Class: Google::Apis::PhotoslibraryV1::ContentFilter
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::PhotoslibraryV1::ContentFilter
 
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/photoslibrary_v1/classes.rb,
 generated/google/apis/photoslibrary_v1/representations.rb,
 generated/google/apis/photoslibrary_v1/representations.rb
Overview
This filter is used to define which results to return based on the contents
of the media item.
It is 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. For example, if the content filter looks like:
included_content_categories: [c1, c2, c3]
It would get media items that contain (c1 OR c2 OR c3).
And if the content filter looks like:
excluded_content_categories: [c1, c2, c3]
It would get media items that contain NOT (c1 OR c2 OR c3).
You can also include some categories while excluding others, as in this
proto:
included_content_categories: [c1, c2],
excluded_content_category: [c3, c4]
It 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.
Instance Attribute Summary collapse
- 
  
    
      #excluded_content_categories  ⇒ Array<String> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The set of categories that must NOT be present in the media items in the result. 
- 
  
    
      #included_content_categories  ⇒ Array<String> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The set of categories that must be present in the media items in the result. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ ContentFilter 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of ContentFilter. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ ContentFilter
Returns a new instance of ContentFilter
| 260 261 262 | # File 'generated/google/apis/photoslibrary_v1/classes.rb', line 260 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#excluded_content_categories ⇒ Array<String>
The set of categories that must NOT be present in the media items in the
result. The items in the set are ORed. There is a maximum of 10
excludedContentCategories per request.
Corresponds to the JSON property excludedContentCategories
| 251 252 253 | # File 'generated/google/apis/photoslibrary_v1/classes.rb', line 251 def excluded_content_categories @excluded_content_categories end | 
#included_content_categories ⇒ Array<String>
The set of categories that must be present in the media items in the
result. The items in the set are ORed. There is a maximum of 10
includedContentCategories per request.
Corresponds to the JSON property includedContentCategories
| 258 259 260 | # File 'generated/google/apis/photoslibrary_v1/classes.rb', line 258 def included_content_categories @included_content_categories end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 265 266 267 268 | # File 'generated/google/apis/photoslibrary_v1/classes.rb', line 265 def update!(**args) @excluded_content_categories = args[:excluded_content_categories] if args.key?(:excluded_content_categories) @included_content_categories = args[:included_content_categories] if args.key?(:included_content_categories) end |