Class Precondition.Builder (3.5.0)

public static final class Precondition.Builder extends GeneratedMessageV3.Builder<Precondition.Builder> implements PreconditionOrBuilder

A precondition on a document, used for conditional operations.

Protobuf type google.firestore.v1.Precondition

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Precondition build()
Returns
TypeDescription
Precondition

buildPartial()

public Precondition buildPartial()
Returns
TypeDescription
Precondition

clear()

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

clearConditionType()

public Precondition.Builder clearConditionType()
Returns
TypeDescription
Precondition.Builder

clearExists()

public Precondition.Builder clearExists()

When set to true, the target document must exist. When set to false, the target document must not exist.

bool exists = 1;

Returns
TypeDescription
Precondition.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Precondition.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Precondition.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUpdateTime()

public Precondition.Builder clearUpdateTime()

When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.

.google.protobuf.Timestamp update_time = 2;

Returns
TypeDescription
Precondition.Builder

clone()

public Precondition.Builder clone()
Returns
TypeDescription
Precondition.Builder
Overrides

getConditionTypeCase()

public Precondition.ConditionTypeCase getConditionTypeCase()
Returns
TypeDescription
Precondition.ConditionTypeCase

getDefaultInstanceForType()

public Precondition getDefaultInstanceForType()
Returns
TypeDescription
Precondition

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getExists()

public boolean getExists()

When set to true, the target document must exist. When set to false, the target document must not exist.

bool exists = 1;

Returns
TypeDescription
boolean

The exists.

getUpdateTime()

public Timestamp getUpdateTime()

When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.

.google.protobuf.Timestamp update_time = 2;

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.

.google.protobuf.Timestamp update_time = 2;

Returns
TypeDescription
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.

.google.protobuf.Timestamp update_time = 2;

Returns
TypeDescription
TimestampOrBuilder

hasExists()

public boolean hasExists()

When set to true, the target document must exist. When set to false, the target document must not exist.

bool exists = 1;

Returns
TypeDescription
boolean

Whether the exists field is set.

hasUpdateTime()

public boolean hasUpdateTime()

When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.

.google.protobuf.Timestamp update_time = 2;

Returns
TypeDescription
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Precondition other)

public Precondition.Builder mergeFrom(Precondition other)
Parameter
NameDescription
otherPrecondition
Returns
TypeDescription
Precondition.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Precondition.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Precondition.Builder
Overrides

mergeUpdateTime(Timestamp value)

public Precondition.Builder mergeUpdateTime(Timestamp value)

When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.

.google.protobuf.Timestamp update_time = 2;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Precondition.Builder

setExists(boolean value)

public Precondition.Builder setExists(boolean value)

When set to true, the target document must exist. When set to false, the target document must not exist.

bool exists = 1;

Parameter
NameDescription
valueboolean

The exists to set.

Returns
TypeDescription
Precondition.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public Precondition.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Precondition.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public Precondition.Builder setUpdateTime(Timestamp value)

When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.

.google.protobuf.Timestamp update_time = 2;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Precondition.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Precondition.Builder setUpdateTime(Timestamp.Builder builderForValue)

When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned.

.google.protobuf.Timestamp update_time = 2;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Precondition.Builder