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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * Create Entry request.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.CreateEntryRequest</code>
 */
class CreateEntryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the parent Entry Group:
     * `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. Entry identifier. It has to be unique within an Entry Group.
     * Entries corresponding to Google Cloud resources use an Entry ID format
     * based on [full resource
     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
     * The format is a full resource name of the resource without the
     * prefix double slashes in the API service name part of the full resource
     * name. This allows retrieval of entries using their associated resource
     * name.
     * For example, if the full resource name of a resource is
     * `//library.googleapis.com/shelves/shelf1/books/book2`,
     * then the suggested entry_id is
     * `library.googleapis.com/shelves/shelf1/books/book2`.
     * It is also suggested to follow the same convention for entries
     * corresponding to resources from providers or systems other than Google
     * Cloud.
     * The maximum size of the field is 4000 characters.
     *
     * Generated from protobuf field <code>string entry_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $entry_id = '';
    /**
     * Required. Entry resource.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Entry entry = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $entry = null;

    /**
     * @param string                          $parent  Required. The resource name of the parent Entry Group:
     *                                                 `projects/{project}/locations/{location}/entryGroups/{entry_group}`. Please see
     *                                                 {@see CatalogServiceClient::entryGroupName()} for help formatting this field.
     * @param \Google\Cloud\Dataplex\V1\Entry $entry   Required. Entry resource.
     * @param string                          $entryId Required. Entry identifier. It has to be unique within an Entry Group.
     *
     *                                                 Entries corresponding to Google Cloud resources use an Entry ID format
     *                                                 based on [full resource
     *                                                 names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
     *                                                 The format is a full resource name of the resource without the
     *                                                 prefix double slashes in the API service name part of the full resource
     *                                                 name. This allows retrieval of entries using their associated resource
     *                                                 name.
     *
     *                                                 For example, if the full resource name of a resource is
     *                                                 `//library.googleapis.com/shelves/shelf1/books/book2`,
     *                                                 then the suggested entry_id is
     *                                                 `library.googleapis.com/shelves/shelf1/books/book2`.
     *
     *                                                 It is also suggested to follow the same convention for entries
     *                                                 corresponding to resources from providers or systems other than Google
     *                                                 Cloud.
     *
     *                                                 The maximum size of the field is 4000 characters.
     *
     * @return \Google\Cloud\Dataplex\V1\CreateEntryRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Dataplex\V1\Entry $entry, string $entryId): self
    {
        return (new self())
            ->setParent($parent)
            ->setEntry($entry)
            ->setEntryId($entryId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the parent Entry Group:
     *           `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
     *     @type string $entry_id
     *           Required. Entry identifier. It has to be unique within an Entry Group.
     *           Entries corresponding to Google Cloud resources use an Entry ID format
     *           based on [full resource
     *           names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
     *           The format is a full resource name of the resource without the
     *           prefix double slashes in the API service name part of the full resource
     *           name. This allows retrieval of entries using their associated resource
     *           name.
     *           For example, if the full resource name of a resource is
     *           `//library.googleapis.com/shelves/shelf1/books/book2`,
     *           then the suggested entry_id is
     *           `library.googleapis.com/shelves/shelf1/books/book2`.
     *           It is also suggested to follow the same convention for entries
     *           corresponding to resources from providers or systems other than Google
     *           Cloud.
     *           The maximum size of the field is 4000 characters.
     *     @type \Google\Cloud\Dataplex\V1\Entry $entry
     *           Required. Entry resource.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the parent Entry Group:
     * `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
     *
     * 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 parent Entry Group:
     * `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
     *
     * 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. Entry identifier. It has to be unique within an Entry Group.
     * Entries corresponding to Google Cloud resources use an Entry ID format
     * based on [full resource
     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
     * The format is a full resource name of the resource without the
     * prefix double slashes in the API service name part of the full resource
     * name. This allows retrieval of entries using their associated resource
     * name.
     * For example, if the full resource name of a resource is
     * `//library.googleapis.com/shelves/shelf1/books/book2`,
     * then the suggested entry_id is
     * `library.googleapis.com/shelves/shelf1/books/book2`.
     * It is also suggested to follow the same convention for entries
     * corresponding to resources from providers or systems other than Google
     * Cloud.
     * The maximum size of the field is 4000 characters.
     *
     * Generated from protobuf field <code>string entry_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getEntryId()
    {
        return $this->entry_id;
    }

    /**
     * Required. Entry identifier. It has to be unique within an Entry Group.
     * Entries corresponding to Google Cloud resources use an Entry ID format
     * based on [full resource
     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name).
     * The format is a full resource name of the resource without the
     * prefix double slashes in the API service name part of the full resource
     * name. This allows retrieval of entries using their associated resource
     * name.
     * For example, if the full resource name of a resource is
     * `//library.googleapis.com/shelves/shelf1/books/book2`,
     * then the suggested entry_id is
     * `library.googleapis.com/shelves/shelf1/books/book2`.
     * It is also suggested to follow the same convention for entries
     * corresponding to resources from providers or systems other than Google
     * Cloud.
     * The maximum size of the field is 4000 characters.
     *
     * Generated from protobuf field <code>string entry_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setEntryId($var)
    {
        GPBUtil::checkString($var, True);
        $this->entry_id = $var;

        return $this;
    }

    /**
     * Required. Entry resource.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Entry entry = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataplex\V1\Entry|null
     */
    public function getEntry()
    {
        return $this->entry;
    }

    public function hasEntry()
    {
        return isset($this->entry);
    }

    public function clearEntry()
    {
        unset($this->entry);
    }

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

        return $this;
    }

}

