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

namespace Google\Cloud\ApiGateway\V1;

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

/**
 * Request message for ApiGatewayService.CreateGateway
 *
 * Generated from protobuf message <code>google.cloud.apigateway.v1.CreateGatewayRequest</code>
 */
class CreateGatewayRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Parent resource of the Gateway, of the form:
     * `projects/&#42;&#47;locations/&#42;`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. Identifier to assign to the Gateway. Must be unique within scope of
     * the parent resource.
     *
     * Generated from protobuf field <code>string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $gateway_id = '';
    /**
     * Required. Gateway resource.
     *
     * Generated from protobuf field <code>.google.cloud.apigateway.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $gateway = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. Parent resource of the Gateway, of the form:
     *           `projects/&#42;&#47;locations/&#42;`
     *     @type string $gateway_id
     *           Required. Identifier to assign to the Gateway. Must be unique within scope of
     *           the parent resource.
     *     @type \Google\Cloud\ApiGateway\V1\Gateway $gateway
     *           Required. Gateway resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apigateway\V1\Apigateway::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Parent resource of the Gateway, of the form:
     * `projects/&#42;&#47;locations/&#42;`
     *
     * 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. Parent resource of the Gateway, of the form:
     * `projects/&#42;&#47;locations/&#42;`
     *
     * 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. Identifier to assign to the Gateway. Must be unique within scope of
     * the parent resource.
     *
     * Generated from protobuf field <code>string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getGatewayId()
    {
        return $this->gateway_id;
    }

    /**
     * Required. Identifier to assign to the Gateway. Must be unique within scope of
     * the parent resource.
     *
     * Generated from protobuf field <code>string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setGatewayId($var)
    {
        GPBUtil::checkString($var, True);
        $this->gateway_id = $var;

        return $this;
    }

    /**
     * Required. Gateway resource.
     *
     * Generated from protobuf field <code>.google.cloud.apigateway.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ApiGateway\V1\Gateway|null
     */
    public function getGateway()
    {
        return isset($this->gateway) ? $this->gateway : null;
    }

    public function hasGateway()
    {
        return isset($this->gateway);
    }

    public function clearGateway()
    {
        unset($this->gateway);
    }

    /**
     * Required. Gateway resource.
     *
     * Generated from protobuf field <code>.google.cloud.apigateway.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ApiGateway\V1\Gateway $var
     * @return $this
     */
    public function setGateway($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiGateway\V1\Gateway::class);
        $this->gateway = $var;

        return $this;
    }

}

