google-apis-language_v1 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 6aeb6487351ffed93b085b2ecc5ca3313c125abcfc502f8b37687df9e061d2cf
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: dc42c33523ab52de478756ce039858a0669eb2c11e7f87cd6e2cc5b53f4e0ce6
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: a4241d6b3bbff823a1ea3d945b5c04425dea82f2a4df6826cef70cf4fbcf025d70e5480bfb96e5403b7ae5f2db0b64f6af3bb04ba8a18e2b4ca0805645338e28
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: cca521c734fafddb8d4b199fca906a375eb719c621947f45c84c1915ff58ab56a0dce811462099496ec62e00ace3da6e7c94cbc71e14ae373806e8dcc6277ed6
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
| 
         @@ -302,6 +302,11 @@ module Google 
     | 
|
| 
       302 
302 
     | 
    
         
             
                    # @return [String]
         
     | 
| 
       303 
303 
     | 
    
         
             
                    attr_accessor :language
         
     | 
| 
       304 
304 
     | 
    
         | 
| 
      
 305 
     | 
    
         
            +
                    # Harmful and sensitive categories identified in the input document.
         
     | 
| 
      
 306 
     | 
    
         
            +
                    # Corresponds to the JSON property `moderationCategories`
         
     | 
| 
      
 307 
     | 
    
         
            +
                    # @return [Array<Google::Apis::LanguageV1::ClassificationCategory>]
         
     | 
| 
      
 308 
     | 
    
         
            +
                    attr_accessor :moderation_categories
         
     | 
| 
      
 309 
     | 
    
         
            +
                  
         
     | 
| 
       305 
310 
     | 
    
         
             
                    # Sentences in the input document. Populated if the user enables
         
     | 
| 
       306 
311 
     | 
    
         
             
                    # AnnotateTextRequest.Features.extract_syntax.
         
     | 
| 
       307 
312 
     | 
    
         
             
                    # Corresponds to the JSON property `sentences`
         
     | 
| 
         @@ -324,6 +329,7 @@ module Google 
     | 
|
| 
       324 
329 
     | 
    
         
             
                      @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
         
     | 
| 
       325 
330 
     | 
    
         
             
                      @entities = args[:entities] if args.key?(:entities)
         
     | 
| 
       326 
331 
     | 
    
         
             
                      @language = args[:language] if args.key?(:language)
         
     | 
| 
      
 332 
     | 
    
         
            +
                      @moderation_categories = args[:moderation_categories] if args.key?(:moderation_categories)
         
     | 
| 
       327 
333 
     | 
    
         
             
                      @sentences = args[:sentences] if args.key?(:sentences)
         
     | 
| 
       328 
334 
     | 
    
         
             
                      @tokens = args[:tokens] if args.key?(:tokens)
         
     | 
| 
       329 
335 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -630,6 +636,12 @@ module Google 
     | 
|
| 
       630 
636 
     | 
    
         
             
                    attr_accessor :extract_syntax
         
     | 
| 
       631 
637 
     | 
    
         
             
                    alias_method :extract_syntax?, :extract_syntax
         
     | 
| 
       632 
638 
     | 
    
         | 
| 
      
 639 
     | 
    
         
            +
                    # Moderate the document for harmful and sensitive categories.
         
     | 
| 
      
 640 
     | 
    
         
            +
                    # Corresponds to the JSON property `moderateText`
         
     | 
| 
      
 641 
     | 
    
         
            +
                    # @return [Boolean]
         
     | 
| 
      
 642 
     | 
    
         
            +
                    attr_accessor :moderate_text
         
     | 
| 
      
 643 
     | 
    
         
            +
                    alias_method :moderate_text?, :moderate_text
         
     | 
| 
      
 644 
     | 
    
         
            +
                  
         
     | 
| 
       633 
645 
     | 
    
         
             
                    def initialize(**args)
         
     | 
| 
       634 
646 
     | 
    
         
             
                       update!(**args)
         
     | 
| 
       635 
