Class DetectLanguageRequest

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.translate.v3.DetectLanguageRequest
All Implemented Interfaces:
DetectLanguageRequestOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class DetectLanguageRequest extends com.google.protobuf.GeneratedMessage implements DetectLanguageRequestOrBuilder
 The request message for language detection.
 
Protobuf type google.cloud.translation.v3.DetectLanguageRequest
See Also:
  • Field Details

  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getSourceCase

      public DetectLanguageRequest.SourceCase getSourceCase()
      Specified by:
      getSourceCase in interface DetectLanguageRequestOrBuilder
    • getParent

      public String getParent()
       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.
       
      string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParent in interface DetectLanguageRequestOrBuilder
      Returns:
      The parent.
    • getParentBytes

      public com.google.protobuf.ByteString getParentBytes()
       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.
       
      string parent = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getParentBytes in interface DetectLanguageRequestOrBuilder
      Returns:
      The bytes for parent.
    • getModel

      public String getModel()
       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.
       
      string model = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModel in interface DetectLanguageRequestOrBuilder
      Returns:
      The model.
    • getModelBytes

      public com.google.protobuf.ByteString getModelBytes()
       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.
       
      string model = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getModelBytes in interface DetectLanguageRequestOrBuilder
      Returns:
      The bytes for model.
    • hasContent

      public boolean hasContent()
       The content of the input stored as a string.
       
      string content = 1;
      Specified by:
      hasContent in interface DetectLanguageRequestOrBuilder
      Returns:
      Whether the content field is set.
    • getContent

      public String getContent()
       The content of the input stored as a string.
       
      string content = 1;
      Specified by:
      getContent in interface DetectLanguageRequestOrBuilder
      Returns:
      The content.
    • getContentBytes

      public com.google.protobuf.ByteString getContentBytes()
       The content of the input stored as a string.
       
      string content = 1;
      Specified by:
      getContentBytes in interface DetectLanguageRequestOrBuilder
      Returns:
      The bytes for content.
    • getMimeType

      public String getMimeType()
       Optional. The format of the source text, for example, "text/html",
       "text/plain". If left blank, the MIME type defaults to "text/html".
       
      string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMimeType in interface DetectLanguageRequestOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       Optional. The format of the source text, for example, "text/html",
       "text/plain". If left blank, the MIME type defaults to "text/html".
       
      string mime_type = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMimeTypeBytes in interface DetectLanguageRequestOrBuilder
      Returns:
      The bytes for mimeType.
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: DetectLanguageRequestOrBuilder
       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/advanced/labels for more
       information.
       
      map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface DetectLanguageRequestOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       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/advanced/labels for more
       information.
       
      map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsLabels in interface DetectLanguageRequestOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface DetectLanguageRequestOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       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/advanced/labels for more
       information.
       
      map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsMap in interface DetectLanguageRequestOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       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/advanced/labels for more
       information.
       
      map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrDefault in interface DetectLanguageRequestOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       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/advanced/labels for more
       information.
       
      map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrThrow in interface DetectLanguageRequestOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static DetectLanguageRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DetectLanguageRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DetectLanguageRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DetectLanguageRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DetectLanguageRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DetectLanguageRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DetectLanguageRequest parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DetectLanguageRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DetectLanguageRequest parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DetectLanguageRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DetectLanguageRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DetectLanguageRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public DetectLanguageRequest.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static DetectLanguageRequest.Builder newBuilder()
    • newBuilder

      public static DetectLanguageRequest.Builder newBuilder(DetectLanguageRequest prototype)
    • toBuilder

      public DetectLanguageRequest.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected DetectLanguageRequest.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static DetectLanguageRequest getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<DetectLanguageRequest> parser()
    • getParserForType

      public com.google.protobuf.Parser<DetectLanguageRequest> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public DetectLanguageRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder