Class 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.GeneratedMessageV3.Builder<TextSnippet.Builder>
    implements TextSnippetOrBuilder
     A representation of a text snippet.
     
    Protobuf type google.cloud.automl.v1beta1.TextSnippet
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.v1beta1.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.
      • setUnknownFields

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

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