Class TextSnippet.Builder

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

public static final class TextSnippet.Builder extends com.google.protobuf.GeneratedMessage.Builder<TextSnippet.Builder> implements TextSnippetOrBuilder
 A representation of a text snippet.
 
Protobuf type google.cloud.automl.v1.TextSnippet
  • 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<TextSnippet.Builder>
    • clear

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

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

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

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

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

      public TextSnippet.Builder mergeFrom(TextSnippet other)
    • isInitialized

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

      public TextSnippet.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<TextSnippet.Builder>
      Throws:
      IOException
    • getContent

      public String getContent()
       Required. The content of the text snippet as a string. Up to 250000
       characters long.
       
      string content = 1;
      Specified by:
      getContent in interface TextSnippetOrBuilder
      Returns:
      The content.
    • getContentBytes

      public com.google.protobuf.ByteString getContentBytes()
       Required. The content of the text snippet as a string. Up to 250000
       characters long.
       
      string content = 1;
      Specified by:
      getContentBytes in interface TextSnippetOrBuilder
      Returns:
      The bytes for content.
    • setContent

      public TextSnippet.Builder setContent(String value)
       Required. The content of the text snippet as a string. Up to 250000
       characters long.
       
      string content = 1;
      Parameters:
      value - The content to set.
      Returns:
      This builder for chaining.
    • clearContent

      public TextSnippet.Builder clearContent()
       Required. The content of the text snippet as a string. Up to 250000
       characters long.
       
      string content = 1;
      Returns:
      This builder for chaining.
    • setContentBytes

      public TextSnippet.Builder setContentBytes(com.google.protobuf.ByteString value)
       Required. The content of the text snippet as a string. Up to 250000
       characters long.
       
      string content = 1;
      Parameters:
      value - The bytes for content to set.
      Returns:
      This builder for chaining.
    • getMimeType

      public String getMimeType()
       Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
       values are "text/html" and "text/plain". If left blank, the format is
       automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
       
      string mime_type = 2;
      Specified by:
      getMimeType in interface TextSnippetOrBuilder
      Returns:
      The mimeType.
    • getMimeTypeBytes

      public com.google.protobuf.ByteString getMimeTypeBytes()
       Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
       values are "text/html" and "text/plain". If left blank, the format is
       automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
       
      string mime_type = 2;
      Specified by:
      getMimeTypeBytes in interface TextSnippetOrBuilder
      Returns:
      The bytes for mimeType.
    • setMimeType

      public TextSnippet.Builder setMimeType(String value)
       Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
       values are "text/html" and "text/plain". If left blank, the format is
       automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
       
      string mime_type = 2;
      Parameters:
      value - The mimeType to set.
      Returns:
      This builder for chaining.
    • clearMimeType

      public TextSnippet.Builder clearMimeType()
       Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
       values are "text/html" and "text/plain". If left blank, the format is
       automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
       
      string mime_type = 2;
      Returns:
      This builder for chaining.
    • setMimeTypeBytes

      public TextSnippet.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
       Optional. The format of [content][google.cloud.automl.v1.TextSnippet.content]. Currently the only two allowed
       values are "text/html" and "text/plain". If left blank, the format is
       automatically determined from the type of the uploaded [content][google.cloud.automl.v1.TextSnippet.content].
       
      string mime_type = 2;
      Parameters:
      value - The bytes for mimeType to set.
      Returns:
      This builder for chaining.
    • getContentUri

      public String getContentUri()
       Output only. HTTP URI where you can download the content.
       
      string content_uri = 4;
      Specified by:
      getContentUri in interface TextSnippetOrBuilder
      Returns:
      The contentUri.
    • getContentUriBytes

      public com.google.protobuf.ByteString getContentUriBytes()
       Output only. HTTP URI where you can download the content.
       
      string content_uri = 4;
      Specified by:
      getContentUriBytes in interface TextSnippetOrBuilder
      Returns:
      The bytes for contentUri.
    • setContentUri

      public TextSnippet.Builder setContentUri(String value)
       Output only. HTTP URI where you can download the content.
       
      string content_uri = 4;
      Parameters:
      value - The contentUri to set.
      Returns:
      This builder for chaining.
    • clearContentUri

      public TextSnippet.Builder clearContentUri()
       Output only. HTTP URI where you can download the content.
       
      string content_uri = 4;
      Returns:
      This builder for chaining.
    • setContentUriBytes

      public TextSnippet.Builder setContentUriBytes(com.google.protobuf.ByteString value)
       Output only. HTTP URI where you can download the content.
       
      string content_uri = 4;
      Parameters:
      value - The bytes for contentUri to set.
      Returns:
      This builder for chaining.