Google Shopping Merchant DataSources V1beta Client - Class DefaultRule (0.2.2)

Reference documentation and code samples for the Google Shopping Merchant DataSources V1beta Client class DefaultRule.

Default rule management of the data source.

Generated from protobuf message google.shopping.merchant.datasources.v1beta.PrimaryProductDataSource.DefaultRule

Namespace

Google \ Shopping \ Merchant \ DataSources \ V1beta \ PrimaryProductDataSource

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ take_from_data_sources array<Google\Shopping\Merchant\DataSources\V1beta\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. To create attribute rules that are different from the default rule, see Set up your attribute rules. 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.

getTakeFromDataSources

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. To create attribute rules that are different from the default rule, see Set up your attribute rules. 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.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setTakeFromDataSources

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. To create attribute rules that are different from the default rule, see Set up your attribute rules. 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.

Parameter
Name Description
var array<Google\Shopping\Merchant\DataSources\V1beta\DataSourceReference>
Returns
Type Description
$this