Class: Google::Apis::ChecksV1alpha::GoogleChecksAisafetyV1alphaTextInput

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/checks_v1alpha/classes.rb,
lib/google/apis/checks_v1alpha/representations.rb,
lib/google/apis/checks_v1alpha/representations.rb

Overview

Text input to be classified.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleChecksAisafetyV1alphaTextInput

Returns a new instance of GoogleChecksAisafetyV1alphaTextInput.



273
274
275
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 273

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#contentString

Actual piece of text to be classified. Corresponds to the JSON property content

Returns:

  • (String)


265
266
267
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 265

def content
  @content
end

#language_codeString

Optional. Language of the text in ISO 639-1 format. If the language is invalid or not specified, the system will try to detect it. Corresponds to the JSON property languageCode

Returns:

  • (String)


271
272
273
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 271

def language_code
  @language_code
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



278
279
280
281
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 278

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @language_code = args[:language_code] if args.key?(:language_code)
end