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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.ReservationBlockPhysicalTopology</code>
 */
class ReservationBlockPhysicalTopology extends \Google\Protobuf\Internal\Message
{
    /**
     * The hash of the capacity block within the cluster.
     *
     * Generated from protobuf field <code>optional string block = 93832333;</code>
     */
    protected $block = null;
    /**
     * The cluster name of the reservation block.
     *
     * Generated from protobuf field <code>optional string cluster = 335221242;</code>
     */
    protected $cluster = null;
    /**
     * Output only. The detailed instances information for a given Block
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ReservationBlockPhysicalTopologyInstance instances = 29097598;</code>
     */
    private $instances;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $block
     *           The hash of the capacity block within the cluster.
     *     @type string $cluster
     *           The cluster name of the reservation block.
     *     @type array<\Google\Cloud\Compute\V1\ReservationBlockPhysicalTopologyInstance>|\Google\Protobuf\Internal\RepeatedField $instances
     *           Output only. The detailed instances information for a given Block
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The hash of the capacity block within the cluster.
     *
     * Generated from protobuf field <code>optional string block = 93832333;</code>
     * @return string
     */
    public function getBlock()
    {
        return isset($this->block) ? $this->block : '';
    }

    public function hasBlock()
    {
        return isset($this->block);
    }

    public function clearBlock()
    {
        unset($this->block);
    }

    /**
     * The hash of the capacity block within the cluster.
     *
     * Generated from protobuf field <code>optional string block = 93832333;</code>
     * @param string $var
     * @return $this
     */
    public function setBlock($var)
    {
        GPBUtil::checkString($var, True);
        $this->block = $var;

        return $this;
    }

    /**
     * The cluster name of the reservation block.
     *
     * Generated from protobuf field <code>optional string cluster = 335221242;</code>
     * @return string
     */
    public function getCluster()
    {
        return isset($this->cluster) ? $this->cluster : '';
    }

    public function hasCluster()
    {
        return isset($this->cluster);
    }

    public function clearCluster()
    {
        unset($this->cluster);
    }

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

        return $this;
    }

    /**
     * Output only. The detailed instances information for a given Block
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ReservationBlockPhysicalTopologyInstance instances = 29097598;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInstances()
    {
        return $this->instances;
    }

    /**
     * Output only. The detailed instances information for a given Block
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ReservationBlockPhysicalTopologyInstance instances = 29097598;</code>
     * @param array<\Google\Cloud\Compute\V1\ReservationBlockPhysicalTopologyInstance>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInstances($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\ReservationBlockPhysicalTopologyInstance::class);
        $this->instances = $arr;

        return $this;
    }

}

