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

namespace Google\Cloud\DataCatalog\V1;

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

/**
 * Request message for
 * [ReconcileTags][google.cloud.datacatalog.v1.DataCatalog.ReconcileTags].
 *
 * Generated from protobuf message <code>google.cloud.datacatalog.v1.ReconcileTagsRequest</code>
 */
class ReconcileTagsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. The name of the tag template, which is used for reconciliation.
     *
     * Generated from protobuf field <code>string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $tag_template = '';
    /**
     * If set to `true`, deletes entry tags related to a tag template
     * not listed in the tags source from an entry. If set to `false`,
     * unlisted tags are retained.
     *
     * Generated from protobuf field <code>bool force_delete_missing = 3;</code>
     */
    protected $force_delete_missing = false;
    /**
     * A list of tags to apply to an entry. A tag can specify a
     * tag template, which must be the template specified in the
     * `ReconcileTagsRequest`.
     * The sole entry and each of its columns must be mentioned at most once.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datacatalog.v1.Tag tags = 4;</code>
     */
    private $tags;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged.
     *     @type string $tag_template
     *           Required. The name of the tag template, which is used for reconciliation.
     *     @type bool $force_delete_missing
     *           If set to `true`, deletes entry tags related to a tag template
     *           not listed in the tags source from an entry. If set to `false`,
     *           unlisted tags are retained.
     *     @type \Google\Cloud\DataCatalog\V1\Tag[] $tags
     *           A list of tags to apply to an entry. A tag can specify a
     *           tag template, which must be the template specified in the
     *           `ReconcileTagsRequest`.
     *           The sole entry and each of its columns must be mentioned at most once.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datacatalog\V1\Datacatalog::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged.
     *
     * 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. Name of [Entry][google.cloud.datacatalog.v1.Entry] to be tagged.
     *
     * 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 name of the tag template, which is used for reconciliation.
     *
     * Generated from protobuf field <code>string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getTagTemplate()
    {
        return $this->tag_template;
    }

    /**
     * Required. The name of the tag template, which is used for reconciliation.
     *
     * Generated from protobuf field <code>string tag_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setTagTemplate($var)
    {
        GPBUtil::checkString($var, True);
        $this->tag_template = $var;

        return $this;
    }

    /**
     * If set to `true`, deletes entry tags related to a tag template
     * not listed in the tags source from an entry. If set to `false`,
     * unlisted tags are retained.
     *
     * Generated from protobuf field <code>bool force_delete_missing = 3;</code>
     * @return bool
     */
    public function getForceDeleteMissing()
    {
        return $this->force_delete_missing;
    }

    /**
     * If set to `true`, deletes entry tags related to a tag template
     * not listed in the tags source from an entry. If set to `false`,
     * unlisted tags are retained.
     *
     * Generated from protobuf field <code>bool force_delete_missing = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setForceDeleteMissing($var)
    {
        GPBUtil::checkBool($var);
        $this->force_delete_missing = $var;

        return $this;
    }

    /**
     * A list of tags to apply to an entry. A tag can specify a
     * tag template, which must be the template specified in the
     * `ReconcileTagsRequest`.
     * The sole entry and each of its columns must be mentioned at most once.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datacatalog.v1.Tag tags = 4;</code>
     * @return RepeatedField<\Google\Cloud\DataCatalog\V1\Tag>
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * A list of tags to apply to an entry. A tag can specify a
     * tag template, which must be the template specified in the
     * `ReconcileTagsRequest`.
     * The sole entry and each of its columns must be mentioned at most once.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datacatalog.v1.Tag tags = 4;</code>
     * @param \Google\Cloud\DataCatalog\V1\Tag[] $var
     * @return $this
     */
    public function setTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataCatalog\V1\Tag::class);
        $this->tags = $arr;

        return $this;
    }

}

