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

namespace Google\Cloud\AlloyDb\V1alpha\Instance;

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

/**
 * Details of a single node in the instance.
 * Nodes in an AlloyDB instance are ephemereal, they can change during
 * update, failover, autohealing and resize operations.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1alpha.Instance.Node</code>
 */
class Node extends \Google\Protobuf\Internal\Message
{
    /**
     * The Compute Engine zone of the VM e.g. "us-central1-b".
     *
     * Generated from protobuf field <code>string zone_id = 1;</code>
     */
    protected $zone_id = '';
    /**
     * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
     *
     * Generated from protobuf field <code>string id = 2;</code>
     */
    protected $id = '';
    /**
     * The private IP address of the VM e.g. "10.57.0.34".
     *
     * Generated from protobuf field <code>string ip = 3;</code>
     */
    protected $ip = '';
    /**
     * Determined by state of the compute VM and postgres-service health.
     * Compute VM state can have values listed in
     * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
     * postgres-service health can have values: HEALTHY and UNHEALTHY.
     *
     * Generated from protobuf field <code>string state = 4;</code>
     */
    protected $state = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $zone_id
     *           The Compute Engine zone of the VM e.g. "us-central1-b".
     *     @type string $id
     *           The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
     *     @type string $ip
     *           The private IP address of the VM e.g. "10.57.0.34".
     *     @type string $state
     *           Determined by state of the compute VM and postgres-service health.
     *           Compute VM state can have values listed in
     *           https://cloud.google.com/compute/docs/instances/instance-life-cycle and
     *           postgres-service health can have values: HEALTHY and UNHEALTHY.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1Alpha\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * The Compute Engine zone of the VM e.g. "us-central1-b".
     *
     * Generated from protobuf field <code>string zone_id = 1;</code>
     * @return string
     */
    public function getZoneId()
    {
        return $this->zone_id;
    }

    /**
     * The Compute Engine zone of the VM e.g. "us-central1-b".
     *
     * Generated from protobuf field <code>string zone_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setZoneId($var)
    {
        GPBUtil::checkString($var, True);
        $this->zone_id = $var;

        return $this;
    }

    /**
     * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
     *
     * Generated from protobuf field <code>string id = 2;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
     *
     * Generated from protobuf field <code>string id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * The private IP address of the VM e.g. "10.57.0.34".
     *
     * Generated from protobuf field <code>string ip = 3;</code>
     * @return string
     */
    public function getIp()
    {
        return $this->ip;
    }

    /**
     * The private IP address of the VM e.g. "10.57.0.34".
     *
     * Generated from protobuf field <code>string ip = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setIp($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip = $var;

        return $this;
    }

    /**
     * Determined by state of the compute VM and postgres-service health.
     * Compute VM state can have values listed in
     * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
     * postgres-service health can have values: HEALTHY and UNHEALTHY.
     *
     * Generated from protobuf field <code>string state = 4;</code>
     * @return string
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Determined by state of the compute VM and postgres-service health.
     * Compute VM state can have values listed in
     * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
     * postgres-service health can have values: HEALTHY and UNHEALTHY.
     *
     * Generated from protobuf field <code>string state = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkString($var, True);
        $this->state = $var;

        return $this;
    }

}


