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

namespace Google\Photos\Library\V1;

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

/**
 * Filters that can be applied to a media item search.
 * If multiple filter options are specified, they're treated as AND with each
 * other.
 *
 * Generated from protobuf message <code>google.photos.library.v1.Filters</code>
 */
class Filters extends \Google\Protobuf\Internal\Message
{
    /**
     * Filters the media items based on their creation date.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.DateFilter date_filter = 1;</code>
     */
    protected $date_filter = null;
    /**
     * Filters the media items based on their content.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.ContentFilter content_filter = 2;</code>
     */
    protected $content_filter = null;
    /**
     * Filters the media items based on the type of media.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.MediaTypeFilter media_type_filter = 3;</code>
     */
    protected $media_type_filter = null;
    /**
     * Filters the media items based on their features.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.FeatureFilter feature_filter = 7;</code>
     */
    protected $feature_filter = null;
    /**
     * If set, the results include media items that the user has archived.
     * Defaults to false (archived media items aren't included).
     *
     * Generated from protobuf field <code>bool include_archived_media = 4;</code>
     */
    protected $include_archived_media = false;
    /**
     * If set, the results exclude media items that were not created by this app.
     * Defaults to false (all media items are returned). This field is ignored if
     * the photoslibrary.readonly.appcreateddata scope is used.
     *
     * Generated from protobuf field <code>bool exclude_non_app_created_data = 5;</code>
     */
    protected $exclude_non_app_created_data = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Photos\Library\V1\DateFilter $date_filter
     *           Filters the media items based on their creation date.
     *     @type \Google\Photos\Library\V1\ContentFilter $content_filter
     *           Filters the media items based on their content.
     *     @type \Google\Photos\Library\V1\MediaTypeFilter $media_type_filter
     *           Filters the media items based on the type of media.
     *     @type \Google\Photos\Library\V1\FeatureFilter $feature_filter
     *           Filters the media items based on their features.
     *     @type bool $include_archived_media
     *           If set, the results include media items that the user has archived.
     *           Defaults to false (archived media items aren't included).
     *     @type bool $exclude_non_app_created_data
     *           If set, the results exclude media items that were not created by this app.
     *           Defaults to false (all media items are returned). This field is ignored if
     *           the photoslibrary.readonly.appcreateddata scope is used.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
        parent::__construct($data);
    }

    /**
     * Filters the media items based on their creation date.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.DateFilter date_filter = 1;</code>
     * @return \Google\Photos\Library\V1\DateFilter|null
     */
    public function getDateFilter()
    {
        return isset($this->date_filter) ? $this->date_filter : null;
    }

    public function hasDateFilter()
    {
        return isset($this->date_filter);
    }

    public function clearDateFilter()
    {
        unset($this->date_filter);
    }

    /**
     * Filters the media items based on their creation date.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.DateFilter date_filter = 1;</code>
     * @param \Google\Photos\Library\V1\DateFilter $var
     * @return $this
     */
    public function setDateFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\DateFilter::class);
        $this->date_filter = $var;

        return $this;
    }

    /**
     * Filters the media items based on their content.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.ContentFilter content_filter = 2;</code>
     * @return \Google\Photos\Library\V1\ContentFilter|null
     */
    public function getContentFilter()
    {
        return isset($this->content_filter) ? $this->content_filter : null;
    }

    public function hasContentFilter()
    {
        return isset($this->content_filter);
    }

    public function clearContentFilter()
    {
        unset($this->content_filter);
    }

    /**
     * Filters the media items based on their content.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.ContentFilter content_filter = 2;</code>
     * @param \Google\Photos\Library\V1\ContentFilter $var
     * @return $this
     */
    public function setContentFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\ContentFilter::class);
        $this->content_filter = $var;

        return $this;
    }

    /**
     * Filters the media items based on the type of media.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.MediaTypeFilter media_type_filter = 3;</code>
     * @return \Google\Photos\Library\V1\MediaTypeFilter|null
     */
    public function getMediaTypeFilter()
    {
        return isset($this->media_type_filter) ? $this->media_type_filter : null;
    }

    public function hasMediaTypeFilter()
    {
        return isset($this->media_type_filter);
    }

    public function clearMediaTypeFilter()
    {
        unset($this->media_type_filter);
    }

    /**
     * Filters the media items based on the type of media.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.MediaTypeFilter media_type_filter = 3;</code>
     * @param \Google\Photos\Library\V1\MediaTypeFilter $var
     * @return $this
     */
    public function setMediaTypeFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\MediaTypeFilter::class);
        $this->media_type_filter = $var;

        return $this;
    }

    /**
     * Filters the media items based on their features.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.FeatureFilter feature_filter = 7;</code>
     * @return \Google\Photos\Library\V1\FeatureFilter|null
     */
    public function getFeatureFilter()
    {
        return isset($this->feature_filter) ? $this->feature_filter : null;
    }

    public function hasFeatureFilter()
    {
        return isset($this->feature_filter);
    }

    public function clearFeatureFilter()
    {
        unset($this->feature_filter);
    }

    /**
     * Filters the media items based on their features.
     *
     * Generated from protobuf field <code>.google.photos.library.v1.FeatureFilter feature_filter = 7;</code>
     * @param \Google\Photos\Library\V1\FeatureFilter $var
     * @return $this
     */
    public function setFeatureFilter($var)
    {
        GPBUtil::checkMessage($var, \Google\Photos\Library\V1\FeatureFilter::class);
        $this->feature_filter = $var;

        return $this;
    }

    /**
     * If set, the results include media items that the user has archived.
     * Defaults to false (archived media items aren't included).
     *
     * Generated from protobuf field <code>bool include_archived_media = 4;</code>
     * @return bool
     */
    public function getIncludeArchivedMedia()
    {
        return $this->include_archived_media;
    }

    /**
     * If set, the results include media items that the user has archived.
     * Defaults to false (archived media items aren't included).
     *
     * Generated from protobuf field <code>bool include_archived_media = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setIncludeArchivedMedia($var)
    {
        GPBUtil::checkBool($var);
        $this->include_archived_media = $var;

        return $this;
    }

    /**
     * If set, the results exclude media items that were not created by this app.
     * Defaults to false (all media items are returned). This field is ignored if
     * the photoslibrary.readonly.appcreateddata scope is used.
     *
     * Generated from protobuf field <code>bool exclude_non_app_created_data = 5;</code>
     * @return bool
     */
    public function getExcludeNonAppCreatedData()
    {
        return $this->exclude_non_app_created_data;
    }

    /**
     * If set, the results exclude media items that were not created by this app.
     * Defaults to false (all media items are returned). This field is ignored if
     * the photoslibrary.readonly.appcreateddata scope is used.
     *
     * Generated from protobuf field <code>bool exclude_non_app_created_data = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setExcludeNonAppCreatedData($var)
    {
        GPBUtil::checkBool($var);
        $this->exclude_non_app_created_data = $var;

        return $this;
    }

}

