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

namespace Google\Cloud\Dataproc\V1;

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

/**
 * Node Group Affinity for clusters using sole-tenant node groups.
 * **The Dataproc `NodeGroupAffinity` resource is not related to the
 * Dataproc [NodeGroup][google.cloud.dataproc.v1.NodeGroup] resource.**
 *
 * Generated from protobuf message <code>google.cloud.dataproc.v1.NodeGroupAffinity</code>
 */
class NodeGroupAffinity extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The URI of a
     * sole-tenant [node group
     * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
     * that the cluster will be created on.
     * A full URL, partial URI, or node group name are valid. Examples:
     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1`
     * * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1`
     * * `node-group-1`
     *
     * Generated from protobuf field <code>string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $node_group_uri = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $node_group_uri
     *           Required. The URI of a
     *           sole-tenant [node group
     *           resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
     *           that the cluster will be created on.
     *           A full URL, partial URI, or node group name are valid. Examples:
     *           * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1`
     *           * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1`
     *           * `node-group-1`
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataproc\V1\Clusters::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The URI of a
     * sole-tenant [node group
     * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
     * that the cluster will be created on.
     * A full URL, partial URI, or node group name are valid. Examples:
     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1`
     * * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1`
     * * `node-group-1`
     *
     * Generated from protobuf field <code>string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getNodeGroupUri()
    {
        return $this->node_group_uri;
    }

    /**
     * Required. The URI of a
     * sole-tenant [node group
     * resource](https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
     * that the cluster will be created on.
     * A full URL, partial URI, or node group name are valid. Examples:
     * * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/nodeGroups/node-group-1`
     * * `projects/[project_id]/zones/[zone]/nodeGroups/node-group-1`
     * * `node-group-1`
     *
     * Generated from protobuf field <code>string node_group_uri = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setNodeGroupUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->node_group_uri = $var;

        return $this;
    }

}

