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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * Request message for creating a data product.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.CreateDataProductRequest</code>
 */
class CreateDataProductRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource where this data product will be created.
     * Format: projects/{project_id_or_number}/locations/{location_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Optional. The ID of the data product to create.
     * The ID must conform to RFC-1034 and contain only lower-case letters (a-z),
     * numbers (0-9), or hyphens, with the first character a letter, the last a
     * letter or a number, and a 63 character maximum. Characters outside of
     * ASCII are not permitted.
     * Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`
     * If not provided, a system generated ID will be used.
     *
     * Generated from protobuf field <code>string data_product_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $data_product_id = '';
    /**
     * Required. The data product to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProduct data_product = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_product = null;
    /**
     * Optional. Validates the request without actually creating the data product.
     * Default: false.
     *
     * Generated from protobuf field <code>bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $validate_only = false;

    /**
     * @param string                                $parent        Required. The parent resource where this data product will be created.
     *                                                             Format: projects/{project_id_or_number}/locations/{location_id}
     *                                                             Please see {@see DataProductServiceClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\Dataplex\V1\DataProduct $dataProduct   Required. The data product to create.
     * @param string                                $dataProductId Optional. The ID of the data product to create.
     *
     *                                                             The ID must conform to RFC-1034 and contain only lower-case letters (a-z),
     *                                                             numbers (0-9), or hyphens, with the first character a letter, the last a
     *                                                             letter or a number, and a 63 character maximum. Characters outside of
     *                                                             ASCII are not permitted.
     *                                                             Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`
     *                                                             If not provided, a system generated ID will be used.
     *
     * @return \Google\Cloud\Dataplex\V1\CreateDataProductRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataProduct $dataProduct, string $dataProductId): self
    {
        return (new self())
            ->setParent($parent)
            ->setDataProduct($dataProduct)
            ->setDataProductId($dataProductId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource where this data product will be created.
     *           Format: projects/{project_id_or_number}/locations/{location_id}
     *     @type string $data_product_id
     *           Optional. The ID of the data product to create.
     *           The ID must conform to RFC-1034 and contain only lower-case letters (a-z),
     *           numbers (0-9), or hyphens, with the first character a letter, the last a
     *           letter or a number, and a 63 character maximum. Characters outside of
     *           ASCII are not permitted.
     *           Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`
     *           If not provided, a system generated ID will be used.
     *     @type \Google\Cloud\Dataplex\V1\DataProduct $data_product
     *           Required. The data product to create.
     *     @type bool $validate_only
     *           Optional. Validates the request without actually creating the data product.
     *           Default: false.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\DataProducts::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource where this data product will be created.
     * Format: projects/{project_id_or_number}/locations/{location_id}
     *
     * 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 resource where this data product will be created.
     * Format: projects/{project_id_or_number}/locations/{location_id}
     *
     * 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;
    }

    /**
     * Optional. The ID of the data product to create.
     * The ID must conform to RFC-1034 and contain only lower-case letters (a-z),
     * numbers (0-9), or hyphens, with the first character a letter, the last a
     * letter or a number, and a 63 character maximum. Characters outside of
     * ASCII are not permitted.
     * Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`
     * If not provided, a system generated ID will be used.
     *
     * Generated from protobuf field <code>string data_product_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDataProductId()
    {
        return $this->data_product_id;
    }

    /**
     * Optional. The ID of the data product to create.
     * The ID must conform to RFC-1034 and contain only lower-case letters (a-z),
     * numbers (0-9), or hyphens, with the first character a letter, the last a
     * letter or a number, and a 63 character maximum. Characters outside of
     * ASCII are not permitted.
     * Valid format regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`
     * If not provided, a system generated ID will be used.
     *
     * Generated from protobuf field <code>string data_product_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDataProductId($var)
    {
        GPBUtil::checkString($var, True);
        $this->data_product_id = $var;

        return $this;
    }

    /**
     * Required. The data product to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProduct data_product = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataplex\V1\DataProduct|null
     */
    public function getDataProduct()
    {
        return $this->data_product;
    }

    public function hasDataProduct()
    {
        return isset($this->data_product);
    }

    public function clearDataProduct()
    {
        unset($this->data_product);
    }

    /**
     * Required. The data product to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProduct data_product = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dataplex\V1\DataProduct $var
     * @return $this
     */
    public function setDataProduct($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProduct::class);
        $this->data_product = $var;

        return $this;
    }

    /**
     * Optional. Validates the request without actually creating the data product.
     * Default: false.
     *
     * Generated from protobuf field <code>bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * Optional. Validates the request without actually creating the data product.
     * Default: false.
     *
     * Generated from protobuf field <code>bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

}

