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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Request message for
 * [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1.EndpointService.CreateEndpoint].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.CreateEndpointRequest</code>
 */
class CreateEndpointRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the Location to create the Endpoint in.
     * Format: `projects/{project}/locations/{location}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The Endpoint to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $endpoint = null;
    /**
     * Immutable. The ID to use for endpoint, which will become the final
     * component of the endpoint resource name.
     * If not provided, Vertex AI will generate a value for this ID.
     * If the first character is a letter, this value may be up to 63 characters,
     * and valid characters are `[a-z0-9-]`. The last character must be a letter
     * or number.
     * If the first character is a number, this value may be up to 9 characters,
     * and valid characters are `[0-9]` with no leading zeros.
     * When using HTTP/JSON, this field is populated
     * based on a query string argument, such as `?endpoint_id=12345`. This is the
     * fallback for fields that are not included in either the URI or the body.
     *
     * Generated from protobuf field <code>string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    protected $endpoint_id = '';

    /**
     * @param string                               $parent   Required. The resource name of the Location to create the Endpoint in.
     *                                                       Format: `projects/{project}/locations/{location}`
     *                                                       Please see {@see EndpointServiceClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\AIPlatform\V1\Endpoint $endpoint Required. The Endpoint to create.
     *
     * @return \Google\Cloud\AIPlatform\V1\CreateEndpointRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\AIPlatform\V1\Endpoint $endpoint): self
    {
        return (new self())
            ->setParent($parent)
            ->setEndpoint($endpoint);
    }

    /**
     * @param string                               $parent     Required. The resource name of the Location to create the Endpoint in.
     *                                                         Format: `projects/{project}/locations/{location}`
     *                                                         Please see {@see EndpointServiceClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\AIPlatform\V1\Endpoint $endpoint   Required. The Endpoint to create.
     * @param string                               $endpointId Immutable. The ID to use for endpoint, which will become the final
     *                                                         component of the endpoint resource name.
     *                                                         If not provided, Vertex AI will generate a value for this ID.
     *
     *                                                         If the first character is a letter, this value may be up to 63 characters,
     *                                                         and valid characters are `[a-z0-9-]`. The last character must be a letter
     *                                                         or number.
     *
     *                                                         If the first character is a number, this value may be up to 9 characters,
     *                                                         and valid characters are `[0-9]` with no leading zeros.
     *
     *                                                         When using HTTP/JSON, this field is populated
     *                                                         based on a query string argument, such as `?endpoint_id=12345`. This is the
     *                                                         fallback for fields that are not included in either the URI or the body.
     *
     * @return \Google\Cloud\AIPlatform\V1\CreateEndpointRequest
     *
     * @experimental
     */
    public static function buildFromParentEndpointEndpointId(string $parent, \Google\Cloud\AIPlatform\V1\Endpoint $endpoint, string $endpointId): self
    {
        return (new self())
            ->setParent($parent)
            ->setEndpoint($endpoint)
            ->setEndpointId($endpointId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the Location to create the Endpoint in.
     *           Format: `projects/{project}/locations/{location}`
     *     @type \Google\Cloud\AIPlatform\V1\Endpoint $endpoint
     *           Required. The Endpoint to create.
     *     @type string $endpoint_id
     *           Immutable. The ID to use for endpoint, which will become the final
     *           component of the endpoint resource name.
     *           If not provided, Vertex AI will generate a value for this ID.
     *           If the first character is a letter, this value may be up to 63 characters,
     *           and valid characters are `[a-z0-9-]`. The last character must be a letter
     *           or number.
     *           If the first character is a number, this value may be up to 9 characters,
     *           and valid characters are `[0-9]` with no leading zeros.
     *           When using HTTP/JSON, this field is populated
     *           based on a query string argument, such as `?endpoint_id=12345`. This is the
     *           fallback for fields that are not included in either the URI or the body.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\EndpointService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the Location to create the Endpoint in.
     * Format: `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 resource name of the Location to create the Endpoint in.
     * Format: `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 Endpoint to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.Endpoint endpoint = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\Endpoint|null
     */
    public function getEndpoint()
    {
        return $this->endpoint;
    }

    public function hasEndpoint()
    {
        return isset($this->endpoint);
    }

    public function clearEndpoint()
    {
        unset($this->endpoint);
    }

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

        return $this;
    }

    /**
     * Immutable. The ID to use for endpoint, which will become the final
     * component of the endpoint resource name.
     * If not provided, Vertex AI will generate a value for this ID.
     * If the first character is a letter, this value may be up to 63 characters,
     * and valid characters are `[a-z0-9-]`. The last character must be a letter
     * or number.
     * If the first character is a number, this value may be up to 9 characters,
     * and valid characters are `[0-9]` with no leading zeros.
     * When using HTTP/JSON, this field is populated
     * based on a query string argument, such as `?endpoint_id=12345`. This is the
     * fallback for fields that are not included in either the URI or the body.
     *
     * Generated from protobuf field <code>string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return string
     */
    public function getEndpointId()
    {
        return $this->endpoint_id;
    }

    /**
     * Immutable. The ID to use for endpoint, which will become the final
     * component of the endpoint resource name.
     * If not provided, Vertex AI will generate a value for this ID.
     * If the first character is a letter, this value may be up to 63 characters,
     * and valid characters are `[a-z0-9-]`. The last character must be a letter
     * or number.
     * If the first character is a number, this value may be up to 9 characters,
     * and valid characters are `[0-9]` with no leading zeros.
     * When using HTTP/JSON, this field is populated
     * based on a query string argument, such as `?endpoint_id=12345`. This is the
     * fallback for fields that are not included in either the URI or the body.
     *
     * Generated from protobuf field <code>string endpoint_id = 4 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param string $var
     * @return $this
     */
    public function setEndpointId($var)
    {
        GPBUtil::checkString($var, True);
        $this->endpoint_id = $var;

        return $this;
    }

}

