Interface MergeFieldsOptionsOrBuilder (0.35.0)

public interface MergeFieldsOptionsOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getReplaceMessageFields()

public abstract 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 abstract 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 abstract 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 abstract 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.