<?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;

/**
 * This filter defines the type of media items to be returned, for example,
 * videos or photos. Only one media type is supported.
 *
 * Generated from protobuf message <code>google.photos.library.v1.MediaTypeFilter</code>
 */
class MediaTypeFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * The types of media items to be included. This field should be populated
     * with only one media type. If you specify multiple media types, it results
     * in an error.
     *
     * Generated from protobuf field <code>repeated .google.photos.library.v1.MediaTypeFilter.MediaType media_types = 1;</code>
     */
    private $media_types;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $media_types
     *           The types of media items to be included. This field should be populated
     *           with only one media type. If you specify multiple media types, it results
     *           in an error.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Photos\Library\V1\PhotosLibrary::initOnce();
        parent::__construct($data);
    }

    /**
     * The types of media items to be included. This field should be populated
     * with only one media type. If you specify multiple media types, it results
     * in an error.
     *
     * Generated from protobuf field <code>repeated .google.photos.library.v1.MediaTypeFilter.MediaType media_types = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getMediaTypes()
    {
        return $this->media_types;
    }

    /**
     * The types of media items to be included. This field should be populated
     * with only one media type. If you specify multiple media types, it results
     * in an error.
     *
     * Generated from protobuf field <code>repeated .google.photos.library.v1.MediaTypeFilter.MediaType media_types = 1;</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setMediaTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Photos\Library\V1\MediaTypeFilter\MediaType::class);
        $this->media_types = $arr;

        return $this;
    }

}