647 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -642,6 +654,45 @@ module Google 
     | 
|
| 
       642 
654 
     | 
    
         
             
                      @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
         
     | 
| 
       643 
655 
     | 
    
         
             
                      @extract_entity_sentiment = args[:extract_entity_sentiment] if args.key?(:extract_entity_sentiment)
         
     | 
| 
       644 
656 
     | 
    
         
             
                      @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
         
     | 
| 
      
 657 
     | 
    
         
            +
                      @moderate_text = args[:moderate_text] if args.key?(:moderate_text)
         
     | 
| 
      
 658 
     | 
    
         
            +
                    end
         
     | 
| 
      
 659 
     | 
    
         
            +
                  end
         
     | 
| 
      
 660 
     | 
    
         
            +
                  
         
     | 
| 
      
 661 
     | 
    
         
            +
                  # The document moderation request message.
         
     | 
| 
      
 662 
     | 
    
         
            +
                  class ModerateTextRequest
         
     | 
| 
      
 663 
     | 
    
         
            +
                    include Google::Apis::Core::Hashable
         
     | 
| 
      
 664 
     | 
    
         
            +
                  
         
     | 
| 
      
 665 
     | 
    
         
            +
                    # Represents the input to API methods.
         
     | 
| 
      
 666 
     | 
    
         
            +
                    # Corresponds to the JSON property `document`
         
     | 
| 
      
 667 
     | 
    
         
            +
                    # @return [Google::Apis::LanguageV1::Document]
         
     | 
| 
      
 668 
     | 
    
         
            +
                    attr_accessor :document
         
     | 
| 
      
 669 
     | 
    
         
            +
                  
         
     | 
| 
      
 670 
     | 
    
         
            +
                    def initialize(**args)
         
     | 
| 
      
 671 
     | 
    
         
            +
                       update!(**args)
         
     | 
| 
      
 672 
     | 
    
         
            +
                    end
         
     | 
| 
      
 673 
     | 
    
         
            +
                  
         
     | 
| 
      
 674 
     | 
    
         
            +
                    # Update properties of this object
         
     | 
| 
      
 675 
     | 
    
         
            +
                    def update!(**args)
         
     | 
| 
      
 676 
     | 
    
         
            +
                      @document = args[:document] if args.key?(:document)
         
     | 
| 
      
 677 
     | 
    
         
            +
                    end
         
     | 
| 
      
 678 
     | 
    
         
            +
                  end
         
     | 
| 
      
 679 
     | 
    
         
            +
                  
         
     | 
| 
      
 680 
     | 
    
         
            +
                  # The document moderation response message.
         
     | 
| 
      
 681 
     | 
    
         
            +
                  class ModerateTextResponse
         
     | 
| 
      
 682 
     | 
    
         
            +
                    include Google::Apis::Core::Hashable
         
     | 
| 
      
 683 
     | 
    
         
            +
                  
         
     | 
| 
      
 684 
     | 
    
         
            +
                    # Harmful and sensitive categories representing the input document.
         
     | 
| 
      
 685 
     | 
    
         
            +
                    # Corresponds to the JSON property `moderationCategories`
         
     | 
| 
      
 686 
     | 
    
         
            +
                    # @return [Array<Google::Apis::LanguageV1::ClassificationCategory>]
         
     | 
| 
      
 687 
     | 
    
         
            +
                    attr_accessor :moderation_categories
         
     | 
| 
      
 688 
     | 
    
         
            +
                  
         
     | 
| 
      
 689 
     | 
    
         
            +
                    def initialize(**args)
         
     | 
| 
      
 690 
     | 
    
         
            +
                       update!(**args)
         
     | 
| 
      
 691 
     | 
    
         
            +
                    end
         
     | 
| 
      
 692 
     | 
    
         
            +
                  
         
     | 
| 
      
 693 
     | 
    
         
            +
                    # Update properties of this object
         
     | 
| 
      
 694 
     | 
    
         
            +
                    def update!(**args)
         
     | 
