Class: Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1MergeFieldsOptions
- Inherits:
-
Object
- Object
- Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1MergeFieldsOptions
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/contentwarehouse_v1/classes.rb,
lib/google/apis/contentwarehouse_v1/representations.rb,
lib/google/apis/contentwarehouse_v1/representations.rb
Overview
Options for merging updated fields.
Instance Attribute Summary collapse
-
#replace_message_fields ⇒ Boolean
(also: #replace_message_fields?)
When merging message fields, the default behavior is to merge the content of two message fields together.
-
#replace_repeated_fields ⇒ Boolean
(also: #replace_repeated_fields?)
When merging repeated fields, the default behavior is to append entries from the source repeated field to the destination repeated field.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudContentwarehouseV1MergeFieldsOptions
constructor
A new instance of GoogleCloudContentwarehouseV1MergeFieldsOptions.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudContentwarehouseV1MergeFieldsOptions
Returns a new instance of GoogleCloudContentwarehouseV1MergeFieldsOptions.
2475 2476 2477 |
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2475 def initialize(**args) update!(**args) end |
Instance Attribute Details
#replace_message_fields ⇒ Boolean Also known as: replace_message_fields?
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.
Corresponds to the JSON property replaceMessageFields
2461 2462 2463 |
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2461 def @replace_message_fields end |
#replace_repeated_fields ⇒ Boolean Also known as: replace_repeated_fields?
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.
Corresponds to the JSON property replaceRepeatedFields
2472 2473 2474 |
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2472 def replace_repeated_fields @replace_repeated_fields end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2480 2481 2482 2483 |
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2480 def update!(**args) @replace_message_fields = args[:replace_message_fields] if args.key?(:replace_message_fields) @replace_repeated_fields = args[:replace_repeated_fields] if args.key?(:replace_repeated_fields) end |