Class DetectLanguageRequest.Builder

    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • clear

        public DetectLanguageRequest.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • getDefaultInstanceForType

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

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

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

        public DetectLanguageRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • clearField

        public DetectLanguageRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • clearOneof

        public DetectLanguageRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • setRepeatedField

        public DetectLanguageRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                              int index,
                                                              Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • addRepeatedField

        public DetectLanguageRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                              Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • mergeFrom

        public DetectLanguageRequest.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DetectLanguageRequest.Builder>
        Throws:
        IOException
      • 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.
      • setParent

        public DetectLanguageRequest.Builder setParent​(String value)
         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) = { ... }
        Parameters:
        value - The parent to set.
        Returns:
        This builder for chaining.
      • clearParent

        public DetectLanguageRequest.Builder clearParent()
         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) = { ... }
        Returns:
        This builder for chaining.
      • setParentBytes

        public DetectLanguageRequest.Builder setParentBytes​(com.google.protobuf.ByteString value)
         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) = { ... }
        Parameters:
        value - The bytes for parent to set.
        Returns:
        This builder for chaining.
      • 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.
      • setModel

        public DetectLanguageRequest.Builder setModel​(String value)
         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];
        Parameters:
        value - The model to set.
        Returns:
        This builder for chaining.
      • clearModel

        public DetectLanguageRequest.Builder clearModel()
         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];
        Returns:
        This builder for chaining.
      • setModelBytes

        public DetectLanguageRequest.Builder setModelBytes​(com.google.protobuf.ByteString value)
         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];
        Parameters:
        value - The bytes for model to set.
        Returns:
        This builder for chaining.
      • 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.
      • 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.
      • setContent

        public DetectLanguageRequest.Builder setContent​(String value)
         The content of the input stored as a string.
         
        string content = 1;
        Parameters:
        value - The content to set.
        Returns:
        This builder for chaining.
      • clearContent

        public DetectLanguageRequest.Builder clearContent()
         The content of the input stored as a string.
         
        string content = 1;
        Returns:
        This builder for chaining.
      • setContentBytes

        public DetectLanguageRequest.Builder setContentBytes​(com.google.protobuf.ByteString value)
         The content of the input stored as a string.
         
        string content = 1;
        Parameters:
        value - The bytes for content to set.
        Returns:
        This builder for chaining.
      • 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.
      • setMimeType

        public DetectLanguageRequest.Builder setMimeType​(String value)
         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];
        Parameters:
        value - The mimeType to set.
        Returns:
        This builder for chaining.
      • clearMimeType

        public DetectLanguageRequest.Builder clearMimeType()
         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];
        Returns:
        This builder for chaining.
      • setMimeTypeBytes

        public DetectLanguageRequest.Builder setMimeTypeBytes​(com.google.protobuf.ByteString value)
         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];
        Parameters:
        value - The bytes for mimeType to set.
        Returns:
        This builder for chaining.
      • 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/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/labels for more information.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels 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/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/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/labels for more information.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface DetectLanguageRequestOrBuilder
      • removeLabels

        public DetectLanguageRequest.Builder removeLabels​(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/labels for more information.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • putLabels

        public DetectLanguageRequest.Builder putLabels​(String key,
                                                       String value)
         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.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
      • putAllLabels

        public DetectLanguageRequest.Builder putAllLabels​(Map<String,​String> values)
         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.
         
        map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
      • setUnknownFields

        public final DetectLanguageRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>
      • mergeUnknownFields

        public final DetectLanguageRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DetectLanguageRequest.Builder>