<?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 asset.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.CreateDataAssetRequest</code>
 */
class CreateDataAssetRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource where this data asset will be created.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_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 asset 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_asset_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $data_asset_id = '';
    /**
     * Required. The data asset to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataAsset data_asset = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_asset = null;
    /**
     * Optional. Validates the request without actually creating the data asset.
     * Defaults to 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 asset will be created.
     *                                                         Format:
     *                                                         projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}
     *                                                         Please see {@see DataProductServiceClient::dataProductName()} for help formatting this field.
     * @param \Google\Cloud\Dataplex\V1\DataAsset $dataAsset   Required. The data asset to create.
     * @param string                              $dataAssetId Optional. The ID of the data asset 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\CreateDataAssetRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Dataplex\V1\DataAsset $dataAsset, string $dataAssetId): self
    {
        return (new self())
            ->setParent($parent)
            ->setDataAsset($dataAsset)
            ->setDataAssetId($dataAssetId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource where this data asset will be created.
     *           Format:
     *           projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_id}
     *     @type string $data_asset_id
     *           Optional. The ID of the data asset 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\DataAsset $data_asset
     *           Required. The data asset to create.
     *     @type bool $validate_only
     *           Optional. Validates the request without actually creating the data asset.
     *           Defaults to false.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\DataProducts::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource where this data asset will be created.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_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 asset will be created.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/dataProducts/{data_product_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 asset 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_asset_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDataAssetId()
    {
        return $this->data_asset_id;
    }

    /**
     * Optional. The ID of the data asset 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_asset_id = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDataAssetId($var)
    {
        GPBUtil::checkString($var, True);
        $this->data_asset_id = $var;

        return $this;
    }

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

    public function hasDataAsset()
    {
        return isset($this->data_asset);
    }

    public function clearDataAsset()
    {
        unset($this->data_asset);
    }

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

        return $this;
    }

    /**
     * Optional. Validates the request without actually creating the data asset.
     * Defaults to 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 asset.
     * Defaults to 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;
    }

}

