Class: Google::Cloud::Translate::V3::DetectLanguageRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/translate/v3/translation_service.rb

Overview

The request message for language detection.

Defined Under Namespace

Classes: LabelsEntry

Instance Attribute Summary collapse

Instance Attribute Details

#content::String

Returns The content of the input stored as a string.

Returns:

  • (::String)

    The content of the input stored as a string.



211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 211

class DetectLanguageRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#labels::Google::Protobuf::Map{::String => ::String}

Returns Optional. The labels with user-defined metadata for the request.

Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

See https://cloud.google.com/translate/docs/labels for more information.

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

    Optional. The labels with user-defined metadata for the request.

    Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.

    See https://cloud.google.com/translate/docs/labels for more information.



211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 211

class DetectLanguageRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#mime_type::String

Returns Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".

Returns:

  • (::String)

    Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html".



211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 211

class DetectLanguageRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#model::String

Returns Optional. The language detection model to be used.

Format: projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}

Only one language detection model is currently supported: projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default.

If not specified, the default model is used.

Returns:

  • (::String)

    Optional. The language detection model to be used.

    Format: projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}

    Only one language detection model is currently supported: projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default.

    If not specified, the default model is used.



211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 211

class DetectLanguageRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#parent::String

Returns Required. Project or location to make a call. Must refer to a caller's project.

Format: projects/{project-number-or-id}/locations/{location-id} or projects/{project-number-or-id}.

For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.

Returns:

  • (::String)

    Required. Project or location to make a call. Must refer to a caller's project.

    Format: projects/{project-number-or-id}/locations/{location-id} or projects/{project-number-or-id}.

    For global calls, use projects/{project-number-or-id}/locations/global or projects/{project-number-or-id}.

    Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.



211
212
213
214
215
216
217
218
219
220
221
222
223
# File 'proto_docs/google/cloud/translate/v3/translation_service.rb', line 211

class DetectLanguageRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end