<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/alloydb/v1/resources.proto

namespace Google\Cloud\AlloyDb\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Message describing Database object.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.Database</code>
 */
class Database extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. Name of the resource in the form of
     * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Optional. Charset for the database.
     * This field can contain any PostgreSQL supported charset name.
     * Example values include "UTF8", "SQL_ASCII", etc.
     *
     * Generated from protobuf field <code>string charset = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $charset = '';
    /**
     * Optional. Collation for the database.
     * Name of the custom or native collation for postgres.
     * Example values include "C", "POSIX", etc
     *
     * Generated from protobuf field <code>string collation = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $collation = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. Name of the resource in the form of
     *           `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
     *     @type string $charset
     *           Optional. Charset for the database.
     *           This field can contain any PostgreSQL supported charset name.
     *           Example values include "UTF8", "SQL_ASCII", etc.
     *     @type string $collation
     *           Optional. Collation for the database.
     *           Name of the custom or native collation for postgres.
     *           Example values include "C", "POSIX", etc
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. Name of the resource in the form of
     * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. Name of the resource in the form of
     * `projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. Charset for the database.
     * This field can contain any PostgreSQL supported charset name.
     * Example values include "UTF8", "SQL_ASCII", etc.
     *
     * Generated from protobuf field <code>string charset = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCharset()
    {
        return $this->charset;
    }

    /**
     * Optional. Charset for the database.
     * This field can contain any PostgreSQL supported charset name.
     * Example values include "UTF8", "SQL_ASCII", etc.
     *
     * Generated from protobuf field <code>string charset = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setCharset($var)
    {
        GPBUtil::checkString($var, True);
        $this->charset = $var;

        return $this;
    }

    /**
     * Optional. Collation for the database.
     * Name of the custom or native collation for postgres.
     * Example values include "C", "POSIX", etc
     *
     * Generated from protobuf field <code>string collation = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCollation()
    {
        return $this->collation;
    }

    /**
     * Optional. Collation for the database.
     * Name of the custom or native collation for postgres.
     * Example values include "C", "POSIX", etc
     *
     * Generated from protobuf field <code>string collation = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setCollation($var)
    {
        GPBUtil::checkString($var, True);
        $this->collation = $var;

        return $this;
    }

}

