Class DocumentInputConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DocumentInputConfig.Builder>
com.google.cloud.translate.v3.DocumentInputConfig.Builder
All Implemented Interfaces:
DocumentInputConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
DocumentInputConfig

public static final class DocumentInputConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<DocumentInputConfig.Builder> implements DocumentInputConfigOrBuilder
 A document translation request input config.
 
Protobuf type google.cloud.translation.v3.DocumentInputConfig
  • 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<DocumentInputConfig.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<DocumentInputConfig.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<DocumentInputConfig.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public DocumentInputConfig.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<DocumentInputConfig.Builder>
      Throws:
      IOException
    • getSourceCase

      public DocumentInputConfig.SourceCase getSourceCase()
      Specified by:
      getSourceCase in interface DocumentInputConfigOrBuilder
    • clearSource

      public DocumentInputConfig.Builder clearSource()
    • hasContent

      public boolean hasContent()
       Document's content represented as a stream of bytes.
       
      bytes content = 1;
      Specified by:
      hasContent in interface DocumentInputConfigOrBuilder
      Returns:
      Whether the content field is set.
    • getContent

      public com.google.protobuf.ByteString getContent()
       Document's content represented as a stream of bytes.
       
      bytes content = 1;
      Specified by:
      getContent in interface DocumentInputConfigOrBuilder
      Returns:
      The content.
    • setContent

      public DocumentInputConfig.Builder setContent(com.google.protobuf.ByteString value)
       Document's content represented as a stream of bytes.
       
      bytes content = 1;
      Parameters:
      value - The content to set.
      Returns:
      This builder for chaining.
    • clearContent

      public DocumentInputConfig.Builder clearContent()
       Document's content represented as a stream of bytes.
       
      bytes content = 1;
      Returns:
      This builder for chaining.
    • hasGcsSource

      public boolean hasGcsSource()
       Google Cloud Storage location. This must be a single file.
       For example: gs://example_bucket/example_file.pdf
       
      .google.cloud.translation.v3.GcsSource gcs_source = 2;
      Specified by:
      hasGcsSource in interface DocumentInputConfigOrBuilder
      Returns:
      Whether the gcsSource field is set.
    • getGcsSource

      public GcsSource getGcsSource()
       Google Cloud Storage location. This must be a single file.
       For example: gs://example_bucket/example_file.pdf
       
      .google.cloud.translation.v3.GcsSource gcs_source = 2;
      Specified by:
      getGcsSource in interface DocumentInputConfigOrBuilder
      Returns:
      The gcsSource.
    • setGcsSource

      public DocumentInputConfig.Builder setGcsSource(GcsSource value)
       Google Cloud Storage location. This must be a single file.
       For example: gs://example_bucket/example_file.pdf
       
      .google.cloud.translation.v3.GcsSource gcs_source = 2;
    • setGcsSource

      public DocumentInputConfig.Builder setGcsSource(GcsSource.Builder builderForValue)
       Google Cloud Storage location. This must be a single file.
       For example: gs://example_bucket/example_file.pdf
       
      .google.cloud.translation.v3.GcsSource gcs_source = 2;
    • mergeGcsSource

      public DocumentInputConfig.Builder mergeGcsSource(GcsSource value)
       Google Cloud Storage location. This must be a single file.
       For example: gs://example_bucket/example_file.pdf
       
      .google.cloud.translation.v3.GcsSource gcs_source = 2;
    • clearGcsSource

      public DocumentInputConfig.Builder clearGcsSource()
       Google Cloud Storage location. This must be a single file.
       For example: gs://example_bucket/example_file.pdf
       
      .google.cloud.translation.v3.GcsSource gcs_source = 2;
    • getGcsSourceBuilder

      public GcsSource.Builder getGcsSourceBuilder()
       Google Cloud Storage location. This must be a single file.
       For example: gs://example_bucket/example_file.pdf
       
      .google.cloud.translation.v3.GcsSource gcs_source = 2;
    • getGcsSourceOrBuilder

      public GcsSourceOrBuilder getGcsSourceOrBuilder()
       Google Cloud Storage location. This must be a single file.
       For example: gs://example_bucket/example_file.pdf
       
      .google.cloud.translation.v3.GcsSource gcs_source = 2;
      Specified by:
      getGcsSourceOrBuilder in interface DocumentInputConfigOrBuilder
    • getMimeType

      public String getMimeType()
       Specifies the input document's mime_type.
      
       If not specified it will be determined using the file extension for
       gcs_source provided files. For a file provided through bytes content the
       mime_type must be provided.
       Currently supported mime types are:
       - application/pdf
       - application/vnd.openxmlformats-officedocument.wordprocessingml.document
       - application/vnd.openxmlformats-officedocument.presentationml.presentation
       - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
       
      string mime_type = 4;
      Specified by:
      getMimeType in interface DocumentInputConfigOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       Specifies the input document's mime_type.
      
       If not specified it will be determined using the file extension for
       gcs_source provided files. For a file provided through bytes content the
       mime_type must be provided.
       Currently supported mime types are:
       - application/pdf
       - application/vnd.openxmlformats-officedocument.wordprocessingml.document
       - application/vnd.openxmlformats-officedocument.presentationml.presentation
       - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
       
      string mime_type = 4;
      Specified by:
      getMimeTypeBytes in interface DocumentInputConfigOrBuilder
      Returns:
      The bytes for mimeType.
    • setMimeType

      public DocumentInputConfig.Builder setMimeType(String value)
       Specifies the input document's mime_type.
      
       If not specified it will be determined using the file extension for
       gcs_source provided files. For a file provided through bytes content the
       mime_type must be provided.
       Currently supported mime types are:
       - application/pdf
       - application/vnd.openxmlformats-officedocument.wordprocessingml.document
       - application/vnd.openxmlformats-officedocument.presentationml.presentation
       - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
       
      string mime_type = 4;
      Parameters:
      value - The mimeType to set.
      Returns:
      This builder for chaining.
    • clearMimeType

      public DocumentInputConfig.Builder clearMimeType()
       Specifies the input document's mime_type.
      
       If not specified it will be determined using the file extension for
       gcs_source provided files. For a file provided through bytes content the
       mime_type must be provided.
       Currently supported mime types are:
       - application/pdf
       - application/vnd.openxmlformats-officedocument.wordprocessingml.document
       - application/vnd.openxmlformats-officedocument.presentationml.presentation
       - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
       
      string mime_type = 4;
      Returns:
      This builder for chaining.
    • setMimeTypeBytes

      public DocumentInputConfig.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
       Specifies the input document's mime_type.
      
       If not specified it will be determined using the file extension for
       gcs_source provided files. For a file provided through bytes content the
       mime_type must be provided.
       Currently supported mime types are:
       - application/pdf
       - application/vnd.openxmlformats-officedocument.wordprocessingml.document
       - application/vnd.openxmlformats-officedocument.presentationml.presentation
       - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
       
      string mime_type = 4;
      Parameters:
      value - The bytes for mimeType to set.
      Returns:
      This builder for chaining.