Class RecognitionResponseMetadata.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<RecognitionResponseMetadata.Builder>
com.google.cloud.speech.v2.RecognitionResponseMetadata.Builder
All Implemented Interfaces:
RecognitionResponseMetadataOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
RecognitionResponseMetadata

public static final class RecognitionResponseMetadata.Builder extends com.google.protobuf.GeneratedMessage.Builder<RecognitionResponseMetadata.Builder> implements RecognitionResponseMetadataOrBuilder
 Metadata about the recognition request and response.
 
Protobuf type google.cloud.speech.v2.RecognitionResponseMetadata
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<RecognitionResponseMetadata.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.GeneratedMessage.Builder<RecognitionResponseMetadata.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.GeneratedMessage.Builder<RecognitionResponseMetadata.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public RecognitionResponseMetadata.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RecognitionResponseMetadata.Builder>
    • mergeFrom

    • isInitialized

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

      public RecognitionResponseMetadata.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<RecognitionResponseMetadata.Builder>
      Throws:
      IOException
    • getRequestId

      public String getRequestId()
       Global request identifier auto-generated by the API.
       
      string request_id = 9 [(.google.api.field_info) = { ... }
      Specified by:
      getRequestId in interface RecognitionResponseMetadataOrBuilder
      Returns:
      The requestId.
    • getRequestIdBytes

      public com.google.protobuf.ByteString getRequestIdBytes()
       Global request identifier auto-generated by the API.
       
      string request_id = 9 [(.google.api.field_info) = { ... }
      Specified by:
      getRequestIdBytes in interface RecognitionResponseMetadataOrBuilder
      Returns:
      The bytes for requestId.
    • setRequestId

      public RecognitionResponseMetadata.Builder setRequestId(String value)
       Global request identifier auto-generated by the API.
       
      string request_id = 9 [(.google.api.field_info) = { ... }
      Parameters:
      value - The requestId to set.
      Returns:
      This builder for chaining.
    • clearRequestId

      public RecognitionResponseMetadata.Builder clearRequestId()
       Global request identifier auto-generated by the API.
       
      string request_id = 9 [(.google.api.field_info) = { ... }
      Returns:
      This builder for chaining.
    • setRequestIdBytes

      public RecognitionResponseMetadata.Builder setRequestIdBytes(com.google.protobuf.ByteString value)
       Global request identifier auto-generated by the API.
       
      string request_id = 9 [(.google.api.field_info) = { ... }
      Parameters:
      value - The bytes for requestId to set.
      Returns:
      This builder for chaining.
    • hasTotalBilledDuration

      public boolean hasTotalBilledDuration()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_duration = 6;
      Specified by:
      hasTotalBilledDuration in interface RecognitionResponseMetadataOrBuilder
      Returns:
      Whether the totalBilledDuration field is set.
    • getTotalBilledDuration

      public com.google.protobuf.Duration getTotalBilledDuration()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_duration = 6;
      Specified by:
      getTotalBilledDuration in interface RecognitionResponseMetadataOrBuilder
      Returns:
      The totalBilledDuration.
    • setTotalBilledDuration

      public RecognitionResponseMetadata.Builder setTotalBilledDuration(com.google.protobuf.Duration value)
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_duration = 6;
    • setTotalBilledDuration

      public RecognitionResponseMetadata.Builder setTotalBilledDuration(com.google.protobuf.Duration.Builder builderForValue)
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_duration = 6;
    • mergeTotalBilledDuration

      public RecognitionResponseMetadata.Builder mergeTotalBilledDuration(com.google.protobuf.Duration value)
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_duration = 6;
    • clearTotalBilledDuration

      public RecognitionResponseMetadata.Builder clearTotalBilledDuration()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_duration = 6;
    • getTotalBilledDurationBuilder

      public com.google.protobuf.Duration.Builder getTotalBilledDurationBuilder()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_duration = 6;
    • getTotalBilledDurationOrBuilder

      public com.google.protobuf.DurationOrBuilder getTotalBilledDurationOrBuilder()
       When available, billed audio seconds for the corresponding request.
       
      .google.protobuf.Duration total_billed_duration = 6;
      Specified by:
      getTotalBilledDurationOrBuilder in interface RecognitionResponseMetadataOrBuilder
    • hasPrompt

      public boolean hasPrompt()
       Optional. Output only. Provides the prompt used for the recognition
       request.
       
      optional string prompt = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasPrompt in interface RecognitionResponseMetadataOrBuilder
      Returns:
      Whether the prompt field is set.
    • getPrompt

      public String getPrompt()
       Optional. Output only. Provides the prompt used for the recognition
       request.
       
      optional string prompt = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPrompt in interface RecognitionResponseMetadataOrBuilder
      Returns:
      The prompt.
    • getPromptBytes

      public com.google.protobuf.ByteString getPromptBytes()
       Optional. Output only. Provides the prompt used for the recognition
       request.
       
      optional string prompt = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPromptBytes in interface RecognitionResponseMetadataOrBuilder
      Returns:
      The bytes for prompt.
    • setPrompt

      public RecognitionResponseMetadata.Builder setPrompt(String value)
       Optional. Output only. Provides the prompt used for the recognition
       request.
       
      optional string prompt = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The prompt to set.
      Returns:
      This builder for chaining.
    • clearPrompt

       Optional. Output only. Provides the prompt used for the recognition
       request.
       
      optional string prompt = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setPromptBytes

      public RecognitionResponseMetadata.Builder setPromptBytes(com.google.protobuf.ByteString value)
       Optional. Output only. Provides the prompt used for the recognition
       request.
       
      optional string prompt = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for prompt to set.
      Returns:
      This builder for chaining.