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

namespace Google\Cloud\Gaming\V1\DeployedFleetDetails;

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

/**
 * Details about the Agones autoscaler.
 *
 * Generated from protobuf message <code>google.cloud.gaming.v1.DeployedFleetDetails.DeployedFleetAutoscaler</code>
 */
class DeployedFleetAutoscaler extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the Agones autoscaler.
     *
     * Generated from protobuf field <code>string autoscaler = 1;</code>
     */
    private $autoscaler = '';
    /**
     * The source spec that is used to create the autoscaler.
     * The GameServerConfig resource may no longer exist in the system.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.SpecSource spec_source = 4;</code>
     */
    private $spec_source = null;
    /**
     * The autoscaler spec retrieved from Agones.
     *
     * Generated from protobuf field <code>string fleet_autoscaler_spec = 3;</code>
     */
    private $fleet_autoscaler_spec = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $autoscaler
     *           The name of the Agones autoscaler.
     *     @type \Google\Cloud\Gaming\V1\SpecSource $spec_source
     *           The source spec that is used to create the autoscaler.
     *           The GameServerConfig resource may no longer exist in the system.
     *     @type string $fleet_autoscaler_spec
     *           The autoscaler spec retrieved from Agones.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the Agones autoscaler.
     *
     * Generated from protobuf field <code>string autoscaler = 1;</code>
     * @return string
     */
    public function getAutoscaler()
    {
        return $this->autoscaler;
    }

    /**
     * The name of the Agones autoscaler.
     *
     * Generated from protobuf field <code>string autoscaler = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setAutoscaler($var)
    {
        GPBUtil::checkString($var, True);
        $this->autoscaler = $var;

        return $this;
    }

    /**
     * The source spec that is used to create the autoscaler.
     * The GameServerConfig resource may no longer exist in the system.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.SpecSource spec_source = 4;</code>
     * @return \Google\Cloud\Gaming\V1\SpecSource|null
     */
    public function getSpecSource()
    {
        return $this->spec_source;
    }

    public function hasSpecSource()
    {
        return isset($this->spec_source);
    }

    public function clearSpecSource()
    {
        unset($this->spec_source);
    }

    /**
     * The source spec that is used to create the autoscaler.
     * The GameServerConfig resource may no longer exist in the system.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.SpecSource spec_source = 4;</code>
     * @param \Google\Cloud\Gaming\V1\SpecSource $var
     * @return $this
     */
    public function setSpecSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\SpecSource::class);
        $this->spec_source = $var;

        return $this;
    }

    /**
     * The autoscaler spec retrieved from Agones.
     *
     * Generated from protobuf field <code>string fleet_autoscaler_spec = 3;</code>
     * @return string
     */
    public function getFleetAutoscalerSpec()
    {
        return $this->fleet_autoscaler_spec;
    }

    /**
     * The autoscaler spec retrieved from Agones.
     *
     * Generated from protobuf field <code>string fleet_autoscaler_spec = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setFleetAutoscalerSpec($var)
    {
        GPBUtil::checkString($var, True);
        $this->fleet_autoscaler_spec = $var;

        return $this;
    }

}


