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

namespace Google\Cloud\Gaming\V1;

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

/**
 * Response message for PreviewGameServerDeploymentRollout.
 * This has details about the Agones fleet and autoscaler to be actuated.
 *
 * Generated from protobuf message <code>google.cloud.gaming.v1.PreviewGameServerDeploymentRolloutResponse</code>
 */
class PreviewGameServerDeploymentRolloutResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Locations that could not be reached on this request.
     *
     * Generated from protobuf field <code>repeated string unavailable = 2;</code>
     */
    private $unavailable;
    /**
     * ETag of the game server deployment.
     *
     * Generated from protobuf field <code>string etag = 3;</code>
     */
    private $etag = '';
    /**
     * The target state.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.TargetState target_state = 4;</code>
     */
    private $target_state = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $unavailable
     *           Locations that could not be reached on this request.
     *     @type string $etag
     *           ETag of the game server deployment.
     *     @type \Google\Cloud\Gaming\V1\TargetState $target_state
     *           The target state.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce();
        parent::__construct($data);
    }

    /**
     * Locations that could not be reached on this request.
     *
     * Generated from protobuf field <code>repeated string unavailable = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUnavailable()
    {
        return $this->unavailable;
    }

    /**
     * Locations that could not be reached on this request.
     *
     * Generated from protobuf field <code>repeated string unavailable = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUnavailable($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->unavailable = $arr;

        return $this;
    }

    /**
     * ETag of the game server deployment.
     *
     * Generated from protobuf field <code>string etag = 3;</code>
     * @return string
     */
    public function getEtag()
    {
        return $this->etag;
    }

    /**
     * ETag of the game server deployment.
     *
     * Generated from protobuf field <code>string etag = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setEtag($var)
    {
        GPBUtil::checkString($var, True);
        $this->etag = $var;

        return $this;
    }

    /**
     * The target state.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.TargetState target_state = 4;</code>
     * @return \Google\Cloud\Gaming\V1\TargetState|null
     */
    public function getTargetState()
    {
        return $this->target_state;
    }

    public function hasTargetState()
    {
        return isset($this->target_state);
    }

    public function clearTargetState()
    {
        unset($this->target_state);
    }

    /**
     * The target state.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.TargetState target_state = 4;</code>
     * @param \Google\Cloud\Gaming\V1\TargetState $var
     * @return $this
     */
    public function setTargetState($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\TargetState::class);
        $this->target_state = $var;

        return $this;
    }

}

