<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Request message for CreateMetadataFeed.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.CreateMetadataFeedRequest</code>
 */
class CreateMetadataFeedRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the parent location, in the 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 = '';
    /**
     * Required. The metadata job resource.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.MetadataFeed metadata_feed = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $metadata_feed = null;
    /**
     * Optional. The metadata job ID. If not provided, a unique ID is generated
     * with the prefix `metadata-job-`.
     *
     * Generated from protobuf field <code>string metadata_feed_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $metadata_feed_id = '';
    /**
     * Optional. The service validates the request without performing any
     * mutations. The default is 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 resource name of the parent location, in the format
     *                                                               `projects/{project_id_or_number}/locations/{location_id}`
     *                                                               Please see {@see CatalogServiceClient::locationName()} for help formatting this field.
     * @param \Google\Cloud\Dataplex\V1\MetadataFeed $metadataFeed   Required. The metadata job resource.
     * @param string                                 $metadataFeedId Optional. The metadata job ID. If not provided, a unique ID is generated
     *                                                               with the prefix `metadata-job-`.
     *
     * @return \Google\Cloud\Dataplex\V1\CreateMetadataFeedRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Dataplex\V1\MetadataFeed $metadataFeed, string $metadataFeedId): self
    {
        return (new self())
            ->setParent($parent)
            ->setMetadataFeed($metadataFeed)
            ->setMetadataFeedId($metadataFeedId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The resource name of the parent location, in the format
     *           `projects/{project_id_or_number}/locations/{location_id}`
     *     @type \Google\Cloud\Dataplex\V1\MetadataFeed $metadata_feed
     *           Required. The metadata job resource.
     *     @type string $metadata_feed_id
     *           Optional. The metadata job ID. If not provided, a unique ID is generated
     *           with the prefix `metadata-job-`.
     *     @type bool $validate_only
     *           Optional. The service validates the request without performing any
     *           mutations. The default is false.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the parent location, in the 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 resource name of the parent location, in the 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;
    }

    /**
     * Required. The metadata job resource.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.MetadataFeed metadata_feed = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataplex\V1\MetadataFeed|null
     */
    public function getMetadataFeed()
    {
        return $this->metadata_feed;
    }

    public function hasMetadataFeed()
    {
        return isset($this->metadata_feed);
    }

    public function clearMetadataFeed()
    {
        unset($this->metadata_feed);
    }

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

        return $this;
    }

    /**
     * Optional. The metadata job ID. If not provided, a unique ID is generated
     * with the prefix `metadata-job-`.
     *
     * Generated from protobuf field <code>string metadata_feed_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getMetadataFeedId()
    {
        return $this->metadata_feed_id;
    }

    /**
     * Optional. The metadata job ID. If not provided, a unique ID is generated
     * with the prefix `metadata-job-`.
     *
     * Generated from protobuf field <code>string metadata_feed_id = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setMetadataFeedId($var)
    {
        GPBUtil::checkString($var, True);
        $this->metadata_feed_id = $var;

        return $this;
    }

    /**
     * Optional. The service validates the request without performing any
     * mutations. The default is 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. The service validates the request without performing any
     * mutations. The default is 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;
    }

}

