Class DocumentSchema.Builder (0.38.0)

public static final class DocumentSchema.Builder extends GeneratedMessageV3.Builder<DocumentSchema.Builder> implements DocumentSchemaOrBuilder

A document schema used to define document structure.

Protobuf type google.cloud.contentwarehouse.v1.DocumentSchema

Static Methods

getDescriptor()

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

Methods

addAllPropertyDefinitions(Iterable<? extends PropertyDefinition> values)

public DocumentSchema.Builder addAllPropertyDefinitions(Iterable<? extends PropertyDefinition> values)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.contentwarehouse.v1.PropertyDefinition>
Returns
Type Description
DocumentSchema.Builder

addPropertyDefinitions(PropertyDefinition value)

public DocumentSchema.Builder addPropertyDefinitions(PropertyDefinition value)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameter
Name Description
value PropertyDefinition
Returns
Type Description
DocumentSchema.Builder

addPropertyDefinitions(PropertyDefinition.Builder builderForValue)

public DocumentSchema.Builder addPropertyDefinitions(PropertyDefinition.Builder builderForValue)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameter
Name Description
builderForValue PropertyDefinition.Builder
Returns
Type Description
DocumentSchema.Builder

addPropertyDefinitions(int index, PropertyDefinition value)

public DocumentSchema.Builder addPropertyDefinitions(int index, PropertyDefinition value)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameters
Name Description
index int
value PropertyDefinition
Returns
Type Description
DocumentSchema.Builder

addPropertyDefinitions(int index, PropertyDefinition.Builder builderForValue)

public DocumentSchema.Builder addPropertyDefinitions(int index, PropertyDefinition.Builder builderForValue)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameters
Name Description
index int
builderForValue PropertyDefinition.Builder
Returns
Type Description
DocumentSchema.Builder

addPropertyDefinitionsBuilder()

public PropertyDefinition.Builder addPropertyDefinitionsBuilder()

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Returns
Type Description
PropertyDefinition.Builder

addPropertyDefinitionsBuilder(int index)

public PropertyDefinition.Builder addPropertyDefinitionsBuilder(int index)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameter
Name Description
index int
Returns
Type Description
PropertyDefinition.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DocumentSchema build()
Returns
Type Description
DocumentSchema

buildPartial()

public DocumentSchema buildPartial()
Returns
Type Description
DocumentSchema

clear()

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

clearCreateTime()

public DocumentSchema.Builder clearCreateTime()

Output only. The time when the document schema is created.

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

Returns
Type Description
DocumentSchema.Builder

clearDescription()

public DocumentSchema.Builder clearDescription()

Schema description.

string description = 7;

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

clearDisplayName()

public DocumentSchema.Builder clearDisplayName()

Required. Name of the schema given by the user. Must be unique per project.

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

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

clearDocumentIsFolder()

public DocumentSchema.Builder clearDocumentIsFolder()

Document Type, true refers the document is a folder, otherwise it is a typical document.

bool document_is_folder = 4;

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public DocumentSchema.Builder clearName()

The resource name of the document schema. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.

The name is ignored when creating a document schema.

string name = 1;

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPropertyDefinitions()

public DocumentSchema.Builder clearPropertyDefinitions()

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Returns
Type Description
DocumentSchema.Builder

clearUpdateTime()

public DocumentSchema.Builder clearUpdateTime()

Output only. The time when the document schema is last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
DocumentSchema.Builder

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. The time when the document schema is created.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time when the document schema is created.

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

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time when the document schema is created.

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

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public DocumentSchema getDefaultInstanceForType()
Returns
Type Description
DocumentSchema

getDescription()

public String getDescription()

Schema description.

string description = 7;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Schema description.

string description = 7;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Required. Name of the schema given by the user. Must be unique per project.

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. Name of the schema given by the user. Must be unique per project.

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

Returns
Type Description
ByteString

The bytes for displayName.

getDocumentIsFolder()

public boolean getDocumentIsFolder()

Document Type, true refers the document is a folder, otherwise it is a typical document.

bool document_is_folder = 4;

Returns
Type Description
boolean

The documentIsFolder.

getName()

public String getName()

The resource name of the document schema. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.

The name is ignored when creating a document schema.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name of the document schema. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.

The name is ignored when creating a document schema.

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getPropertyDefinitions(int index)

