Class: Google::Apis::LanguageV1beta2::Document

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

Overview

########################################################## # Represents

the input to API methods.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Document

Returns a new instance of Document.



513
514
515
# File 'lib/google/apis/language_v1beta2/classes.rb', line 513

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

Instance Attribute Details

#boilerplate_handlingString

Indicates how detected boilerplate(e.g. advertisements, copyright declarations, banners) should be handled for this document. If not specified, boilerplate will be treated the same as content. Corresponds to the JSON property boilerplateHandling

Returns:

  • (String)


475
476
477
# File 'lib/google/apis/language_v1beta2/classes.rb', line 475

def boilerplate_handling
  @boilerplate_handling
end

#contentString

The content of the input in string format. Cloud audit logging exempt since it is based on user data. Corresponds to the JSON property content

Returns:

  • (String)


481
482
483
# File 'lib/google/apis/language_v1beta2/classes.rb', line 481

def content
  @content
end

#gcs_content_uriString

The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucket_name/object_name. For more details, see https:// cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. Corresponds to the JSON property gcsContentUri

Returns:

  • (String)


489
490
491
# File 'lib/google/apis/language_v1beta2/classes.rb', line 489

def gcs_content_uri
  @gcs_content_uri
end

#languageString

The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. Language Support lists currently supported languages for each API method. If the language (either specified by the caller or automatically detected) is not supported by the called API method, an INVALID_ARGUMENT error is returned. Corresponds to the JSON property language

Returns:

  • (String)


499
500
501
# File 'lib/google/apis/language_v1beta2/classes.rb', line 499

def language
  @language
end

#reference_web_uriString

The web URI where the document comes from. This URI is not used for fetching the content, but as a hint for analyzing the document. Corresponds to the JSON property referenceWebUri

Returns:

  • (String)


505
506
507
# File 'lib/google/apis/language_v1beta2/classes.rb', line 505

def reference_web_uri
  @reference_web_uri
end

#typeString

Required. If the type is not set or is TYPE_UNSPECIFIED, returns an INVALID_ARGUMENT error. Corresponds to the JSON property type

Returns:

  • (String)


511
512
513
# File 'lib/google/apis/language_v1beta2/classes.rb', line 511

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



518
519
520
521
522
523
524
525
# File 'lib/google/apis/language_v1beta2/classes.rb', line 518

def update!(**args)
  @boilerplate_handling = args[:boilerplate_handling] if args.key?(:boilerplate_handling)
  @content = args[:content] if args.key?(:content)
  @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
  @language = args[:language] if args.key?(:language)
  @reference_web_uri = args[:reference_web_uri] if args.key?(:reference_web_uri)
  @type = args[:type] if args.key?(:type)
end