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

namespace Google\Cloud\Dataplex\V1\MetadataFeed;

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

/**
 * Scope defines the scope of the metadata feed.
 * Scopes are exclusive. Only one of the scopes can be specified.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.MetadataFeed.Scope</code>
 */
class Scope extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Whether the metadata feed is at the organization-level.
     * - If `true`, all changes happened to the entries in the same
     * organization as the feed are published.
     * - If `false`, you must specify a list of projects or a list of entry
     * groups whose entries you want to listen to.
     * The default is `false`.
     *
     * Generated from protobuf field <code>bool organization_level = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $organization_level = false;
    /**
     * Optional. The projects whose entries you want to listen to.
     * Must be in the same organization as the feed.
     * Must be in the format: `projects/{project_id_or_number}`.
     *
     * Generated from protobuf field <code>repeated string projects = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    private $projects;
    /**
     * Optional. The entry groups whose entries you want to listen to.
     * Must be in the format:
     * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
     *
     * Generated from protobuf field <code>repeated string entry_groups = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    private $entry_groups;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $organization_level
     *           Optional. Whether the metadata feed is at the organization-level.
     *           - If `true`, all changes happened to the entries in the same
     *           organization as the feed are published.
     *           - If `false`, you must specify a list of projects or a list of entry
     *           groups whose entries you want to listen to.
     *           The default is `false`.
     *     @type string[] $projects
     *           Optional. The projects whose entries you want to listen to.
     *           Must be in the same organization as the feed.
     *           Must be in the format: `projects/{project_id_or_number}`.
     *     @type string[] $entry_groups
     *           Optional. The entry groups whose entries you want to listen to.
     *           Must be in the format:
     *           `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\Catalog::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Whether the metadata feed is at the organization-level.
     * - If `true`, all changes happened to the entries in the same
     * organization as the feed are published.
     * - If `false`, you must specify a list of projects or a list of entry
     * groups whose entries you want to listen to.
     * The default is `false`.
     *
     * Generated from protobuf field <code>bool organization_level = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getOrganizationLevel()
    {
        return $this->organization_level;
    }

    /**
     * Optional. Whether the metadata feed is at the organization-level.
     * - If `true`, all changes happened to the entries in the same
     * organization as the feed are published.
     * - If `false`, you must specify a list of projects or a list of entry
     * groups whose entries you want to listen to.
     * The default is `false`.
     *
     * Generated from protobuf field <code>bool organization_level = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setOrganizationLevel($var)
    {
        GPBUtil::checkBool($var);
        $this->organization_level = $var;

        return $this;
    }

    /**
     * Optional. The projects whose entries you want to listen to.
     * Must be in the same organization as the feed.
     * Must be in the format: `projects/{project_id_or_number}`.
     *
     * Generated from protobuf field <code>repeated string projects = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return RepeatedField<string>
     */
    public function getProjects()
    {
        return $this->projects;
    }

    /**
     * Optional. The projects whose entries you want to listen to.
     * Must be in the same organization as the feed.
     * Must be in the format: `projects/{project_id_or_number}`.
     *
     * Generated from protobuf field <code>repeated string projects = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string[] $var
     * @return $this
     */
    public function setProjects($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->projects = $arr;

        return $this;
    }

    /**
     * Optional. The entry groups whose entries you want to listen to.
     * Must be in the format:
     * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
     *
     * Generated from protobuf field <code>repeated string entry_groups = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return RepeatedField<string>
     */
    public function getEntryGroups()
    {
        return $this->entry_groups;
    }

    /**
     * Optional. The entry groups whose entries you want to listen to.
     * Must be in the format:
     * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
     *
     * Generated from protobuf field <code>repeated string entry_groups = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string[] $var
     * @return $this
     */
    public function setEntryGroups($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->entry_groups = $arr;

        return $this;
    }

}