public PropertyDefinition getPropertyDefinitions(int index)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameter
Name Description
index int
Returns
Type Description
PropertyDefinition

getPropertyDefinitionsBuilder(int index)

public PropertyDefinition.Builder getPropertyDefinitionsBuilder(int index)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameter
Name Description
index int
Returns
Type Description
PropertyDefinition.Builder

getPropertyDefinitionsBuilderList()

public List<PropertyDefinition.Builder> getPropertyDefinitionsBuilderList()

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Returns
Type Description
List<Builder>

getPropertyDefinitionsCount()

public int getPropertyDefinitionsCount()

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Returns
Type Description
int

getPropertyDefinitionsList()

public List<PropertyDefinition> getPropertyDefinitionsList()

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Returns
Type Description
List<PropertyDefinition>

getPropertyDefinitionsOrBuilder(int index)

public PropertyDefinitionOrBuilder getPropertyDefinitionsOrBuilder(int index)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameter
Name Description
index int
Returns
Type Description
PropertyDefinitionOrBuilder

getPropertyDefinitionsOrBuilderList()

public List<? extends PropertyDefinitionOrBuilder> getPropertyDefinitionsOrBuilderList()

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Returns
Type Description
List<? extends com.google.cloud.contentwarehouse.v1.PropertyDefinitionOrBuilder>

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time when the document schema is last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time when the document schema is last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time when the document schema is last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The time when the document schema is created.

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

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time when the document schema is last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public DocumentSchema.Builder mergeCreateTime(Timestamp value)

Output only. The time when the document schema is created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DocumentSchema.Builder

mergeFrom(DocumentSchema other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public DocumentSchema.Builder mergeUpdateTime(Timestamp value)

Output only. The time when the document schema is last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
DocumentSchema.Builder

removePropertyDefinitions(int index)

public DocumentSchema.Builder removePropertyDefinitions(int index)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameter
Name Description
index int
Returns
Type Description
DocumentSchema.Builder

setCreateTime(Timestamp value)

public DocumentSchema.Builder setCreateTime(Timestamp value)

Output only. The time when the document schema is created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DocumentSchema.Builder

setCreateTime(Timestamp.Builder builderForValue)

public DocumentSchema.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time when the document schema is created.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DocumentSchema.Builder

setDescription(String value)

public DocumentSchema.Builder setDescription(String value)

Schema description.

string description = 7;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public DocumentSchema.Builder setDescriptionBytes(ByteString value)

Schema description.

string description = 7;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

setDisplayName(String value)

public DocumentSchema.Builder setDisplayName(String value)

Required. Name of the schema given by the user. Must be unique per project.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public DocumentSchema.Builder setDisplayNameBytes(ByteString value)

Required. Name of the schema given by the user. Must be unique per project.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

setDocumentIsFolder(boolean value)

public DocumentSchema.Builder setDocumentIsFolder(boolean value)

Document Type, true refers the document is a folder, otherwise it is a typical document.

bool document_is_folder = 4;

Parameter
Name Description
value boolean

The documentIsFolder to set.

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public DocumentSchema.Builder setName(String value)

The resource name of the document schema. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.

The name is ignored when creating a document schema.

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

setNameBytes(ByteString value)

public DocumentSchema.Builder setNameBytes(ByteString value)

The resource name of the document schema. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.

The name is ignored when creating a document schema.

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
DocumentSchema.Builder

This builder for chaining.

setPropertyDefinitions(int index, PropertyDefinition value)

public DocumentSchema.Builder setPropertyDefinitions(int index, PropertyDefinition value)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameters
Name Description
index int
value PropertyDefinition
Returns
Type Description
DocumentSchema.Builder

setPropertyDefinitions(int index, PropertyDefinition.Builder builderForValue)

public DocumentSchema.Builder setPropertyDefinitions(int index, PropertyDefinition.Builder builderForValue)

Document details.

repeated .google.cloud.contentwarehouse.v1.PropertyDefinition property_definitions = 3;

Parameters
Name Description
index int
builderForValue PropertyDefinition.Builder
Returns
Type Description
DocumentSchema.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public DocumentSchema.Builder setUpdateTime(Timestamp value)

Output only. The time when the document schema is last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
DocumentSchema.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public DocumentSchema.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time when the document schema is last updated.

.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DocumentSchema.Builder