| 
      
 695 
     | 
    
         
            +
                      @moderation_categories = args[:moderation_categories] if args.key?(:moderation_categories)
         
     | 
| 
       645 
696 
     | 
    
         
             
                    end
         
     | 
| 
       646 
697 
     | 
    
         
             
                  end
         
     | 
| 
       647 
698 
     | 
    
         | 
| 
         @@ -16,13 +16,13 @@ module Google 
     | 
|
| 
       16 
16 
     | 
    
         
             
              module Apis
         
     | 
| 
       17 
17 
     | 
    
         
             
                module LanguageV1
         
     | 
| 
       18 
18 
     | 
    
         
             
                  # Version of the google-apis-language_v1 gem
         
     | 
| 
       19 
     | 
    
         
            -
                  GEM_VERSION = "0. 
     | 
| 
      
 19 
     | 
    
         
            +
                  GEM_VERSION = "0.18.0"
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
                  # Version of the code generator used to generate this client
         
     | 
| 
       22 
22 
     | 
    
         
             
                  GENERATOR_VERSION = "0.12.0"
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
                  # Revision of the discovery document this client was generated from
         
     | 
| 
       25 
     | 
    
         
            -
                  REVISION = " 
     | 
| 
      
 25 
     | 
    
         
            +
                  REVISION = "20230527"
         
     | 
| 
       26 
26 
     | 
    
         
             
                end
         
     | 
| 
       27 
27 
     | 
    
         
             
              end
         
     | 
| 
       28 
28 
     | 
    
         
             
            end
         
     | 
| 
         @@ -136,6 +136,18 @@ module Google 
     | 
|
| 
       136 
136 
     | 
    
         
             
                    include Google::Apis::Core::JsonObjectSupport
         
     | 
| 
       137 
137 
     | 
    
         
             
                  end
         
     | 
| 
       138 
138 
     | 
    
         | 
| 
      
 139 
     | 
    
         
            +
                  class ModerateTextRequest
         
     | 
| 
      
 140 
     | 
    
         
            +
                    class Representation < Google::Apis::Core::JsonRepresentation; end
         
     | 
| 
      
 141 
     | 
    
         
            +
                  
         
     | 
| 
      
 142 
     | 
    
         
            +
                    include Google::Apis::Core::JsonObjectSupport
         
     | 
| 
      
 143 
     | 
    
         
            +
                  end
         
     | 
| 
      
 144 
     | 
    
         
            +
                  
         
     | 
| 
      
 145 
     | 
    
         
            +
                  class ModerateTextResponse
         
     | 
| 
      
 146 
     | 
    
         
            +
                    class Representation < Google::Apis::Core::JsonRepresentation; end
         
     | 
| 
      
 147 
     | 
    
         
            +
                  
         
     | 
| 
      
 148 
     | 
    
         
            +
                    include Google::Apis::Core::JsonObjectSupport
         
     | 
| 
      
 149 
     | 
    
         
            +
                  end
         
     | 
| 
      
 150 
     | 
    
         
            +
                  
         
     | 
| 
       139 
151 
     | 
    
         
             
                  class PartOfSpeech
         
     | 
| 
       140 
152 
     | 
    
         
             
                    class Representation < Google::Apis::Core::JsonRepresentation; end
         
     | 
| 
       141 
153 
     | 
    
         | 
| 
         @@ -281,6 +293,8 @@ module Google 
     | 
|
| 
       281 
293 
     | 
    
         
             
                      collection :entities, as: 'entities', class: Google::Apis::LanguageV1::Entity, decorator: Google::Apis::LanguageV1::Entity::Representation
         
     | 
| 
       282 
294 
     | 
    
         | 
| 
       283 
295 
     | 
    
         
             
                      property :language, as: 'language'
         
     | 
| 
      
 296 
     | 
    
         
            +
                      collection :moderation_categories, as: 'moderationCategories', class: Google::Apis::LanguageV1::ClassificationCategory, decorator: Google::Apis::LanguageV1::ClassificationCategory::Representation
         
     | 
