Class BatchGetDocumentsRequest.Builder (0.3.0)

public static final class BatchGetDocumentsRequest.Builder extends GeneratedMessage.Builder<BatchGetDocumentsRequest.Builder> implements BatchGetDocumentsRequestOrBuilder

Request message for DeveloperKnowledge.BatchGetDocuments.

Protobuf type google.developers.knowledge.v1.BatchGetDocumentsRequest

Inheritance

java.lang.Object > com.google.protobuf.AbstractMessageLite.Builder > com.google.protobuf.AbstractMessage.Builder > com.google.protobuf.GeneratedMessage.Builder > BatchGetDocumentsRequest.Builder

Static Methods

getDescriptor()

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

Methods

addAllNames(Iterable<String> values)

public BatchGetDocumentsRequest.Builder addAllNames(Iterable<String> values)

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The names to add.

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

addNames(String value)

public BatchGetDocumentsRequest.Builder addNames(String value)

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The names to add.

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

addNamesBytes(ByteString value)

public BatchGetDocumentsRequest.Builder addNamesBytes(ByteString value)

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value com.google.protobuf.ByteString

The bytes of the names to add.

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

build()

public BatchGetDocumentsRequest build()
Returns
Type Description
BatchGetDocumentsRequest

buildPartial()

public BatchGetDocumentsRequest buildPartial()
Returns
Type Description
BatchGetDocumentsRequest

clear()

public BatchGetDocumentsRequest.Builder clear()
Returns
Type Description
BatchGetDocumentsRequest.Builder
Overrides
com.google.protobuf.GeneratedMessage.Builder.clear()

clearNames()

public BatchGetDocumentsRequest.Builder clearNames()

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

clearView()

public BatchGetDocumentsRequest.Builder clearView()

Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to DOCUMENT_VIEW_CONTENT.

.google.developers.knowledge.v1.DocumentView view = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

getDefaultInstanceForType()

public BatchGetDocumentsRequest getDefaultInstanceForType()
Returns
Type Description
BatchGetDocumentsRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
com.google.protobuf.Descriptors.Descriptor
Overrides
com.google.protobuf.GeneratedMessage.Builder.getDescriptorForType()

getNames(int index)

public String getNames(int index)

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The names at the given index.

getNamesBytes(int index)

public ByteString getNamesBytes(int index)

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
com.google.protobuf.ByteString

The bytes of the names at the given index.

getNamesCount()

public int getNamesCount()

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of names.

getNamesList()

public ProtocolStringList getNamesList()

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
com.google.protobuf.ProtocolStringList

A list containing the names.

getView()

public DocumentView getView()

Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to DOCUMENT_VIEW_CONTENT.

.google.developers.knowledge.v1.DocumentView view = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DocumentView

The view.

getViewValue()

public int getViewValue()

Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to DOCUMENT_VIEW_CONTENT.

.google.developers.knowledge.v1.DocumentView view = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for view.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
com.google.protobuf.GeneratedMessage.FieldAccessorTable
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetFieldAccessorTable()

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
com.google.protobuf.GeneratedMessage.Builder.isInitialized()

mergeFrom(BatchGetDocumentsRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BatchGetDocumentsRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input com.google.protobuf.CodedInputStream
extensionRegistry com.google.protobuf.ExtensionRegistryLite
Returns
Type Description
BatchGetDocumentsRequest.Builder
Overrides
com.google.protobuf.AbstractMessage.Builder.mergeFrom(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite)
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BatchGetDocumentsRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other com.google.protobuf.Message
Returns
Type Description
BatchGetDocumentsRequest.Builder
Overrides
com.google.protobuf.AbstractMessage.Builder.mergeFrom(com.google.protobuf.Message)

setNames(int index, String value)

public BatchGetDocumentsRequest.Builder setNames(int index, String value)

Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the names in the request.

Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

repeated string names = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The names to set.

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

setView(DocumentView value)

public BatchGetDocumentsRequest.Builder setView(DocumentView value)

Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to DOCUMENT_VIEW_CONTENT.

.google.developers.knowledge.v1.DocumentView view = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value DocumentView

The view to set.

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

setViewValue(int value)

public BatchGetDocumentsRequest.Builder setViewValue(int value)

Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to DOCUMENT_VIEW_CONTENT.

.google.developers.knowledge.v1.DocumentView view = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.