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

namespace Google\Cloud\ApigeeRegistry\V1;

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

/**
 * Request message for CreateApiDeployment.
 *
 * Generated from protobuf message <code>google.cloud.apigeeregistry.v1.CreateApiDeploymentRequest</code>
 */
class CreateApiDeploymentRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent, which owns this collection of deployments.
     * Format: `projects/&#42;&#47;locations/&#42;&#47;apis/&#42;`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The deployment to create.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $api_deployment = null;
    /**
     * Required. The ID to use for the deployment, which will become the final component of
     * the deployment's resource name.
     * This value should be 4-63 characters, and valid characters
     * are /[a-z][0-9]-/.
     * Following AIP-162, IDs must not have the form of a UUID.
     *
     * Generated from protobuf field <code>string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $api_deployment_id = '';

    /**
     * @param string                                        $parent          Required. The parent, which owns this collection of deployments.
     *                                                                       Format: `projects/&#42;/locations/&#42;/apis/*`
     *                                                                       Please see {@see RegistryClient::apiName()} for help formatting this field.
     * @param \Google\Cloud\ApigeeRegistry\V1\ApiDeployment $apiDeployment   Required. The deployment to create.
     * @param string                                        $apiDeploymentId Required. The ID to use for the deployment, which will become the final component of
     *                                                                       the deployment's resource name.
     *
     *                                                                       This value should be 4-63 characters, and valid characters
     *                                                                       are /[a-z][0-9]-/.
     *
     *                                                                       Following AIP-162, IDs must not have the form of a UUID.
     *
     * @return \Google\Cloud\ApigeeRegistry\V1\CreateApiDeploymentRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\ApigeeRegistry\V1\ApiDeployment $apiDeployment, string $apiDeploymentId): self
    {
        return (new self())
            ->setParent($parent)
            ->setApiDeployment($apiDeployment)
            ->setApiDeploymentId($apiDeploymentId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent, which owns this collection of deployments.
     *           Format: `projects/&#42;&#47;locations/&#42;&#47;apis/&#42;`
     *     @type \Google\Cloud\ApigeeRegistry\V1\ApiDeployment $api_deployment
     *           Required. The deployment to create.
     *     @type string $api_deployment_id
     *           Required. The ID to use for the deployment, which will become the final component of
     *           the deployment's resource name.
     *           This value should be 4-63 characters, and valid characters
     *           are /[a-z][0-9]-/.
     *           Following AIP-162, IDs must not have the form of a UUID.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apigeeregistry\V1\RegistryService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent, which owns this collection of deployments.
     * Format: `projects/&#42;&#47;locations/&#42;&#47;apis/&#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. The parent, which owns this collection of deployments.
     * Format: `projects/&#42;&#47;locations/&#42;&#47;apis/&#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. The deployment to create.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ApigeeRegistry\V1\ApiDeployment|null
     */
    public function getApiDeployment()
    {
        return $this->api_deployment;
    }

    public function hasApiDeployment()
    {
        return isset($this->api_deployment);
    }

    public function clearApiDeployment()
    {
        unset($this->api_deployment);
    }

    /**
     * Required. The deployment to create.
     *
     * Generated from protobuf field <code>.google.cloud.apigeeregistry.v1.ApiDeployment api_deployment = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ApigeeRegistry\V1\ApiDeployment $var
     * @return $this
     */
    public function setApiDeployment($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApigeeRegistry\V1\ApiDeployment::class);
        $this->api_deployment = $var;

        return $this;
    }

    /**
     * Required. The ID to use for the deployment, which will become the final component of
     * the deployment's resource name.
     * This value should be 4-63 characters, and valid characters
     * are /[a-z][0-9]-/.
     * Following AIP-162, IDs must not have the form of a UUID.
     *
     * Generated from protobuf field <code>string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getApiDeploymentId()
    {
        return $this->api_deployment_id;
    }

    /**
     * Required. The ID to use for the deployment, which will become the final component of
     * the deployment's resource name.
     * This value should be 4-63 characters, and valid characters
     * are /[a-z][0-9]-/.
     * Following AIP-162, IDs must not have the form of a UUID.
     *
     * Generated from protobuf field <code>string api_deployment_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setApiDeploymentId($var)
    {
        GPBUtil::checkString($var, True);
        $this->api_deployment_id = $var;

        return $this;
    }

}

