Types for Google Shopping Merchant Datasources v1 API¶
- class google.shopping.merchant_datasources_v1.types.CreateDataSourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for the CreateDataSource method.
- parent¶
Required. The account where this data source will be created. Format:
accounts/{account}- Type
- data_source¶
Required. The data source to create.
- class google.shopping.merchant_datasources_v1.types.DataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe data source for the Merchant Center account.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- primary_product_data_source¶
The primary data source for local and online products.
This field is a member of oneof
Type.
- supplemental_product_data_source¶
The supplemental data source for local and online products.
This field is a member of oneof
Type.
- local_inventory_data_source¶
The local inventory data source.
This field is a member of oneof
Type.
- regional_inventory_data_source¶
The regional inventory data source.
This field is a member of oneof
Type.
- product_review_data_source¶
The product review data source.
This field is a member of oneof
Type.
- merchant_review_data_source¶
The merchant review data source.
This field is a member of oneof
Type.
- name¶
Required. Identifier. The name of the data source. Format:
accounts/{account}/dataSources/{datasource}- Type
- input¶
Output only. Determines the type of input to the data source. Based on the input some settings might not work. Only generic data sources can be created through the API.
- file_input¶
Optional. The field is used only when data is managed through a file.
- class Input(value)[source]¶
Bases:
proto.enums.EnumDetermines the type of input to the data source. Based on the input some settings might not be supported.
- Values:
- INPUT_UNSPECIFIED (0):
Input unspecified.
- API (1):
Represents data sources for which the data is primarily provided through the API.
- FILE (2):
Represents data sources for which the data is primarily provided through file input. Data can still be provided through the API.
- UI (3):
The data source for products added directly in Merchant Center. This type of data source can not be created or updated through this API, only by Merchant Center UI.
This type of data source is read only.
- AUTOFEED (4):
This is also known as Automated feeds used to automatically build your product data. This type of data source can be enabled or disabled through the Accounts sub-API.
- class google.shopping.merchant_datasources_v1.types.DataSourceReference(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageData source reference can be used to manage related data sources within the data source service.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- self_¶
Self should be used to reference the primary data source itself.
This field is a member of oneof
data_source_id.- Type
- class google.shopping.merchant_datasources_v1.types.DeleteDataSourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for the DeleteDataSource method.
- class google.shopping.merchant_datasources_v1.types.FetchDataSourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for the FetchDataSource method.
- class google.shopping.merchant_datasources_v1.types.FileInput(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe data specific for file data sources. This field is empty for other data source inputs.
- fetch_settings¶
Optional. Fetch details to deliver the data source. It contains settings for
FETCHandGOOGLE_SHEETSfile input types. The required fields vary based on the frequency of fetching.
- file_name¶
Optional. The file name of the data source. Required for
UPLOADfile input type.- Type
- file_input_type¶
Output only. The type of file input.
- class FetchSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageFetch details to deliver the data source.
- day_of_month¶
Optional. The day of the month when the data source file should be fetched (1-31). This field can only be set for monthly frequency.
- Type
- time_of_day¶
Optional. The hour of the day when the data source file should be fetched. Minutes and seconds are not supported and will be ignored.
- Type
google.type.timeofday_pb2.TimeOfDay
- day_of_week¶
Optional. The day of the week when the data source file should be fetched. This field can only be set for weekly frequency.
- Type
google.type.dayofweek_pb2.DayOfWeek
- time_zone¶
Optional. Time zone used for schedule. UTC by default. For example, “America/Los_Angeles”.
- Type
- frequency¶
Required. The frequency describing fetch schedule.
- fetch_uri¶
Optional. The URL where the data source file can be fetched. Google Merchant Center supports automatic scheduled uploads using the HTTP, HTTPS or SFTP protocols, so the value will need to be a valid link using one of those three protocols. Immutable for Google Sheets files.
- Type
- username¶
Optional. An optional user name for [fetch_uri][google.shopping.merchant.datasources.v1.FileInput.FetchSettings.fetch_uri]. Used for submitting data sources through SFTP.
- Type
- password¶
Optional. An optional password for [fetch_uri][google.shopping.merchant.datasources.v1.FileInput.FetchSettings.fetch_uri]. Used for submitting data sources through SFTP.
- Type
- class Frequency(value)[source]¶
Bases:
proto.enums.EnumThe required fields vary based on the frequency of fetching. For a monthly fetch schedule,
day of monthand hour of day are required. For a weekly fetch schedule, day of week and hour of day are required. For a daily fetch schedule, only an hour of day is required.- Values:
- FREQUENCY_UNSPECIFIED (0):
Frequency unspecified.
- FREQUENCY_DAILY (1):
The fetch happens every day.
- FREQUENCY_WEEKLY (2):
The fetch happens every week.
- FREQUENCY_MONTHLY (3):
The fetch happens every month.
- class FileInputType(value)[source]¶
Bases:
proto.enums.EnumThe method of file delivery.
- Values:
- FILE_INPUT_TYPE_UNSPECIFIED (0):
File input type unspecified.
- UPLOAD (1):
The file is uploaded through SFTP, Google Cloud Storage or manually in the Merchant Center.
- FETCH (2):
The file is fetched from the configured [fetch_uri][google.shopping.merchant.datasources.v1.FileInput.FetchSettings.fetch_uri].
- GOOGLE_SHEETS (3):
The file is fetched from Google Sheets specified in the [fetch_uri][google.shopping.merchant.datasources.v1.FileInput.FetchSettings.fetch_uri]. However, you can’t set up
GOOGLE_SHEETSas a data source through the API. To addGOOGLE_SHEETSas a data source through the Merchant Center, see Add products to Merchant Center.
- class google.shopping.merchant_datasources_v1.types.FileUpload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe file upload of a specific data source, that is, the result of the retrieval of the data source at a certain timestamp computed asynchronously when the data source processing is finished. Only applicable to file data sources.
- name¶
Identifier. The name of the data source file upload. Format:
{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}}- Type
- processing_state¶
Output only. The processing state of the data source.
- issues¶
Output only. The list of issues occurring in the data source.
- Type
MutableSequence[google.shopping.merchant_datasources_v1.types.FileUpload.Issue]
- upload_time¶
Output only. The date at which the file of the data source was uploaded.
- class Issue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAn error occurring in the data source, like “invalid price”.
- description¶
Output only. The error description, for example, “Your data source contains items which have too many attributes, or are too big. These items will be dropped”.
- Type
- code¶
Output only. The code of the error, for example, “validation/invalid_value”. Returns “?” if the code is unknown.
- Type
- severity¶
Output only. The severity of the issue.
- documentation_uri¶
Output only. Link to the documentation explaining the issue in more details, if available.
- Type
- class Severity(value)[source]¶
Bases:
proto.enums.EnumThe severity of the issue.
- Values:
- SEVERITY_UNSPECIFIED (0):
Severity unspecified.
- WARNING (1):
The issue is the warning.
- ERROR (2):
The issue is an error.
- class ProcessingState(value)[source]¶
Bases:
proto.enums.EnumThe processing state of the data source.
- Values:
- PROCESSING_STATE_UNSPECIFIED (0):
Processing state unspecified.
- FAILED (1):
The data source could not be processed or all the items had errors.
- IN_PROGRESS (2):
The data source is being processed.
- SUCCEEDED (3):
The data source was processed successfully, though some items might have had errors.
- class google.shopping.merchant_datasources_v1.types.GetDataSourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for the GetDataSource method.
- class google.shopping.merchant_datasources_v1.types.GetFileUploadRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for the GetFileUploadRequest method.
- class google.shopping.merchant_datasources_v1.types.ListDataSourcesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for the ListDataSources method.
- page_size¶
Optional. The maximum number of data sources to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the maximum number of data sources will be returned.
- Type
- class google.shopping.merchant_datasources_v1.types.ListDataSourcesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse message for the ListDataSources method.
- data_sources¶
The data sources from the specified account.
- Type
MutableSequence[google.shopping.merchant_datasources_v1.types.DataSource]
- class google.shopping.merchant_datasources_v1.types.LocalInventoryDataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe local inventory data source type is only available for file inputs and can’t be used to create API local inventory data sources.
- feed_label¶
Required. Immutable. The feed label of the offers to which the local inventory is provided.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
- Type
- class google.shopping.merchant_datasources_v1.types.MerchantReviewDataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe merchant review data source.
- class google.shopping.merchant_datasources_v1.types.PrimaryProductDataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe primary data source for local and online products.
- legacy_local¶
Optional. Immutable. Determines whether the products of this data source are only targeting local destinations. Legacy local products are prefixed with
local~in the product resource ID. For example,accounts/123/products/local~en~US~sku123.- Type
- feed_label¶
Optional. Immutable. The feed label that is specified on the data source level.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
feedLabelandcontentLanguagemust be either both set or unset for data sources with product content type. They must be set for data sources with a file input.If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
This field is a member of oneof
_feed_label.- Type
- content_language¶
Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source.
feedLabelandcontentLanguagemust be either both set or unset. The fields can only be unset for data sources without file input.If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.
This field is a member of oneof
_content_language.- Type
- countries¶
Optional. The countries where the items may be displayed. Represented as a CLDR territory code.
- Type
MutableSequence[str]
- default_rule¶
Optional. Default rule management of the data source. If set, the linked data sources will be replaced.
- destinations¶
Optional. A list of destinations describing where products of the data source can be shown.
When retrieving the data source, the list contains all the destinations that can be used for the data source, including the ones that are disabled for the data source but enabled for the account.
Only destinations that are enabled on the account, for example through program participation, can be enabled on the data source.
If unset, during creation, the destinations will be inherited based on the account level program participation.
If set, during creation or update, the data source will be set only for the specified destinations.
Updating this field requires at least one destination.
- Type
MutableSequence[google.shopping.merchant_datasources_v1.types.PrimaryProductDataSource.Destination]
- class DefaultRule(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageDefault rule management of the data source.
- take_from_data_sources¶
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
selfand 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 source1001, and fallback toselfif the attribute is not set in1001.- Type
MutableSequence[google.shopping.merchant_datasources_v1.types.DataSourceReference]
- class Destination(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageDestinations also known as Marketing methods selections.
- destination¶
Marketing methods (also known as destination) selections.
- Type
google.shopping.type.types.Destination.DestinationEnum
- state¶
The state of the destination.
- class State(value)[source]¶
Bases:
proto.enums.EnumThe state of the destination.
- Values:
- STATE_UNSPECIFIED (0):
Not specified.
- ENABLED (1):
Indicates that the destination is enabled.
- DISABLED (2):
Indicates that the destination is disabled.
- class google.shopping.merchant_datasources_v1.types.ProductReviewDataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe product review data source.
- class google.shopping.merchant_datasources_v1.types.PromotionDataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe promotion data source.
- target_country¶
Required. Immutable. The target country used as part of the unique identifier. Represented as a CLDR territory code.
Promotions are only available in selected countries.
- Type
- class google.shopping.merchant_datasources_v1.types.RegionalInventoryDataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message- feed_label¶
Required. Immutable. The feed label of the offers to which the regional inventory is provided.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
- Type
- class google.shopping.merchant_datasources_v1.types.SupplementalProductDataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageThe supplemental data source for local and online products. After creation, you should make sure to link the supplemental product data source into one or more primary product data sources.
- feed_label¶
Optional. Immutable. The feed label that is specified on the data source level.
Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).
See also migration to feed labels.
feedLabelandcontentLanguagemust be either both set or unset for data sources with product content type.They must be set for data sources with a [file input][google.shopping.merchant.datasources.v1.FileInput]. The fields must be unset for data sources without [file input][google.shopping.merchant.datasources.v1.FileInput].
If set, the data source will only accept products matching this combination. If unset, the data source will accept produts without that restriction.
This field is a member of oneof
_feed_label.- Type
- content_language¶
Optional. Immutable. The two-letter ISO 639-1 language of the items in the data source.
feedLabelandcontentLanguagemust be either both set or unset. The fields can only be unset for data sources without file input.If set, the data source will only accept products matching this combination. If unset, the data source will accept produts without that restriction.
This field is a member of oneof
_content_language.- Type
- referencing_primary_data_sources¶
Output only. The (unordered and deduplicated) list of all primary data sources linked to this data source in either default or custom rules. Supplemental data source cannot be deleted before all links are removed.
- Type
MutableSequence[google.shopping.merchant_datasources_v1.types.DataSourceReference]
- class google.shopping.merchant_datasources_v1.types.UpdateDataSourceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for the UpdateDataSource method.
- data_source¶
Required. The data source resource to update.
- update_mask¶
Required. The list of data source fields to be updated.
Fields specified in the update mask without a value specified in the body will be deleted from the data source.
Providing special “*” value for full data source replacement is not supported.
For example, If you insert
updateMask=displayNamein the request, it will only update thedisplayNameleaving all other fields untouched.