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

namespace Google\Cloud\AlloyDb\V1beta\Cluster;

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

/**
 * Configuration information for the secondary cluster. This should be set
 * if and only if the cluster is of type SECONDARY.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1beta.Cluster.SecondaryConfig</code>
 */
class SecondaryConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the primary cluster name with the format:
     * * projects/{project}/locations/{region}/clusters/{cluster_id}
     *
     * Generated from protobuf field <code>string primary_cluster_name = 1;</code>
     */
    protected $primary_cluster_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $primary_cluster_name
     *           The name of the primary cluster name with the format:
     *           * projects/{project}/locations/{region}/clusters/{cluster_id}
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1Beta\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the primary cluster name with the format:
     * * projects/{project}/locations/{region}/clusters/{cluster_id}
     *
     * Generated from protobuf field <code>string primary_cluster_name = 1;</code>
     * @return string
     */
    public function getPrimaryClusterName()
    {
        return $this->primary_cluster_name;
    }

    /**
     * The name of the primary cluster name with the format:
     * * projects/{project}/locations/{region}/clusters/{cluster_id}
     *
     * Generated from protobuf field <code>string primary_cluster_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPrimaryClusterName($var)
    {
        GPBUtil::checkString($var, True);
        $this->primary_cluster_name = $var;

        return $this;
    }

}


