Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ version: v0.14.0
repo: googleapis/google-cloud-python
sources:
googleapis:
commit: 84009fb6ad8975910a5cb62d32e7f35e48c9da02
sha256: b82e61ef9bc042fe02c9c9113a53d207331dc7cd8c10cc0d4f4cbeb7e65f1577
commit: 43731d5d22f8e3526ba7aa708da9d5de26043d0f
sha256: d146cfa257ffa00fc298ec7b6f73f9c7395a5a5ba050dcc553cfd78d6705bc3b
default:
output: packages
tag_format: '{name}-v{version}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
PpidData,
UserIdData,
)
from google.ads.datamanager_v1.types.cart_data import CartData, Item
from google.ads.datamanager_v1.types.cart_data import CartData, Item, ItemCustomVariable
from google.ads.datamanager_v1.types.consent import Consent, ConsentStatus
from google.ads.datamanager_v1.types.destination import (
Destination,
Expand All @@ -80,6 +80,7 @@
AdIdentifiers,
CustomVariable,
Event,
EventLocation,
EventParameter,
EventSource,
)
Expand Down Expand Up @@ -217,6 +218,7 @@
"UserIdData",
"CartData",
"Item",
"ItemCustomVariable",
"Consent",
"ConsentStatus",
"Destination",
Expand All @@ -230,6 +232,7 @@
"AdIdentifiers",
"CustomVariable",
"Event",
"EventLocation",
"EventParameter",
"EventSource",
"ExperimentalField",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
)
from .types.age_range import AgeRange
from .types.audience import AudienceMember, MobileData, PairData, PpidData, UserIdData
from .types.cart_data import CartData, Item
from .types.cart_data import CartData, Item, ItemCustomVariable
from .types.consent import Consent, ConsentStatus
from .types.destination import Destination, Product, ProductAccount
from .types.device_info import DeviceInfo
Expand All @@ -59,6 +59,7 @@
AdIdentifiers,
CustomVariable,
Event,
EventLocation,
EventParameter,
EventSource,
)
Expand Down Expand Up @@ -274,6 +275,7 @@ def _get_version(dependency_name):
"ErrorInfo",
"ErrorReason",
"Event",
"EventLocation",
"EventParameter",
"EventSource",
"ExperimentalField",
Expand All @@ -289,6 +291,7 @@ def _get_version(dependency_name):
"IngestedUserListInfo",
"IngestionServiceClient",
"Item",
"ItemCustomVariable",
"ItemParameter",
"ListUserListDirectLicensesRequest",
"ListUserListDirectLicensesResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
class PartnerLinkServiceTransport(abc.ABC):
"""Abstract transport class for PartnerLinkService."""

AUTH_SCOPES = ("https://www.googleapis.com/auth/datamanager",)
AUTH_SCOPES = (
"https://www.googleapis.com/auth/datamanager",
"https://www.googleapis.com/auth/datamanager.partnerlink",
)

DEFAULT_HOST: str = "datamanager.googleapis.com"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from .cart_data import (
CartData,
Item,
ItemCustomVariable,
)
from .consent import (
Consent,
Expand All @@ -51,6 +52,7 @@
AdIdentifiers,
CustomVariable,
Event,
EventLocation,
EventParameter,
EventSource,
)
Expand Down Expand Up @@ -184,6 +186,7 @@
"UserIdData",
"CartData",
"Item",
"ItemCustomVariable",
"Consent",
"ConsentStatus",
"Destination",
Expand All @@ -197,6 +200,7 @@
"AdIdentifiers",
"CustomVariable",
"Event",
"EventLocation",
"EventParameter",
"EventSource",
"ExperimentalField",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
manifest={
"CartData",
"Item",
"ItemCustomVariable",
},
)

Expand All @@ -50,6 +51,15 @@ class CartData(proto.Message):
items (MutableSequence[google.ads.datamanager_v1.types.Item]):
Optional. The list of items associated with
the event.
coupon_codes (MutableSequence[str]):
Optional. The list of coupon codes that were
applied to the cart. Cart-level and item-level
coupon codes are independent.

