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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Request message for
 * [FeaturestoreService.CreateEntityType][google.cloud.aiplatform.v1.FeaturestoreService.CreateEntityType].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.CreateEntityTypeRequest</code>
 */
class CreateEntityTypeRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the Featurestore to create EntityTypes.
     * Format:
     * `projects/{project}/locations/{location}/featurestores/{featurestore}`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * The EntityType to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.EntityType entity_type = 2;</code>
     */
    protected $entity_type = null;
    /**
     * Required. The ID to use for the EntityType, which will become the final
     * component of the EntityType's resource name.
     * This value may be up to 60 characters, and valid characters are
     * `[a-z0-9_]`. The first character cannot be a number.
     * The value must be unique within a featurestore.
     *
     * Generated from protobuf field <code>string entity_type_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $entity_type_id = '';

    /**
     * @param string                                 $parent     Required. The resource name of the Featurestore to create EntityTypes.
     *                                                           Format:
     *                                                           `projects/{project}/locations/{location}/featurestores/{featurestore}`
     *                                                           Please see {@see FeaturestoreServiceClient::featurestoreName()} for help formatting this field.
     * @param \Google\Cloud\AIPlatform\V1\EntityType $entityType The EntityType to create.
     *
     * @return \Google\Cloud\AIPlatform\V1\CreateEntityTypeRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\AIPlatform\V1\EntityType $entityType): self
    {
        return (new self())
            ->setParent($parent)
            ->setEntityType($entityType);
    }

    /**
     * @param string                                 $parent       Required. The resource name of the Featurestore to create EntityTypes.
     *                                                             Format:
     *                                                             `projects/{project}/locations/{location}/featurestores/{featurestore}`
     *                                                             Please see {@see FeaturestoreServiceClient::featurestoreName()} for help formatting this field.
     * @param \Google\Cloud\AIPlatform\V1\EntityType $entityType   The EntityType to create.
     * @param string                                 $entityTypeId Required. The ID to use for the EntityType, which will become the final
     *                                                             component of the EntityType's resource name.
     *
     *                                                             This value may be up to 60 characters, and valid characters are
     *                                                             `[a-z0-9_]`. The first character cannot be a number.
     *
     *                                                             The value must be unique within a featurestore.
     *
     * @return \Google\Cloud\AIPlatform\V1\CreateEntityTypeRequest
     *
     * @experimental
     */
    public static function buildFromParentEntityTypeEntityTypeId(string $parent, \Google\Cloud\AIPlatform\V1\EntityType $entityType, string $entityTypeId): self
    {
        return (new self())
            ->setParent($parent)
            ->setEntityType($entityType)
            ->setEntityTypeId($entityTypeId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the Featurestore to create EntityTypes.
     *           Format:
     *           `projects/{project}/locations/{location}/featurestores/{featurestore}`
     *     @type \Google\Cloud\AIPlatform\V1\EntityType $entity_type
     *           The EntityType to create.
     *     @type string $entity_type_id
     *           Required. The ID to use for the EntityType, which will become the final
     *           component of the EntityType's resource name.
     *           This value may be up to 60 characters, and valid characters are
     *           `[a-z0-9_]`. The first character cannot be a number.
     *           The value must be unique within a featurestore.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\FeaturestoreService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the Featurestore to create EntityTypes.
     * Format:
     * `projects/{project}/locations/{location}/featurestores/{featurestore}`
     *
     * 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 Featurestore to create EntityTypes.
     * Format:
     * `projects/{project}/locations/{location}/featurestores/{featurestore}`
     *
     * 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;
    }

    /**
     * The EntityType to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.EntityType entity_type = 2;</code>
     * @return \Google\Cloud\AIPlatform\V1\EntityType|null
     */
    public function getEntityType()
    {
        return $this->entity_type;
    }

    public function hasEntityType()
    {
        return isset($this->entity_type);
    }

    public function clearEntityType()
    {
        unset($this->entity_type);
    }

    /**
     * The EntityType to create.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.EntityType entity_type = 2;</code>
     * @param \Google\Cloud\AIPlatform\V1\EntityType $var
     * @return $this
     */
    public function setEntityType($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\EntityType::class);
        $this->entity_type = $var;

        return $this;
    }

    /**
     * Required. The ID to use for the EntityType, which will become the final
     * component of the EntityType's resource name.
     * This value may be up to 60 characters, and valid characters are
     * `[a-z0-9_]`. The first character cannot be a number.
     * The value must be unique within a featurestore.
     *
     * Generated from protobuf field <code>string entity_type_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getEntityTypeId()
    {
        return $this->entity_type_id;
    }

    /**
     * Required. The ID to use for the EntityType, which will become the final
     * component of the EntityType's resource name.
     * This value may be up to 60 characters, and valid characters are
     * `[a-z0-9_]`. The first character cannot be a number.
     * The value must be unique within a featurestore.
     *
     * Generated from protobuf field <code>string entity_type_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setEntityTypeId($var)
    {
        GPBUtil::checkString($var, True);
        $this->entity_type_id = $var;

        return $this;
    }

}

