<?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;

/**
 * A game server config override.
 *
 * Generated from protobuf message <code>google.cloud.gaming.v1.GameServerConfigOverride</code>
 */
class GameServerConfigOverride extends \Google\Protobuf\Internal\Message
{
    protected $selector;
    protected $change;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Gaming\V1\RealmSelector $realms_selector
     *           Selector for choosing applicable realms.
     *     @type string $config_version
     *           The game server config for this override.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gaming\V1\GameServerDeployments::initOnce();
        parent::__construct($data);
    }

    /**
     * Selector for choosing applicable realms.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.RealmSelector realms_selector = 1;</code>
     * @return \Google\Cloud\Gaming\V1\RealmSelector
     */
    public function getRealmsSelector()
    {
        return $this->readOneof(1);
    }

    public function hasRealmsSelector()
    {
        return $this->hasOneof(1);
    }

    /**
     * Selector for choosing applicable realms.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.RealmSelector realms_selector = 1;</code>
     * @param \Google\Cloud\Gaming\V1\RealmSelector $var
     * @return $this
     */
    public function setRealmsSelector($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\RealmSelector::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The game server config for this override.
     *
     * Generated from protobuf field <code>string config_version = 100;</code>
     * @return string
     */
    public function getConfigVersion()
    {
        return $this->readOneof(100);
    }

    public function hasConfigVersion()
    {
        return $this->hasOneof(100);
    }

    /**
     * The game server config for this override.
     *
     * Generated from protobuf field <code>string config_version = 100;</code>
     * @param string $var
     * @return $this
     */
    public function setConfigVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(100, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getSelector()
    {
        return $this->whichOneof("selector");
    }

    /**
     * @return string
     */
    public function getChange()
    {
        return $this->whichOneof("change");
    }

}

