Class Document.Content.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
- com.google.cloud.discoveryengine.v1beta.Document.Content.Builder
-
- All Implemented Interfaces:
Document.ContentOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- Document.Content
public static final class Document.Content.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder> implements Document.ContentOrBuilder
Unstructured data linked to this document.
Protobuf typegoogle.cloud.discoveryengine.v1beta.Document.Content
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Document.Content.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Document.Content
build()
Document.Content
buildPartial()
Document.Content.Builder
clear()
Document.Content.Builder
clearContent()
Document.Content.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Document.Content.Builder
clearMimeType()
The MIME type of the content.Document.Content.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Document.Content.Builder
clearRawBytes()
The content represented as a stream of bytes.Document.Content.Builder
clearUri()
The URI of the content.Document.Content.Builder
clone()
Document.Content.ContentCase
getContentCase()
Document.Content
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getMimeType()
The MIME type of the content.com.google.protobuf.ByteString
getMimeTypeBytes()
The MIME type of the content.com.google.protobuf.ByteString
getRawBytes()
The content represented as a stream of bytes.String
getUri()
The URI of the content.com.google.protobuf.ByteString
getUriBytes()
The URI of the content.boolean
hasRawBytes()
The content represented as a stream of bytes.boolean
hasUri()
The URI of the content.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Document.Content.Builder
mergeFrom(Document.Content other)
Document.Content.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Document.Content.Builder
mergeFrom(com.google.protobuf.Message other)
Document.Content.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Document.Content.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
Document.Content.Builder
setMimeType(String value)
The MIME type of the content.Document.Content.Builder
setMimeTypeBytes(com.google.protobuf.ByteString value)
The MIME type of the content.Document.Content.Builder
setRawBytes(com.google.protobuf.ByteString value)
The content represented as a stream of bytes.Document.Content.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
Document.Content.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Document.Content.Builder
setUri(String value)
The URI of the content.Document.Content.Builder
setUriBytes(com.google.protobuf.ByteString value)
The URI of the content.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, 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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
clear
public Document.Content.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
getDefaultInstanceForType
public Document.Content getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Document.Content build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Document.Content buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Document.Content.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
setField
public Document.Content.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
clearField
public Document.Content.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
clearOneof
public Document.Content.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
setRepeatedField
public Document.Content.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
addRepeatedField
public Document.Content.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
mergeFrom
public Document.Content.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Document.Content.Builder>
-
mergeFrom
public Document.Content.Builder mergeFrom(Document.Content other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
mergeFrom
public Document.Content.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Document.Content.Builder>
- Throws:
IOException
-
getContentCase
public Document.Content.ContentCase getContentCase()
- Specified by:
getContentCase
in interfaceDocument.ContentOrBuilder
-
clearContent
public Document.Content.Builder clearContent()
-
hasRawBytes
public boolean hasRawBytes()
The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json.
bytes raw_bytes = 2;
- Specified by:
hasRawBytes
in interfaceDocument.ContentOrBuilder
- Returns:
- Whether the rawBytes field is set.
-
getRawBytes
public com.google.protobuf.ByteString getRawBytes()
The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json.
bytes raw_bytes = 2;
- Specified by:
getRawBytes
in interfaceDocument.ContentOrBuilder
- Returns:
- The rawBytes.
-
setRawBytes
public Document.Content.Builder setRawBytes(com.google.protobuf.ByteString value)
The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json.
bytes raw_bytes = 2;
- Parameters:
value
- The rawBytes to set.- Returns:
- This builder for chaining.
-
clearRawBytes
public Document.Content.Builder clearRawBytes()
The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json.
bytes raw_bytes = 2;
- Returns:
- This builder for chaining.
-
hasUri
public boolean hasUri()
The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 100 MB.
string uri = 3;
- Specified by:
hasUri
in interfaceDocument.ContentOrBuilder
- Returns:
- Whether the uri field is set.
-
getUri
public String getUri()
The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 100 MB.
string uri = 3;
- Specified by:
getUri
in interfaceDocument.ContentOrBuilder
- Returns:
- The uri.
-
getUriBytes
public com.google.protobuf.ByteString getUriBytes()
The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 100 MB.
string uri = 3;
- Specified by:
getUriBytes
in interfaceDocument.ContentOrBuilder
- Returns:
- The bytes for uri.
-
setUri
public Document.Content.Builder setUri(String value)
The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 100 MB.
string uri = 3;
- Parameters:
value
- The uri to set.- Returns:
- This builder for chaining.
-
clearUri
public Document.Content.Builder clearUri()
The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 100 MB.
string uri = 3;
- Returns:
- This builder for chaining.
-
setUriBytes
public Document.Content.Builder setUriBytes(com.google.protobuf.ByteString value)
The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 100 MB.
string uri = 3;
- Parameters:
value
- The bytes for uri to set.- Returns:
- This builder for chaining.
-
getMimeType
public String getMimeType()
The MIME type of the content. Supported types: * `application/pdf` (PDF, only native PDFs are supported for now) * `text/html` (HTML) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) * `text/plain` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml.
string mime_type = 1;
- Specified by:
getMimeType
in interfaceDocument.ContentOrBuilder
- Returns:
- The mimeType.
-
getMimeTypeBytes
public com.google.protobuf.ByteString getMimeTypeBytes()
The MIME type of the content. Supported types: * `application/pdf` (PDF, only native PDFs are supported for now) * `text/html` (HTML) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) * `text/plain` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml.
string mime_type = 1;
- Specified by:
getMimeTypeBytes
in interfaceDocument.ContentOrBuilder
- Returns:
- The bytes for mimeType.
-
setMimeType
public Document.Content.Builder setMimeType(String value)
The MIME type of the content. Supported types: * `application/pdf` (PDF, only native PDFs are supported for now) * `text/html` (HTML) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) * `text/plain` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml.
string mime_type = 1;
- Parameters:
value
- The mimeType to set.- Returns:
- This builder for chaining.
-
clearMimeType
public Document.Content.Builder clearMimeType()
The MIME type of the content. Supported types: * `application/pdf` (PDF, only native PDFs are supported for now) * `text/html` (HTML) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) * `text/plain` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml.
string mime_type = 1;
- Returns:
- This builder for chaining.
-
setMimeTypeBytes
public Document.Content.Builder setMimeTypeBytes(com.google.protobuf.ByteString value)
The MIME type of the content. Supported types: * `application/pdf` (PDF, only native PDFs are supported for now) * `text/html` (HTML) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) * `text/plain` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml.
string mime_type = 1;
- Parameters:
value
- The bytes for mimeType to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final Document.Content.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
mergeUnknownFields
public final Document.Content.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
-
-