Class ImportDocumentTemplate.Builder (4.61.0)

public static final class ImportDocumentTemplate.Builder extends GeneratedMessageV3.Builder<ImportDocumentTemplate.Builder> implements ImportDocumentTemplateOrBuilder

The template used for importing documents.

Protobuf type google.cloud.dialogflow.v2beta1.ImportDocumentTemplate

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllKnowledgeTypes(Iterable<? extends Document.KnowledgeType> values)

public ImportDocumentTemplate.Builder addAllKnowledgeTypes(Iterable<? extends Document.KnowledgeType> values)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.cloud.dialogflow.v2beta1.Document.KnowledgeType>

The knowledgeTypes to add.

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

addAllKnowledgeTypesValue(Iterable<Integer> values)

public ImportDocumentTemplate.Builder addAllKnowledgeTypesValue(Iterable<Integer> values)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for knowledgeTypes to add.

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

addKnowledgeTypes(Document.KnowledgeType value)

public ImportDocumentTemplate.Builder addKnowledgeTypes(Document.KnowledgeType value)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Document.KnowledgeType

The knowledgeTypes to add.

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

addKnowledgeTypesValue(int value)

public ImportDocumentTemplate.Builder addKnowledgeTypesValue(int value)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for knowledgeTypes to add.

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ImportDocumentTemplate.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

build()

public ImportDocumentTemplate build()
Returns
Type Description
ImportDocumentTemplate

buildPartial()

public ImportDocumentTemplate buildPartial()
Returns
Type Description
ImportDocumentTemplate

clear()

public ImportDocumentTemplate.Builder clear()
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ImportDocumentTemplate.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

clearKnowledgeTypes()

public ImportDocumentTemplate.Builder clearKnowledgeTypes()

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

clearMetadata()

public ImportDocumentTemplate.Builder clearMetadata()
Returns
Type Description
ImportDocumentTemplate.Builder

clearMimeType()

public ImportDocumentTemplate.Builder clearMimeType()

Required. The MIME type of the document.

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ImportDocumentTemplate.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

clone()

public ImportDocumentTemplate.Builder clone()
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

containsMetadata(String key)

public boolean containsMetadata(String key)

Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

map<string, string> metadata = 3;

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public ImportDocumentTemplate getDefaultInstanceForType()
Returns
Type Description
ImportDocumentTemplate

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKnowledgeTypes(int index)

public Document.KnowledgeType getKnowledgeTypes(int index)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
Document.KnowledgeType

The knowledgeTypes at the given index.

getKnowledgeTypesCount()

public int getKnowledgeTypesCount()

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of knowledgeTypes.

getKnowledgeTypesList()

public List<Document.KnowledgeType> getKnowledgeTypesList()

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<KnowledgeType>

A list containing the knowledgeTypes.

getKnowledgeTypesValue(int index)

public int getKnowledgeTypesValue(int index)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of knowledgeTypes at the given index.

getKnowledgeTypesValueList()

public List<Integer> getKnowledgeTypesValueList()

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for knowledgeTypes.

getMetadata() (deprecated)

public Map<String,String> getMetadata()

Use #getMetadataMap() instead.

Returns
Type Description
Map<String,String>

getMetadataCount()

public int getMetadataCount()

Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

map<string, string> metadata = 3;

Returns
Type Description
int

getMetadataMap()

public Map<String,String> getMetadataMap()

Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

map<string, string> metadata = 3;

Returns
Type Description
Map<String,String>

getMetadataOrDefault(String key, String defaultValue)

public String getMetadataOrDefault(String key, String defaultValue)

Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

map<string, string> metadata = 3;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getMetadataOrThrow(String key)

public String getMetadataOrThrow(String key)

Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

map<string, string> metadata = 3;

Parameter
Name Description
key String
Returns
Type Description
String

getMimeType()

public String getMimeType()

Required. The MIME type of the document.

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

Required. The MIME type of the document.

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for mimeType.

getMutableMetadata() (deprecated)

public Map<String,String> getMutableMetadata()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ImportDocumentTemplate other)

public ImportDocumentTemplate.Builder mergeFrom(ImportDocumentTemplate other)
Parameter
Name Description
other ImportDocumentTemplate
Returns
Type Description
ImportDocumentTemplate.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ImportDocumentTemplate.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ImportDocumentTemplate.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ImportDocumentTemplate.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

putAllMetadata(Map<String,String> values)

public ImportDocumentTemplate.Builder putAllMetadata(Map<String,String> values)

Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

map<string, string> metadata = 3;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
ImportDocumentTemplate.Builder

putMetadata(String key, String value)

public ImportDocumentTemplate.Builder putMetadata(String key, String value)

Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

map<string, string> metadata = 3;

Parameters
Name Description
key String
value String
Returns
Type Description
ImportDocumentTemplate.Builder

removeMetadata(String key)

public ImportDocumentTemplate.Builder removeMetadata(String key)

Metadata for the document. The metadata supports arbitrary key-value pairs. Suggested use cases include storing a document's title, an external URL distinct from the document's content_uri, etc. The max size of a key or a value of the metadata is 1024 bytes.

map<string, string> metadata = 3;

Parameter
Name Description
key String
Returns
Type Description
ImportDocumentTemplate.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ImportDocumentTemplate.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

setKnowledgeTypes(int index, Document.KnowledgeType value)

public ImportDocumentTemplate.Builder setKnowledgeTypes(int index, Document.KnowledgeType value)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value Document.KnowledgeType

The knowledgeTypes to set.

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

setKnowledgeTypesValue(int index, int value)

public ImportDocumentTemplate.Builder setKnowledgeTypesValue(int index, int value)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2beta1.Document.KnowledgeType knowledge_types = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for knowledgeTypes to set.

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

setMimeType(String value)

public ImportDocumentTemplate.Builder setMimeType(String value)

Required. The MIME type of the document.

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The mimeType to set.

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public ImportDocumentTemplate.Builder setMimeTypeBytes(ByteString value)

Required. The MIME type of the document.

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
ImportDocumentTemplate.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ImportDocumentTemplate.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ImportDocumentTemplate.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides