Class: Google::Apis::LanguageV2::ModerateTextResponse
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV2::ModerateTextResponse
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/language_v2/classes.rb,
lib/google/apis/language_v2/representations.rb,
lib/google/apis/language_v2/representations.rb
Overview
The document moderation response message.
Instance Attribute Summary collapse
-
#language_code ⇒ String
The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language.
-
#language_supported ⇒ Boolean
(also: #language_supported?)
Whether the language is officially supported.
-
#moderation_categories ⇒ Array<Google::Apis::LanguageV2::ClassificationCategory>
Harmful and sensitive categories representing the input document.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ModerateTextResponse
constructor
A new instance of ModerateTextResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ModerateTextResponse
Returns a new instance of ModerateTextResponse.
800 801 802 |
# File 'lib/google/apis/language_v2/classes.rb', line 800 def initialize(**args) update!(**args) end |
Instance Attribute Details
#language_code ⇒ String
The language of the text, which will be the same as the language specified in
the request or, if not specified, the automatically-detected language. See
Document.language field for more details.
Corresponds to the JSON property languageCode
786 787 788 |
# File 'lib/google/apis/language_v2/classes.rb', line 786 def language_code @language_code end |
#language_supported ⇒ Boolean Also known as: language_supported?
Whether the language is officially supported. The API may still return a
response when the language is not supported, but it is on a best effort basis.
Corresponds to the JSON property languageSupported
792 793 794 |
# File 'lib/google/apis/language_v2/classes.rb', line 792 def language_supported @language_supported end |
#moderation_categories ⇒ Array<Google::Apis::LanguageV2::ClassificationCategory>
Harmful and sensitive categories representing the input document.
Corresponds to the JSON property moderationCategories
798 799 800 |
# File 'lib/google/apis/language_v2/classes.rb', line 798 def moderation_categories @moderation_categories end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
805 806 807 808 809 |
# File 'lib/google/apis/language_v2/classes.rb', line 805 def update!(**args) @language_code = args[:language_code] if args.key?(:language_code) @language_supported = args[:language_supported] if args.key?(:language_supported) @moderation_categories = args[:moderation_categories] if args.key?(:moderation_categories) end |