// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Data Manager API Client for Deno * ================================ * * A unified ingestion API for data partners, agencies and advertisers to connect first-party data across Google advertising products. * * Docs: https://developers.google.com/data-manager * Source: https://googleapis.deno.dev/v1/datamanager:v1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * A unified ingestion API for data partners, agencies and advertisers to * connect first-party data across Google advertising products. */ export class DataManager { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://datamanager.googleapis.com/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Retrieves marketing data insights for a given user list. This feature is * only available to data partners. Authorization Headers: This method * supports the following optional headers to define how the API authorizes * access for the request: * `login-account`: (Optional) The resource name of * the account where the Google Account of the credentials is a user. If not * set, defaults to the account of the request. Format: * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param parent Required. The parent account that owns the user list. Format: `accountTypes/{account_type}/accounts/{account}` */ async accountTypesAccountsInsightsRetrieve(parent: string, req: RetrieveInsightsRequest): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/insights:retrieve`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeRetrieveInsightsResponse(data); } /** * Creates a partner link for the given account. Authorization Headers: This * method supports the following optional headers to define how the API * authorizes access for the request: * `login-account`: (Optional) The * resource name of the account where the Google Account of the credentials is * a user. If not set, defaults to the account of the request. Format: * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param parent Required. The parent, which owns this collection of partner links. Format: accountTypes/{account_type}/accounts/{account} */ async accountTypesAccountsPartnerLinksCreate(parent: string, req: PartnerLink): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/partnerLinks`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as PartnerLink; } /** * Deletes a partner link for the given account. Authorization Headers: This * method supports the following optional headers to define how the API * authorizes access for the request: * `login-account`: (Optional) The * resource name of the account where the Google Account of the credentials is * a user. If not set, defaults to the account of the request. Format: * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param name Required. The resource name of the partner link to delete. Format: accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link} */ async accountTypesAccountsPartnerLinksDelete(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Searches for all partner links to and from a given account. Authorization * Headers: This method supports the following optional headers to define how * the API authorizes access for the request: * `login-account`: (Optional) * The resource name of the account where the Google Account of the * credentials is a user. If not set, defaults to the account of the request. * Format: `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param parent Required. Account to search for partner links. If no `filter` is specified, all partner links where this account is either the `owning_account` or `partner_account` are returned. Format: `accountTypes/{account_type}/accounts/{account}` */ async accountTypesAccountsPartnerLinksSearch(parent: string, opts: AccountTypesAccountsPartnerLinksSearchOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/partnerLinks:search`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as SearchPartnerLinksResponse; } /** * Creates a user list direct license. This feature is only available to data * partners. * * @param parent Required. The account that owns the user list being licensed. Should be in the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} */ async accountTypesAccountsUserListDirectLicensesCreate(parent: string, req: UserListDirectLicense): Promise { req = serializeUserListDirectLicense(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userListDirectLicenses`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeUserListDirectLicense(data); } /** * Retrieves a user list direct license. This feature is only available to * data partners. * * @param name Required. The resource name of the user list direct license. */ async accountTypesAccountsUserListDirectLicensesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeUserListDirectLicense(data); } /** * Lists all user list direct licenses owned by the parent account. This * feature is only available to data partners. * * @param parent Required. The account whose licenses are being queried. Should be in the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} */ async accountTypesAccountsUserListDirectLicensesList(parent: string, opts: AccountTypesAccountsUserListDirectLicensesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/userListDirectLicenses`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListUserListDirectLicensesResponse(data); } /** * Updates a user list direct license. This feature is only available to data * partners. * * @param name Identifier. The resource name of the user list direct license. */ async accountTypesAccountsUserListDirectLicensesPatch(name: string, req: UserListDirectLicense, opts: AccountTypesAccountsUserListDirectLicensesPatchOptions = {}): Promise { req = serializeUserListDirectLicense(req); opts = serializeAccountTypesAccountsUserListDirectLicensesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeUserListDirectLicense(data); } /** * Creates a user list global license. This feature is only available to data * partners. * * @param parent Required. The account that owns the user list being licensed. Should be in the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} */ async accountTypesAccountsUserListGlobalLicensesCreate(parent: string, req: UserListGlobalLicense): Promise { req = serializeUserListGlobalLicense(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userListGlobalLicenses`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeUserListGlobalLicense(data); } /** * Retrieves a user list global license. This feature is only available to * data partners. * * @param name Required. The resource name of the user list global license. */ async accountTypesAccountsUserListGlobalLicensesGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeUserListGlobalLicense(data); } /** * Lists all user list global licenses owned by the parent account. This * feature is only available to data partners. * * @param parent Required. The account whose licenses are being queried. Should be in the format accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID} */ async accountTypesAccountsUserListGlobalLicensesList(parent: string, opts: AccountTypesAccountsUserListGlobalLicensesListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/userListGlobalLicenses`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListUserListGlobalLicensesResponse(data); } /** * Updates a user list global license. This feature is only available to data * partners. * * @param name Identifier. The resource name of the user list global license. */ async accountTypesAccountsUserListGlobalLicensesPatch(name: string, req: UserListGlobalLicense, opts: AccountTypesAccountsUserListGlobalLicensesPatchOptions = {}): Promise { req = serializeUserListGlobalLicense(req); opts = serializeAccountTypesAccountsUserListGlobalLicensesPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeUserListGlobalLicense(data); } /** * Lists all customer info for a user list global license. This feature is * only available to data partners. * * @param parent Required. The global license whose customer info are being queried. Should be in the format `accountTypes/{ACCOUNT_TYPE}/accounts/{ACCOUNT_ID}/userListGlobalLicenses/{USER_LIST_GLOBAL_LICENSE_ID}`. To list all global license customer info under an account, replace the user list global license id with a '-' (for example, `accountTypes/DATA_PARTNER/accounts/123/userListGlobalLicenses/-`) */ async accountTypesAccountsUserListGlobalLicensesUserListGlobalLicenseCustomerInfosList(parent: string, opts: AccountTypesAccountsUserListGlobalLicensesUserListGlobalLicenseCustomerInfosListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/userListGlobalLicenseCustomerInfos`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListUserListGlobalLicenseCustomerInfosResponse; } /** * Creates a UserList. Authorization Headers: This method supports the * following optional headers to define how the API authorizes access for the * request: * `login-account`: (Optional) The resource name of the account * where the Google Account of the credentials is a user. If not set, defaults * to the account of the request. Format: * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param parent Required. The parent account where this user list will be created. Format: accountTypes/{account_type}/accounts/{account} */ async accountTypesAccountsUserListsCreate(parent: string, req: UserList, opts: AccountTypesAccountsUserListsCreateOptions = {}): Promise { req = serializeUserList(req); const url = new URL(`${this.#baseUrl}v1/${ parent }/userLists`); if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeUserList(data); } /** * Deletes a UserList. Authorization Headers: This method supports the * following optional headers to define how the API authorizes access for the * request: * `login-account`: (Optional) The resource name of the account * where the Google Account of the credentials is a user. If not set, defaults * to the account of the request. Format: * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param name Required. The name of the user list to delete. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list} */ async accountTypesAccountsUserListsDelete(name: string, opts: AccountTypesAccountsUserListsDeleteOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); return data as Empty; } /** * Gets a UserList. Authorization Headers: This method supports the following * optional headers to define how the API authorizes access for the request: * * `login-account`: (Optional) The resource name of the account where the * Google Account of the credentials is a user. If not set, defaults to the * account of the request. Format: * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param name Required. The resource name of the UserList to retrieve. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list} */ async accountTypesAccountsUserListsGet(name: string): Promise { const url = new URL(`${this.#baseUrl}v1/${ name }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeUserList(data); } /** * Lists UserLists. Authorization Headers: This method supports the following * optional headers to define how the API authorizes access for the request: * * `login-account`: (Optional) The resource name of the account where the * Google Account of the credentials is a user. If not set, defaults to the * account of the request. Format: * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param parent Required. The parent account which owns this collection of user lists. Format: accountTypes/{account_type}/accounts/{account} */ async accountTypesAccountsUserListsList(parent: string, opts: AccountTypesAccountsUserListsListOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/${ parent }/userLists`); if (opts.filter !== undefined) { url.searchParams.append("filter", String(opts.filter)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListUserListsResponse(data); } /** * Updates a UserList. Authorization Headers: This method supports the * following optional headers to define how the API authorizes access for the * request: * `login-account`: (Optional) The resource name of the account * where the Google Account of the credentials is a user. If not set, defaults * to the account of the request. Format: * `accountTypes/{loginAccountType}/accounts/{loginAccountId}` * * `linked-account`: (Optional) The resource name of the account with an * established product link to the `login-account`. Format: * `accountTypes/{linkedAccountType}/accounts/{linkedAccountId}` * * @param name Identifier. The resource name of the user list. Format: accountTypes/{account_type}/accounts/{account}/userLists/{user_list} */ async accountTypesAccountsUserListsPatch(name: string, req: UserList, opts: AccountTypesAccountsUserListsPatchOptions = {}): Promise { req = serializeUserList(req); opts = serializeAccountTypesAccountsUserListsPatchOptions(opts); const url = new URL(`${this.#baseUrl}v1/${ name }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } if (opts.validateOnly !== undefined) { url.searchParams.append("validateOnly", String(opts.validateOnly)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeUserList(data); } /** * Uploads a list of AudienceMember resources to the provided Destination. * */ async audienceMembersIngest(req: IngestAudienceMembersRequest): Promise { const url = new URL(`${this.#baseUrl}v1/audienceMembers:ingest`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as IngestAudienceMembersResponse; } /** * Removes a list of AudienceMember resources from the provided Destination. * */ async audienceMembersRemove(req: RemoveAudienceMembersRequest): Promise { const url = new URL(`${this.#baseUrl}v1/audienceMembers:remove`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as RemoveAudienceMembersResponse; } /** * Uploads a list of Event resources from the provided Destination. * */ async eventsIngest(req: IngestEventsRequest): Promise { req = serializeIngestEventsRequest(req); const url = new URL(`${this.#baseUrl}v1/events:ingest`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as IngestEventsResponse; } /** * Gets the status of a request given request id. * */ async requestStatusRetrieve(opts: RequestStatusRetrieveOptions = {}): Promise { const url = new URL(`${this.#baseUrl}v1/requestStatus:retrieve`); if (opts.requestId !== undefined) { url.searchParams.append("requestId", String(opts.requestId)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeRetrieveRequestStatusResponse(data); } } /** * Additional options for DataManager#accountTypesAccountsPartnerLinksSearch. */ export interface AccountTypesAccountsPartnerLinksSearchOptions { /** * Optional. A [filter string](//google.aip.dev/160). All fields need to be * on the left hand side of each condition (for example: `partner_link_id = * 123456789`). Supported operations: - `AND` - `=` - `!=` Supported fields: - * `partner_link_id` - `owning_account.account_type` - * `owning_account.account_id` - `partner_account.account_type` - * `partner_account.account_id` Example: `owning_account.account_type = * "GOOGLE_ADS" OR partner_account.account_id = 987654321` */ filter?: string; /** * The maximum number of partner links to return. The service may return * fewer than this value. If unspecified, at most 10 partner links will be * returned. The maximum value is 100; values above 100 will be coerced to * 100. */ pageSize?: number; /** * A page token, received from a previous `SearchPartnerLinks` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `SearchPartnerLinks` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for * DataManager#accountTypesAccountsUserListDirectLicensesList. */ export interface AccountTypesAccountsUserListDirectLicensesListOptions { /** * Optional. Filters to apply to the list request. All fields need to be on * the left hand side of each condition (for example: user_list_id = 123). * **Supported Operations:** - `AND` - `=` - `!=` - `>` - `>=` - `<` - `<=` * **Unsupported Fields:** - `name` (use get method instead) - * `historical_pricings` and all its subfields - `pricing.start_time` - * `pricing.end_time` */ filter?: string; /** * Optional. The maximum number of licenses to return per page. The service * may return fewer than this value. If unspecified, at most 50 licenses will * be returned. The maximum value is 1000; values above 1000 will be coerced * to 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent * page. When paginating, all other parameters provided to * `ListUserListDirectLicense` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for * DataManager#accountTypesAccountsUserListDirectLicensesPatch. */ export interface AccountTypesAccountsUserListDirectLicensesPatchOptions { /** * Optional. The list of fields to update. The special character `*` is not * supported and an `INVALID_UPDATE_MASK` error will be thrown if used. */ updateMask?: string /* FieldMask */; } function serializeAccountTypesAccountsUserListDirectLicensesPatchOptions(data: any): AccountTypesAccountsUserListDirectLicensesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeAccountTypesAccountsUserListDirectLicensesPatchOptions(data: any): AccountTypesAccountsUserListDirectLicensesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DataManager#accountTypesAccountsUserListGlobalLicensesList. */ export interface AccountTypesAccountsUserListGlobalLicensesListOptions { /** * Optional. Filters to apply to the list request. All fields need to be on * the left hand side of each condition (for example: user_list_id = 123). * **Supported Operations:** - `AND` - `=` - `!=` - `>` - `>=` - `<` - `<=` * **Unsupported Fields:** - `name` (use get method instead) - * `historical_pricings` and all its subfields - `pricing.start_time` - * `pricing.end_time` */ filter?: string; /** * Optional. The maximum number of licenses to return. The service may return * fewer than this value. If unspecified, at most 50 licenses will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous * `ListUserListGlobalLicense` call. Provide this to retrieve the subsequent * page. When paginating, all other parameters provided to * `ListUserListDirectLicense` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for * DataManager#accountTypesAccountsUserListGlobalLicensesPatch. */ export interface AccountTypesAccountsUserListGlobalLicensesPatchOptions { /** * Optional. The list of fields to update. The special character `*` is not * supported and an `INVALID_UPDATE_MASK` error will be thrown if used. */ updateMask?: string /* FieldMask */; } function serializeAccountTypesAccountsUserListGlobalLicensesPatchOptions(data: any): AccountTypesAccountsUserListGlobalLicensesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeAccountTypesAccountsUserListGlobalLicensesPatchOptions(data: any): AccountTypesAccountsUserListGlobalLicensesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Additional options for * DataManager#accountTypesAccountsUserListGlobalLicensesUserListGlobalLicenseCustomerInfosList. */ export interface AccountTypesAccountsUserListGlobalLicensesUserListGlobalLicenseCustomerInfosListOptions { /** * Optional. Filters to apply to the list request. All fields need to be on * the left hand side of each condition (for example: user_list_id = 123). * **Supported Operations:** - `AND` - `=` - `!=` - `>` - `>=` - `<` - `<=` * **Unsupported Fields:** - `name` (use get method instead) - * `historical_pricings` and all its subfields - `pricing.start_time` - * `pricing.end_time` */ filter?: string; /** * Optional. The maximum number of licenses to return. The service may return * fewer than this value. If unspecified, at most 50 licenses will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous * `ListUserListDirectLicense` call. Provide this to retrieve the subsequent * page. When paginating, all other parameters provided to * `ListUserListDirectLicense` must match the call that provided the page * token. */ pageToken?: string; } /** * Additional options for DataManager#accountTypesAccountsUserListsCreate. */ export interface AccountTypesAccountsUserListsCreateOptions { /** * Optional. If true, the request is validated but not executed. */ validateOnly?: boolean; } /** * Additional options for DataManager#accountTypesAccountsUserListsDelete. */ export interface AccountTypesAccountsUserListsDeleteOptions { /** * Optional. If true, the request is validated but not executed. */ validateOnly?: boolean; } /** * Additional options for DataManager#accountTypesAccountsUserListsList. */ export interface AccountTypesAccountsUserListsListOptions { /** * Optional. A [filter string](//google.aip.dev/160). All fields need to be * on the left hand side of each condition (for example: `display_name = "list * 1"`). Supported operations: - `AND` - `=` - `!=` - `>` - `>=` - `<` - `<=` * - `:` (has) Supported fields: - `id` - `display_name` - `description` - * `membership_status` - `integration_code` - `access_reason` - * `ingested_user_list_info.upload_key_types` */ filter?: string; /** * Optional. The maximum number of user lists to return. The service may * return fewer than this value. If unspecified, at most 50 user lists will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. */ pageSize?: number; /** * Optional. A page token, received from a previous `ListUserLists` call. * Provide this to retrieve the subsequent page. When paginating, all other * parameters provided to `ListUserLists` must match the call that provided * the page token. */ pageToken?: string; } /** * Additional options for DataManager#accountTypesAccountsUserListsPatch. */ export interface AccountTypesAccountsUserListsPatchOptions { /** * Optional. The list of fields to update. */ updateMask?: string /* FieldMask */; /** * Optional. If true, the request is validated but not executed. */ validateOnly?: boolean; } function serializeAccountTypesAccountsUserListsPatchOptions(data: any): AccountTypesAccountsUserListsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeAccountTypesAccountsUserListsPatchOptions(data: any): AccountTypesAccountsUserListsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Address information for the user. */ export interface AddressInfo { /** * Required. Family (last) name of the user, all lowercase, with no * punctuation, no leading or trailing whitespace, and hashed as SHA-256. */ familyName?: string; /** * Required. Given (first) name of the user, all lowercase, with no * punctuation, no leading or trailing whitespace, and hashed as SHA-256. */ givenName?: string; /** * Required. The postal code of the user's address. */ postalCode?: string; /** * Required. The 2-letter region code in ISO-3166-1 alpha-2 of the user's * address. */ regionCode?: string; } /** * Identifiers and other information used to match the conversion event with * other online activity (such as ad clicks). */ export interface AdIdentifiers { /** * Optional. The click identifier for clicks associated with app events and * originating from iOS devices starting with iOS14. */ gbraid?: string; /** * Optional. The Google click ID (gclid) associated with this event. */ gclid?: string; /** * Optional. Information gathered about the device being used (if any) at the * time of landing onto the advertiser’s site after interacting with the ad. */ landingPageDeviceInfo?: DeviceInfo; /** * Optional. Session attributes for event attribution and modeling. */ sessionAttributes?: string; /** * Optional. The click identifier for clicks associated with web events and * originating from iOS devices starting with iOS14. */ wbraid?: string; } /** * The audience member to be operated on. */ export interface AudienceMember { /** * Optional. The consent setting for the user. */ consent?: Consent; /** * Optional. Defines which Destination to send the audience member to. */ destinationReferences?: string[]; /** * Data identifying the user's mobile devices. */ mobileData?: MobileData; /** * [Publisher Advertiser Identity Reconciliation (PAIR) * IDs](//support.google.com/admanager/answer/15067908). This feature is only * available to data partners. */ pairData?: PairData; /** * Data related to publisher provided identifiers. This feature is only * available to data partners. */ ppidData?: PpidData; /** * User-provided data that identifies the user. */ userData?: UserData; /** * Data related to unique identifiers for a user, as defined by the * advertiser. */ userIdData?: UserIdData; } /** * A data encryption key wrapped by an AWS KMS key. */ export interface AwsWrappedKeyInfo { /** * Required. The base64 encoded encrypted data encryption key. */ encryptedDek?: string; /** * Required. The URI of the AWS KMS key used to decrypt the DEK. Should be in * the format of `arn:{partition}:kms:{region}:{account_id}:key/{key_id}` or * `aws-kms://arn:{partition}:kms:{region}:{account_id}:key/{key_id}` */ kekUri?: string; /** * Required. The type of algorithm used to encrypt the data. */ keyType?: | "KEY_TYPE_UNSPECIFIED" | "XCHACHA20_POLY1305"; /** * Required. The Amazon Resource Name of the IAM Role to assume for KMS * decryption access. Should be in the format of * `arn:{partition}:iam::{account_id}:role/{role_name}` */ roleArn?: string; } /** * Baseline criteria against which insights are compared. */ export interface Baseline { /** * The baseline location of the request. Baseline location is an OR-list of * the requested regions. */ baselineLocation?: Location; /** * If set to true, the service will try to automatically detect the baseline * location for insights. */ locationAutoDetectionEnabled?: boolean; } /** * The cart data associated with the event. */ export interface CartData { /** * Optional. The list of items associated with the event. */ items?: Item[]; /** * Optional. The Merchant Center feed label associated with the feed of the * items. */ merchantFeedLabel?: string; /** * Optional. The language code in ISO 639-1 associated with the Merchant * Center feed of the items.where your items are uploaded. */ merchantFeedLanguageCode?: string; /** * Optional. The Merchant Center ID associated with the items. */ merchantId?: string; /** * Optional. The sum of all discounts associated with the transaction. */ transactionDiscount?: number; } function serializeCartData(data: any): CartData { return { ...data, items: data["items"] !== undefined ? data["items"].map((item: any) => (serializeItem(item))) : undefined, }; } function deserializeCartData(data: any): CartData { return { ...data, items: data["items"] !== undefined ? data["items"].map((item: any) => (deserializeItem(item))) : undefined, }; } /** * [Digital Markets Act (DMA)](//digital-markets-act.ec.europa.eu/index_en) * consent settings for the user. */ export interface Consent { /** * Optional. Represents if the user consents to ad personalization. */ adPersonalization?: | "CONSENT_STATUS_UNSPECIFIED" | "CONSENT_GRANTED" | "CONSENT_DENIED"; /** * Optional. Represents if the user consents to ad user data. */ adUserData?: | "CONSENT_STATUS_UNSPECIFIED" | "CONSENT_GRANTED" | "CONSENT_DENIED"; } /** * Additional information when `CONTACT_ID` is one of the `upload_key_types`. */ export interface ContactIdInfo { /** * Optional. Immutable. Source of the upload data */ dataSourceType?: | "DATA_SOURCE_TYPE_UNSPECIFIED" | "DATA_SOURCE_TYPE_FIRST_PARTY" | "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU" | "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE" | "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA"; /** * Output only. Match rate for customer match user lists. */ readonly matchRatePercentage?: number; } /** * Custom variable for ads conversions. */ export interface CustomVariable { /** * Optional. Reference string used to determine which of the * Event.destination_references the custom variable should be sent to. If * empty, the Event.destination_references will be used. */ destinationReferences?: string[]; /** * Optional. The value to store for the custom variable. */ value?: string; /** * Optional. The name of the custom variable to set. If the variable is not * found for the given destination, it will be ignored. */ variable?: string; } /** * The Google product you're sending data to. For example, a Google Ads * account. */ export interface Destination { /** * Optional. An account that the calling user's `login_account` has access * to, through an established account link. For example, a data partner's * `login_account` might have access to a client's `linked_account`. The * partner might use this field to send data from the `linked_account` to * another `operating_account`. */ linkedAccount?: ProductAccount; /** * Optional. The account used to make this API call. To add or remove data * from the `operating_account`, this `login_account` must have write access * to the `operating_account`. For example, a manager account of the * `operating_account`, or an account with an established link to the * `operating_account`. */ loginAccount?: ProductAccount; /** * Required. The account to send the data to or remove the data from. */ operatingAccount?: ProductAccount; /** * Required. The object within the product account to ingest into. For * example, a Google Ads audience ID, a Display & Video 360 audience ID or a * Google Ads conversion action ID. */ productDestinationId?: string; /** * Optional. ID for this `Destination` resource, unique within the request. * Use to reference this `Destination` in the IngestEventsRequest and * IngestAudienceMembersRequest. */ reference?: string; } /** * Information about the device being used (if any) when the event happened. */ export interface DeviceInfo { /** * Optional. The IP address of the device for the given context. **Note:** * Google Ads does not support IP address matching for end users in the * European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add * logic to conditionally exclude sharing IP addresses from users from these * regions and ensure that you provide users with clear and comprehensive * information about the data you collect on your sites, apps, and other * properties and get consent where required by law or any applicable Google * policies. See the [About offline conversion * imports](https://support.google.com/google-ads/answer/2998031) page for * more details. */ ipAddress?: string; /** * Optional. The user-agent string of the device for the given context. */ userAgent?: string; } /** * A generic empty message that you can re-use to avoid defining duplicated * empty messages in your APIs. A typical example is to use it as the request or * the response type of an API method. For instance: service Foo { rpc * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } */ export interface Empty { } /** * Encryption information for the data being ingested. */ export interface EncryptionInfo { /** * Amazon Web Services wrapped key information. */ awsWrappedKeyInfo?: AwsWrappedKeyInfo; /** * Google Cloud Platform wrapped key information. */ gcpWrappedKeyInfo?: GcpWrappedKeyInfo; } /** * The error count for a given error reason. */ export interface ErrorCount { /** * The error reason of the failed records. */ reason?: | "PROCESSING_ERROR_REASON_UNSPECIFIED" | "PROCESSING_ERROR_REASON_INVALID_CUSTOM_VARIABLE" | "PROCESSING_ERROR_REASON_CUSTOM_VARIABLE_NOT_ENABLED" | "PROCESSING_ERROR_REASON_EVENT_TOO_OLD" | "PROCESSING_ERROR_REASON_DENIED_CONSENT" | "PROCESSING_ERROR_REASON_NO_CONSENT" | "PROCESSING_ERROR_REASON_UNKNOWN_CONSENT" | "PROCESSING_ERROR_REASON_DUPLICATE_GCLID" | "PROCESSING_ERROR_REASON_DUPLICATE_TRANSACTION_ID" | "PROCESSING_ERROR_REASON_INVALID_GBRAID" | "PROCESSING_ERROR_REASON_INVALID_GCLID" | "PROCESSING_ERROR_REASON_INVALID_MERCHANT_ID" | "PROCESSING_ERROR_REASON_INVALID_WBRAID" | "PROCESSING_ERROR_REASON_INTERNAL_ERROR" | "PROCESSING_ERROR_REASON_DESTINATION_ACCOUNT_ENHANCED_CONVERSIONS_TERMS_NOT_SIGNED" | "PROCESSING_ERROR_REASON_INVALID_EVENT" | "PROCESSING_ERROR_REASON_INSUFFICIENT_MATCHED_TRANSACTIONS" | "PROCESSING_ERROR_REASON_INSUFFICIENT_TRANSACTIONS" | "PROCESSING_ERROR_REASON_INVALID_FORMAT" | "PROCESSING_ERROR_REASON_DECRYPTION_ERROR" | "PROCESSING_ERROR_REASON_DEK_DECRYPTION_ERROR" | "PROCESSING_ERROR_REASON_INVALID_WIP" | "PROCESSING_ERROR_REASON_INVALID_KEK" | "PROCESSING_ERROR_REASON_WIP_AUTH_FAILED" | "PROCESSING_ERROR_REASON_KEK_PERMISSION_DENIED" | "PROCESSING_ERROR_REASON_AWS_AUTH_FAILED" | "PROCESSING_ERROR_REASON_USER_IDENTIFIER_DECRYPTION_ERROR" | "PROCESSING_ERROR_OPERATING_ACCOUNT_MISMATCH_FOR_AD_IDENTIFIER"; /** * The count of records that failed to upload for a given reason. */ recordCount?: bigint; } function serializeErrorCount(data: any): ErrorCount { return { ...data, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeErrorCount(data: any): ErrorCount { return { ...data, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * Error counts for each type of error. */ export interface ErrorInfo { /** * A list of errors and counts per error reason. May not be populated in all * cases. */ errorCounts?: ErrorCount[]; } function serializeErrorInfo(data: any): ErrorInfo { return { ...data, errorCounts: data["errorCounts"] !== undefined ? data["errorCounts"].map((item: any) => (serializeErrorCount(item))) : undefined, }; } function deserializeErrorInfo(data: any): ErrorInfo { return { ...data, errorCounts: data["errorCounts"] !== undefined ? data["errorCounts"].map((item: any) => (deserializeErrorCount(item))) : undefined, }; } /** * An event representing a user interaction with an advertiser's website or * app. */ export interface Event { /** * Optional. A bucket of any [event * parameters](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. */ additionalEventParameters?: EventParameter[]; /** * Optional. Identifiers and other information used to match the conversion * event with other online activity (such as ad clicks). */ adIdentifiers?: AdIdentifiers; /** * Optional. Information about the transaction and items associated with the * event. */ cartData?: CartData; /** * Optional. A unique identifier for the user instance of a web client for * this GA4 web stream. */ clientId?: string; /** * Optional. Information about whether the associated user has provided * different types of consent. */ consent?: Consent; /** * Optional. The conversion value associated with the event, for value-based * conversions. */ conversionValue?: number; /** * Optional. The currency code associated with all monetary values within * this event. */ currency?: string; /** * Optional. Additional key/value pair information to send to the conversion * containers (conversion action or FL activity). */ customVariables?: CustomVariable[]; /** * Optional. Reference string used to determine the destination. If empty, * the event will be sent to all destinations in the request. */ destinationReferences?: string[]; /** * Optional. Information gathered about the device being used (if any) when * the event happened. */ eventDeviceInfo?: DeviceInfo; /** * Optional. The name of the event. Required for GA4 events. */ eventName?: string; /** * Optional. Signal for where the event happened (web, app, in-store, etc.). */ eventSource?: | "EVENT_SOURCE_UNSPECIFIED" | "WEB" | "APP" | "IN_STORE" | "PHONE" | "OTHER"; /** * Required. The time the event occurred. */ eventTimestamp?: Date; /** * Optional. A list of key/value pairs for experimental fields that may * eventually be promoted to be part of the API. */ experimentalFields?: ExperimentalField[]; /** * Optional. The last time the event was updated. */ lastUpdatedTimestamp?: Date; /** * Optional. The unique identifier for this event. Required for conversions * using multiple data sources. */ transactionId?: string; /** * Optional. Pieces of user provided data, representing the user the event is * associated with. */ userData?: UserData; /** * Optional. A unique identifier for a user, as defined by the advertiser. */ userId?: string; /** * Optional. Advertiser-assessed information about the user at the time that * the event happened. */ userProperties?: UserProperties; } function serializeEvent(data: any): Event { return { ...data, cartData: data["cartData"] !== undefined ? serializeCartData(data["cartData"]) : undefined, eventTimestamp: data["eventTimestamp"] !== undefined ? data["eventTimestamp"].toISOString() : undefined, lastUpdatedTimestamp: data["lastUpdatedTimestamp"] !== undefined ? data["lastUpdatedTimestamp"].toISOString() : undefined, }; } function deserializeEvent(data: any): Event { return { ...data, cartData: data["cartData"] !== undefined ? deserializeCartData(data["cartData"]) : undefined, eventTimestamp: data["eventTimestamp"] !== undefined ? new Date(data["eventTimestamp"]) : undefined, lastUpdatedTimestamp: data["lastUpdatedTimestamp"] !== undefined ? new Date(data["lastUpdatedTimestamp"]) : undefined, }; } /** * Event parameter for GA4 events. */ export interface EventParameter { /** * Required. The name of the parameter to use. */ parameterName?: string; /** * Required. The string representation of the value of the parameter to set. */ value?: string; } /** * Experimental field representing unofficial fields. */ export interface ExperimentalField { /** * Optional. The name of the field to use. */ field?: string; /** * Optional. The value the field to set. */ value?: string; } /** * Information about the Google Cloud Platform wrapped key. */ export interface GcpWrappedKeyInfo { /** * Required. The base64 encoded encrypted data encryption key. */ encryptedDek?: string; /** * Required. Google Cloud Platform [Cloud Key Management Service resource * ID](//cloud.google.com/kms/docs/getting-resource-ids). Should be in the * format of * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}` * or * `gcp-kms://projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}` */ kekUri?: string; /** * Required. The type of algorithm used to encrypt the data. */ keyType?: | "KEY_TYPE_UNSPECIFIED" | "XCHACHA20_POLY1305"; /** * Required. The [Workload * Identity](//cloud.google.com/iam/docs/workload-identity-federation) pool * provider required to use KEK. */ wipProvider?: string; } /** * Request to upload audience members to the provided destinations. Returns an * IngestAudienceMembersResponse. */ export interface IngestAudienceMembersRequest { /** * Required. The list of users to send to the specified destinations. At most * 10000 AudienceMember resources can be sent in a single request. */ audienceMembers?: AudienceMember[]; /** * Optional. Request-level consent to apply to all users in the request. * User-level consent overrides request-level consent, and can be specified in * each AudienceMember. */ consent?: Consent; /** * Required. The list of destinations to send the audience members to. */ destinations?: Destination[]; /** * Optional. Required for UserData uploads. The encoding type of the user * identifiers. For hashed user identifiers, this is the encoding type of the * hashed string. For encrypted hashed user identifiers, this is the encoding * type of the outer encrypted string, but not necessarily the inner hashed * string, meaning the inner hashed string could be encoded in a different way * than the outer encrypted string. For non `UserData` uploads, this field is * ignored. */ encoding?: | "ENCODING_UNSPECIFIED" | "HEX" | "BASE64"; /** * Optional. Encryption information for UserData uploads. If not set, it's * assumed that uploaded identifying information is hashed but not encrypted. * For non `UserData` uploads, this field is ignored. */ encryptionInfo?: EncryptionInfo; /** * Optional. The terms of service that the user has accepted/rejected. */ termsOfService?: TermsOfService; /** * Optional. For testing purposes. If `true`, the request is validated but * not executed. Only errors are returned, not results. */ validateOnly?: boolean; } /** * Response from the IngestAudienceMembersRequest. */ export interface IngestAudienceMembersResponse { /** * The auto-generated ID of the request. */ requestId?: string; } /** * The status of the ingest audience members request. */ export interface IngestAudienceMembersStatus { /** * The status of the mobile data ingestion to the destination. */ mobileDataIngestionStatus?: IngestMobileDataStatus; /** * The status of the pair data ingestion to the destination. */ pairDataIngestionStatus?: IngestPairDataStatus; /** * The status of the ppid data ingestion to the destination. */ ppidDataIngestionStatus?: IngestPpidDataStatus; /** * The status of the user data ingestion to the destination. */ userDataIngestionStatus?: IngestUserDataStatus; /** * The status of the user id data ingestion to the destination. */ userIdDataIngestionStatus?: IngestUserIdDataStatus; } function serializeIngestAudienceMembersStatus(data: any): IngestAudienceMembersStatus { return { ...data, mobileDataIngestionStatus: data["mobileDataIngestionStatus"] !== undefined ? serializeIngestMobileDataStatus(data["mobileDataIngestionStatus"]) : undefined, pairDataIngestionStatus: data["pairDataIngestionStatus"] !== undefined ? serializeIngestPairDataStatus(data["pairDataIngestionStatus"]) : undefined, ppidDataIngestionStatus: data["ppidDataIngestionStatus"] !== undefined ? serializeIngestPpidDataStatus(data["ppidDataIngestionStatus"]) : undefined, userDataIngestionStatus: data["userDataIngestionStatus"] !== undefined ? serializeIngestUserDataStatus(data["userDataIngestionStatus"]) : undefined, userIdDataIngestionStatus: data["userIdDataIngestionStatus"] !== undefined ? serializeIngestUserIdDataStatus(data["userIdDataIngestionStatus"]) : undefined, }; } function deserializeIngestAudienceMembersStatus(data: any): IngestAudienceMembersStatus { return { ...data, mobileDataIngestionStatus: data["mobileDataIngestionStatus"] !== undefined ? deserializeIngestMobileDataStatus(data["mobileDataIngestionStatus"]) : undefined, pairDataIngestionStatus: data["pairDataIngestionStatus"] !== undefined ? deserializeIngestPairDataStatus(data["pairDataIngestionStatus"]) : undefined, ppidDataIngestionStatus: data["ppidDataIngestionStatus"] !== undefined ? deserializeIngestPpidDataStatus(data["ppidDataIngestionStatus"]) : undefined, userDataIngestionStatus: data["userDataIngestionStatus"] !== undefined ? deserializeIngestUserDataStatus(data["userDataIngestionStatus"]) : undefined, userIdDataIngestionStatus: data["userIdDataIngestionStatus"] !== undefined ? deserializeIngestUserIdDataStatus(data["userIdDataIngestionStatus"]) : undefined, }; } /** * Represents a user list that is populated by user provided data. */ export interface IngestedUserListInfo { /** * Optional. Additional information when `CONTACT_ID` is one of the * `upload_key_types`. */ contactIdInfo?: ContactIdInfo; /** * Optional. Additional information when `MOBILE_ID` is one of the * `upload_key_types`. */ mobileIdInfo?: MobileIdInfo; /** * Optional. Additional information when `PAIR_ID` is one of the * `upload_key_types`. This feature is only available to data partners. */ pairIdInfo?: PairIdInfo; /** * Optional. Additional information for partner audiences. This feature is * only available to data partners. */ partnerAudienceInfo?: PartnerAudienceInfo; /** * Optional. Additional information for `PSEUDONYMOUS_ID` is one of the * `upload_key_types`. */ pseudonymousIdInfo?: PseudonymousIdInfo; /** * Required. Immutable. Upload key types of this user list. */ uploadKeyTypes?: | "UPLOAD_KEY_TYPE_UNSPECIFIED" | "CONTACT_ID" | "MOBILE_ID" | "USER_ID" | "PAIR_ID" | "PSEUDONYMOUS_ID"[]; /** * Optional. Additional information when `USER_ID` is one of the * `upload_key_types`. */ userIdInfo?: UserIdInfo; } function serializeIngestedUserListInfo(data: any): IngestedUserListInfo { return { ...data, pairIdInfo: data["pairIdInfo"] !== undefined ? serializePairIdInfo(data["pairIdInfo"]) : undefined, pseudonymousIdInfo: data["pseudonymousIdInfo"] !== undefined ? serializePseudonymousIdInfo(data["pseudonymousIdInfo"]) : undefined, }; } function deserializeIngestedUserListInfo(data: any): IngestedUserListInfo { return { ...data, pairIdInfo: data["pairIdInfo"] !== undefined ? deserializePairIdInfo(data["pairIdInfo"]) : undefined, pseudonymousIdInfo: data["pseudonymousIdInfo"] !== undefined ? deserializePseudonymousIdInfo(data["pseudonymousIdInfo"]) : undefined, }; } /** * Request to upload audience members to the provided destinations. Returns an * IngestEventsResponse. */ export interface IngestEventsRequest { /** * Optional. Request-level consent to apply to all users in the request. * User-level consent overrides request-level consent, and can be specified in * each Event. */ consent?: Consent; /** * Required. The list of destinations to send the events to. */ destinations?: Destination[]; /** * Optional. Required for UserData uploads. The encoding type of the user * identifiers. For hashed user identifiers, this is the encoding type of the * hashed string. For encrypted hashed user identifiers, this is the encoding * type of the outer encrypted string, but not necessarily the inner hashed * string, meaning the inner hashed string could be encoded in a different way * than the outer encrypted string. For non `UserData` uploads, this field is * ignored. */ encoding?: | "ENCODING_UNSPECIFIED" | "HEX" | "BASE64"; /** * Optional. Encryption information for UserData uploads. If not set, it's * assumed that uploaded identifying information is hashed but not encrypted. * For non `UserData` uploads, this field is ignored. */ encryptionInfo?: EncryptionInfo; /** * Required. The list of events to send to the specified destinations. At * most 2000 Event resources can be sent in a single request. */ events?: Event[]; /** * Optional. For testing purposes. If `true`, the request is validated but * not executed. Only errors are returned, not results. */ validateOnly?: boolean; } function serializeIngestEventsRequest(data: any): IngestEventsRequest { return { ...data, events: data["events"] !== undefined ? data["events"].map((item: any) => (serializeEvent(item))) : undefined, }; } function deserializeIngestEventsRequest(data: any): IngestEventsRequest { return { ...data, events: data["events"] !== undefined ? data["events"].map((item: any) => (deserializeEvent(item))) : undefined, }; } /** * Response from the IngestEventsRequest. */ export interface IngestEventsResponse { /** * The auto-generated ID of the request. */ requestId?: string; } /** * The status of the events ingestion to the destination. */ export interface IngestEventsStatus { /** * The total count of events sent in the upload request. Includes all events * in the request, regardless of whether they were successfully ingested or * not. */ recordCount?: bigint; } function serializeIngestEventsStatus(data: any): IngestEventsStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeIngestEventsStatus(data: any): IngestEventsStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * The status of the mobile data ingestion to the destination containing stats * related to the ingestion. */ export interface IngestMobileDataStatus { /** * The total count of mobile ids sent in the upload request for the * destination. Includes all mobile ids in the request, regardless of whether * they were successfully ingested or not. */ mobileIdCount?: bigint; /** * The total count of audience members sent in the upload request for the * destination. Includes all audience members in the request, regardless of * whether they were successfully ingested or not. */ recordCount?: bigint; } function serializeIngestMobileDataStatus(data: any): IngestMobileDataStatus { return { ...data, mobileIdCount: data["mobileIdCount"] !== undefined ? String(data["mobileIdCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeIngestMobileDataStatus(data: any): IngestMobileDataStatus { return { ...data, mobileIdCount: data["mobileIdCount"] !== undefined ? BigInt(data["mobileIdCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * The status of the pair data ingestion to the destination containing stats * related to the ingestion. */ export interface IngestPairDataStatus { /** * The total count of pair ids sent in the upload request for the * destination. Includes all pair ids in the request, regardless of whether * they were successfully ingested or not. */ pairIdCount?: bigint; /** * The total count of audience members sent in the upload request for the * destination. Includes all audience members in the request, regardless of * whether they were successfully ingested or not. */ recordCount?: bigint; } function serializeIngestPairDataStatus(data: any): IngestPairDataStatus { return { ...data, pairIdCount: data["pairIdCount"] !== undefined ? String(data["pairIdCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeIngestPairDataStatus(data: any): IngestPairDataStatus { return { ...data, pairIdCount: data["pairIdCount"] !== undefined ? BigInt(data["pairIdCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * The status of the ppid data ingestion to the destination containing stats * related to the ingestion. */ export interface IngestPpidDataStatus { /** * The total count of ppids sent in the upload request for the destination. * Includes all ppids in the request, regardless of whether they were * successfully ingested or not. */ ppidCount?: bigint; /** * The total count of audience members sent in the upload request for the * destination. Includes all audience members in the request, regardless of * whether they were successfully ingested or not. */ recordCount?: bigint; } function serializeIngestPpidDataStatus(data: any): IngestPpidDataStatus { return { ...data, ppidCount: data["ppidCount"] !== undefined ? String(data["ppidCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeIngestPpidDataStatus(data: any): IngestPpidDataStatus { return { ...data, ppidCount: data["ppidCount"] !== undefined ? BigInt(data["ppidCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * The status of the user data ingestion to the destination containing stats * related to the ingestion. */ export interface IngestUserDataStatus { /** * The total count of audience members sent in the upload request for the * destination. Includes all audience members in the request, regardless of * whether they were successfully ingested or not. */ recordCount?: bigint; /** * The match rate range of the upload. */ uploadMatchRateRange?: | "MATCH_RATE_RANGE_UNKNOWN" | "MATCH_RATE_RANGE_NOT_ELIGIBLE" | "MATCH_RATE_RANGE_LESS_THAN_20" | "MATCH_RATE_RANGE_20_TO_30" | "MATCH_RATE_RANGE_31_TO_40" | "MATCH_RATE_RANGE_41_TO_50" | "MATCH_RATE_RANGE_51_TO_60" | "MATCH_RATE_RANGE_61_TO_70" | "MATCH_RATE_RANGE_71_TO_80" | "MATCH_RATE_RANGE_81_TO_90" | "MATCH_RATE_RANGE_91_TO_100"; /** * The total count of user identifiers sent in the upload request for the * destination. Includes all user identifiers in the request, regardless of * whether they were successfully ingested or not. */ userIdentifierCount?: bigint; } function serializeIngestUserDataStatus(data: any): IngestUserDataStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, userIdentifierCount: data["userIdentifierCount"] !== undefined ? String(data["userIdentifierCount"]) : undefined, }; } function deserializeIngestUserDataStatus(data: any): IngestUserDataStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, userIdentifierCount: data["userIdentifierCount"] !== undefined ? BigInt(data["userIdentifierCount"]) : undefined, }; } /** * The status of the user id data ingestion to the destination containing stats * related to the ingestion. */ export interface IngestUserIdDataStatus { /** * The total count of audience members sent in the upload request for the * destination. Includes all audience members in the request, regardless of * whether they were successfully ingested or not. */ recordCount?: bigint; /** * The total count of user ids sent in the upload request for the * destination. Includes all user ids in the request, regardless of whether * they were successfully ingested or not. */ userIdCount?: bigint; } function serializeIngestUserIdDataStatus(data: any): IngestUserIdDataStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, userIdCount: data["userIdCount"] !== undefined ? String(data["userIdCount"]) : undefined, }; } function deserializeIngestUserIdDataStatus(data: any): IngestUserIdDataStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, userIdCount: data["userIdCount"] !== undefined ? BigInt(data["userIdCount"]) : undefined, }; } /** * Represents an item in the cart associated with the event. */ export interface Item { /** * Optional. A bucket of any [event parameters related to an * 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. */ additionalItemParameters?: ItemParameter[]; /** * Optional. A unique identifier to reference the item. */ itemId?: string; /** * Optional. The product ID within the Merchant Center account. */ merchantProductId?: string; /** * Optional. The number of this item associated with the event. */ quantity?: bigint; /** * Optional. The unit price excluding tax, shipping, and any transaction * level discounts. */ unitPrice?: number; } function serializeItem(data: any): Item { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializeItem(data: any): Item { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } /** * A bucket of any [event parameters related to an * 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. */ export interface ItemParameter { /** * Required. The name of the parameter to use. */ parameterName?: string; /** * Required. The string representation of the value of the parameter to set. */ value?: string; } /** * Response from the ListUserListDirectLicensesRequest. */ export interface ListUserListDirectLicensesResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The licenses for the given user list in the request. */ userListDirectLicenses?: UserListDirectLicense[]; } function serializeListUserListDirectLicensesResponse(data: any): ListUserListDirectLicensesResponse { return { ...data, userListDirectLicenses: data["userListDirectLicenses"] !== undefined ? data["userListDirectLicenses"].map((item: any) => (serializeUserListDirectLicense(item))) : undefined, }; } function deserializeListUserListDirectLicensesResponse(data: any): ListUserListDirectLicensesResponse { return { ...data, userListDirectLicenses: data["userListDirectLicenses"] !== undefined ? data["userListDirectLicenses"].map((item: any) => (deserializeUserListDirectLicense(item))) : undefined, }; } /** * Response from the ListUserListGlobalLicensesCustomerInfoRequest. */ export interface ListUserListGlobalLicenseCustomerInfosResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The customer information for the given license in the request. */ userListGlobalLicenseCustomerInfos?: UserListGlobalLicenseCustomerInfo[]; } /** * Response from the ListUserListGlobalLicensesRequest. */ export interface ListUserListGlobalLicensesResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The licenses for the given user list in the request. */ userListGlobalLicenses?: UserListGlobalLicense[]; } function serializeListUserListGlobalLicensesResponse(data: any): ListUserListGlobalLicensesResponse { return { ...data, userListGlobalLicenses: data["userListGlobalLicenses"] !== undefined ? data["userListGlobalLicenses"].map((item: any) => (serializeUserListGlobalLicense(item))) : undefined, }; } function deserializeListUserListGlobalLicensesResponse(data: any): ListUserListGlobalLicensesResponse { return { ...data, userListGlobalLicenses: data["userListGlobalLicenses"] !== undefined ? data["userListGlobalLicenses"].map((item: any) => (deserializeUserListGlobalLicense(item))) : undefined, }; } /** * Response message for ListUserLists. */ export interface ListUserListsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The user lists from the specified account. */ userLists?: UserList[]; } function serializeListUserListsResponse(data: any): ListUserListsResponse { return { ...data, userLists: data["userLists"] !== undefined ? data["userLists"].map((item: any) => (serializeUserList(item))) : undefined, }; } function deserializeListUserListsResponse(data: any): ListUserListsResponse { return { ...data, userLists: data["userLists"] !== undefined ? data["userLists"].map((item: any) => (deserializeUserList(item))) : undefined, }; } /** * The baseline location of the request. Baseline location is on OR-list of ISO * 3166-1 alpha-2 region codes of the requested regions. */ export interface Location { /** * List of ISO 3166-1 alpha-2 region codes. */ regionCodes?: string[]; } /** * Insights for marketing data. This feature is only available to data * partners. */ export interface MarketingDataInsight { /** * Insights for values of a given dimension. */ attributes?: MarketingDataInsightsAttribute[]; /** * The dimension to which the insight belongs. */ dimension?: | "AUDIENCE_INSIGHTS_DIMENSION_UNSPECIFIED" | "AUDIENCE_INSIGHTS_DIMENSION_UNKNOWN" | "AFFINITY_USER_INTEREST" | "IN_MARKET_USER_INTEREST" | "AGE_RANGE" | "GENDER"; } function serializeMarketingDataInsight(data: any): MarketingDataInsight { return { ...data, attributes: data["attributes"] !== undefined ? data["attributes"].map((item: any) => (serializeMarketingDataInsightsAttribute(item))) : undefined, }; } function deserializeMarketingDataInsight(data: any): MarketingDataInsight { return { ...data, attributes: data["attributes"] !== undefined ? data["attributes"].map((item: any) => (deserializeMarketingDataInsightsAttribute(item))) : undefined, }; } /** * Insights for a collection of related attributes of the same dimension. */ export interface MarketingDataInsightsAttribute { /** * Age range of the audience for which the lift is provided. */ ageRange?: | "AGE_RANGE_UNSPECIFIED" | "AGE_RANGE_UNKNOWN" | "AGE_RANGE_18_24" | "AGE_RANGE_25_34" | "AGE_RANGE_35_44" | "AGE_RANGE_45_54" | "AGE_RANGE_55_64" | "AGE_RANGE_65_UP"; /** * Gender of the audience for which the lift is provided. */ gender?: | "GENDER_UNSPECIFIED" | "GENDER_UNKNOWN" | "GENDER_MALE" | "GENDER_FEMALE"; /** * Measure of lift that the audience has for the attribute value as compared * to the baseline. Range [0-1]. */ lift?: number; /** * The user interest ID. */ userInterestId?: bigint; } function serializeMarketingDataInsightsAttribute(data: any): MarketingDataInsightsAttribute { return { ...data, userInterestId: data["userInterestId"] !== undefined ? String(data["userInterestId"]) : undefined, }; } function deserializeMarketingDataInsightsAttribute(data: any): MarketingDataInsightsAttribute { return { ...data, userInterestId: data["userInterestId"] !== undefined ? BigInt(data["userInterestId"]) : undefined, }; } /** * Mobile IDs for the audience. At least one mobile ID is required. */ export interface MobileData { /** * Required. The list of mobile device IDs (advertising ID/IDFA). At most 10 * `mobileIds` can be provided in a single AudienceMember. */ mobileIds?: string[]; } /** * Additional information when `MOBILE_ID` is one of the `upload_key_types`. */ export interface MobileIdInfo { /** * Required. Immutable. A string that uniquely identifies a mobile * application from which the data was collected. */ appId?: string; /** * Optional. Immutable. Source of the upload data. */ dataSourceType?: | "DATA_SOURCE_TYPE_UNSPECIFIED" | "DATA_SOURCE_TYPE_FIRST_PARTY" | "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU" | "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE" | "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA"; /** * Required. Immutable. The key space of mobile IDs. */ keySpace?: | "KEY_SPACE_UNSPECIFIED" | "IOS" | "ANDROID"; } /** * [PAIR](//support.google.com/admanager/answer/15067908) IDs for the audience. * At least one PAIR ID is required. This feature is only available to data * partners. */ export interface PairData { /** * Required. Cleanroom-provided PII data, hashed with SHA256, and encrypted * with an EC commutative cipher using publisher key for the * [PAIR]((//support.google.com/admanager/answer/15067908)) user list. At most * 10 `pairIds` can be provided in a single AudienceMember. */ pairIds?: string[]; } /** * Additional information when `PAIR_ID` is one of the `upload_key_types`. This * feature is only available to data partners. */ export interface PairIdInfo { /** * Output only. The count of the advertiser's first party data records that * have been uploaded to a clean room provider. This does not signify the size * of a PAIR user list. */ readonly advertiserIdentifierCount?: bigint; /** * Required. Immutable. Identifies a unique advertiser to publisher * relationship with one clean room provider or across multiple clean room * providers. */ cleanRoomIdentifier?: string; /** * Output only. This field denotes the percentage of membership match of this * user list with the corresponding publisher's first party data. Must be * between 0 and 100 inclusive. */ readonly matchRatePercentage?: number; /** * Required. Immutable. Identifies the publisher that the Publisher * Advertiser Identity Reconciliation user list is reconciled with. This field * is provided by the cleanroom provider and is only unique in the scope of * that cleanroom. This cannot be used as a global identifier across multiple * cleanrooms. */ publisherId?: bigint; /** * Optional. Descriptive name of the publisher to be displayed in the UI for * a better targeting experience. */ publisherName?: string; } function serializePairIdInfo(data: any): PairIdInfo { return { ...data, publisherId: data["publisherId"] !== undefined ? String(data["publisherId"]) : undefined, }; } function deserializePairIdInfo(data: any): PairIdInfo { return { ...data, advertiserIdentifierCount: data["advertiserIdentifierCount"] !== undefined ? BigInt(data["advertiserIdentifierCount"]) : undefined, publisherId: data["publisherId"] !== undefined ? BigInt(data["publisherId"]) : undefined, }; } /** * Additional information for partner audiences. This feature is only available * to data partners. */ export interface PartnerAudienceInfo { /** * Optional. The commerce partner name. Only allowed if * `partner_audience_source` is `COMMERCE_AUDIENCE`. */ commercePartner?: string; /** * Required. Immutable. The source of the partner audience. */ partnerAudienceSource?: | "PARTNER_AUDIENCE_SOURCE_UNSPECIFIED" | "COMMERCE_AUDIENCE" | "LINEAR_TV_AUDIENCE" | "AGENCY_PROVIDER_AUDIENCE"; } /** * A partner link between an owning account and a partner account. */ export interface PartnerLink { /** * Identifier. The name of the partner link. Format: * accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link} */ name?: string; /** * Required. The owning account granting access to the partner account. */ owningAccount?: ProductAccount; /** * Required. The partner account granted access by the owning account. */ partnerAccount?: ProductAccount; /** * Output only. The partner link ID. */ readonly partnerLinkId?: string; } /** * Publisher provided identifiers data holding the ppids. At least one ppid is * required. This feature is only available to data partners. */ export interface PpidData { /** * Required. The list of publisher provided identifiers for a user. */ ppids?: string[]; } /** * Represents a specific account. */ export interface ProductAccount { /** * Required. The ID of the account. For example, your Google Ads account ID. */ accountId?: string; /** * Optional. The type of the account. For example, `GOOGLE_ADS`. Either * `account_type` or the deprecated `product` is required. If both are set, * the values must match. */ accountType?: | "ACCOUNT_TYPE_UNSPECIFIED" | "GOOGLE_ADS" | "DISPLAY_VIDEO_PARTNER" | "DISPLAY_VIDEO_ADVERTISER" | "DATA_PARTNER" | "GOOGLE_ANALYTICS_PROPERTY" | "GOOGLE_AD_MANAGER_AUDIENCE_LINK"; /** * Deprecated. Use `account_type` instead. */ product?: | "PRODUCT_UNSPECIFIED" | "GOOGLE_ADS" | "DISPLAY_VIDEO_PARTNER" | "DISPLAY_VIDEO_ADVERTISER" | "DATA_PARTNER"; } /** * Additional information when `PSEUDONYMOUS_ID` is one of the * `upload_key_types`. */ export interface PseudonymousIdInfo { /** * Optional. Immutable. The number of billable records (e.g. uploaded or * matched). */ billableRecordCount?: bigint; /** * Output only. Sync status of the user list. */ readonly syncStatus?: | "SYNC_STATUS_UNSPECIFIED" | "CREATED" | "READY_FOR_USE" | "FAILED"; } function serializePseudonymousIdInfo(data: any): PseudonymousIdInfo { return { ...data, billableRecordCount: data["billableRecordCount"] !== undefined ? String(data["billableRecordCount"]) : undefined, }; } function deserializePseudonymousIdInfo(data: any): PseudonymousIdInfo { return { ...data, billableRecordCount: data["billableRecordCount"] !== undefined ? BigInt(data["billableRecordCount"]) : undefined, }; } /** * Request to remove users from an audience in the provided destinations. * Returns a RemoveAudienceMembersResponse. */ export interface RemoveAudienceMembersRequest { /** * Required. The list of users to remove. */ audienceMembers?: AudienceMember[]; /** * Required. The list of destinations to remove the users from. */ destinations?: Destination[]; /** * Optional. Required for UserData uploads. The encoding type of the user * identifiers. Applies to only the outer encoding for encrypted user * identifiers. For non `UserData` uploads, this field is ignored. */ encoding?: | "ENCODING_UNSPECIFIED" | "HEX" | "BASE64"; /** * Optional. Encryption information for UserData uploads. If not set, it's * assumed that uploaded identifying information is hashed but not encrypted. * For non `UserData` uploads, this field is ignored. */ encryptionInfo?: EncryptionInfo; /** * Optional. For testing purposes. If `true`, the request is validated but * not executed. Only errors are returned, not results. */ validateOnly?: boolean; } /** * Response from the RemoveAudienceMembersRequest. */ export interface RemoveAudienceMembersResponse { /** * The auto-generated ID of the request. */ requestId?: string; } /** * The status of the remove audience members request. */ export interface RemoveAudienceMembersStatus { /** * The status of the mobile data removal from the destination. */ mobileDataRemovalStatus?: RemoveMobileDataStatus; /** * The status of the pair data removal from the destination. */ pairDataRemovalStatus?: RemovePairDataStatus; /** * The status of the ppid data removal from the destination. */ ppidDataRemovalStatus?: RemovePpidDataStatus; /** * The status of the user data removal from the destination. */ userDataRemovalStatus?: RemoveUserDataStatus; /** * The status of the user id data removal from the destination. */ userIdDataRemovalStatus?: RemoveUserIdDataStatus; } function serializeRemoveAudienceMembersStatus(data: any): RemoveAudienceMembersStatus { return { ...data, mobileDataRemovalStatus: data["mobileDataRemovalStatus"] !== undefined ? serializeRemoveMobileDataStatus(data["mobileDataRemovalStatus"]) : undefined, pairDataRemovalStatus: data["pairDataRemovalStatus"] !== undefined ? serializeRemovePairDataStatus(data["pairDataRemovalStatus"]) : undefined, ppidDataRemovalStatus: data["ppidDataRemovalStatus"] !== undefined ? serializeRemovePpidDataStatus(data["ppidDataRemovalStatus"]) : undefined, userDataRemovalStatus: data["userDataRemovalStatus"] !== undefined ? serializeRemoveUserDataStatus(data["userDataRemovalStatus"]) : undefined, userIdDataRemovalStatus: data["userIdDataRemovalStatus"] !== undefined ? serializeRemoveUserIdDataStatus(data["userIdDataRemovalStatus"]) : undefined, }; } function deserializeRemoveAudienceMembersStatus(data: any): RemoveAudienceMembersStatus { return { ...data, mobileDataRemovalStatus: data["mobileDataRemovalStatus"] !== undefined ? deserializeRemoveMobileDataStatus(data["mobileDataRemovalStatus"]) : undefined, pairDataRemovalStatus: data["pairDataRemovalStatus"] !== undefined ? deserializeRemovePairDataStatus(data["pairDataRemovalStatus"]) : undefined, ppidDataRemovalStatus: data["ppidDataRemovalStatus"] !== undefined ? deserializeRemovePpidDataStatus(data["ppidDataRemovalStatus"]) : undefined, userDataRemovalStatus: data["userDataRemovalStatus"] !== undefined ? deserializeRemoveUserDataStatus(data["userDataRemovalStatus"]) : undefined, userIdDataRemovalStatus: data["userIdDataRemovalStatus"] !== undefined ? deserializeRemoveUserIdDataStatus(data["userIdDataRemovalStatus"]) : undefined, }; } /** * The status of the mobile data removal from the destination. */ export interface RemoveMobileDataStatus { /** * The total count of mobile Ids sent in the removal request. Includes all * mobile ids in the request, regardless of whether they were successfully * removed or not. */ mobileIdCount?: bigint; /** * The total count of audience members sent in the removal request. Includes * all audience members in the request, regardless of whether they were * successfully removed or not. */ recordCount?: bigint; } function serializeRemoveMobileDataStatus(data: any): RemoveMobileDataStatus { return { ...data, mobileIdCount: data["mobileIdCount"] !== undefined ? String(data["mobileIdCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeRemoveMobileDataStatus(data: any): RemoveMobileDataStatus { return { ...data, mobileIdCount: data["mobileIdCount"] !== undefined ? BigInt(data["mobileIdCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * The status of the pair data removal from the destination. */ export interface RemovePairDataStatus { /** * The total count of pair ids sent in the removal request. Includes all pair * ids in the request, regardless of whether they were successfully removed or * not. */ pairIdCount?: bigint; /** * The total count of audience members sent in the removal request. Includes * all audience members in the request, regardless of whether they were * successfully removed or not. */ recordCount?: bigint; } function serializeRemovePairDataStatus(data: any): RemovePairDataStatus { return { ...data, pairIdCount: data["pairIdCount"] !== undefined ? String(data["pairIdCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeRemovePairDataStatus(data: any): RemovePairDataStatus { return { ...data, pairIdCount: data["pairIdCount"] !== undefined ? BigInt(data["pairIdCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * The status of the ppid data removal from the destination. */ export interface RemovePpidDataStatus { /** * The total count of ppids sent in the removal request. Includes all ppids * in the request, regardless of whether they were successfully removed or * not. */ ppidCount?: bigint; /** * The total count of audience members sent in the removal request. Includes * all audience members in the request, regardless of whether they were * successfully removed or not. */ recordCount?: bigint; } function serializeRemovePpidDataStatus(data: any): RemovePpidDataStatus { return { ...data, ppidCount: data["ppidCount"] !== undefined ? String(data["ppidCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeRemovePpidDataStatus(data: any): RemovePpidDataStatus { return { ...data, ppidCount: data["ppidCount"] !== undefined ? BigInt(data["ppidCount"]) : undefined, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * The status of the user data removal from the destination. */ export interface RemoveUserDataStatus { /** * The total count of audience members sent in the removal request. Includes * all audience members in the request, regardless of whether they were * successfully removed or not. */ recordCount?: bigint; /** * The total count of user identifiers sent in the removal request. Includes * all user identifiers in the request, regardless of whether they were * successfully removed or not. */ userIdentifierCount?: bigint; } function serializeRemoveUserDataStatus(data: any): RemoveUserDataStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, userIdentifierCount: data["userIdentifierCount"] !== undefined ? String(data["userIdentifierCount"]) : undefined, }; } function deserializeRemoveUserDataStatus(data: any): RemoveUserDataStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, userIdentifierCount: data["userIdentifierCount"] !== undefined ? BigInt(data["userIdentifierCount"]) : undefined, }; } /** * The status of the user id data removal from the destination. */ export interface RemoveUserIdDataStatus { /** * The total count of audience members sent in the removal request. Includes * all audience members in the request, regardless of whether they were * successfully removed or not. */ recordCount?: bigint; /** * The total count of user ids sent in the removal request. Includes all user * ids in the request, regardless of whether they were successfully removed or * not. */ userIdCount?: bigint; } function serializeRemoveUserIdDataStatus(data: any): RemoveUserIdDataStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, userIdCount: data["userIdCount"] !== undefined ? String(data["userIdCount"]) : undefined, }; } function deserializeRemoveUserIdDataStatus(data: any): RemoveUserIdDataStatus { return { ...data, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, userIdCount: data["userIdCount"] !== undefined ? BigInt(data["userIdCount"]) : undefined, }; } /** * A request status per destination. */ export interface RequestStatusPerDestination { /** * The status of the ingest audience members request. */ audienceMembersIngestionStatus?: IngestAudienceMembersStatus; /** * The status of the remove audience members request. */ audienceMembersRemovalStatus?: RemoveAudienceMembersStatus; /** * A destination within a DM API request. */ destination?: Destination; /** * An error info error containing the error reason and error counts related * to the upload. */ errorInfo?: ErrorInfo; /** * The status of the ingest events request. */ eventsIngestionStatus?: IngestEventsStatus; /** * The request status of the destination. */ requestStatus?: | "REQUEST_STATUS_UNKNOWN" | "SUCCESS" | "PROCESSING" | "FAILED" | "PARTIAL_SUCCESS"; /** * A warning info containing the warning reason and warning counts related to * the upload. */ warningInfo?: WarningInfo; } function serializeRequestStatusPerDestination(data: any): RequestStatusPerDestination { return { ...data, audienceMembersIngestionStatus: data["audienceMembersIngestionStatus"] !== undefined ? serializeIngestAudienceMembersStatus(data["audienceMembersIngestionStatus"]) : undefined, audienceMembersRemovalStatus: data["audienceMembersRemovalStatus"] !== undefined ? serializeRemoveAudienceMembersStatus(data["audienceMembersRemovalStatus"]) : undefined, errorInfo: data["errorInfo"] !== undefined ? serializeErrorInfo(data["errorInfo"]) : undefined, eventsIngestionStatus: data["eventsIngestionStatus"] !== undefined ? serializeIngestEventsStatus(data["eventsIngestionStatus"]) : undefined, warningInfo: data["warningInfo"] !== undefined ? serializeWarningInfo(data["warningInfo"]) : undefined, }; } function deserializeRequestStatusPerDestination(data: any): RequestStatusPerDestination { return { ...data, audienceMembersIngestionStatus: data["audienceMembersIngestionStatus"] !== undefined ? deserializeIngestAudienceMembersStatus(data["audienceMembersIngestionStatus"]) : undefined, audienceMembersRemovalStatus: data["audienceMembersRemovalStatus"] !== undefined ? deserializeRemoveAudienceMembersStatus(data["audienceMembersRemovalStatus"]) : undefined, errorInfo: data["errorInfo"] !== undefined ? deserializeErrorInfo(data["errorInfo"]) : undefined, eventsIngestionStatus: data["eventsIngestionStatus"] !== undefined ? deserializeIngestEventsStatus(data["eventsIngestionStatus"]) : undefined, warningInfo: data["warningInfo"] !== undefined ? deserializeWarningInfo(data["warningInfo"]) : undefined, }; } /** * Additional options for DataManager#requestStatusRetrieve. */ export interface RequestStatusRetrieveOptions { /** * Required. Required. The request ID of the Data Manager API request. */ requestId?: string; } /** * Request message for DM API MarketingDataInsightsService.RetrieveInsights */ export interface RetrieveInsightsRequest { /** * Required. Baseline for the insights requested. */ baseline?: Baseline; /** * Required. The user list ID for which insights are requested. */ userListId?: string; } /** * Response message for DM API MarketingDataInsightsService.RetrieveInsights */ export interface RetrieveInsightsResponse { /** * Contains the insights for the marketing data. */ marketingDataInsights?: MarketingDataInsight[]; } function serializeRetrieveInsightsResponse(data: any): RetrieveInsightsResponse { return { ...data, marketingDataInsights: data["marketingDataInsights"] !== undefined ? data["marketingDataInsights"].map((item: any) => (serializeMarketingDataInsight(item))) : undefined, }; } function deserializeRetrieveInsightsResponse(data: any): RetrieveInsightsResponse { return { ...data, marketingDataInsights: data["marketingDataInsights"] !== undefined ? data["marketingDataInsights"].map((item: any) => (deserializeMarketingDataInsight(item))) : undefined, }; } /** * Response from the RetrieveRequestStatusRequest. */ export interface RetrieveRequestStatusResponse { /** * A list of request statuses per destination. The order of the statuses * matches the order of the destinations in the original request. */ requestStatusPerDestination?: RequestStatusPerDestination[]; } function serializeRetrieveRequestStatusResponse(data: any): RetrieveRequestStatusResponse { return { ...data, requestStatusPerDestination: data["requestStatusPerDestination"] !== undefined ? data["requestStatusPerDestination"].map((item: any) => (serializeRequestStatusPerDestination(item))) : undefined, }; } function deserializeRetrieveRequestStatusResponse(data: any): RetrieveRequestStatusResponse { return { ...data, requestStatusPerDestination: data["requestStatusPerDestination"] !== undefined ? data["requestStatusPerDestination"].map((item: any) => (deserializeRequestStatusPerDestination(item))) : undefined, }; } /** * Response from the SearchPartnerLinksRequest. */ export interface SearchPartnerLinksResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The partner links for the given account. */ partnerLinks?: PartnerLink[]; } /** * Estimated number of members in this user list in different target networks. */ export interface SizeInfo { /** * Output only. Estimated number of members in this user list, on the Google * Display Network. */ readonly displayNetworkMembersCount?: bigint; /** * Output only. Estimated number of members in this user list in the * google.com domain. These are the members available for targeting in Search * campaigns. */ readonly searchNetworkMembersCount?: bigint; } /** * The `Status` type defines a logical error model that is suitable for * different programming environments, including REST APIs and RPC APIs. It is * used by [gRPC](https://github.com/grpc). Each `Status` message contains three * pieces of data: error code, error message, and error details. You can find * out more about this error model and how to work with it in the [API Design * Guide](https://cloud.google.com/apis/design/errors). */ export interface Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number; /** * A list of messages that carry the error details. There is a common set of * message types for APIs to use. */ details?: { [key: string]: any }[]; /** * A developer-facing error message, which should be in English. Any * user-facing error message should be localized and sent in the * google.rpc.Status.details field, or localized by the client. */ message?: string; } /** * Eligibility information for different target networks. */ export interface TargetNetworkInfo { /** * Output only. Indicates this user list is eligible for Google Display * Network. */ readonly eligibleForDisplay?: boolean; /** * Optional. Indicates if this user list is eligible for Google Search * Network. */ eligibleForSearch?: boolean; } /** * The terms of service that the user has accepted/rejected. */ export interface TermsOfService { /** * Optional. The Customer Match terms of service: * https://support.google.com/adspolicy/answer/6299717. This must be accepted * when ingesting UserData or MobileData. This field is not required for * Partner Match User list. */ customerMatchTermsOfServiceStatus?: | "TERMS_OF_SERVICE_STATUS_UNSPECIFIED" | "ACCEPTED" | "REJECTED"; } /** * Data that identifies the user. At least one identifier is required. */ export interface UserData { /** * Required. The identifiers for the user. It's possible to provide multiple * instances of the same type of data (for example, multiple email addresses). * To increase the likelihood of a match, provide as many identifiers as * possible. At most 10 `userIdentifiers` can be provided in a single * AudienceMember or Event. */ userIdentifiers?: UserIdentifier[]; } /** * User id data holding the user id. */ export interface UserIdData { /** * Required. A unique identifier for a user, as defined by the advertiser. */ userId?: string; } /** * A single identifier for the user. */ export interface UserIdentifier { /** * The known components of a user's address. Holds a grouping of identifiers * that are matched all at once. */ address?: AddressInfo; /** * Hashed email address using SHA-256 hash function after normalization. */ emailAddress?: string; /** * Hashed phone number using SHA-256 hash function after normalization (E164 * standard). */ phoneNumber?: string; } /** * Additional information when `USER_ID` is one of the `upload_key_types`. */ export interface UserIdInfo { /** * Optional. Immutable. Source of the upload data. */ dataSourceType?: | "DATA_SOURCE_TYPE_UNSPECIFIED" | "DATA_SOURCE_TYPE_FIRST_PARTY" | "DATA_SOURCE_TYPE_THIRD_PARTY_CREDIT_BUREAU" | "DATA_SOURCE_TYPE_THIRD_PARTY_VOTER_FILE" | "DATA_SOURCE_TYPE_THIRD_PARTY_PARTNER_DATA"; } /** * A user list resource. */ export interface UserList { /** * Output only. The reason this account has been granted access to the list. */ readonly accessReason?: | "ACCESS_REASON_UNSPECIFIED" | "OWNED" | "SHARED" | "LICENSED" | "SUBSCRIBED" | "AFFILIATED"; /** * Optional. Indicates if this share is still enabled. When a user list is * shared with the account this field is set to `ENABLED`. Later the user list * owner can decide to revoke the share and make it `DISABLED`. */ accountAccessStatus?: | "ACCESS_STATUS_UNSPECIFIED" | "ENABLED" | "DISABLED"; /** * Output only. The reason why this user list membership status is closed. */ readonly closingReason?: | "CLOSING_REASON_UNSPECIFIED" | "UNUSED"; /** * Optional. A description of the user list. */ description?: string; /** * Required. The display name of the user list. */ displayName?: string; /** * Output only. The unique ID of the user list. */ readonly id?: bigint; /** * Optional. Represents a user list that is populated by user ingested data. */ ingestedUserListInfo?: IngestedUserListInfo; /** * Optional. An ID from external system. It is used by user list sellers to * correlate IDs on their systems. */ integrationCode?: string; /** * Optional. The duration a user remains in the user list. Valid durations * are exact multiples of 24 hours (86400 seconds). Providing a value that is * not an exact multiple of 24 hours will result in an INVALID_ARGUMENT error. */ membershipDuration?: number /* Duration */; /** * Optional. Membership status of this user list. */ membershipStatus?: | "MEMBERSHIP_STATUS_UNSPECIFIED" | "OPEN" | "CLOSED"; /** * Identifier. The resource name of the user list. Format: * accountTypes/{account_type}/accounts/{account}/userLists/{user_list} */ name?: string; /** * Output only. An option that indicates if a user may edit a list. */ readonly readOnly?: boolean; /** * Output only. Estimated number of members in this user list in different * target networks. */ readonly sizeInfo?: SizeInfo; /** * Optional. Eligibility information for different target networks. */ targetNetworkInfo?: TargetNetworkInfo; } function serializeUserList(data: any): UserList { return { ...data, ingestedUserListInfo: data["ingestedUserListInfo"] !== undefined ? serializeIngestedUserListInfo(data["ingestedUserListInfo"]) : undefined, membershipDuration: data["membershipDuration"] !== undefined ? data["membershipDuration"] : undefined, }; } function deserializeUserList(data: any): UserList { return { ...data, id: data["id"] !== undefined ? BigInt(data["id"]) : undefined, ingestedUserListInfo: data["ingestedUserListInfo"] !== undefined ? deserializeIngestedUserListInfo(data["ingestedUserListInfo"]) : undefined, membershipDuration: data["membershipDuration"] !== undefined ? data["membershipDuration"] : undefined, }; } /** * A user list direct license. This feature is only available to data partners. */ export interface UserListDirectLicense { /** * Output only. Name of client customer which the user list is being licensed * to. This field is read-only. */ readonly clientAccountDisplayName?: string; /** * Immutable. ID of client customer which the user list is being licensed to. */ clientAccountId?: bigint; /** * Immutable. Account type of client customer which the user list is being * licensed to. */ clientAccountType?: | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN" | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS" | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER" | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER" | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK"; /** * Output only. Pricing history of this user list license. This field is * read-only. */ readonly historicalPricings?: UserListLicensePricing[]; /** * Output only. Metrics related to this license This field is read-only and * only populated if the start and end dates are set in the * ListUserListDirectLicenses call */ readonly metrics?: UserListLicenseMetrics; /** * Identifier. The resource name of the user list direct license. */ name?: string; /** * Optional. UserListDirectLicense pricing. */ pricing?: UserListLicensePricing; /** * Optional. Status of UserListDirectLicense - ENABLED or DISABLED. */ status?: | "USER_LIST_LICENSE_STATUS_UNSPECIFIED" | "USER_LIST_LICENSE_STATUS_ENABLED" | "USER_LIST_LICENSE_STATUS_DISABLED"; /** * Output only. Name of the user list being licensed. This field is * read-only. */ readonly userListDisplayName?: string; /** * Immutable. ID of the user list being licensed. */ userListId?: bigint; } function serializeUserListDirectLicense(data: any): UserListDirectLicense { return { ...data, clientAccountId: data["clientAccountId"] !== undefined ? String(data["clientAccountId"]) : undefined, pricing: data["pricing"] !== undefined ? serializeUserListLicensePricing(data["pricing"]) : undefined, userListId: data["userListId"] !== undefined ? String(data["userListId"]) : undefined, }; } function deserializeUserListDirectLicense(data: any): UserListDirectLicense { return { ...data, clientAccountId: data["clientAccountId"] !== undefined ? BigInt(data["clientAccountId"]) : undefined, historicalPricings: data["historicalPricings"] !== undefined ? data["historicalPricings"].map((item: any) => (deserializeUserListLicensePricing(item))) : undefined, pricing: data["pricing"] !== undefined ? deserializeUserListLicensePricing(data["pricing"]) : undefined, userListId: data["userListId"] !== undefined ? BigInt(data["userListId"]) : undefined, }; } /** * A user list global license. This feature is only available to data partners. */ export interface UserListGlobalLicense { /** * Output only. Pricing history of this user list license. This field is * read-only. */ readonly historicalPricings?: UserListLicensePricing[]; /** * Immutable. Product type of client customer which the user list is being * licensed to. */ licenseType?: | "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED" | "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER" | "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE" | "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE"; /** * Output only. Metrics related to this license This field is read-only and * only populated if the start and end dates are set in the * ListUserListGlobalLicenses call */ readonly metrics?: UserListLicenseMetrics; /** * Identifier. The resource name of the user list global license. */ name?: string; /** * Optional. UserListGlobalLicense pricing. */ pricing?: UserListLicensePricing; /** * Optional. Status of UserListGlobalLicense - ENABLED or DISABLED. */ status?: | "USER_LIST_LICENSE_STATUS_UNSPECIFIED" | "USER_LIST_LICENSE_STATUS_ENABLED" | "USER_LIST_LICENSE_STATUS_DISABLED"; /** * Output only. Name of the user list being licensed. This field is * read-only. */ readonly userListDisplayName?: string; /** * Immutable. ID of the user list being licensed. */ userListId?: bigint; } function serializeUserListGlobalLicense(data: any): UserListGlobalLicense { return { ...data, pricing: data["pricing"] !== undefined ? serializeUserListLicensePricing(data["pricing"]) : undefined, userListId: data["userListId"] !== undefined ? String(data["userListId"]) : undefined, }; } function deserializeUserListGlobalLicense(data: any): UserListGlobalLicense { return { ...data, historicalPricings: data["historicalPricings"] !== undefined ? data["historicalPricings"].map((item: any) => (deserializeUserListLicensePricing(item))) : undefined, pricing: data["pricing"] !== undefined ? deserializeUserListLicensePricing(data["pricing"]) : undefined, userListId: data["userListId"] !== undefined ? BigInt(data["userListId"]) : undefined, }; } /** * Information about a customer of a user list global license. This will * automatically be created by the system when a customer purchases a global * license. */ export interface UserListGlobalLicenseCustomerInfo { /** * Output only. Name of client customer which the user list is being licensed * to. */ readonly clientAccountDisplayName?: string; /** * Output only. ID of client customer which the user list is being licensed * to. */ readonly clientAccountId?: bigint; /** * Output only. Product type of client customer which the user list is being * licensed to. */ readonly clientAccountType?: | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_UNKNOWN" | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_ADS" | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_PARTNER" | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_DISPLAY_VIDEO_ADVERTISER" | "USER_LIST_LICENSE_CLIENT_ACCOUNT_TYPE_GOOGLE_AD_MANAGER_AUDIENCE_LINK"; /** * Output only. Pricing history of this user list license. */ readonly historicalPricings?: UserListLicensePricing[]; /** * Output only. Product type of client customer which the user list is being * licensed to. */ readonly licenseType?: | "USER_LIST_GLOBAL_LICENSE_TYPE_UNSPECIFIED" | "USER_LIST_GLOBAL_LICENSE_TYPE_RESELLER" | "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_SELL_SIDE" | "USER_LIST_GLOBAL_LICENSE_TYPE_DATA_MART_BUY_SIDE"; /** * Output only. Metrics related to this license This field is only populated * if the start and end dates are set in the * ListUserListGlobalLicenseCustomerInfos call. */ readonly metrics?: UserListLicenseMetrics; /** * Identifier. The resource name of the user list global license customer. */ name?: string; /** * Output only. UserListDirectLicense pricing. */ readonly pricing?: UserListLicensePricing; /** * Output only. Status of UserListDirectLicense - ENABLED or DISABLED. */ readonly status?: | "USER_LIST_LICENSE_STATUS_UNSPECIFIED" | "USER_LIST_LICENSE_STATUS_ENABLED" | "USER_LIST_LICENSE_STATUS_DISABLED"; /** * Output only. Name of the user list being licensed. */ readonly userListDisplayName?: string; /** * Output only. ID of the user list being licensed. */ readonly userListId?: bigint; } /** * Metrics related to a user list license. */ export interface UserListLicenseMetrics { /** * Output only. The number of clicks for the user list license. */ readonly clickCount?: bigint; /** * Output only. The end date (inclusive) of the metrics in the format * YYYYMMDD. For example, 20260102 represents January 2, 2026. If `start_date` * is used in the filter, `end_date` is also required. If neither `start_date` * nor `end_date` are included in the filter, the UserListLicenseMetrics * fields will not be populated in the response. */ readonly endDate?: bigint; /** * Output only. The number of impressions for the user list license. */ readonly impressionCount?: bigint; /** * Output only. The revenue for the user list license in USD micros. */ readonly revenueUsdMicros?: bigint; /** * Output only. The start date (inclusive) of the metrics in the format * YYYYMMDD. For example, 20260102 represents January 2, 2026. If `end_date` * is used in the filter, `start_date` is also required. If neither * `start_date` nor `end_date` are included in the filter, the * UserListLicenseMetrics fields will not be populated in the response. */ readonly startDate?: bigint; } /** * A user list license pricing. */ export interface UserListLicensePricing { /** * Output only. The buyer approval state of this pricing. This field is * read-only. */ readonly buyerApprovalState?: | "USER_LIST_PRICING_BUYER_APPROVAL_STATE_UNSPECIFIED" | "PENDING" | "APPROVED" | "REJECTED"; /** * Optional. The cost associated with the model, in micro units (10^-6), in * the currency specified by the currency_code field. For example, 2000000 * means $2 if `currency_code` is `USD`. */ costMicros?: bigint; /** * Immutable. The cost type of this pricing. Can be set only in the `create` * operation. Can't be updated for an existing license. */ costType?: | "USER_LIST_PRICING_COST_TYPE_UNSPECIFIED" | "CPC" | "CPM" | "MEDIA_SHARE"; /** * Optional. The currency in which cost and max_cost is specified. Must be a * three-letter currency code defined in ISO 4217. */ currencyCode?: string; /** * Optional. End time of the pricing. */ endTime?: Date; /** * Optional. The maximum CPM a commerce audience can be charged when the * MEDIA_SHARE cost type is used. The value is in micro units (10^-6) and in * the currency specified by the currency_code field. For example, 2000000 * means $2 if `currency_code` is `USD`. This is only relevant when cost_type * is MEDIA_SHARE. When cost_type is not MEDIA_SHARE, and this field is set, a * MAX_COST_NOT_ALLOWED error will be returned. If not set or set to`0`, there * is no cap. */ maxCostMicros?: bigint; /** * Output only. Whether this pricing is active. */ readonly pricingActive?: boolean; /** * Output only. The ID of this pricing. */ readonly pricingId?: bigint; /** * Output only. Start time of the pricing. */ readonly startTime?: Date; } function serializeUserListLicensePricing(data: any): UserListLicensePricing { return { ...data, costMicros: data["costMicros"] !== undefined ? String(data["costMicros"]) : undefined, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, maxCostMicros: data["maxCostMicros"] !== undefined ? String(data["maxCostMicros"]) : undefined, }; } function deserializeUserListLicensePricing(data: any): UserListLicensePricing { return { ...data, costMicros: data["costMicros"] !== undefined ? BigInt(data["costMicros"]) : undefined, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, maxCostMicros: data["maxCostMicros"] !== undefined ? BigInt(data["maxCostMicros"]) : undefined, pricingId: data["pricingId"] !== undefined ? BigInt(data["pricingId"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Advertiser-assessed information about the user at the time that the event * happened. See https://support.google.com/google-ads/answer/14007601 for more * details. */ export interface UserProperties { /** * Optional. A bucket of any additional [user * properties](https://developers.google.com/analytics/devguides/collection/protocol/ga4/user-properties) * for the user associated with this event. */ additionalUserProperties?: UserProperty[]; /** * Optional. Type of the customer associated with the event. */ customerType?: | "CUSTOMER_TYPE_UNSPECIFIED" | "NEW" | "RETURNING" | "REENGAGED"; /** * Optional. The advertiser-assessed value of the customer. */ customerValueBucket?: | "CUSTOMER_VALUE_BUCKET_UNSPECIFIED" | "LOW" | "MEDIUM" | "HIGH"; } /** * A bucket of any additional [user * properties](https://developers.google.com/analytics/devguides/collection/protocol/ga4/user-properties) * for the user associated with this event. */ export interface UserProperty { /** * Required. The name of the user property to use. */ propertyName?: string; /** * Required. The string representation of the value of the user property to * use. */ value?: string; } /** * The warning count for a given warning reason. */ export interface WarningCount { /** * The warning reason. */ reason?: | "PROCESSING_WARNING_REASON_UNSPECIFIED" | "PROCESSING_WARNING_REASON_KEK_PERMISSION_DENIED" | "PROCESSING_WARNING_REASON_DEK_DECRYPTION_ERROR" | "PROCESSING_WARNING_REASON_DECRYPTION_ERROR" | "PROCESSING_WARNING_REASON_WIP_AUTH_FAILED" | "PROCESSING_WARNING_REASON_INVALID_WIP" | "PROCESSING_WARNING_REASON_INVALID_KEK" | "PROCESSING_WARNING_REASON_USER_IDENTIFIER_DECRYPTION_ERROR" | "PROCESSING_WARNING_REASON_INTERNAL_ERROR" | "PROCESSING_WARNING_REASON_AWS_AUTH_FAILED"; /** * The count of records that have a warning. */ recordCount?: bigint; } function serializeWarningCount(data: any): WarningCount { return { ...data, recordCount: data["recordCount"] !== undefined ? String(data["recordCount"]) : undefined, }; } function deserializeWarningCount(data: any): WarningCount { return { ...data, recordCount: data["recordCount"] !== undefined ? BigInt(data["recordCount"]) : undefined, }; } /** * Warning counts for each type of warning. */ export interface WarningInfo { /** * A list of warnings and counts per warning reason. */ warningCounts?: WarningCount[]; } function serializeWarningInfo(data: any): WarningInfo { return { ...data, warningCounts: data["warningCounts"] !== undefined ? data["warningCounts"].map((item: any) => (serializeWarningCount(item))) : undefined, }; } function deserializeWarningInfo(data: any): WarningInfo { return { ...data, warningCounts: data["warningCounts"] !== undefined ? data["warningCounts"].map((item: any) => (deserializeWarningCount(item))) : undefined, }; }