Class ContentFilter.Builder

  • All Implemented Interfaces:
    ContentFilterOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    ContentFilter

    public static final class ContentFilter.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
    implements ContentFilterOrBuilder
     This filter allows you to return media items based on the content type.
     It's possible to specify a list of categories to include, and/or a list of
     categories to exclude. Within each list, the categories are combined with an
     OR. <p>
     The content filter `includedContentCategories`: [c1, c2, c3] would get media
     items that contain (c1 OR c2 OR c3). <p>
     The content filter `excludedContentCategories`: [c1, c2, c3] would NOT get
     media items that contain (c1 OR c2 OR c3). <p>
     You can also include some categories while excluding others, as in this
     example: `includedContentCategories`: [c1, c2], `excludedContentCategories`:
     [c3, c4] <p>
     The previous example would get media items that contain (c1 OR c2) AND NOT
     (c3 OR c4). A category that appears in `includedContentategories` must not
     appear in `excludedContentCategories`.
     
    Protobuf type google.photos.library.v1.ContentFilter
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • clear

        public ContentFilter.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • getDefaultInstanceForType

        public ContentFilter getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public ContentFilter build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public ContentFilter buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public ContentFilter.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • setField

        public ContentFilter.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                              java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • clearField

        public ContentFilter.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • clearOneof

        public ContentFilter.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • setRepeatedField

        public ContentFilter.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      int index,
                                                      java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • addRepeatedField

        public ContentFilter.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • mergeFrom

        public ContentFilter.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ContentFilter.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • mergeFrom

        public ContentFilter.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ContentFilter.Builder>
        Throws:
        java.io.IOException
      • getIncludedContentCategoriesList

        public java.util.List<ContentCategory> getIncludedContentCategoriesList()
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Specified by:
        getIncludedContentCategoriesList in interface ContentFilterOrBuilder
        Returns:
        A list containing the includedContentCategories.
      • getIncludedContentCategoriesCount

        public int getIncludedContentCategoriesCount()
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Specified by:
        getIncludedContentCategoriesCount in interface ContentFilterOrBuilder
        Returns:
        The count of includedContentCategories.
      • getIncludedContentCategories

        public ContentCategory getIncludedContentCategories​(int index)
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Specified by:
        getIncludedContentCategories in interface ContentFilterOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The includedContentCategories at the given index.
      • setIncludedContentCategories

        public ContentFilter.Builder setIncludedContentCategories​(int index,
                                                                  ContentCategory value)
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Parameters:
        index - The index to set the value at.
        value - The includedContentCategories to set.
        Returns:
        This builder for chaining.
      • addIncludedContentCategories

        public ContentFilter.Builder addIncludedContentCategories​(ContentCategory value)
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Parameters:
        value - The includedContentCategories to add.
        Returns:
        This builder for chaining.
      • addAllIncludedContentCategories

        public ContentFilter.Builder addAllIncludedContentCategories​(java.lang.Iterable<? extends ContentCategory> values)
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Parameters:
        values - The includedContentCategories to add.
        Returns:
        This builder for chaining.
      • clearIncludedContentCategories

        public ContentFilter.Builder clearIncludedContentCategories()
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Returns:
        This builder for chaining.
      • getIncludedContentCategoriesValueList

        public java.util.List<java.lang.Integer> getIncludedContentCategoriesValueList()
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Specified by:
        getIncludedContentCategoriesValueList in interface ContentFilterOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for includedContentCategories.
      • getIncludedContentCategoriesValue

        public int getIncludedContentCategoriesValue​(int index)
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Specified by:
        getIncludedContentCategoriesValue in interface ContentFilterOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of includedContentCategories at the given index.
      • setIncludedContentCategoriesValue

        public ContentFilter.Builder setIncludedContentCategoriesValue​(int index,
                                                                       int value)
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of includedContentCategories at the given index.
      • addIncludedContentCategoriesValue

        public ContentFilter.Builder addIncludedContentCategoriesValue​(int value)
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Parameters:
        value - The enum numeric value on the wire for includedContentCategories to add.
        Returns:
        This builder for chaining.
      • addAllIncludedContentCategoriesValue

        public ContentFilter.Builder addAllIncludedContentCategoriesValue​(java.lang.Iterable<java.lang.Integer> values)
         The set of categories to be included in the media item search results.
         The items in the set are ORed. There's a maximum of 10
         `includedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory included_content_categories = 1;
        Parameters:
        values - The enum numeric values on the wire for includedContentCategories to add.
        Returns:
        This builder for chaining.
      • getExcludedContentCategoriesList

        public java.util.List<ContentCategory> getExcludedContentCategoriesList()
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Specified by:
        getExcludedContentCategoriesList in interface ContentFilterOrBuilder
        Returns:
        A list containing the excludedContentCategories.
      • getExcludedContentCategoriesCount

        public int getExcludedContentCategoriesCount()
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Specified by:
        getExcludedContentCategoriesCount in interface ContentFilterOrBuilder
        Returns:
        The count of excludedContentCategories.
      • getExcludedContentCategories

        public ContentCategory getExcludedContentCategories​(int index)
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Specified by:
        getExcludedContentCategories in interface ContentFilterOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The excludedContentCategories at the given index.
      • setExcludedContentCategories

        public ContentFilter.Builder setExcludedContentCategories​(int index,
                                                                  ContentCategory value)
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Parameters:
        index - The index to set the value at.
        value - The excludedContentCategories to set.
        Returns:
        This builder for chaining.
      • addExcludedContentCategories

        public ContentFilter.Builder addExcludedContentCategories​(ContentCategory value)
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Parameters:
        value - The excludedContentCategories to add.
        Returns:
        This builder for chaining.
      • addAllExcludedContentCategories

        public ContentFilter.Builder addAllExcludedContentCategories​(java.lang.Iterable<? extends ContentCategory> values)
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Parameters:
        values - The excludedContentCategories to add.
        Returns:
        This builder for chaining.
      • clearExcludedContentCategories

        public ContentFilter.Builder clearExcludedContentCategories()
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Returns:
        This builder for chaining.
      • getExcludedContentCategoriesValueList

        public java.util.List<java.lang.Integer> getExcludedContentCategoriesValueList()
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Specified by:
        getExcludedContentCategoriesValueList in interface ContentFilterOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for excludedContentCategories.
      • getExcludedContentCategoriesValue

        public int getExcludedContentCategoriesValue​(int index)
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Specified by:
        getExcludedContentCategoriesValue in interface ContentFilterOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of excludedContentCategories at the given index.
      • setExcludedContentCategoriesValue

        public ContentFilter.Builder setExcludedContentCategoriesValue​(int index,
                                                                       int value)
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of excludedContentCategories at the given index.
      • addExcludedContentCategoriesValue

        public ContentFilter.Builder addExcludedContentCategoriesValue​(int value)
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Parameters:
        value - The enum numeric value on the wire for excludedContentCategories to add.
        Returns:
        This builder for chaining.
      • addAllExcludedContentCategoriesValue

        public ContentFilter.Builder addAllExcludedContentCategoriesValue​(java.lang.Iterable<java.lang.Integer> values)
         The set of categories which are not to be included in the media item search
         results. The items in the set are ORed. There's a maximum of 10
         `excludedContentCategories` per request.
         
        repeated .google.photos.library.v1.ContentCategory excluded_content_categories = 2;
        Parameters:
        values - The enum numeric values on the wire for excludedContentCategories to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final ContentFilter.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>
      • mergeUnknownFields

        public final ContentFilter.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ContentFilter.Builder>