Class ImportDocumentTemplate (4.23.0)

public final class ImportDocumentTemplate extends GeneratedMessageV3 implements ImportDocumentTemplateOrBuilder

The template used for importing documents.

Protobuf type google.cloud.dialogflow.v2.ImportDocumentTemplate

Static Fields

KNOWLEDGE_TYPES_FIELD_NUMBER

public static final int KNOWLEDGE_TYPES_FIELD_NUMBER
Field Value
Type Description
int

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
Type Description
int

MIME_TYPE_FIELD_NUMBER

public static final int MIME_TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ImportDocumentTemplate getDefaultInstance()
Returns
Type Description
ImportDocumentTemplate

getDescriptor()

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

newBuilder()

public static ImportDocumentTemplate.Builder newBuilder()
Returns
Type Description
ImportDocumentTemplate.Builder

newBuilder(ImportDocumentTemplate prototype)

public static ImportDocumentTemplate.Builder newBuilder(ImportDocumentTemplate prototype)
Parameter
Name Description
prototype ImportDocumentTemplate
Returns
Type Description
ImportDocumentTemplate.Builder

parseDelimitedFrom(InputStream input)

public static ImportDocumentTemplate parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ImportDocumentTemplate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ImportDocumentTemplate parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ImportDocumentTemplate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ImportDocumentTemplate parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ImportDocumentTemplate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ImportDocumentTemplate parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ImportDocumentTemplate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ImportDocumentTemplate parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ImportDocumentTemplate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ImportDocumentTemplate parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ImportDocumentTemplate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImportDocumentTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ImportDocumentTemplate> parser()
Returns
Type Description
Parser<ImportDocumentTemplate>

Methods

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

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public ImportDocumentTemplate getDefaultInstanceForType()
Returns
Type Description
ImportDocumentTemplate

getKnowledgeTypes(int index)

public Document.KnowledgeType getKnowledgeTypes(int index)

Required. The knowledge type of document content.

repeated .google.cloud.dialogflow.v2.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.v2.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.v2.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.v2.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.v2.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()

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.

getParserForType()

public Parser<ImportDocumentTemplate> getParserForType()
Returns
Type Description
Parser<ImportDocumentTemplate>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ImportDocumentTemplate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ImportDocumentTemplate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException