As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Shopping Type API

class google.shopping.type.types.Channel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Channel of a product.

Channel is used to distinguish between online and local products.

class ChannelEnum(value)[source]

Bases: proto.enums.Enum

Channel values.

Values:
CHANNEL_ENUM_UNSPECIFIED (0):

Not specified.

ONLINE (1):

Online product.

LOCAL (2):

Local product.

class google.shopping.type.types.CustomAttribute(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A message that represents custom attributes. Exactly one of value or group_values must not be empty.

name

The name of the attribute.

This field is a member of oneof _name.

Type

str

value

The value of the attribute. If value is not empty, group_values must be empty.

This field is a member of oneof _value.

Type

str

group_values

Subattributes within this attribute group. If group_values is not empty, value must be empty.

Type

MutableSequence[google.shopping.type.types.CustomAttribute]

class google.shopping.type.types.Destination(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Destinations available for a product.

Destinations are used in Merchant Center to allow you to control where the products from your data feed should be displayed.

class DestinationEnum(value)[source]

Bases: proto.enums.Enum

Destination values.

Values:
DESTINATION_ENUM_UNSPECIFIED (0):

Not specified.

SHOPPING_ADS (1):

Shopping ads.

DISPLAY_ADS (2):

Display ads.

LOCAL_INVENTORY_ADS (3):

Local inventory ads.

FREE_LISTINGS (4):

Free listings.

FREE_LOCAL_LISTINGS (5):

Free local product listings.

YOUTUBE_SHOPPING (6):

YouTube Shopping.

class google.shopping.type.types.Price(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The price represented as a number and currency.

amount_micros

The price represented as a number in micros (1 million micros is an equivalent to one’s currency standard unit, for example, 1 USD = 1000000 micros).

This field is a member of oneof _amount_micros.

Type

int

currency_code

The currency of the price using three-letter acronyms according to ISO 4217.

This field is a member of oneof _currency_code.

Type

str

class google.shopping.type.types.ReportingContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Reporting contexts that your account and product issues apply to.

Reporting contexts are groups of surfaces and formats for product results on Google. They can represent the entire destination (for example, Shopping ads) or a subset of formats within a destination (for example, Demand Gen ads).

class ReportingContextEnum(value)[source]

Bases: proto.enums.Enum

Reporting context values.

Values:
REPORTING_CONTEXT_ENUM_UNSPECIFIED (0):

Not specified.

SHOPPING_ADS (1):

Shopping ads.

DISCOVERY_ADS (2):

Deprecated: Use DEMAND_GEN_ADS instead. Discovery and Demand Gen ads.

DEMAND_GEN_ADS (13):

Demand Gen ads.

DEMAND_GEN_ADS_DISCOVER_SURFACE (14):

Demand Gen ads on Discover surface.

VIDEO_ADS (3):

Video ads.

DISPLAY_ADS (4):

Display ads.

LOCAL_INVENTORY_ADS (5):

Local inventory ads.

VEHICLE_INVENTORY_ADS (6):

Vehicle inventory ads.

FREE_LISTINGS (7):

Free product listings.

FREE_LOCAL_LISTINGS (8):

Free local product listings.

FREE_LOCAL_VEHICLE_LISTINGS (9):

Free local vehicle listings.

YOUTUBE_SHOPPING (10):

YouTube Shopping.

CLOUD_RETAIL (11):

Cloud retail.

LOCAL_CLOUD_RETAIL (12):

Local cloud retail.

class google.shopping.type.types.Weight(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The weight represented as the value in string and the unit.

amount_micros

Required. The weight represented as a number in micros (1 million micros is an equivalent to one’s currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value.

This field is a member of oneof _amount_micros.

Type

int

unit

Required. The weight unit. Acceptable values are: kg and lb

Type

google.shopping.type.types.Weight.WeightUnit

class WeightUnit(value)[source]

Bases: proto.enums.Enum

The weight unit.

Values:
WEIGHT_UNIT_UNSPECIFIED (0):

unit unspecified

POUND (1):

lb unit.

KILOGRAM (2):

kg unit.