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

namespace Google\Cloud\Container\V1;

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

/**
 * SetLabelsRequest sets the Google Cloud Platform labels on a Google Container
 * Engine cluster, which will in turn set them for Google Compute Engine
 * resources used by that cluster
 *
 * Generated from protobuf message <code>google.container.v1.SetLabelsRequest</code>
 */
class SetLabelsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The Google Developers Console [project ID or project
     * number](https://developers.google.com/console/help/new/#projectnumber).
     *
     * Generated from protobuf field <code>string project_id = 1;</code>
     */
    private $project_id = '';
    /**
     * The name of the Google Compute Engine
     * [zone](/compute/docs/zones#available) in which the cluster
     * resides.
     *
     * Generated from protobuf field <code>string zone = 2;</code>
     */
    private $zone = '';
    /**
     * The name of the cluster.
     *
     * Generated from protobuf field <code>string cluster_id = 3;</code>
     */
    private $cluster_id = '';
    /**
     * The labels to set for that cluster.
     *
     * Generated from protobuf field <code>map<string, string> resource_labels = 4;</code>
     */
    private $resource_labels;
    /**
     * The fingerprint of the previous set of labels for this resource,
     * used to detect conflicts. The fingerprint is initially generated by
     * Container Engine and changes after every request to modify or update
     * labels. You must always provide an up-to-date fingerprint hash when
     * updating or changing labels. Make a <code>get()</code> request to the
     * resource to get the latest fingerprint.
     *
     * Generated from protobuf field <code>string label_fingerprint = 5;</code>
     */
    private $label_fingerprint = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $project_id
     *           The Google Developers Console [project ID or project
     *           number](https://developers.google.com/console/help/new/#projectnumber).
     *     @type string $zone
     *           The name of the Google Compute Engine
     *           [zone](/compute/docs/zones#available) in which the cluster
     *           resides.
     *     @type string $cluster_id
     *           The name of the cluster.
     *     @type array|\Google\Protobuf\Internal\MapField $resource_labels
     *           The labels to set for that cluster.
     *     @type string $label_fingerprint
     *           The fingerprint of the previous set of labels for this resource,
     *           used to detect conflicts. The fingerprint is initially generated by
     *           Container Engine and changes after every request to modify or update
     *           labels. You must always provide an up-to-date fingerprint hash when
     *           updating or changing labels. Make a <code>get()</code> request to the
     *           resource to get the latest fingerprint.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * The Google Developers Console [project ID or project
     * number](https://developers.google.com/console/help/new/#projectnumber).
     *
     * Generated from protobuf field <code>string project_id = 1;</code>
     * @return string
     */
    public function getProjectId()
    {
        return $this->project_id;
    }

    /**
     * The Google Developers Console [project ID or project
     * number](https://developers.google.com/console/help/new/#projectnumber).
     *
     * Generated from protobuf field <code>string project_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setProjectId($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id = $var;

        return $this;
    }

    /**
     * The name of the Google Compute Engine
     * [zone](/compute/docs/zones#available) in which the cluster
     * resides.
     *
     * Generated from protobuf field <code>string zone = 2;</code>
     * @return string
     */
    public function getZone()
    {
        return $this->zone;
    }

    /**
     * The name of the Google Compute Engine
     * [zone](/compute/docs/zones#available) in which the cluster
     * resides.
     *
     * Generated from protobuf field <code>string zone = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setZone($var)
    {
        GPBUtil::checkString($var, True);
        $this->zone = $var;

        return $this;
    }

    /**
     * The name of the cluster.
     *
     * Generated from protobuf field <code>string cluster_id = 3;</code>
     * @return string
     */
    public function getClusterId()
    {
        return $this->cluster_id;
    }

    /**
     * The name of the cluster.
     *
     * Generated from protobuf field <code>string cluster_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setClusterId($var)
    {
        GPBUtil::checkString($var, True);
        $this->cluster_id = $var;

        return $this;
    }

    /**
     * The labels to set for that cluster.
     *
     * Generated from protobuf field <code>map<string, string> resource_labels = 4;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getResourceLabels()
    {
        return $this->resource_labels;
    }

    /**
     * The labels to set for that cluster.
     *
     * Generated from protobuf field <code>map<string, string> resource_labels = 4;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setResourceLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->resource_labels = $arr;

        return $this;
    }

    /**
     * The fingerprint of the previous set of labels for this resource,
     * used to detect conflicts. The fingerprint is initially generated by
     * Container Engine and changes after every request to modify or update
     * labels. You must always provide an up-to-date fingerprint hash when
     * updating or changing labels. Make a <code>get()</code> request to the
     * resource to get the latest fingerprint.
     *
     * Generated from protobuf field <code>string label_fingerprint = 5;</code>
     * @return string
     */
    public function getLabelFingerprint()
    {
        return $this->label_fingerprint;
    }

    /**
     * The fingerprint of the previous set of labels for this resource,
     * used to detect conflicts. The fingerprint is initially generated by
     * Container Engine and changes after every request to modify or update
     * labels. You must always provide an up-to-date fingerprint hash when
     * updating or changing labels. Make a <code>get()</code> request to the
     * resource to get the latest fingerprint.
     *
     * Generated from protobuf field <code>string label_fingerprint = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setLabelFingerprint($var)
    {
        GPBUtil::checkString($var, True);
        $this->label_fingerprint = $var;

        return $this;
    }

}

