Class: Google::Apis::LanguageV1beta1::Document
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1beta1::Document
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/language_v1beta1/classes.rb,
generated/google/apis/language_v1beta1/representations.rb,
generated/google/apis/language_v1beta1/representations.rb
Overview
##########################################################
Represents the input to API methods.
Instance Attribute Summary collapse
-
#content ⇒ String
The content of the input in string format.
-
#gcs_content_uri ⇒ String
The Google Cloud Storage URI where the file content is located.
-
#language ⇒ String
The language of the document (if not specified, the language is automatically detected).
-
#type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Document
constructor
A new instance of Document.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Document
Returns a new instance of Document
122 123 124 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 122 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content ⇒ String
The content of the input in string format.
Corresponds to the JSON property content
112 113 114 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 112 def content @content end |
#gcs_content_uri ⇒ String
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
120 121 122 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 120 def gcs_content_uri @gcs_content_uri end |
#language ⇒ String
The language of the document (if not specified, the language is
automatically detected). Both ISO and BCP-47 language codes are
accepted.
Current Language Restrictions:
- Only English, Spanish, and Japanese textual content are supported.
If the language (either specified by the caller or automatically detected)
is not supported by the called API method, an
INVALID_ARGUMENTerror is returned. Corresponds to the JSON propertylanguage
101 102 103 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 101 def language @language end |
#type ⇒ String
Required. If the type is not set or is TYPE_UNSPECIFIED,
returns an INVALID_ARGUMENT error.
Corresponds to the JSON property type
107 108 109 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 107 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
127 128 129 130 131 132 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 127 def update!(**args) @language = args[:language] if args.key?(:language) @type = args[:type] if args.key?(:type) @content = args[:content] if args.key?(:content) @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri) end |