Class Collection.Builder (0.99.0)

public static final class Collection.Builder extends GeneratedMessage.Builder<Collection.Builder> implements CollectionOrBuilder

Collection is a container for configuring resources and access to a set of DataStores.

Protobuf type google.cloud.discoveryengine.v1.Collection

Implements

CollectionOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Collection build()
Returns
Type Description
Collection

buildPartial()

public Collection buildPartial()
Returns
Type Description
Collection

clear()

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

clearCreateTime()

public Collection.Builder clearCreateTime()

Output only. Timestamp the Collection was created at.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Collection.Builder

clearDisplayName()

public Collection.Builder clearDisplayName()

Required. The Collection display name.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Collection.Builder

This builder for chaining.

clearName()

public Collection.Builder clearName()

Immutable. The full resource name of the Collection. Format: projects/{project}/locations/{location}/collections/{collection_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
Collection.Builder

This builder for chaining.

getCreateTime()

public Timestamp getCreateTime()

Output only. Timestamp the Collection was created at.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Timestamp the Collection was created at.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Timestamp the Collection was created at.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public Collection getDefaultInstanceForType()
Returns
Type Description
Collection

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. The Collection display name.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The Collection display name.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Immutable. The full resource name of the Collection. Format: projects/{project}/locations/{location}/collections/{collection_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. The full resource name of the Collection. Format: projects/{project}/locations/{location}/collections/{collection_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

hasCreateTime()

public boolean hasCreateTime()

Output only. Timestamp the Collection was created at.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Collection.Builder mergeCreateTime(Timestamp value)

Output only. Timestamp the Collection was created at.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Collection.Builder

mergeFrom(Collection other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setCreateTime(Timestamp value)

public Collection.Builder setCreateTime(Timestamp value)

Output only. Timestamp the Collection was created at.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Collection.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Collection.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Timestamp the Collection was created at.

.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Collection.Builder

setDisplayName(String value)

public Collection.Builder setDisplayName(String value)

Required. The Collection display name.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Collection.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Collection.Builder setDisplayNameBytes(ByteString value)

Required. The Collection display name.

This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Collection.Builder

This builder for chaining.

setName(String value)

public Collection.Builder setName(String value)

Immutable. The full resource name of the Collection. Format: projects/{project}/locations/{location}/collections/{collection_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Collection.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Collection.Builder setNameBytes(ByteString value)

Immutable. The full resource name of the Collection. Format: projects/{project}/locations/{location}/collections/{collection_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

string name = 1 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Collection.Builder

This builder for chaining.