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
The table of contents is too big for display.
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.46.0
repo: googleapis/google-cloud-python
sources:
googleapis:
commit: 9b719a5c153f3ec7a14d5d45d4da720410c7b943
sha256: fcceaa2004ccc51874effb9669303c042d21ff3e308f1710ce8280acbab8e2a5
commit: 93d6085996d0b4ff7e7e86ca9945d5524bb380d1
sha256: 2271ff64a808d6a9089d0f410d28fc9ce4dd35ffe6e1c2cf79dd9a8578ddc871
tools:
pip:
- name: black
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,14 @@
IngestAudienceMembersResponse,
IngestEventsRequest,
IngestEventsResponse,
IngestUsersRequest,
IngestUsersResponse,
RemoveAllAudienceMembersRequest,
RemoveAllAudienceMembersResponse,
RemoveAudienceMembersRequest,
RemoveAudienceMembersResponse,
RemoveUsersRequest,
RemoveUsersResponse,
RetrieveRequestStatusRequest,
RetrieveRequestStatusResponse,
)
Expand Down Expand Up @@ -151,6 +155,7 @@
TermsOfService,
TermsOfServiceStatus,
)
from google.ads.datamanager_v1.types.user import User
from google.ads.datamanager_v1.types.user_data import (
AddressInfo,
UserData,
Expand Down Expand Up @@ -287,10 +292,14 @@
"IngestAudienceMembersResponse",
"IngestEventsRequest",
"IngestEventsResponse",
"IngestUsersRequest",
"IngestUsersResponse",
"RemoveAllAudienceMembersRequest",
"RemoveAllAudienceMembersResponse",
"RemoveAudienceMembersRequest",
"RemoveAudienceMembersResponse",
"RemoveUsersRequest",
"RemoveUsersResponse",
"RetrieveRequestStatusRequest",
"RetrieveRequestStatusResponse",
"Encoding",
Expand Down Expand Up @@ -318,6 +327,7 @@
"RequestStatusPerDestination",
"TermsOfService",
"TermsOfServiceStatus",
"User",
"AddressInfo",
"UserData",
"UserIdentifier",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"google.ads.datamanager_v1.types.processing_errors",
"google.ads.datamanager_v1.types.request_status_per_destination",
"google.ads.datamanager_v1.types.terms_of_service",
"google.ads.datamanager_v1.types.user",
"google.ads.datamanager_v1.types.user_data",
"google.ads.datamanager_v1.types.user_list",
"google.ads.datamanager_v1.types.user_list_direct_license",
Expand Down Expand Up @@ -146,10 +147,14 @@
IngestAudienceMembersResponse,
IngestEventsRequest,
IngestEventsResponse,
IngestUsersRequest,
IngestUsersResponse,
RemoveAllAudienceMembersRequest,
RemoveAllAudienceMembersResponse,
RemoveAudienceMembersRequest,
RemoveAudienceMembersResponse,
RemoveUsersRequest,
RemoveUsersResponse,
RetrieveRequestStatusRequest,
RetrieveRequestStatusResponse,
)
Expand Down Expand Up @@ -182,6 +187,7 @@
)
from .types.request_status_per_destination import RequestStatusPerDestination
from .types.terms_of_service import TermsOfService, TermsOfServiceStatus
from .types.user import User
from .types.user_data import AddressInfo, UserData, UserIdentifier
from .types.user_list import (
ContactIdInfo,
Expand Down Expand Up @@ -301,6 +307,8 @@
"IngestAudienceMembersResponse",
"IngestEventsRequest",
"IngestEventsResponse",
"IngestUsersRequest",
"IngestUsersResponse",
"IngestedUserListInfo",
"IngestionServiceClient",
"IpData",
Expand Down Expand Up @@ -340,6 +348,8 @@
"RemoveAllAudienceMembersResponse",
"RemoveAudienceMembersRequest",
"RemoveAudienceMembersResponse",
"RemoveUsersRequest",
"RemoveUsersResponse",
"RequestStatusPerDestination",
"RetrieveInsightsRequest",
"RetrieveInsightsResponse",
Expand All @@ -355,6 +365,7 @@
"UpdateUserListDirectLicenseRequest",
"UpdateUserListGlobalLicenseRequest",
"UpdateUserListRequest",
"User",
"UserData",
"UserIdData",
"UserIdInfo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"ingest_events"
]
},
"IngestUsers": {
"methods": [
"ingest_users"
]
},
"RemoveAllAudienceMembers": {
"methods": [
"remove_all_audience_members"
Expand All @@ -35,6 +40,11 @@
"remove_audience_members"
]
},
"RemoveUsers": {
"methods": [
"remove_users"
]
},
"RetrieveRequestStatus": {
"methods": [
"retrieve_request_status"
Expand All @@ -60,6 +70,11 @@
"ingest_events"
]
},
"IngestUsers": {
"methods": [
"ingest_users"
]
},
"RemoveAllAudienceMembers": {
"methods": [
"remove_all_audience_members"
Expand All @@ -70,6 +85,11 @@
"remove_audience_members"
]
},
"RemoveUsers": {
"methods": [
"remove_users"
]
},
"RetrieveRequestStatus": {
"methods": [
"retrieve_request_status"
Expand All @@ -95,6 +115,11 @@
"ingest_events"
]
},
"IngestUsers": {
"methods": [
"ingest_users"
]
},
"RemoveAllAudienceMembers": {
"methods": [
"remove_all_audience_members"
Expand All @@ -105,6 +130,11 @@
"remove_audience_members"
]
},
"RemoveUsers": {
"methods": [
"remove_users"
]
},
"RetrieveRequestStatus": {
"methods": [
"retrieve_request_status"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,191 @@ async def sample_ingest_events():
# Done; return the response.
return response

async def ingest_users(
self,
request: Optional[Union[ingestion_service.IngestUsersRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> ingestion_service.IngestUsersResponse:
r"""Uploads a list of users to the provided destinations. Unlike
[IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers]
(which adds users to specific advertiser audience lists for
targeting), ``IngestUsers`` ingests account level identity
linkage data (for example, user identifiers linked to mobile
IDs) independent of specific audience segments.

This feature is only available to accounts on an allowlist.

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.ads import datamanager_v1

async def sample_ingest_users():
# Create a client
client = datamanager_v1.IngestionServiceAsyncClient()

# Initialize request argument(s)
destinations = datamanager_v1.Destination()
destinations.operating_account.account_id = "account_id_value"
destinations.operating_account.account_type = "GOOGLE_AD_MANAGER"

users = datamanager_v1.User()
users.user_data.user_identifiers.email_address = "email_address_value"
users.mobile_data.mobile_ids = ['mobile_ids_value1', 'mobile_ids_value2']

request = datamanager_v1.IngestUsersRequest(
destinations=destinations,
users=users,
encoding="BASE64",
)

# Make the request
response = await client.ingest_users(request=request)

# Handle the response
print(response)

Args:
request (Optional[Union[google.ads.datamanager_v1.types.IngestUsersRequest, dict]]):
The request object. Request to upload users to the
provided destinations.
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
sent along with the request as metadata. Normally, each value must be of type `str`,
but for metadata keys ending with the suffix `-bin`, the corresponding values must
be of type `bytes`.

Returns:
google.ads.datamanager_v1.types.IngestUsersResponse:
Response from the IngestUsersRequest.
"""
# Create or coerce a protobuf request object.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, ingestion_service.IngestUsersRequest):
request = ingestion_service.IngestUsersRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = self._client._transport._wrapped_methods[
self._client._transport.ingest_users
]

# Validate the universe domain.
self._client._validate_universe_domain()

# Send the request.
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response

async def remove_users(
self,
request: Optional[Union[ingestion_service.RemoveUsersRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
) -> ingestion_service.RemoveUsersResponse:
r"""Removes a list of users from the provided
destinations.
This feature is only available to accounts on an
allowlist.

.. code-block:: python

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.ads import datamanager_v1

async def sample_remove_users():
# Create a client
client = datamanager_v1.IngestionServiceAsyncClient()

# Initialize request argument(s)
destinations = datamanager_v1.Destination()
destinations.operating_account.account_id = "account_id_value"
destinations.operating_account.account_type = "GOOGLE_AD_MANAGER"

user_data = datamanager_v1.UserData()
user_data.user_identifiers.email_address = "email_address_value"

request = datamanager_v1.RemoveUsersRequest(
destinations=destinations,
user_data=user_data,
encoding="BASE64",
)

# Make the request
response = await client.remove_users(request=request)

# Handle the response
print(response)

Args:
request (Optional[Union[google.ads.datamanager_v1.types.RemoveUsersRequest, dict]]):
The request object. Request to remove users from the
provided destinations.
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
sent along with the request as metadata. Normally, each value must be of type `str`,
but for metadata keys ending with the suffix `-bin`, the corresponding values must
be of type `bytes`.

Returns:
google.ads.datamanager_v1.types.RemoveUsersResponse:
Response from the RemoveUsersRequest.
"""
# Create or coerce a protobuf request object.
# - Use the request object if provided (there's no risk of modifying the input as
# there are no flattened fields), or create one.
if not isinstance(request, ingestion_service.RemoveUsersRequest):
request = ingestion_service.RemoveUsersRequest(request)

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = self._client._transport._wrapped_methods[
self._client._transport.remove_users
]

# Validate the universe domain.
self._client._validate_universe_domain()

# Send the request.
response = await rpc(
request,
retry=retry,
timeout=timeout,
metadata=metadata,
)

# Done; return the response.
return response

async def ingest_ad_events(
self,
request: Optional[Union[ingestion_service.IngestAdEventsRequest, dict]] = None,
Expand Down
Loading
Loading