Class RecognitionAudio.Builder

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

public static final class RecognitionAudio.Builder extends com.google.protobuf.GeneratedMessage.Builder<RecognitionAudio.Builder> implements RecognitionAudioOrBuilder
 Contains audio data in the encoding specified in the `RecognitionConfig`.
 Either `content` or `uri` must be supplied. Supplying both or neither
 returns [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
 See [content limits](https://cloud.google.com/speech-to-text/quotas#content).
 
Protobuf type google.cloud.speech.v1.RecognitionAudio
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
     
    The audio data bytes encoded as specified in `RecognitionConfig`.
    URI that points to a file that contains audio data bytes as specified in `RecognitionConfig`.
     
    com.google.protobuf.ByteString
    The audio data bytes encoded as specified in `RecognitionConfig`.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    URI that points to a file that contains audio data bytes as specified in `RecognitionConfig`.
    com.google.protobuf.ByteString
    URI that points to a file that contains audio data bytes as specified in `RecognitionConfig`.
    boolean
    The audio data bytes encoded as specified in `RecognitionConfig`.
    boolean
    URI that points to a file that contains audio data bytes as specified in `RecognitionConfig`.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setContent(com.google.protobuf.ByteString value)
    The audio data bytes encoded as specified in `RecognitionConfig`.
    setUri(String value)
    URI that points to a file that contains audio data bytes as specified in `RecognitionConfig`.
    setUriBytes(com.google.protobuf.ByteString value)
    URI that points to a file that contains audio data bytes as specified in `RecognitionConfig`.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • 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<RecognitionAudio.Builder>
    • clear

      public RecognitionAudio.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<RecognitionAudio.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<RecognitionAudio.Builder>
    • getDefaultInstanceForType

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

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

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

      public RecognitionAudio.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<RecognitionAudio.Builder>
    • mergeFrom

      public RecognitionAudio.Builder mergeFrom(RecognitionAudio other)
    • isInitialized

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

      public RecognitionAudio.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<RecognitionAudio.Builder>
      Throws:
      IOException
    • getAudioSourceCase

      public RecognitionAudio.AudioSourceCase getAudioSourceCase()
      Specified by:
      getAudioSourceCase in interface RecognitionAudioOrBuilder
    • clearAudioSource

      public RecognitionAudio.Builder clearAudioSource()
    • hasContent

      public boolean hasContent()
       The audio data bytes encoded as specified in
       `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
       pure binary representation, whereas JSON representations use base64.
       
      bytes content = 1;
      Specified by:
      hasContent in interface RecognitionAudioOrBuilder
      Returns:
      Whether the content field is set.
    • getContent

      public com.google.protobuf.ByteString getContent()
       The audio data bytes encoded as specified in
       `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
       pure binary representation, whereas JSON representations use base64.
       
      bytes content = 1;
      Specified by:
      getContent in interface RecognitionAudioOrBuilder
      Returns:
      The content.
    • setContent

      public RecognitionAudio.Builder setContent(com.google.protobuf.ByteString value)
       The audio data bytes encoded as specified in
       `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
       pure binary representation, whereas JSON representations use base64.
       
      bytes content = 1;
      Parameters:
      value - The content to set.
      Returns:
      This builder for chaining.
    • clearContent

      public RecognitionAudio.Builder clearContent()
       The audio data bytes encoded as specified in
       `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
       pure binary representation, whereas JSON representations use base64.
       
      bytes content = 1;
      Returns:
      This builder for chaining.
    • hasUri

      public boolean hasUri()
       URI that points to a file that contains audio data bytes as specified in
       `RecognitionConfig`. The file must not be compressed (for example, gzip).
       Currently, only Google Cloud Storage URIs are
       supported, which must be specified in the following format:
       `gs://bucket_name/object_name` (other URI formats return
       [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
       For more information, see [Request
       URIs](https://cloud.google.com/storage/docs/reference-uris).
       
      string uri = 2;
      Specified by:
      hasUri in interface RecognitionAudioOrBuilder
      Returns:
      Whether the uri field is set.
    • getUri

      public String getUri()
       URI that points to a file that contains audio data bytes as specified in
       `RecognitionConfig`. The file must not be compressed (for example, gzip).
       Currently, only Google Cloud Storage URIs are
       supported, which must be specified in the following format:
       `gs://bucket_name/object_name` (other URI formats return
       [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
       For more information, see [Request
       URIs](https://cloud.google.com/storage/docs/reference-uris).
       
      string uri = 2;
      Specified by:
      getUri in interface RecognitionAudioOrBuilder
      Returns:
      The uri.
    • getUriBytes

      public com.google.protobuf.ByteString getUriBytes()
       URI that points to a file that contains audio data bytes as specified in
       `RecognitionConfig`. The file must not be compressed (for example, gzip).
       Currently, only Google Cloud Storage URIs are
       supported, which must be specified in the following format:
       `gs://bucket_name/object_name` (other URI formats return
       [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
       For more information, see [Request
       URIs](https://cloud.google.com/storage/docs/reference-uris).
       
      string uri = 2;
      Specified by:
      getUriBytes in interface RecognitionAudioOrBuilder
      Returns:
      The bytes for uri.
    • setUri

      public RecognitionAudio.Builder setUri(String value)
       URI that points to a file that contains audio data bytes as specified in
       `RecognitionConfig`. The file must not be compressed (for example, gzip).
       Currently, only Google Cloud Storage URIs are
       supported, which must be specified in the following format:
       `gs://bucket_name/object_name` (other URI formats return
       [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
       For more information, see [Request
       URIs](https://cloud.google.com/storage/docs/reference-uris).
       
      string uri = 2;
      Parameters:
      value - The uri to set.
      Returns:
      This builder for chaining.
    • clearUri

      public RecognitionAudio.Builder clearUri()
       URI that points to a file that contains audio data bytes as specified in
       `RecognitionConfig`. The file must not be compressed (for example, gzip).
       Currently, only Google Cloud Storage URIs are
       supported, which must be specified in the following format:
       `gs://bucket_name/object_name` (other URI formats return
       [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
       For more information, see [Request
       URIs](https://cloud.google.com/storage/docs/reference-uris).
       
      string uri = 2;
      Returns:
      This builder for chaining.
    • setUriBytes

      public RecognitionAudio.Builder setUriBytes(com.google.protobuf.ByteString value)
       URI that points to a file that contains audio data bytes as specified in
       `RecognitionConfig`. The file must not be compressed (for example, gzip).
       Currently, only Google Cloud Storage URIs are
       supported, which must be specified in the following format:
       `gs://bucket_name/object_name` (other URI formats return
       [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
       For more information, see [Request
       URIs](https://cloud.google.com/storage/docs/reference-uris).
       
      string uri = 2;
      Parameters:
      value - The bytes for uri to set.
      Returns:
      This builder for chaining.