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

namespace Google\Cloud\Gaming\V1;

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

/**
 * Encapsulates Agones fleet spec and Agones autoscaler spec sources.
 *
 * Generated from protobuf message <code>google.cloud.gaming.v1.SpecSource</code>
 */
class SpecSource extends \Google\Protobuf\Internal\Message
{
    /**
     * The game server config resource. Uses the form:
     * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`.
     *
     * Generated from protobuf field <code>string game_server_config_name = 1;</code>
     */
    private $game_server_config_name = '';
    /**
     * The name of the Agones leet config or Agones scaling config used to derive
     * the Agones fleet or Agones autoscaler spec.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     */
    private $name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $game_server_config_name
     *           The game server config resource. Uses the form:
     *           `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`.
     *     @type string $name
     *           The name of the Agones leet config or Agones scaling config used to derive
     *           the Agones fleet or Agones autoscaler spec.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gaming\V1\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * The game server config resource. Uses the form:
     * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`.
     *
     * Generated from protobuf field <code>string game_server_config_name = 1;</code>
     * @return string
     */
    public function getGameServerConfigName()
    {
        return $this->game_server_config_name;
    }

    /**
     * The game server config resource. Uses the form:
     * `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`.
     *
     * Generated from protobuf field <code>string game_server_config_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setGameServerConfigName($var)
    {
        GPBUtil::checkString($var, True);
        $this->game_server_config_name = $var;

        return $this;
    }

    /**
     * The name of the Agones leet config or Agones scaling config used to derive
     * the Agones fleet or Agones autoscaler spec.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of the Agones leet config or Agones scaling config used to derive
     * the Agones fleet or Agones autoscaler spec.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

