Class ImportDocumentTemplate.Builder (4.4.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

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
NameDescription
valuesIterable<? extends com.google.cloud.dialogflow.v2beta1.Document.KnowledgeType>

The knowledgeTypes to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<Integer>

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

Returns
TypeDescription
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
NameDescription
valueDocument.KnowledgeType

The knowledgeTypes to add.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
ImportDocumentTemplate.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ImportDocumentTemplate.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ImportDocumentTemplate.Builder
Overrides

build()

public ImportDocumentTemplate build()
Returns
TypeDescription
ImportDocumentTemplate

buildPartial()

public ImportDocumentTemplate buildPartial()
Returns
TypeDescription
ImportDocumentTemplate

clear()

public ImportDocumentTemplate.Builder clear()
Returns
TypeDescription
ImportDocumentTemplate.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ImportDocumentTemplate.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ImportDocumentTemplate.Builder

This builder for chaining.

clearMetadata()

public ImportDocumentTemplate.Builder clearMetadata()
Returns
TypeDescription
ImportDocumentTemplate.Builder

clearMimeType()

public ImportDocumentTemplate.Builder clearMimeType()

Required. The MIME type of the document.

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

Returns
TypeDescription
ImportDocumentTemplate.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ImportDocumentTemplate.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ImportDocumentTemplate.Builder
Overrides

clone()

public ImportDocumentTemplate.Builder clone()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public ImportDocumentTemplate getDefaultInstanceForType()
Returns
TypeDescription
ImportDocumentTemplate

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
List<Integer>

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

getMetadata()

public Map<String,String> getMetadata()

Use #getMetadataMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getMimeType()

public String getMimeType()

Required. The MIME type of the document.

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

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

Required. The MIME type of the document.

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

Returns
TypeDescription
ByteString

The bytes for mimeType.

getMutableMetadata()

public Map<String,String> getMutableMetadata()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ImportDocumentTemplate other)

public ImportDocumentTemplate.Builder mergeFrom(ImportDocumentTemplate other)
Parameter
NameDescription
otherImportDocumentTemplate
Returns
TypeDescription
ImportDocumentTemplate.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ImportDocumentTemplate.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImportDocumentTemplate.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ImportDocumentTemplate.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ImportDocumentTemplate.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ImportDocumentTemplate.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
ImportDocumentTemplate.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ImportDocumentTemplate.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueDocument.KnowledgeType

The knowledgeTypes to set.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

valueint
Returns
TypeDescription
ImportDocumentTemplate.Builder

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

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
NameDescription
valueString

The mimeType to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for mimeType to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ImportDocumentTemplate.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ImportDocumentTemplate.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ImportDocumentTemplate.Builder
Overrides