| 
      
 297 
     | 
    
         
            +
                  
         
     | 
| 
       284 
298 
     | 
    
         
             
                      collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1::Sentence, decorator: Google::Apis::LanguageV1::Sentence::Representation
         
     | 
| 
       285 
299 
     | 
    
         | 
| 
       286 
300 
     | 
    
         
             
                      collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1::Token, decorator: Google::Apis::LanguageV1::Token::Representation
         
     | 
| 
         @@ -377,6 +391,23 @@ module Google 
     | 
|
| 
       377 
391 
     | 
    
         
             
                      property :extract_entities, as: 'extractEntities'
         
     | 
| 
       378 
392 
     | 
    
         
             
                      property :extract_entity_sentiment, as: 'extractEntitySentiment'
         
     | 
| 
       379 
393 
     | 
    
         
             
                      property :extract_syntax, as: 'extractSyntax'
         
     | 
| 
      
 394 
     | 
    
         
            +
                      property :moderate_text, as: 'moderateText'
         
     | 
| 
      
 395 
     | 
    
         
            +
                    end
         
     | 
| 
      
 396 
     | 
    
         
            +
                  end
         
     | 
| 
      
 397 
     | 
    
         
            +
                  
         
     | 
| 
      
 398 
     | 
    
         
            +
                  class ModerateTextRequest
         
     | 
| 
      
 399 
     | 
    
         
            +
                    # @private
         
     | 
| 
      
 400 
     | 
    
         
            +
                    class Representation < Google::Apis::Core::JsonRepresentation
         
     | 
| 
      
 401 
     | 
    
         
            +
                      property :document, as: 'document', class: Google::Apis::LanguageV1::Document, decorator: Google::Apis::LanguageV1::Document::Representation
         
     | 
| 
      
 402 
     | 
    
         
            +
                  
         
     | 
| 
      
 403 
     | 
    
         
            +
                    end
         
     | 
| 
      
 404 
     | 
    
         
            +
                  end
         
     | 
| 
      
 405 
     | 
    
         
            +
                  
         
     | 
| 
      
 406 
     | 
    
         
            +
                  class ModerateTextResponse
         
     | 
| 
      
 407 
     | 
    
         
            +
                    # @private
         
     | 
| 
      
 408 
     | 
    
         
            +
                    class Representation < Google::Apis::Core::JsonRepresentation
         
     | 
| 
      
 409 
     | 
    
         
            +
                      collection :moderation_categories, as: 'moderationCategories', class: Google::Apis::LanguageV1::ClassificationCategory, decorator: Google::Apis::LanguageV1::ClassificationCategory::Representation
         
     | 
| 
      
 410 
     | 
    
         
            +
                  
         
     | 
| 
       380 
411 
     | 
    
         
             
                    end
         
     | 
| 
       381 
412 
     | 
    
         
             
                  end
         
     | 
| 
       382 
413 
     | 
    
         | 
| 
         @@ -236,6 +236,36 @@ module Google 
     | 
|
| 
       236 
236 
     | 
    
         
             
                      command.query['quotaUser'] = quota_user unless quota_user.nil?
         
     | 
| 
       237 
237 
     | 
    
         
             
                      execute_or_queue_command(command, &block)
         
     | 
| 
       238 
238 
     | 
    
         
             
                    end
         
     | 
| 
      
 239 
     | 
    
         
            +
                    
         
     | 
| 
      
 240 
     | 
    
         
            +
                    # Moderates a document for harmful and sensitive categories.
         
     | 
| 
      
 241 
     | 
    
         
            +
                    # @param [Google::Apis::LanguageV1::ModerateTextRequest] moderate_text_request_object
         
     | 
| 
      
 242 
     | 
    
         
            +
                    # @param [String] fields
         
     | 
| 
      
 243 
     | 
    
         
            +
                    #   Selector specifying which fields to include in a partial response.
         
     | 
| 
      
 244 
     | 
    
         
            +
                    # @param [String] quota_user
         
     | 
| 
      
 245 
     | 
    
         
            +
                    #   Available to use for quota purposes for server-side applications. Can be any
         
     | 
| 
      
 246 
     | 
    
         
            +
                    #   arbitrary string assigned to a user, but should not exceed 40 characters.
         
     | 
| 
      
 247 
     | 
    
         
            +
                    # @param [Google::Apis::RequestOptions] options
         
     | 
| 
      
 248 
     | 
    
         
            +
                    #   Request-specific options
         
     | 
| 
      
 249 
     | 
    
         
            +
                    #
         
     | 
| 
      
 250 
     | 
    
         
            +
                    # @yield [result, err] Result & error if block supplied
         
     | 
| 
      
 251 
     | 
    
         
            +
                    # @yieldparam result [Google::Apis::LanguageV1::ModerateTextResponse] parsed result object
         
     | 
| 
      
 252 
     | 
    
         
            +
                    # @yieldparam err [StandardError] error object if request failed
         
     | 
| 
      
 253 
     | 
    
         
            +
                    #
         
     | 
| 
      
 254 
     | 
    
         
            +
                    # @return [Google::Apis::LanguageV1::ModerateTextResponse]
         
     | 
| 
      
 255 
     | 
    
         
            +
                    #
         
     | 
| 
      
 256 
     | 
    
         
            +
                    # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
         
     | 
| 
      
 257 
     | 
    
         
            +
                    # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
         
     | 
| 
      
 258 
     | 
    
         
            +
                    # @raise [Google::Apis::AuthorizationError] Authorization is required
         
     | 
| 
      
 259 
     | 
    
         
            +
                    def moderate_document_text(moderate_text_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
         
     | 
| 
      
 260 
     | 
    
         
            +
                      command = make_simple_command(:post, 'v1/documents:moderateText', options)
         
     | 
| 
      
 261 
     | 
    
         
            +
                      command.request_representation = Google::Apis::LanguageV1::ModerateTextRequest::Representation
         
     | 
| 
      
 262 
     | 
    
         
            +
                      command.request_object = moderate_text_request_object
         
     | 
| 
      
 263 
     | 
    
         
            +
                      command.response_representation = Google::Apis::LanguageV1::ModerateTextResponse::Representation
         
     | 
| 
      
 264 
     | 
    
         
            +
                      command.response_class = Google::Apis::LanguageV1::ModerateTextResponse
         
     | 
| 
      
 265 
     | 
    
         
            +
                      command.query['fields'] = fields unless fields.nil?
         
     | 
| 
      
 266 
     | 
    
         
            +
                      command.query['quotaUser'] = quota_user unless quota_user.nil?
         
     | 
| 
      
 267 
     | 
    
         
            +
                      execute_or_queue_command(command, &block)
         
     | 
| 
      
 268 
     | 
    
         
            +
                    end
         
     | 
| 
       239 
269 
     | 
    
         | 
| 
       240 
270 
     | 
    
         
             
                    protected
         
     | 
| 
       241 
271 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: google-apis-language_v1
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.18.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Google LLC
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2023-04 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-06-04 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: google-apis-core
         
     | 
| 
         @@ -58,7 +58,7 @@ licenses: 
     | 
|
| 
       58 
58 
     | 
    
         
             
            metadata:
         
     | 
| 
       59 
59 
     | 
    
         
             
              bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
         
     | 
| 
       60 
60 
     | 
    
         
             
              changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-language_v1/CHANGELOG.md
         
     | 
| 
       61 
     | 
    
         
            -
              documentation_uri: https://googleapis.dev/ruby/google-apis-language_v1/v0. 
     | 
| 
      
 61 
     | 
    
         
            +
              documentation_uri: https://googleapis.dev/ruby/google-apis-language_v1/v0.18.0
         
     | 
| 
       62 
62 
     | 
    
         
             
              source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-language_v1
         
     | 
| 
       63 
63 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       64 
64 
     | 
    
         
             
            rdoc_options: []
         
     |