Class MergeFieldsOptions.Builder (0.15.0)

public static final class MergeFieldsOptions.Builder extends GeneratedMessageV3.Builder<MergeFieldsOptions.Builder> implements MergeFieldsOptionsOrBuilder

Options for merging updated fields.

Protobuf type google.cloud.contentwarehouse.v1.MergeFieldsOptions

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public MergeFieldsOptions build()
Returns
TypeDescription
MergeFieldsOptions

buildPartial()

public MergeFieldsOptions buildPartial()
Returns
TypeDescription
MergeFieldsOptions

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReplaceMessageFields()

public MergeFieldsOptions.Builder clearReplaceMessageFields()

When merging message fields, the default behavior is to merge the content of two message fields together. If you instead want to use the field from the source message to replace the corresponding field in the destination message, set this flag to true. When this flag is set, specified submessage fields that are missing in source will be cleared in destination.

optional bool replace_message_fields = 1;

Returns
TypeDescription
MergeFieldsOptions.Builder

This builder for chaining.

clearReplaceRepeatedFields()

public MergeFieldsOptions.Builder clearReplaceRepeatedFields()

When merging repeated fields, the default behavior is to append entries from the source repeated field to the destination repeated field. If you instead want to keep only the entries from the source repeated field, set this flag to true.

If you want to replace a repeated field within a message field on the destination message, you must set both replace_repeated_fields and replace_message_fields to true, otherwise the repeated fields will be appended.

optional bool replace_repeated_fields = 2;

Returns
TypeDescription
MergeFieldsOptions.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public MergeFieldsOptions getDefaultInstanceForType()
Returns
TypeDescription
MergeFieldsOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getReplaceMessageFields()

public boolean getReplaceMessageFields()

When merging message fields, the default behavior is to merge the content of two message fields together. If you instead want to use the field from the source message to replace the corresponding field in the destination message, set this flag to true. When this flag is set, specified submessage fields that are missing in source will be cleared in destination.

optional bool replace_message_fields = 1;

Returns
TypeDescription
boolean

The replaceMessageFields.

getReplaceRepeatedFields()

public boolean getReplaceRepeatedFields()

When merging repeated fields, the default behavior is to append entries from the source repeated field to the destination repeated field. If you instead want to keep only the entries from the source repeated field, set this flag to true.

If you want to replace a repeated field within a message field on the destination message, you must set both replace_repeated_fields and replace_message_fields to true, otherwise the repeated fields will be appended.

optional bool replace_repeated_fields = 2;

Returns
TypeDescription
boolean

The replaceRepeatedFields.

hasReplaceMessageFields()

public boolean hasReplaceMessageFields()

When merging message fields, the default behavior is to merge the content of two message fields together. If you instead want to use the field from the source message to replace the corresponding field in the destination message, set this flag to true. When this flag is set, specified submessage fields that are missing in source will be cleared in destination.

optional bool replace_message_fields = 1;

Returns
TypeDescription
boolean

Whether the replaceMessageFields field is set.

hasReplaceRepeatedFields()

public boolean hasReplaceRepeatedFields()

When merging repeated fields, the default behavior is to append entries from the source repeated field to the destination repeated field. If you instead want to keep only the entries from the source repeated field, set this flag to true.

If you want to replace a repeated field within a message field on the destination message, you must set both replace_repeated_fields and replace_message_fields to true, otherwise the repeated fields will be appended.

optional bool replace_repeated_fields = 2;

Returns
TypeDescription
boolean

Whether the replaceRepeatedFields field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(MergeFieldsOptions other)

public MergeFieldsOptions.Builder mergeFrom(MergeFieldsOptions other)
Parameter
NameDescription
otherMergeFieldsOptions
Returns
TypeDescription
MergeFieldsOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setReplaceMessageFields(boolean value)

public MergeFieldsOptions.Builder setReplaceMessageFields(boolean value)

When merging message fields, the default behavior is to merge the content of two message fields together. If you instead want to use the field from the source message to replace the corresponding field in the destination message, set this flag to true. When this flag is set, specified submessage fields that are missing in source will be cleared in destination.

optional bool replace_message_fields = 1;

Parameter
NameDescription
valueboolean

The replaceMessageFields to set.

Returns
TypeDescription
MergeFieldsOptions.Builder

This builder for chaining.

setReplaceRepeatedFields(boolean value)

public MergeFieldsOptions.Builder setReplaceRepeatedFields(boolean value)

When merging repeated fields, the default behavior is to append entries from the source repeated field to the destination repeated field. If you instead want to keep only the entries from the source repeated field, set this flag to true.

If you want to replace a repeated field within a message field on the destination message, you must set both replace_repeated_fields and replace_message_fields to true, otherwise the repeated fields will be appended.

optional bool replace_repeated_fields = 2;

Parameter
NameDescription
valueboolean

The replaceRepeatedFields to set.

Returns
TypeDescription
MergeFieldsOptions.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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