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

namespace Google\Cloud\GkeMultiCloud\V1;

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

/**
 * An Anthos node pool running on AWS.
 *
 * Generated from protobuf message <code>google.cloud.gkemulticloud.v1.AwsNodePool</code>
 */
class AwsNodePool extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of this resource.
     * Node pool names are formatted as
     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
     * For more details on Google Cloud resource names,
     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Required. The Kubernetes version to run on this node pool (e.g.
     * `1.19.10-gke.1000`).
     * You can list all supported versions on a given Google Cloud region by
     * calling
     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $version = '';
    /**
     * Required. The configuration of the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $config = null;
    /**
     * Required. Autoscaler configuration for this node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $autoscaling = null;
    /**
     * Required. The subnet where the node pool node run.
     *
     * Generated from protobuf field <code>string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $subnet_id = '';
    /**
     * Output only. The lifecycle state of the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $state = 0;
    /**
     * Output only. A globally unique identifier for the node pool.
     *
     * Generated from protobuf field <code>string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $uid = '';
    /**
     * Output only. If set, there are currently changes in flight to the node
     * pool.
     *
     * Generated from protobuf field <code>bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $reconciling = false;
    /**
     * Output only. The time at which this node pool was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. The time at which this node pool was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * Allows clients to perform consistent read-modify-writes
     * through optimistic concurrency control.
     * Can be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 21;</code>
     */
    private $etag = '';
    /**
     * Optional. Annotations on the node pool.
     * This field has the same restrictions as Kubernetes annotations.
     * The total size of all keys and values combined is limited to 256k.
     * Key can have 2 segments: prefix (optional) and name (required),
     * separated by a slash (/).
     * Prefix must be a DNS subdomain.
     * Name must be 63 characters or less, begin and end with alphanumerics,
     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $annotations;
    /**
     * Required. The constraint on the maximum number of pods that can be run
     * simultaneously on a node in the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $max_pods_constraint = null;
    /**
     * Output only. A set of errors found in the node pool.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $errors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of this resource.
     *           Node pool names are formatted as
     *           `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
     *           For more details on Google Cloud resource names,
     *           see [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *     @type string $version
     *           Required. The Kubernetes version to run on this node pool (e.g.
     *           `1.19.10-gke.1000`).
     *           You can list all supported versions on a given Google Cloud region by
     *           calling
     *           [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
     *     @type \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig $config
     *           Required. The configuration of the node pool.
     *     @type \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling $autoscaling
     *           Required. Autoscaler configuration for this node pool.
     *     @type string $subnet_id
     *           Required. The subnet where the node pool node run.
     *     @type int $state
     *           Output only. The lifecycle state of the node pool.
     *     @type string $uid
     *           Output only. A globally unique identifier for the node pool.
     *     @type bool $reconciling
     *           Output only. If set, there are currently changes in flight to the node
     *           pool.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The time at which this node pool was created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. The time at which this node pool was last updated.
     *     @type string $etag
     *           Allows clients to perform consistent read-modify-writes
     *           through optimistic concurrency control.
     *           Can be sent on update and delete requests to ensure the
     *           client has an up-to-date value before proceeding.
     *     @type array|\Google\Protobuf\Internal\MapField $annotations
     *           Optional. Annotations on the node pool.
     *           This field has the same restrictions as Kubernetes annotations.
     *           The total size of all keys and values combined is limited to 256k.
     *           Key can have 2 segments: prefix (optional) and name (required),
     *           separated by a slash (/).
     *           Prefix must be a DNS subdomain.
     *           Name must be 63 characters or less, begin and end with alphanumerics,
     *           with dashes (-), underscores (_), dots (.), and alphanumerics between.
     *     @type \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $max_pods_constraint
     *           Required. The constraint on the maximum number of pods that can be run
     *           simultaneously on a node in the node pool.
     *     @type array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $errors
     *           Output only. A set of errors found in the node pool.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AwsResources::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of this resource.
     * Node pool names are formatted as
     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
     * For more details on Google Cloud resource names,
     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of this resource.
     * Node pool names are formatted as
     * `projects/<project-number>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
     * For more details on Google Cloud resource names,
     * see [Resource Names](https://cloud.google.com/apis/design/resource_names)
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The Kubernetes version to run on this node pool (e.g.
     * `1.19.10-gke.1000`).
     * You can list all supported versions on a given Google Cloud region by
     * calling
     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getVersion()
    {
        return $this->version;
    }

    /**
     * Required. The Kubernetes version to run on this node pool (e.g.
     * `1.19.10-gke.1000`).
     * You can list all supported versions on a given Google Cloud region by
     * calling
     * [GetAwsServerConfig][google.cloud.gkemulticloud.v1.AwsClusters.GetAwsServerConfig].
     *
     * Generated from protobuf field <code>string version = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->version = $var;

        return $this;
    }

    /**
     * Required. The configuration of the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig|null
     */
    public function getConfig()
    {
        return $this->config;
    }

    public function hasConfig()
    {
        return isset($this->config);
    }

    public function clearConfig()
    {
        unset($this->config);
    }

    /**
     * Required. The configuration of the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodeConfig config = 28 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig $var
     * @return $this
     */
    public function setConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodeConfig::class);
        $this->config = $var;

        return $this;
    }

    /**
     * Required. Autoscaler configuration for this node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling|null
     */
    public function getAutoscaling()
    {
        return $this->autoscaling;
    }

    public function hasAutoscaling()
    {
        return isset($this->autoscaling);
    }

    public function clearAutoscaling()
    {
        unset($this->autoscaling);
    }

    /**
     * Required. Autoscaler configuration for this node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodePoolAutoscaling autoscaling = 25 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling $var
     * @return $this
     */
    public function setAutoscaling($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolAutoscaling::class);
        $this->autoscaling = $var;

        return $this;
    }

    /**
     * Required. The subnet where the node pool node run.
     *
     * Generated from protobuf field <code>string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSubnetId()
    {
        return $this->subnet_id;
    }

    /**
     * Required. The subnet where the node pool node run.
     *
     * Generated from protobuf field <code>string subnet_id = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSubnetId($var)
    {
        GPBUtil::checkString($var, True);
        $this->subnet_id = $var;

        return $this;
    }

    /**
     * Output only. The lifecycle state of the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. The lifecycle state of the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.AwsNodePool.State state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\GkeMultiCloud\V1\AwsNodePool\State::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Output only. A globally unique identifier for the node pool.
     *
     * Generated from protobuf field <code>string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. A globally unique identifier for the node pool.
     *
     * Generated from protobuf field <code>string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

    /**
     * Output only. If set, there are currently changes in flight to the node
     * pool.
     *
     * Generated from protobuf field <code>bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return bool
     */
    public function getReconciling()
    {
        return $this->reconciling;
    }

    /**
     * Output only. If set, there are currently changes in flight to the node
     * pool.
     *
     * Generated from protobuf field <code>bool reconciling = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setReconciling($var)
    {
        GPBUtil::checkBool($var);
        $this->reconciling = $var;

        return $this;
    }

    /**
     * Output only. The time at which this node pool was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. The time at which this node pool was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. The time at which this node pool was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. The time at which this node pool was last updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Allows clients to perform consistent read-modify-writes
     * through optimistic concurrency control.
     * Can be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 21;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * Allows clients to perform consistent read-modify-writes
     * through optimistic concurrency control.
     * Can be sent on update and delete requests to ensure the
     * client has an up-to-date value before proceeding.
     *
     * Generated from protobuf field <code>string etag = 21;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

    /**
     * Optional. Annotations on the node pool.
     * This field has the same restrictions as Kubernetes annotations.
     * The total size of all keys and values combined is limited to 256k.
     * Key can have 2 segments: prefix (optional) and name (required),
     * separated by a slash (/).
     * Prefix must be a DNS subdomain.
     * Name must be 63 characters or less, begin and end with alphanumerics,
     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getAnnotations()
    {
        return $this->annotations;
    }

    /**
     * Optional. Annotations on the node pool.
     * This field has the same restrictions as Kubernetes annotations.
     * The total size of all keys and values combined is limited to 256k.
     * Key can have 2 segments: prefix (optional) and name (required),
     * separated by a slash (/).
     * Prefix must be a DNS subdomain.
     * Name must be 63 characters or less, begin and end with alphanumerics,
     * with dashes (-), underscores (_), dots (.), and alphanumerics between.
     *
     * Generated from protobuf field <code>map<string, string> annotations = 22 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setAnnotations($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->annotations = $arr;

        return $this;
    }

    /**
     * Required. The constraint on the maximum number of pods that can be run
     * simultaneously on a node in the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint|null
     */
    public function getMaxPodsConstraint()
    {
        return $this->max_pods_constraint;
    }

    public function hasMaxPodsConstraint()
    {
        return isset($this->max_pods_constraint);
    }

    public function clearMaxPodsConstraint()
    {
        unset($this->max_pods_constraint);
    }

    /**
     * Required. The constraint on the maximum number of pods that can be run
     * simultaneously on a node in the node pool.
     *
     * Generated from protobuf field <code>.google.cloud.gkemulticloud.v1.MaxPodsConstraint max_pods_constraint = 27 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint $var
     * @return $this
     */
    public function setMaxPodsConstraint($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeMultiCloud\V1\MaxPodsConstraint::class);
        $this->max_pods_constraint = $var;

        return $this;
    }

    /**
     * Output only. A set of errors found in the node pool.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getErrors()
    {
        return $this->errors;
    }

    /**
     * Output only. A set of errors found in the node pool.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkemulticloud.v1.AwsNodePoolError errors = 29 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AwsNodePoolError::class);
        $this->errors = $arr;

        return $this;
    }

}

