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

namespace Google\Cloud\Dataproc\V1;

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

/**
 * Dataproc job config.
 *
 * Generated from protobuf message <code>google.cloud.dataproc.v1.JobPlacement</code>
 */
class JobPlacement extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the cluster where the job will be submitted.
     *
     * Generated from protobuf field <code>string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $cluster_name = '';
    /**
     * Output only. A cluster UUID generated by the Dataproc service when
     * the job is submitted.
     *
     * Generated from protobuf field <code>string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $cluster_uuid = '';
    /**
     * Optional. Cluster labels to identify a cluster where the job will be
     * submitted.
     *
     * Generated from protobuf field <code>map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $cluster_labels;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $cluster_name
     *           Required. The name of the cluster where the job will be submitted.
     *     @type string $cluster_uuid
     *           Output only. A cluster UUID generated by the Dataproc service when
     *           the job is submitted.
     *     @type array|\Google\Protobuf\Internal\MapField $cluster_labels
     *           Optional. Cluster labels to identify a cluster where the job will be
     *           submitted.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataproc\V1\Jobs::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the cluster where the job will be submitted.
     *
     * Generated from protobuf field <code>string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getClusterName()
    {
        return $this->cluster_name;
    }

    /**
     * Required. The name of the cluster where the job will be submitted.
     *
     * Generated from protobuf field <code>string cluster_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setClusterName($var)
    {
        GPBUtil::checkString($var, True);
        $this->cluster_name = $var;

        return $this;
    }

    /**
     * Output only. A cluster UUID generated by the Dataproc service when
     * the job is submitted.
     *
     * Generated from protobuf field <code>string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getClusterUuid()
    {
        return $this->cluster_uuid;
    }

    /**
     * Output only. A cluster UUID generated by the Dataproc service when
     * the job is submitted.
     *
     * Generated from protobuf field <code>string cluster_uuid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setClusterUuid($var)
    {
        GPBUtil::checkString($var, True);
        $this->cluster_uuid = $var;

        return $this;
    }

    /**
     * Optional. Cluster labels to identify a cluster where the job will be
     * submitted.
     *
     * Generated from protobuf field <code>map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getClusterLabels()
    {
        return $this->cluster_labels;
    }

    /**
     * Optional. Cluster labels to identify a cluster where the job will be
     * submitted.
     *
     * Generated from protobuf field <code>map<string, string> cluster_labels = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setClusterLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->cluster_labels = $arr;

        return $this;
    }

}

