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.



174
175
176
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 174

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. Corresponds to the JSON property takeFromDataSources



172
173
174
# File 'lib/google/apis/merchantapi_datasources_v1beta/classes.rb', line 172

def take_from_data_sources
  @take_from_data_sources
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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