If the event is for a Google Analytics
destination, only provide a single coupon code.
Google Analytics ignores additional coupon
codes.
"""

merchant_id: str = proto.Field(
Expand All @@ -73,11 +83,17 @@ class CartData(proto.Message):
number=5,
message="Item",
)
coupon_codes: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=6,
)


class Item(proto.Message):
r"""Represents an item in the cart associated with the event.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes:
merchant_product_id (str):
Optional. The product ID within the Merchant
Expand All @@ -96,6 +112,34 @@ class Item(proto.Message):
item <https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events>`__
to be included within the event that were not already
specified using other structured fields.
merchant_id (str):
Optional. The Merchant Center ID associated
with the item. For Store Sales events this will
override the value set at the cart level. This
field is ignored for other events.
merchant_feed_label (str):
Optional. The feed label of the Merchant
Center feed. If countries are still being used,
the 2-letter country code in ISO-3166-1 alpha-2
can be used instead. For Store Sales events this
will override the value set at the cart level.
This field is ignored for other events.
merchant_feed_language_code (str):
Optional. The language code in ISO 639-1
associated with the Merchant Center feed where
your items are uploaded.
conversion_value (float):
Optional. The conversion value associated
with this item within the event, for cases where
the conversion value is different for each item.

This field is a member of `oneof`_ ``_conversion_value``.
custom_variables (MutableSequence[google.ads.datamanager_v1.types.ItemCustomVariable]):
Optional. Additional key/value pair
information to send to the conversion containers
(conversion action or Floodlight activity), when
tracking per-item
conversions.
"""

merchant_product_id: str = proto.Field(
Expand All @@ -121,6 +165,61 @@ class Item(proto.Message):
message=item_parameter.ItemParameter,
)
)
merchant_id: str = proto.Field(
proto.STRING,
number=6,
)
merchant_feed_label: str = proto.Field(
proto.STRING,
number=7,
)
merchant_feed_language_code: str = proto.Field(
proto.STRING,
number=8,
)
conversion_value: float = proto.Field(
proto.DOUBLE,
number=9,
optional=True,
)
custom_variables: MutableSequence["ItemCustomVariable"] = proto.RepeatedField(
proto.MESSAGE,
number=10,
message="ItemCustomVariable",
)


class ItemCustomVariable(proto.Message):
r"""Item-level custom variable for ads conversions.

Attributes:
variable (str):
Optional. The name of the custom variable to
set. If the variable is not found for the given
destination, it will be ignored.
value (str):
Optional. The value to store for the custom
variable.
destination_references (MutableSequence[str]):
Optional. Reference string used to determine which of the
[Event.destination_references][google.ads.datamanager.v1.Event.destination_references]
the custom variable should be sent to. If empty, the
[Event.destination_references][google.ads.datamanager.v1.Event.destination_references]
will be used.
"""

variable: str = proto.Field(
proto.STRING,
number=1,
)
value: str = proto.Field(
proto.STRING,
number=2,
)
destination_references: MutableSequence[str] = proto.RepeatedField(
proto.STRING,
number=3,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,31 @@ class DeviceInfo(proto.Message):
`About offline conversion
imports <https://support.google.com/google-ads/answer/2998031>`__
page for more details.
category (str):
Optional. The category of device. For
example, “desktop”, “tablet”, “mobile”, “smart
TV”.
language_code (str):
Optional. The language the device uses in ISO
639-1 format.
screen_height (int):
Optional. The height of the screen in pixels.
screen_width (int):
Optional. The width of the screen in pixels.
operating_system (str):
Optional. The operating system or platform of
the device.
operating_system_version (str):
Optional. The version of the operating system
or platform.
model (str):
Optional. The model of the device.
brand (str):
Optional. The brand of the device.
browser (str):
Optional. The brand or type of the browser.
browser_version (str):
Optional. The version of the browser.
"""

user_agent: str = proto.Field(
Expand All @@ -60,6 +85,46 @@ class DeviceInfo(proto.Message):
proto.STRING,
number=2,
)
category: str = proto.Field(
proto.STRING,
number=3,
)
language_code: str = proto.Field(
proto.STRING,
number=4,
)
screen_height: int = proto.Field(
proto.INT32,
number=5,
)
screen_width: int = proto.Field(
proto.INT32,
number=6,
)
operating_system: str = proto.Field(
proto.STRING,
number=7,
)
operating_system_version: str = proto.Field(
proto.STRING,
number=8,
)
model: str = proto.Field(
proto.STRING,
number=9,
)
brand: str = proto.Field(
proto.STRING,
number=10,
)
browser: str = proto.Field(
proto.STRING,
number=11,
)
browser_version: str = proto.Field(
proto.STRING,
number=12,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Loading
Loading