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

namespace Google\Cloud\Gaming\V1;

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

/**
 * Request message for RealmsService.CreateRealm.
 *
 * Generated from protobuf message <code>google.cloud.gaming.v1.CreateRealmRequest</code>
 */
class CreateRealmRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource name, in the following form:
     * `projects/{project}/locations/{location}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The ID of the realm resource to be created.
     *
     * Generated from protobuf field <code>string realm_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $realm_id = '';
    /**
     * Required. The realm resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $realm = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource name, in the following form:
     *           `projects/{project}/locations/{location}`.
     *     @type string $realm_id
     *           Required. The ID of the realm resource to be created.
     *     @type \Google\Cloud\Gaming\V1\Realm $realm
     *           Required. The realm resource to be created.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gaming\V1\Realms::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource name, in the following form:
     * `projects/{project}/locations/{location}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent resource name, in the following form:
     * `projects/{project}/locations/{location}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. The ID of the realm resource to be created.
     *
     * Generated from protobuf field <code>string realm_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRealmId()
    {
        return $this->realm_id;
    }

    /**
     * Required. The ID of the realm resource to be created.
     *
     * Generated from protobuf field <code>string realm_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRealmId($var)
    {
        GPBUtil::checkString($var, True);
        $this->realm_id = $var;

        return $this;
    }

    /**
     * Required. The realm resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Gaming\V1\Realm|null
     */
    public function getRealm()
    {
        return $this->realm;
    }

    public function hasRealm()
    {
        return isset($this->realm);
    }

    public function clearRealm()
    {
        unset($this->realm);
    }

    /**
     * Required. The realm resource to be created.
     *
     * Generated from protobuf field <code>.google.cloud.gaming.v1.Realm realm = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Gaming\V1\Realm $var
     * @return $this
     */
    public function setRealm($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Gaming\V1\Realm::class);
        $this->realm = $var;

        return $this;
    }

}

