Class: Google::Apis::MerchantapiDatasourcesV1beta::DefaultRule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_datasources_v1beta/classes.rb,
lib/google/apis/merchantapi_datasources_v1beta/representations.rb,
lib/google/apis/merchantapi_datasources_v1beta/representations.rb

Overview

Default rule management of the data source.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DefaultRule

Returns a new instance of DefaultRule.



178
179
180
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 178

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#take_from_data_sourcesArray<Google::Apis::MerchantapiDatasourcesV1beta::DataSourceReference>

Required. The list of data sources linked in the default rule. This list is ordered by the default rule priority of joining the data. It might include none or multiple references to self and supplemental data sources. The list must not be empty. To link the data source to the default rule, you need to add a new reference to this list (in sequential order). To unlink the data source from the default rule, you need to remove the given reference from this list. Changing the order of this list will result in changing the priority of data sources in the default rule. For example, providing the following list: [1001, self] will take attribute values from supplemental data source 1001, and fallback to self if the attribute is not set in 1001. Warning: The update (patch) and create call replaces the entire default rule setup. It doesn't work as an addition or append. If self is missing from the list of take_from_data_sources, the API will ignore attributes from the primary data source itself. Corresponds to the JSON property takeFromDataSources



176
177
178
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 176

def take_from_data_sources
  @take_from_data_sources
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



183
184
185
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 183

def update!(**args)
  @take_from_data_sources = args[:take_from_data_sources] if args.key?(:take_from_data_sources)
end