blob: 6cf10dd58ed4a8fa6d5f1fd484eaf781d13e490b [file] [edit]
// Copyright 2016 Google LLC
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
// This is a generated file (see the discoveryapis_generator project).
// ignore_for_file: camel_case_types
// ignore_for_file: comment_references
// ignore_for_file: deprecated_member_use_from_same_package
// ignore_for_file: doc_directive_unknown
// ignore_for_file: lines_longer_than_80_chars
// ignore_for_file: non_constant_identifier_names
// ignore_for_file: prefer_interpolation_to_compose_strings
// ignore_for_file: unintended_html_in_doc_comment
// ignore_for_file: unnecessary_brace_in_string_interps
// ignore_for_file: unnecessary_lambdas
// ignore_for_file: unnecessary_string_interpolations
/// Ad Exchange Buyer API II - v2beta1
///
/// Access the latest features for managing Authorized Buyers accounts,
/// Real-Time Bidding configurations and auction metrics, and Marketplace
/// programmatic deals.
///
/// For more information, see
/// <https://developers.google.com/authorized-buyers/apis/reference/rest/>
///
/// Create an instance of [AdExchangeBuyerIIApi] to access these resources:
///
/// - [AccountsResource]
/// - [AccountsClientsResource]
/// - [AccountsClientsInvitationsResource]
/// - [AccountsClientsUsersResource]
/// - [AccountsCreativesResource]
/// - [AccountsCreativesDealAssociationsResource]
/// - [AccountsFinalizedProposalsResource]
/// - [AccountsProductsResource]
/// - [AccountsProposalsResource]
/// - [AccountsPublisherProfilesResource]
/// - [BiddersResource]
/// - [BiddersAccountsResource]
/// - [BiddersAccountsFilterSetsResource]
/// - [BiddersAccountsFilterSetsBidMetricsResource]
/// - [BiddersAccountsFilterSetsBidResponseErrorsResource]
/// - [BiddersAccountsFilterSetsBidResponsesWithoutBidsResource]
/// - [BiddersAccountsFilterSetsFilteredBidRequestsResource]
/// - [BiddersAccountsFilterSetsFilteredBidsResource]
/// - [BiddersAccountsFilterSetsFilteredBidsCreativesResource]
/// - [BiddersAccountsFilterSetsFilteredBidsDetailsResource]
/// - [BiddersAccountsFilterSetsImpressionMetricsResource]
/// - [BiddersAccountsFilterSetsLosingBidsResource]
/// - [BiddersAccountsFilterSetsNonBillableWinningBidsResource]
/// - [BiddersFilterSetsResource]
/// - [BiddersFilterSetsBidMetricsResource]
/// - [BiddersFilterSetsBidResponseErrorsResource]
/// - [BiddersFilterSetsBidResponsesWithoutBidsResource]
/// - [BiddersFilterSetsFilteredBidRequestsResource]
/// - [BiddersFilterSetsFilteredBidsResource]
/// - [BiddersFilterSetsFilteredBidsCreativesResource]
/// - [BiddersFilterSetsFilteredBidsDetailsResource]
/// - [BiddersFilterSetsImpressionMetricsResource]
/// - [BiddersFilterSetsLosingBidsResource]
/// - [BiddersFilterSetsNonBillableWinningBidsResource]
/// - [BuyersResource]
/// - [BuyersFilterSetsResource]
/// - [BuyersFilterSetsBidMetricsResource]
/// - [BuyersFilterSetsBidResponseErrorsResource]
/// - [BuyersFilterSetsBidResponsesWithoutBidsResource]
/// - [BuyersFilterSetsFilteredBidRequestsResource]
/// - [BuyersFilterSetsFilteredBidsResource]
/// - [BuyersFilterSetsFilteredBidsCreativesResource]
/// - [BuyersFilterSetsFilteredBidsDetailsResource]
/// - [BuyersFilterSetsImpressionMetricsResource]
/// - [BuyersFilterSetsLosingBidsResource]
/// - [BuyersFilterSetsNonBillableWinningBidsResource]
library;
import 'dart:async' as async;
import 'dart:convert' as convert;
import 'dart:core' as core;
import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
import 'package:http/http.dart' as http;
import '../shared.dart';
import '../src/user_agent.dart';
export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
show ApiRequestError, DetailedApiRequestError;
/// Access the latest features for managing Authorized Buyers accounts,
/// Real-Time Bidding configurations and auction metrics, and Marketplace
/// programmatic deals.
class AdExchangeBuyerIIApi {
/// Manage your Ad Exchange buyer account configuration
static const adexchangeBuyerScope =
'https://www.googleapis.com/auth/adexchange.buyer';
final commons.ApiRequester _requester;
AccountsResource get accounts => AccountsResource(_requester);
BiddersResource get bidders => BiddersResource(_requester);
BuyersResource get buyers => BuyersResource(_requester);
AdExchangeBuyerIIApi(
http.Client client, {
core.String rootUrl = 'https://adexchangebuyer.googleapis.com/',
core.String servicePath = '',
}) : _requester = commons.ApiRequester(
client,
rootUrl,
servicePath,
requestHeaders,
);
}
class AccountsResource {
final commons.ApiRequester _requester;
AccountsClientsResource get clients => AccountsClientsResource(_requester);
AccountsCreativesResource get creatives =>
AccountsCreativesResource(_requester);
AccountsFinalizedProposalsResource get finalizedProposals =>
AccountsFinalizedProposalsResource(_requester);
AccountsProductsResource get products => AccountsProductsResource(_requester);
AccountsProposalsResource get proposals =>
AccountsProposalsResource(_requester);
AccountsPublisherProfilesResource get publisherProfiles =>
AccountsPublisherProfilesResource(_requester);
AccountsResource(commons.ApiRequester client) : _requester = client;
}
class AccountsClientsResource {
final commons.ApiRequester _requester;
AccountsClientsInvitationsResource get invitations =>
AccountsClientsInvitationsResource(_requester);
AccountsClientsUsersResource get users =>
AccountsClientsUsersResource(_requester);
AccountsClientsResource(commons.ApiRequester client) : _requester = client;
/// Creates a new client buyer.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Unique numerical account ID for the buyer of which the
/// client buyer is a customer; the sponsor buyer to create a client for.
/// (required)
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Client].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Client> create(
Client request,
core.String accountId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' + commons.escapeVariable('$accountId') + '/clients';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Client.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets a client buyer with a given client account ID.
///
/// Request parameters:
///
/// [accountId] - Numerical account ID of the client's sponsor buyer.
/// (required)
///
/// [clientAccountId] - Numerical account ID of the client buyer to retrieve.
/// (required)
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Client].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Client> get(
core.String accountId,
core.String clientAccountId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/clients/' +
commons.escapeVariable('$clientAccountId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Client.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists all the clients for the current sponsor buyer.
///
/// Request parameters:
///
/// [accountId] - Unique numerical account ID of the sponsor buyer to list the
/// clients for.
///
/// [pageSize] - Requested page size. The server may return fewer clients than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of ListClientsResponse.nextPageToken
/// returned from the previous call to the accounts.clients.list method.
///
/// [partnerClientId] - Optional unique identifier (from the standpoint of an
/// Ad Exchange sponsor buyer partner) of the client to return. If specified,
/// at most one client will be returned in the response.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListClientsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListClientsResponse> list(
core.String accountId, {
core.int? pageSize,
core.String? pageToken,
core.String? partnerClientId,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'partnerClientId': ?partnerClientId == null ? null : [partnerClientId],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' + commons.escapeVariable('$accountId') + '/clients';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListClientsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates an existing client buyer.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Unique numerical account ID for the buyer of which the
/// client buyer is a customer; the sponsor buyer to update a client for.
/// (required)
///
/// [clientAccountId] - Unique numerical account ID of the client to update.
/// (required)
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Client].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Client> update(
Client request,
core.String accountId,
core.String clientAccountId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/clients/' +
commons.escapeVariable('$clientAccountId');
final response_ = await _requester.request(
url_,
'PUT',
body: body_,
queryParams: queryParams_,
);
return Client.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class AccountsClientsInvitationsResource {
final commons.ApiRequester _requester;
AccountsClientsInvitationsResource(commons.ApiRequester client)
: _requester = client;
/// Creates and sends out an email invitation to access an Ad Exchange client
/// buyer account.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Numerical account ID of the client's sponsor buyer.
/// (required)
///
/// [clientAccountId] - Numerical account ID of the client buyer that the user
/// should be associated with. (required)
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ClientUserInvitation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ClientUserInvitation> create(
ClientUserInvitation request,
core.String accountId,
core.String clientAccountId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/clients/' +
commons.escapeVariable('$clientAccountId') +
'/invitations';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return ClientUserInvitation.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Retrieves an existing client user invitation.
///
/// Request parameters:
///
/// [accountId] - Numerical account ID of the client's sponsor buyer.
/// (required)
///
/// [clientAccountId] - Numerical account ID of the client buyer that the user
/// invitation to be retrieved is associated with. (required)
///
/// [invitationId] - Numerical identifier of the user invitation to retrieve.
/// (required)
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ClientUserInvitation].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ClientUserInvitation> get(
core.String accountId,
core.String clientAccountId,
core.String invitationId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/clients/' +
commons.escapeVariable('$clientAccountId') +
'/invitations/' +
commons.escapeVariable('$invitationId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ClientUserInvitation.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Lists all the client users invitations for a client with a given account
/// ID.
///
/// Request parameters:
///
/// [accountId] - Numerical account ID of the client's sponsor buyer.
/// (required)
///
/// [clientAccountId] - Numerical account ID of the client buyer to list
/// invitations for. (required) You must either specify a string
/// representation of a numerical account identifier or the `-` character to
/// list all the invitations for all the clients of a given sponsor buyer.
///
/// [pageSize] - Requested page size. Server may return fewer clients than
/// requested. If unspecified, server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListClientUserInvitationsResponse.nextPageToken returned from the previous
/// call to the clients.invitations.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListClientUserInvitationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListClientUserInvitationsResponse> list(
core.String accountId,
core.String clientAccountId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/clients/' +
commons.escapeVariable('$clientAccountId') +
'/invitations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListClientUserInvitationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class AccountsClientsUsersResource {
final commons.ApiRequester _requester;
AccountsClientsUsersResource(commons.ApiRequester client)
: _requester = client;
/// Retrieves an existing client user.
///
/// Request parameters:
///
/// [accountId] - Numerical account ID of the client's sponsor buyer.
/// (required)
///
/// [clientAccountId] - Numerical account ID of the client buyer that the user
/// to be retrieved is associated with. (required)
///
/// [userId] - Numerical identifier of the user to retrieve. (required)
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ClientUser].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ClientUser> get(
core.String accountId,
core.String clientAccountId,
core.String userId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/clients/' +
commons.escapeVariable('$clientAccountId') +
'/users/' +
commons.escapeVariable('$userId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ClientUser.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Lists all the known client users for a specified sponsor buyer account ID.
///
/// Request parameters:
///
/// [accountId] - Numerical account ID of the sponsor buyer of the client to
/// list users for. (required)
///
/// [clientAccountId] - The account ID of the client buyer to list users for.
/// (required) You must specify either a string representation of a numerical
/// account identifier or the `-` character to list all the client users for
/// all the clients of a given sponsor buyer.
///
/// [pageSize] - Requested page size. The server may return fewer clients than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListClientUsersResponse.nextPageToken returned from the previous call to
/// the accounts.clients.users.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListClientUsersResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListClientUsersResponse> list(
core.String accountId,
core.String clientAccountId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/clients/' +
commons.escapeVariable('$clientAccountId') +
'/users';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListClientUsersResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Updates an existing client user.
///
/// Only the user status can be changed on update.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Numerical account ID of the client's sponsor buyer.
/// (required)
///
/// [clientAccountId] - Numerical account ID of the client buyer that the user
/// to be retrieved is associated with. (required)
///
/// [userId] - Numerical identifier of the user to retrieve. (required)
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ClientUser].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ClientUser> update(
ClientUser request,
core.String accountId,
core.String clientAccountId,
core.String userId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/clients/' +
commons.escapeVariable('$clientAccountId') +
'/users/' +
commons.escapeVariable('$userId');
final response_ = await _requester.request(
url_,
'PUT',
body: body_,
queryParams: queryParams_,
);
return ClientUser.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class AccountsCreativesResource {
final commons.ApiRequester _requester;
AccountsCreativesDealAssociationsResource get dealAssociations =>
AccountsCreativesDealAssociationsResource(_requester);
AccountsCreativesResource(commons.ApiRequester client) : _requester = client;
/// Creates a creative.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - The account that this creative belongs to. Can be used to
/// filter the response of the creatives.list method.
///
/// [duplicateIdMode] - Indicates if multiple creatives can share an ID or
/// not. Default is NO_DUPLICATES (one ID per creative).
/// Possible string values are:
/// - "NO_DUPLICATES" : Recommended. This means that an ID will be unique to a
/// single creative. Multiple creatives will not share an ID.
/// - "FORCE_ENABLE_DUPLICATE_IDS" : Not recommended. Using this option will
/// allow multiple creatives to share the same ID. Get and Update requests
/// will not be possible for any ID that has more than one creative
/// associated. (List will still function.) This is only intended for
/// backwards compatibility in cases where a single ID is already shared by
/// multiple creatives from previous APIs.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Creative].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Creative> create(
Creative request,
core.String accountId, {
core.String? duplicateIdMode,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'duplicateIdMode': ?duplicateIdMode == null ? null : [duplicateIdMode],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Creative.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets a creative.
///
/// Request parameters:
///
/// [accountId] - The account the creative belongs to.
///
/// [creativeId] - The ID of the creative to retrieve.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Creative].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Creative> get(
core.String accountId,
core.String creativeId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives/' +
commons.escapeVariable('$creativeId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Creative.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists creatives.
///
/// Request parameters:
///
/// [accountId] - The account to list the creatives from. Specify "-" to list
/// all creatives the current user has access to.
///
/// [pageSize] - Requested page size. The server may return fewer creatives
/// than requested (due to timeout constraint) even if more are available
/// through another call. If unspecified, server will pick an appropriate
/// default. Acceptable values are 1 to 1000, inclusive.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListCreativesResponse.next_page_token returned from the previous call to
/// 'ListCreatives' method.
///
/// [query] - An optional query string to filter creatives. If no filter is
/// specified, all active creatives will be returned. Supported queries are: -
/// accountId=*account_id_string* - creativeId=*creative_id_string* -
/// dealsStatus: {approved, conditionally_approved, disapproved, not_checked}
/// - openAuctionStatus: {approved, conditionally_approved, disapproved,
/// not_checked} - attribute: {a numeric attribute from the list of
/// attributes} - disapprovalReason: {a reason from DisapprovalReason}
/// Example: 'accountId=12345 AND (dealsStatus:disapproved AND
/// disapprovalReason:unacceptable_content) OR attribute:47'
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCreativesResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCreativesResponse> list(
core.String accountId, {
core.int? pageSize,
core.String? pageToken,
core.String? query,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'query': ?query == null ? null : [query],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCreativesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Stops watching a creative.
///
/// Will stop push notifications being sent to the topics when the creative
/// changes status.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - The account of the creative to stop notifications for.
///
/// [creativeId] - The creative ID of the creative to stop notifications for.
/// Specify "-" to specify stopping account level notifications.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> stopWatching(
StopWatchingCreativeRequest request,
core.String accountId,
core.String creativeId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives/' +
commons.escapeVariable('$creativeId') +
':stopWatching';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Updates a creative.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - The account that this creative belongs to. Can be used to
/// filter the response of the creatives.list method.
///
/// [creativeId] - The buyer-defined creative ID of this creative. Can be used
/// to filter the response of the creatives.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Creative].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Creative> update(
Creative request,
core.String accountId,
core.String creativeId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives/' +
commons.escapeVariable('$creativeId');
final response_ = await _requester.request(
url_,
'PUT',
body: body_,
queryParams: queryParams_,
);
return Creative.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Watches a creative.
///
/// Will result in push notifications being sent to the topic when the
/// creative changes status.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - The account of the creative to watch.
///
/// [creativeId] - The creative ID to watch for status changes. Specify "-" to
/// watch all creatives under the above account. If both creative-level and
/// account-level notifications are sent, only a single notification will be
/// sent to the creative-level notification topic.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> watch(
WatchCreativeRequest request,
core.String accountId,
core.String creativeId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives/' +
commons.escapeVariable('$creativeId') +
':watch';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class AccountsCreativesDealAssociationsResource {
final commons.ApiRequester _requester;
AccountsCreativesDealAssociationsResource(commons.ApiRequester client)
: _requester = client;
/// Associate an existing deal with a creative.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - The account the creative belongs to.
///
/// [creativeId] - The ID of the creative associated with the deal.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> add(
AddDealAssociationRequest request,
core.String accountId,
core.String creativeId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives/' +
commons.escapeVariable('$creativeId') +
'/dealAssociations:add';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// List all creative-deal associations.
///
/// Request parameters:
///
/// [accountId] - The account to list the associations from. Specify "-" to
/// list all creatives the current user has access to.
///
/// [creativeId] - The creative ID to list the associations from. Specify "-"
/// to list all creatives under the above account.
///
/// [pageSize] - Requested page size. Server may return fewer associations
/// than requested. If unspecified, server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListDealAssociationsResponse.next_page_token returned from the previous
/// call to 'ListDealAssociations' method.
///
/// [query] - An optional query string to filter deal associations. If no
/// filter is specified, all associations will be returned. Supported queries
/// are: - accountId=*account_id_string* - creativeId=*creative_id_string* -
/// dealsId=*deals_id_string* - dealsStatus:{approved, conditionally_approved,
/// disapproved, not_checked} - openAuctionStatus:{approved,
/// conditionally_approved, disapproved, not_checked} Example: 'dealsId=12345
/// AND dealsStatus:disapproved'
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListDealAssociationsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListDealAssociationsResponse> list(
core.String accountId,
core.String creativeId, {
core.int? pageSize,
core.String? pageToken,
core.String? query,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'query': ?query == null ? null : [query],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives/' +
commons.escapeVariable('$creativeId') +
'/dealAssociations';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListDealAssociationsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Remove the association between a deal and a creative.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - The account the creative belongs to.
///
/// [creativeId] - The ID of the creative associated with the deal.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> remove(
RemoveDealAssociationRequest request,
core.String accountId,
core.String creativeId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/creatives/' +
commons.escapeVariable('$creativeId') +
'/dealAssociations:remove';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class AccountsFinalizedProposalsResource {
final commons.ApiRequester _requester;
AccountsFinalizedProposalsResource(commons.ApiRequester client)
: _requester = client;
/// List finalized proposals, regardless if a proposal is being renegotiated.
///
/// A filter expression (PQL query) may be specified to filter the results.
/// The notes will not be returned.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [filter] - An optional PQL filter query used to query for proposals.
/// Nested repeated fields, such as proposal.deals.targetingCriterion, cannot
/// be filtered.
///
/// [filterSyntax] - Syntax the filter is written in. Current implementation
/// defaults to PQL but in the future it will be LIST_FILTER.
/// Possible string values are:
/// - "FILTER_SYNTAX_UNSPECIFIED" : A placeholder for an undefined filter
/// syntax.
/// - "PQL" : PQL query syntax. Visit
/// https://developers.google.com/ad-manager/api/pqlreference for PQL
/// documentation and examples.
/// - "LIST_FILTER" : API list filtering syntax. Read about syntax and usage
/// at
/// https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - The page token as returned from ListProposalsResponse.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListProposalsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListProposalsResponse> list(
core.String accountId, {
core.String? filter,
core.String? filterSyntax,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'filterSyntax': ?filterSyntax == null ? null : [filterSyntax],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/finalizedProposals';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListProposalsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Update given deals to pause serving.
///
/// This method will set the
/// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all
/// listed deals in the request. Currently, this method only applies to PG and
/// PD deals. For PA deals, call accounts.proposals.pause endpoint. It is a
/// no-op to pause already-paused deals. It is an error to call
/// PauseProposalDeals for deals which are not part of the proposal of
/// proposal_id or which are not finalized or renegotiating.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The proposal_id of the proposal containing the deals.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> pause(
PauseProposalDealsRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/finalizedProposals/' +
commons.escapeVariable('$proposalId') +
':pause';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Update given deals to resume serving.
///
/// This method will set the
/// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for
/// all listed deals in the request. Currently, this method only applies to PG
/// and PD deals. For PA deals, call accounts.proposals.resume endpoint. It is
/// a no-op to resume running deals or deals paused by the other party. It is
/// an error to call ResumeProposalDeals for deals which are not part of the
/// proposal of proposal_id or which are not finalized or renegotiating.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The proposal_id of the proposal containing the deals.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> resume(
ResumeProposalDealsRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/finalizedProposals/' +
commons.escapeVariable('$proposalId') +
':resume';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class AccountsProductsResource {
final commons.ApiRequester _requester;
AccountsProductsResource(commons.ApiRequester client) : _requester = client;
/// Gets the requested product by ID.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [productId] - The ID for the product to get the head revision for.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Product].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Product> get(
core.String accountId,
core.String productId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/products/' +
commons.escapeVariable('$productId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Product.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// List all products visible to the buyer (optionally filtered by the
/// specified PQL query).
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [filter] - An optional PQL query used to query for products. See
/// https://developers.google.com/ad-manager/docs/pqlreference for
/// documentation about PQL and examples. Nested repeated fields, such as
/// product.targetingCriterion.inclusions, cannot be filtered.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - The page token as returned from ListProductsResponse.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListProductsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListProductsResponse> list(
core.String accountId, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/products';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListProductsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class AccountsProposalsResource {
final commons.ApiRequester _requester;
AccountsProposalsResource(commons.ApiRequester client) : _requester = client;
/// Mark the proposal as accepted at the given revision number.
///
/// If the number does not match the server's revision number an `ABORTED`
/// error message will be returned. This call updates the proposal_state from
/// `PROPOSED` to `BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`.
/// Upon calling this endpoint, the buyer implicitly agrees to the terms and
/// conditions optionally set within the proposal by the publisher.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The ID of the proposal to accept.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> accept(
AcceptProposalRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId') +
':accept';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Create a new note and attach it to the proposal.
///
/// The note is assigned a unique ID by the server. The proposal revision
/// number will not increase when associated with a new note.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The ID of the proposal to attach the note to.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Note].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Note> addNote(
AddNoteRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId') +
':addNote';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Note.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Cancel an ongoing negotiation on a proposal.
///
/// This does not cancel or end serving for the deals if the proposal has been
/// finalized, but only cancels a negotiation unilaterally.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The ID of the proposal to cancel negotiation for.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> cancelNegotiation(
CancelNegotiationRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId') +
':cancelNegotiation';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// You can opt-in to manually update proposals to indicate that setup is
/// complete.
///
/// By default, proposal setup is automatically completed after their deals
/// are finalized. Contact your Technical Account Manager to opt in. Buyers
/// can call this method when the proposal has been finalized, and all the
/// required creatives have been uploaded using the Creatives API. This call
/// updates the `is_setup_completed` field on the deals in the proposal, and
/// notifies the seller. The server then advances the revision number of the
/// most recent proposal. To mark an individual deal as ready to serve, call
/// `buyers.finalizedDeals.setReadyToServe` in the Marketplace API.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The ID of the proposal to mark as setup completed.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> completeSetup(
CompleteSetupRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId') +
':completeSetup';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Create the given proposal.
///
/// Each created proposal and any deals it contains are assigned a unique ID
/// by the server.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> create(
Proposal request,
core.String accountId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Gets a proposal given its ID.
///
/// The proposal is returned at its head revision.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The unique ID of the proposal
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> get(
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// List proposals.
///
/// A filter expression (PQL query) may be specified to filter the results. To
/// retrieve all finalized proposals, regardless if a proposal is being
/// renegotiated, see the FinalizedProposals resource. Note that
/// Bidder/ChildSeat relationships differ from the usual behavior. A Bidder
/// account can only see its child seats' proposals by specifying the
/// ChildSeat's accountId in the request path.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [filter] - An optional PQL filter query used to query for proposals.
/// Nested repeated fields, such as proposal.deals.targetingCriterion, cannot
/// be filtered.
///
/// [filterSyntax] - Syntax the filter is written in. Current implementation
/// defaults to PQL but in the future it will be LIST_FILTER.
/// Possible string values are:
/// - "FILTER_SYNTAX_UNSPECIFIED" : A placeholder for an undefined filter
/// syntax.
/// - "PQL" : PQL query syntax. Visit
/// https://developers.google.com/ad-manager/api/pqlreference for PQL
/// documentation and examples.
/// - "LIST_FILTER" : API list filtering syntax. Read about syntax and usage
/// at
/// https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - The page token as returned from ListProposalsResponse.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListProposalsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListProposalsResponse> list(
core.String accountId, {
core.String? filter,
core.String? filterSyntax,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'filterSyntax': ?filterSyntax == null ? null : [filterSyntax],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListProposalsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// Update the given proposal to pause serving.
///
/// This method will set the
/// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all
/// deals in the proposal. It is a no-op to pause an already-paused proposal.
/// It is an error to call PauseProposal for a proposal that is not finalized
/// or renegotiating.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The ID of the proposal to pause.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> pause(
PauseProposalRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId') +
':pause';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Update the given proposal to resume serving.
///
/// This method will set the
/// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for
/// all deals in the proposal. Note that if the `has_seller_paused` bit is
/// also set, serving will not resume until the seller also resumes. It is a
/// no-op to resume an already-running proposal. It is an error to call
/// ResumeProposal for a proposal that is not finalized or renegotiating.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The ID of the proposal to resume.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> resume(
ResumeProposalRequest request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId') +
':resume';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Update the given proposal at the client known revision number.
///
/// If the server revision has advanced since the passed-in
/// `proposal.proposal_revision`, an `ABORTED` error message will be returned.
/// Only the buyer-modifiable fields of the proposal will be updated. Note
/// that the deals in the proposal will be updated to match the passed-in
/// copy. If a passed-in deal does not have a `deal_id`, the server will
/// assign a new unique ID and create the deal. If passed-in deal has a
/// `deal_id`, it will be updated to match the passed-in copy. Any existing
/// deals not present in the passed-in proposal will be deleted. It is an
/// error to pass in a deal with a `deal_id` not present at head.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [proposalId] - The unique ID of the proposal.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Proposal].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Proposal> update(
Proposal request,
core.String accountId,
core.String proposalId, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals/' +
commons.escapeVariable('$proposalId');
final response_ = await _requester.request(
url_,
'PUT',
body: body_,
queryParams: queryParams_,
);
return Proposal.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
}
class AccountsPublisherProfilesResource {
final commons.ApiRequester _requester;
AccountsPublisherProfilesResource(commons.ApiRequester client)
: _requester = client;
/// Gets the requested publisher profile by id.
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [publisherProfileId] - The id for the publisher profile to get.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [PublisherProfile].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<PublisherProfile> get(
core.String accountId,
core.String publisherProfileId, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/publisherProfiles/' +
commons.escapeVariable('$publisherProfileId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return PublisherProfile.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
/// List all publisher profiles visible to the buyer
///
/// Request parameters:
///
/// [accountId] - Account ID of the buyer.
///
/// [pageSize] - Specify the number of results to include per page.
///
/// [pageToken] - The page token as return from ListPublisherProfilesResponse.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListPublisherProfilesResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListPublisherProfilesResponse> list(
core.String accountId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/publisherProfiles';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListPublisherProfilesResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersResource {
final commons.ApiRequester _requester;
BiddersAccountsResource get accounts => BiddersAccountsResource(_requester);
BiddersFilterSetsResource get filterSets =>
BiddersFilterSetsResource(_requester);
BiddersResource(commons.ApiRequester client) : _requester = client;
}
class BiddersAccountsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsResource get filterSets =>
BiddersAccountsFilterSetsResource(_requester);
BiddersAccountsResource(commons.ApiRequester client) : _requester = client;
}
class BiddersAccountsFilterSetsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsBidMetricsResource get bidMetrics =>
BiddersAccountsFilterSetsBidMetricsResource(_requester);
BiddersAccountsFilterSetsBidResponseErrorsResource get bidResponseErrors =>
BiddersAccountsFilterSetsBidResponseErrorsResource(_requester);
BiddersAccountsFilterSetsBidResponsesWithoutBidsResource
get bidResponsesWithoutBids =>
BiddersAccountsFilterSetsBidResponsesWithoutBidsResource(_requester);
BiddersAccountsFilterSetsFilteredBidRequestsResource
get filteredBidRequests =>
BiddersAccountsFilterSetsFilteredBidRequestsResource(_requester);
BiddersAccountsFilterSetsFilteredBidsResource get filteredBids =>
BiddersAccountsFilterSetsFilteredBidsResource(_requester);
BiddersAccountsFilterSetsImpressionMetricsResource get impressionMetrics =>
BiddersAccountsFilterSetsImpressionMetricsResource(_requester);
BiddersAccountsFilterSetsLosingBidsResource get losingBids =>
BiddersAccountsFilterSetsLosingBidsResource(_requester);
BiddersAccountsFilterSetsNonBillableWinningBidsResource
get nonBillableWinningBids =>
BiddersAccountsFilterSetsNonBillableWinningBidsResource(_requester);
BiddersAccountsFilterSetsResource(commons.ApiRequester client)
: _requester = client;
/// Creates the specified filter set for the account with the given account
/// ID.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [ownerName] - Name of the owner (bidder or account) of the filter set to
/// be created. For example: - For a bidder-level filter set for bidder 123:
/// `bidders/123` - For an account-level filter set for the buyer account
/// representing bidder 123: `bidders/123/accounts/123` - For an account-level
/// filter set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456`
/// Value must have pattern `^bidders/\[^/\]+/accounts/\[^/\]+$`.
///
/// [isTransient] - Whether the filter set is transient, or should be
/// persisted indefinitely. By default, filter sets are not transient. If
/// transient, it will be available for at least 1 hour after creation.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [FilterSet].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<FilterSet> create(
FilterSet request,
core.String ownerName, {
core.bool? isTransient,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'isTransient': ?isTransient == null ? null : ['${isTransient}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$ownerName') + '/filterSets';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return FilterSet.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes the requested filter set from the account with the given account
/// ID.
///
/// Request parameters:
///
/// [name] - Full name of the resource to delete. For example: - For a
/// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For
/// an account-level filter set for the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> delete(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Retrieves the requested filter set for the account with the given account
/// ID.
///
/// Request parameters:
///
/// [name] - Full name of the resource being requested. For example: - For a
/// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For
/// an account-level filter set for the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [FilterSet].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<FilterSet> get(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return FilterSet.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists all filter sets for the account with the given account ID.
///
/// Request parameters:
///
/// [ownerName] - Name of the owner (bidder or account) of the filter sets to
/// be listed. For example: - For a bidder-level filter set for bidder 123:
/// `bidders/123` - For an account-level filter set for the buyer account
/// representing bidder 123: `bidders/123/accounts/123` - For an account-level
/// filter set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456`
/// Value must have pattern `^bidders/\[^/\]+/accounts/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilterSetsResponse.nextPageToken returned from the previous call to
/// the accounts.filterSets.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilterSetsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilterSetsResponse> list(
core.String ownerName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$ownerName') + '/filterSets';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilterSetsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsBidMetricsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsBidMetricsResource(commons.ApiRequester client)
: _requester = client;
/// Lists all metrics that are measured in terms of number of bids.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidMetricsResponse.nextPageToken returned from the previous call to
/// the bidMetrics.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidMetricsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidMetricsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/bidMetrics';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidMetricsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsBidResponseErrorsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsBidResponseErrorsResource(
commons.ApiRequester client,
) : _requester = client;
/// List all errors that occurred in bid responses, with the number of bid
/// responses affected for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidResponseErrorsResponse.nextPageToken returned from the previous
/// call to the bidResponseErrors.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidResponseErrorsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidResponseErrorsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/bidResponseErrors';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidResponseErrorsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsBidResponsesWithoutBidsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsBidResponsesWithoutBidsResource(
commons.ApiRequester client,
) : _requester = client;
/// List all reasons for which bid responses were considered to have no
/// applicable bids, with the number of bid responses affected for each
/// reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the
/// previous call to the bidResponsesWithoutBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidResponsesWithoutBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidResponsesWithoutBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/bidResponsesWithoutBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidResponsesWithoutBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsFilteredBidRequestsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsFilteredBidRequestsResource(
commons.ApiRequester client,
) : _requester = client;
/// List all reasons that caused a bid request not to be sent for an
/// impression, with the number of bid requests not sent for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilteredBidRequestsResponse.nextPageToken returned from the previous
/// call to the filteredBidRequests.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilteredBidRequestsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilteredBidRequestsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBidRequests';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilteredBidRequestsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsFilteredBidsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsFilteredBidsCreativesResource get creatives =>
BiddersAccountsFilterSetsFilteredBidsCreativesResource(_requester);
BiddersAccountsFilterSetsFilteredBidsDetailsResource get details =>
BiddersAccountsFilterSetsFilteredBidsDetailsResource(_requester);
BiddersAccountsFilterSetsFilteredBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which bids were filtered, with the number of bids
/// filtered for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilteredBidsResponse.nextPageToken returned from the previous call to
/// the filteredBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilteredBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilteredBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/filteredBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilteredBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsFilteredBidsCreativesResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsFilteredBidsCreativesResource(
commons.ApiRequester client,
) : _requester = client;
/// List all creatives associated with a specific reason for which bids were
/// filtered, with the number of bids filtered for each creative.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [creativeStatusId] - The ID of the creative status for which to retrieve a
/// breakdown by creative. See
/// \[creative-status-codes\](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from
/// the previous call to the filteredBids.creatives.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCreativeStatusBreakdownByCreativeResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCreativeStatusBreakdownByCreativeResponse> list(
core.String filterSetName,
core.int creativeStatusId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBids/' +
commons.escapeVariable('$creativeStatusId') +
'/creatives';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCreativeStatusBreakdownByCreativeResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsFilteredBidsDetailsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsFilteredBidsDetailsResource(
commons.ApiRequester client,
) : _requester = client;
/// List all details associated with a specific reason for which bids were
/// filtered, with the number of bids filtered for each detail.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [creativeStatusId] - The ID of the creative status for which to retrieve a
/// breakdown by detail. See
/// \[creative-status-codes\](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
/// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and
/// 87.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from
/// the previous call to the filteredBids.details.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCreativeStatusBreakdownByDetailResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCreativeStatusBreakdownByDetailResponse> list(
core.String filterSetName,
core.int creativeStatusId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBids/' +
commons.escapeVariable('$creativeStatusId') +
'/details';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCreativeStatusBreakdownByDetailResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsImpressionMetricsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsImpressionMetricsResource(
commons.ApiRequester client,
) : _requester = client;
/// Lists all metrics that are measured in terms of number of impressions.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListImpressionMetricsResponse.nextPageToken returned from the previous
/// call to the impressionMetrics.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListImpressionMetricsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListImpressionMetricsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/impressionMetrics';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListImpressionMetricsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsLosingBidsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsLosingBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which bids lost in the auction, with the number of
/// bids that lost for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListLosingBidsResponse.nextPageToken returned from the previous call to
/// the losingBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListLosingBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListLosingBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/losingBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListLosingBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersAccountsFilterSetsNonBillableWinningBidsResource {
final commons.ApiRequester _requester;
BiddersAccountsFilterSetsNonBillableWinningBidsResource(
commons.ApiRequester client,
) : _requester = client;
/// List all reasons for which winning bids were not billable, with the number
/// of bids not billed for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern
/// `^bidders/\[^/\]+/accounts/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListNonBillableWinningBidsResponse.nextPageToken returned from the
/// previous call to the nonBillableWinningBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListNonBillableWinningBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListNonBillableWinningBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/nonBillableWinningBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListNonBillableWinningBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsBidMetricsResource get bidMetrics =>
BiddersFilterSetsBidMetricsResource(_requester);
BiddersFilterSetsBidResponseErrorsResource get bidResponseErrors =>
BiddersFilterSetsBidResponseErrorsResource(_requester);
BiddersFilterSetsBidResponsesWithoutBidsResource
get bidResponsesWithoutBids =>
BiddersFilterSetsBidResponsesWithoutBidsResource(_requester);
BiddersFilterSetsFilteredBidRequestsResource get filteredBidRequests =>
BiddersFilterSetsFilteredBidRequestsResource(_requester);
BiddersFilterSetsFilteredBidsResource get filteredBids =>
BiddersFilterSetsFilteredBidsResource(_requester);
BiddersFilterSetsImpressionMetricsResource get impressionMetrics =>
BiddersFilterSetsImpressionMetricsResource(_requester);
BiddersFilterSetsLosingBidsResource get losingBids =>
BiddersFilterSetsLosingBidsResource(_requester);
BiddersFilterSetsNonBillableWinningBidsResource get nonBillableWinningBids =>
BiddersFilterSetsNonBillableWinningBidsResource(_requester);
BiddersFilterSetsResource(commons.ApiRequester client) : _requester = client;
/// Creates the specified filter set for the account with the given account
/// ID.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [ownerName] - Name of the owner (bidder or account) of the filter set to
/// be created. For example: - For a bidder-level filter set for bidder 123:
/// `bidders/123` - For an account-level filter set for the buyer account
/// representing bidder 123: `bidders/123/accounts/123` - For an account-level
/// filter set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456`
/// Value must have pattern `^bidders/\[^/\]+$`.
///
/// [isTransient] - Whether the filter set is transient, or should be
/// persisted indefinitely. By default, filter sets are not transient. If
/// transient, it will be available for at least 1 hour after creation.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [FilterSet].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<FilterSet> create(
FilterSet request,
core.String ownerName, {
core.bool? isTransient,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'isTransient': ?isTransient == null ? null : ['${isTransient}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$ownerName') + '/filterSets';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return FilterSet.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes the requested filter set from the account with the given account
/// ID.
///
/// Request parameters:
///
/// [name] - Full name of the resource to delete. For example: - For a
/// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For
/// an account-level filter set for the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> delete(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Retrieves the requested filter set for the account with the given account
/// ID.
///
/// Request parameters:
///
/// [name] - Full name of the resource being requested. For example: - For a
/// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For
/// an account-level filter set for the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [FilterSet].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<FilterSet> get(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return FilterSet.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists all filter sets for the account with the given account ID.
///
/// Request parameters:
///
/// [ownerName] - Name of the owner (bidder or account) of the filter sets to
/// be listed. For example: - For a bidder-level filter set for bidder 123:
/// `bidders/123` - For an account-level filter set for the buyer account
/// representing bidder 123: `bidders/123/accounts/123` - For an account-level
/// filter set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456`
/// Value must have pattern `^bidders/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilterSetsResponse.nextPageToken returned from the previous call to
/// the accounts.filterSets.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilterSetsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilterSetsResponse> list(
core.String ownerName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$ownerName') + '/filterSets';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilterSetsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsBidMetricsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsBidMetricsResource(commons.ApiRequester client)
: _requester = client;
/// Lists all metrics that are measured in terms of number of bids.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidMetricsResponse.nextPageToken returned from the previous call to
/// the bidMetrics.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidMetricsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidMetricsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/bidMetrics';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidMetricsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsBidResponseErrorsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsBidResponseErrorsResource(commons.ApiRequester client)
: _requester = client;
/// List all errors that occurred in bid responses, with the number of bid
/// responses affected for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidResponseErrorsResponse.nextPageToken returned from the previous
/// call to the bidResponseErrors.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidResponseErrorsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidResponseErrorsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/bidResponseErrors';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidResponseErrorsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsBidResponsesWithoutBidsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsBidResponsesWithoutBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which bid responses were considered to have no
/// applicable bids, with the number of bid responses affected for each
/// reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the
/// previous call to the bidResponsesWithoutBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidResponsesWithoutBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidResponsesWithoutBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/bidResponsesWithoutBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidResponsesWithoutBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsFilteredBidRequestsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsFilteredBidRequestsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons that caused a bid request not to be sent for an
/// impression, with the number of bid requests not sent for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilteredBidRequestsResponse.nextPageToken returned from the previous
/// call to the filteredBidRequests.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilteredBidRequestsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilteredBidRequestsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBidRequests';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilteredBidRequestsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsFilteredBidsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsFilteredBidsCreativesResource get creatives =>
BiddersFilterSetsFilteredBidsCreativesResource(_requester);
BiddersFilterSetsFilteredBidsDetailsResource get details =>
BiddersFilterSetsFilteredBidsDetailsResource(_requester);
BiddersFilterSetsFilteredBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which bids were filtered, with the number of bids
/// filtered for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilteredBidsResponse.nextPageToken returned from the previous call to
/// the filteredBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilteredBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilteredBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/filteredBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilteredBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsFilteredBidsCreativesResource {
final commons.ApiRequester _requester;
BiddersFilterSetsFilteredBidsCreativesResource(commons.ApiRequester client)
: _requester = client;
/// List all creatives associated with a specific reason for which bids were
/// filtered, with the number of bids filtered for each creative.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [creativeStatusId] - The ID of the creative status for which to retrieve a
/// breakdown by creative. See
/// \[creative-status-codes\](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from
/// the previous call to the filteredBids.creatives.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCreativeStatusBreakdownByCreativeResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCreativeStatusBreakdownByCreativeResponse> list(
core.String filterSetName,
core.int creativeStatusId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBids/' +
commons.escapeVariable('$creativeStatusId') +
'/creatives';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCreativeStatusBreakdownByCreativeResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsFilteredBidsDetailsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsFilteredBidsDetailsResource(commons.ApiRequester client)
: _requester = client;
/// List all details associated with a specific reason for which bids were
/// filtered, with the number of bids filtered for each detail.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [creativeStatusId] - The ID of the creative status for which to retrieve a
/// breakdown by detail. See
/// \[creative-status-codes\](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
/// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and
/// 87.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from
/// the previous call to the filteredBids.details.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCreativeStatusBreakdownByDetailResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCreativeStatusBreakdownByDetailResponse> list(
core.String filterSetName,
core.int creativeStatusId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBids/' +
commons.escapeVariable('$creativeStatusId') +
'/details';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCreativeStatusBreakdownByDetailResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsImpressionMetricsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsImpressionMetricsResource(commons.ApiRequester client)
: _requester = client;
/// Lists all metrics that are measured in terms of number of impressions.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListImpressionMetricsResponse.nextPageToken returned from the previous
/// call to the impressionMetrics.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListImpressionMetricsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListImpressionMetricsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/impressionMetrics';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListImpressionMetricsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsLosingBidsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsLosingBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which bids lost in the auction, with the number of
/// bids that lost for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListLosingBidsResponse.nextPageToken returned from the previous call to
/// the losingBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListLosingBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListLosingBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/losingBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListLosingBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BiddersFilterSetsNonBillableWinningBidsResource {
final commons.ApiRequester _requester;
BiddersFilterSetsNonBillableWinningBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which winning bids were not billable, with the number
/// of bids not billed for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^bidders/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListNonBillableWinningBidsResponse.nextPageToken returned from the
/// previous call to the nonBillableWinningBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListNonBillableWinningBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListNonBillableWinningBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/nonBillableWinningBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListNonBillableWinningBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersResource {
final commons.ApiRequester _requester;
BuyersFilterSetsResource get filterSets =>
BuyersFilterSetsResource(_requester);
BuyersResource(commons.ApiRequester client) : _requester = client;
}
class BuyersFilterSetsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsBidMetricsResource get bidMetrics =>
BuyersFilterSetsBidMetricsResource(_requester);
BuyersFilterSetsBidResponseErrorsResource get bidResponseErrors =>
BuyersFilterSetsBidResponseErrorsResource(_requester);
BuyersFilterSetsBidResponsesWithoutBidsResource get bidResponsesWithoutBids =>
BuyersFilterSetsBidResponsesWithoutBidsResource(_requester);
BuyersFilterSetsFilteredBidRequestsResource get filteredBidRequests =>
BuyersFilterSetsFilteredBidRequestsResource(_requester);
BuyersFilterSetsFilteredBidsResource get filteredBids =>
BuyersFilterSetsFilteredBidsResource(_requester);
BuyersFilterSetsImpressionMetricsResource get impressionMetrics =>
BuyersFilterSetsImpressionMetricsResource(_requester);
BuyersFilterSetsLosingBidsResource get losingBids =>
BuyersFilterSetsLosingBidsResource(_requester);
BuyersFilterSetsNonBillableWinningBidsResource get nonBillableWinningBids =>
BuyersFilterSetsNonBillableWinningBidsResource(_requester);
BuyersFilterSetsResource(commons.ApiRequester client) : _requester = client;
/// Creates the specified filter set for the account with the given account
/// ID.
///
/// [request] - The metadata request object.
///
/// Request parameters:
///
/// [ownerName] - Name of the owner (bidder or account) of the filter set to
/// be created. For example: - For a bidder-level filter set for bidder 123:
/// `bidders/123` - For an account-level filter set for the buyer account
/// representing bidder 123: `bidders/123/accounts/123` - For an account-level
/// filter set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456`
/// Value must have pattern `^buyers/\[^/\]+$`.
///
/// [isTransient] - Whether the filter set is transient, or should be
/// persisted indefinitely. By default, filter sets are not transient. If
/// transient, it will be available for at least 1 hour after creation.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [FilterSet].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<FilterSet> create(
FilterSet request,
core.String ownerName, {
core.bool? isTransient,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
'isTransient': ?isTransient == null ? null : ['${isTransient}'],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$ownerName') + '/filterSets';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return FilterSet.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Deletes the requested filter set from the account with the given account
/// ID.
///
/// Request parameters:
///
/// [name] - Full name of the resource to delete. For example: - For a
/// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For
/// an account-level filter set for the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [Empty].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<Empty> delete(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Retrieves the requested filter set for the account with the given account
/// ID.
///
/// Request parameters:
///
/// [name] - Full name of the resource being requested. For example: - For a
/// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For
/// an account-level filter set for the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [FilterSet].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<FilterSet> get(core.String name, {core.String? $fields}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return FilterSet.fromJson(response_ as core.Map<core.String, core.dynamic>);
}
/// Lists all filter sets for the account with the given account ID.
///
/// Request parameters:
///
/// [ownerName] - Name of the owner (bidder or account) of the filter sets to
/// be listed. For example: - For a bidder-level filter set for bidder 123:
/// `bidders/123` - For an account-level filter set for the buyer account
/// representing bidder 123: `bidders/123/accounts/123` - For an account-level
/// filter set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456`
/// Value must have pattern `^buyers/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilterSetsResponse.nextPageToken returned from the previous call to
/// the accounts.filterSets.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilterSetsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilterSetsResponse> list(
core.String ownerName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v2beta1/' + core.Uri.encodeFull('$ownerName') + '/filterSets';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilterSetsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsBidMetricsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsBidMetricsResource(commons.ApiRequester client)
: _requester = client;
/// Lists all metrics that are measured in terms of number of bids.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidMetricsResponse.nextPageToken returned from the previous call to
/// the bidMetrics.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidMetricsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidMetricsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/bidMetrics';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidMetricsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsBidResponseErrorsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsBidResponseErrorsResource(commons.ApiRequester client)
: _requester = client;
/// List all errors that occurred in bid responses, with the number of bid
/// responses affected for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidResponseErrorsResponse.nextPageToken returned from the previous
/// call to the bidResponseErrors.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidResponseErrorsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidResponseErrorsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/bidResponseErrors';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidResponseErrorsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsBidResponsesWithoutBidsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsBidResponsesWithoutBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which bid responses were considered to have no
/// applicable bids, with the number of bid responses affected for each
/// reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the
/// previous call to the bidResponsesWithoutBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListBidResponsesWithoutBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListBidResponsesWithoutBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/bidResponsesWithoutBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListBidResponsesWithoutBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsFilteredBidRequestsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsFilteredBidRequestsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons that caused a bid request not to be sent for an
/// impression, with the number of bid requests not sent for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilteredBidRequestsResponse.nextPageToken returned from the previous
/// call to the filteredBidRequests.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilteredBidRequestsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilteredBidRequestsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBidRequests';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilteredBidRequestsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsFilteredBidsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsFilteredBidsCreativesResource get creatives =>
BuyersFilterSetsFilteredBidsCreativesResource(_requester);
BuyersFilterSetsFilteredBidsDetailsResource get details =>
BuyersFilterSetsFilteredBidsDetailsResource(_requester);
BuyersFilterSetsFilteredBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which bids were filtered, with the number of bids
/// filtered for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListFilteredBidsResponse.nextPageToken returned from the previous call to
/// the filteredBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListFilteredBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListFilteredBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/filteredBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListFilteredBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsFilteredBidsCreativesResource {
final commons.ApiRequester _requester;
BuyersFilterSetsFilteredBidsCreativesResource(commons.ApiRequester client)
: _requester = client;
/// List all creatives associated with a specific reason for which bids were
/// filtered, with the number of bids filtered for each creative.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [creativeStatusId] - The ID of the creative status for which to retrieve a
/// breakdown by creative. See
/// \[creative-status-codes\](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from
/// the previous call to the filteredBids.creatives.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCreativeStatusBreakdownByCreativeResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCreativeStatusBreakdownByCreativeResponse> list(
core.String filterSetName,
core.int creativeStatusId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBids/' +
commons.escapeVariable('$creativeStatusId') +
'/creatives';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCreativeStatusBreakdownByCreativeResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsFilteredBidsDetailsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsFilteredBidsDetailsResource(commons.ApiRequester client)
: _requester = client;
/// List all details associated with a specific reason for which bids were
/// filtered, with the number of bids filtered for each detail.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [creativeStatusId] - The ID of the creative status for which to retrieve a
/// breakdown by detail. See
/// \[creative-status-codes\](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
/// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and
/// 87.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from
/// the previous call to the filteredBids.details.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListCreativeStatusBreakdownByDetailResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListCreativeStatusBreakdownByDetailResponse> list(
core.String filterSetName,
core.int creativeStatusId, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/filteredBids/' +
commons.escapeVariable('$creativeStatusId') +
'/details';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListCreativeStatusBreakdownByDetailResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsImpressionMetricsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsImpressionMetricsResource(commons.ApiRequester client)
: _requester = client;
/// Lists all metrics that are measured in terms of number of impressions.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListImpressionMetricsResponse.nextPageToken returned from the previous
/// call to the impressionMetrics.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListImpressionMetricsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListImpressionMetricsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/impressionMetrics';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListImpressionMetricsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsLosingBidsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsLosingBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which bids lost in the auction, with the number of
/// bids that lost for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListLosingBidsResponse.nextPageToken returned from the previous call to
/// the losingBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListLosingBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListLosingBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' + core.Uri.encodeFull('$filterSetName') + '/losingBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListLosingBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
class BuyersFilterSetsNonBillableWinningBidsResource {
final commons.ApiRequester _requester;
BuyersFilterSetsNonBillableWinningBidsResource(commons.ApiRequester client)
: _requester = client;
/// List all reasons for which winning bids were not billable, with the number
/// of bids not billed for each reason.
///
/// Request parameters:
///
/// [filterSetName] - Name of the filter set that should be applied to the
/// requested metrics. For example: - For a bidder-level filter set for bidder
/// 123: `bidders/123/filterSets/abc` - For an account-level filter set for
/// the buyer account representing bidder 123:
/// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter
/// set for the child seat buyer account 456 whose bidder is 123:
/// `bidders/123/accounts/456/filterSets/abc`
/// Value must have pattern `^buyers/\[^/\]+/filterSets/\[^/\]+$`.
///
/// [pageSize] - Requested page size. The server may return fewer results than
/// requested. If unspecified, the server will pick an appropriate default.
///
/// [pageToken] - A token identifying a page of results the server should
/// return. Typically, this is the value of
/// ListNonBillableWinningBidsResponse.nextPageToken returned from the
/// previous call to the nonBillableWinningBids.list method.
///
/// [$fields] - Selector specifying which fields to include in a partial
/// response.
///
/// Completes with a [ListNonBillableWinningBidsResponse].
///
/// Completes with a [commons.ApiRequestError] if the API endpoint returned an
/// error.
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
async.Future<ListNonBillableWinningBidsResponse> list(
core.String filterSetName, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v2beta1/' +
core.Uri.encodeFull('$filterSetName') +
'/nonBillableWinningBids';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListNonBillableWinningBidsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}
}
/// An absolute date range, specified by its start date and end date.
///
/// The supported range of dates begins 30 days before today and ends today.
/// Validity checked upon filter set creation. If a filter set with an absolute
/// date range is run at a later date more than 30 days after start_date, it
/// will fail.
class AbsoluteDateRange {
/// The end date of the range (inclusive).
///
/// Must be within the 30 days leading up to current date, and must be equal
/// to or after start_date.
Date? endDate;
/// The start date of the range (inclusive).
///
/// Must be within the 30 days leading up to current date, and must be equal
/// to or before end_date.
Date? startDate;
AbsoluteDateRange({this.endDate, this.startDate});
AbsoluteDateRange.fromJson(core.Map json_)
: this(
endDate: json_.containsKey('endDate')
? Date.fromJson(
json_['endDate'] as core.Map<core.String, core.dynamic>,
)
: null,
startDate: json_.containsKey('startDate')
? Date.fromJson(
json_['startDate'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final endDate = this.endDate;
final startDate = this.startDate;
return {'endDate': ?endDate, 'startDate': ?startDate};
}
}
/// Request to accept a proposal.
class AcceptProposalRequest {
/// The last known client revision number of the proposal.
core.String? proposalRevision;
AcceptProposalRequest({this.proposalRevision});
AcceptProposalRequest.fromJson(core.Map json_)
: this(proposalRevision: json_['proposalRevision'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final proposalRevision = this.proposalRevision;
return {'proposalRevision': ?proposalRevision};
}
}
/// Represents size of a single ad slot, or a creative.
class AdSize {
/// The height of the ad slot in pixels.
///
/// This field will be present only when size type is `PIXEL`.
core.String? height;
/// The size type of the ad slot.
/// Possible string values are:
/// - "SIZE_TYPE_UNSPECIFIED" : A placeholder for an undefined size type.
/// - "PIXEL" : Ad slot with size specified by height and width in pixels.
/// - "INTERSTITIAL" : Special size to describe an interstitial ad slot.
/// - "NATIVE" : Native (mobile) ads rendered by the publisher.
/// - "FLUID" : Fluid size (for example, responsive size) can be resized
/// automatically with the change of outside environment.
core.String? sizeType;
/// The width of the ad slot in pixels.
///
/// This field will be present only when size type is `PIXEL`.
core.String? width;
AdSize({this.height, this.sizeType, this.width});
AdSize.fromJson(core.Map json_)
: this(
height: json_['height'] as core.String?,
sizeType: json_['sizeType'] as core.String?,
width: json_['width'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final height = this.height;
final sizeType = this.sizeType;
final width = this.width;
return {'height': ?height, 'sizeType': ?sizeType, 'width': ?width};
}
}
/// Detected ad technology provider information.
class AdTechnologyProviders {
/// The detected ad technology provider IDs for this creative.
///
/// See https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for
/// mapping of provider ID to provided name, a privacy policy URL, and a list
/// of domains which can be attributed to the provider. If the creative
/// contains provider IDs that are outside of those listed in the
/// `BidRequest.adslot.consented_providers_settings.consented_providers` field
/// on the (Google bid
/// protocol)\[https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto\]
/// and the
/// `BidRequest.user.ext.consented_providers_settings.consented_providers`
/// field on the (OpenRTB
/// protocol)\[https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-adx-proto\],
/// and a bid is submitted with that creative for an impression that will
/// serve to an EEA user, the bid will be filtered before the auction.
core.List<core.String>? detectedProviderIds;
/// Whether the creative contains an unidentified ad technology provider.
///
/// If true for a given creative, any bid submitted with that creative for an
/// impression that will serve to an EEA user will be filtered before the
/// auction.
core.bool? hasUnidentifiedProvider;
AdTechnologyProviders({
this.detectedProviderIds,
this.hasUnidentifiedProvider,
});
AdTechnologyProviders.fromJson(core.Map json_)
: this(
detectedProviderIds: (json_['detectedProviderIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
hasUnidentifiedProvider: json_['hasUnidentifiedProvider'] as core.bool?,
);
core.Map<core.String, core.dynamic> toJson() {
final detectedProviderIds = this.detectedProviderIds;
final hasUnidentifiedProvider = this.hasUnidentifiedProvider;
return {
'detectedProviderIds': ?detectedProviderIds,
'hasUnidentifiedProvider': ?hasUnidentifiedProvider,
};
}
}
/// A request for associating a deal and a creative.
class AddDealAssociationRequest {
/// The association between a creative and a deal that should be added.
CreativeDealAssociation? association;
AddDealAssociationRequest({this.association});
AddDealAssociationRequest.fromJson(core.Map json_)
: this(
association: json_.containsKey('association')
? CreativeDealAssociation.fromJson(
json_['association'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final association = this.association;
return {'association': ?association};
}
}
/// Request message for adding a note to a given proposal.
class AddNoteRequest {
/// Details of the note to add.
Note? note;
AddNoteRequest({this.note});
AddNoteRequest.fromJson(core.Map json_)
: this(
note: json_.containsKey('note')
? Note.fromJson(
json_['note'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final note = this.note;
return {'note': ?note};
}
}
/// The app type the restriction applies to for mobile device.
///
/// Output only.
class AppContext {
/// The app types this restriction applies to.
core.List<core.String>? appTypes;
AppContext({this.appTypes});
AppContext.fromJson(core.Map json_)
: this(
appTypes: (json_['appTypes'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final appTypes = this.appTypes;
return {'appTypes': ?appTypes};
}
}
/// The auction type the restriction applies to.
///
/// Output only.
class AuctionContext {
/// The auction types this restriction applies to.
core.List<core.String>? auctionTypes;
AuctionContext({this.auctionTypes});
AuctionContext.fromJson(core.Map json_)
: this(
auctionTypes: (json_['auctionTypes'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final auctionTypes = this.auctionTypes;
return {'auctionTypes': ?auctionTypes};
}
}
/// The set of metrics that are measured in numbers of bids, representing how
/// many bids with the specified dimension values were considered eligible at
/// each stage of the bidding funnel;
class BidMetricsRow {
/// The number of bids that Ad Exchange received from the buyer.
MetricValue? bids;
/// The number of bids that were permitted to compete in the auction.
MetricValue? bidsInAuction;
/// The number of bids for which the buyer was billed.
///
/// Also called valid impressions as invalid impressions are not billed.
MetricValue? billedImpressions;
/// The number of bids that won the auction.
MetricValue? impressionsWon;
/// The number of bids for which the corresponding impression was measurable
/// for viewability (as defined by Active View).
MetricValue? measurableImpressions;
/// The number of bids that won the auction and also won the mediation
/// waterfall (if any).
MetricValue? reachedQueries;
/// The values of all dimensions associated with metric values in this row.
RowDimensions? rowDimensions;
/// The number of bids for which the corresponding impression was viewable (as
/// defined by Active View).
MetricValue? viewableImpressions;
BidMetricsRow({
this.bids,
this.bidsInAuction,
this.billedImpressions,
this.impressionsWon,
this.measurableImpressions,
this.reachedQueries,
this.rowDimensions,
this.viewableImpressions,
});
BidMetricsRow.fromJson(core.Map json_)
: this(
bids: json_.containsKey('bids')
? MetricValue.fromJson(
json_['bids'] as core.Map<core.String, core.dynamic>,
)
: null,
bidsInAuction: json_.containsKey('bidsInAuction')
? MetricValue.fromJson(
json_['bidsInAuction'] as core.Map<core.String, core.dynamic>,
)
: null,
billedImpressions: json_.containsKey('billedImpressions')
? MetricValue.fromJson(
json_['billedImpressions']
as core.Map<core.String, core.dynamic>,
)
: null,
impressionsWon: json_.containsKey('impressionsWon')
? MetricValue.fromJson(
json_['impressionsWon'] as core.Map<core.String, core.dynamic>,
)
: null,
measurableImpressions: json_.containsKey('measurableImpressions')
? MetricValue.fromJson(
json_['measurableImpressions']
as core.Map<core.String, core.dynamic>,
)
: null,
reachedQueries: json_.containsKey('reachedQueries')
? MetricValue.fromJson(
json_['reachedQueries'] as core.Map<core.String, core.dynamic>,
)
: null,
rowDimensions: json_.containsKey('rowDimensions')
? RowDimensions.fromJson(
json_['rowDimensions'] as core.Map<core.String, core.dynamic>,
)
: null,
viewableImpressions: json_.containsKey('viewableImpressions')
? MetricValue.fromJson(
json_['viewableImpressions']
as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final bids = this.bids;
final bidsInAuction = this.bidsInAuction;
final billedImpressions = this.billedImpressions;
final impressionsWon = this.impressionsWon;
final measurableImpressions = this.measurableImpressions;
final reachedQueries = this.reachedQueries;
final rowDimensions = this.rowDimensions;
final viewableImpressions = this.viewableImpressions;
return {
'bids': ?bids,
'bidsInAuction': ?bidsInAuction,
'billedImpressions': ?billedImpressions,
'impressionsWon': ?impressionsWon,
'measurableImpressions': ?measurableImpressions,
'reachedQueries': ?reachedQueries,
'rowDimensions': ?rowDimensions,
'viewableImpressions': ?viewableImpressions,
};
}
}
/// The number of impressions with the specified dimension values that were
/// considered to have no applicable bids, as described by the specified status.
class BidResponseWithoutBidsStatusRow {
/// The number of impressions for which there was a bid response with the
/// specified status.
MetricValue? impressionCount;
/// The values of all dimensions associated with metric values in this row.
RowDimensions? rowDimensions;
/// The status specifying why the bid responses were considered to have no
/// applicable bids.
/// Possible string values are:
/// - "STATUS_UNSPECIFIED" : A placeholder for an undefined status. This value
/// will never be returned in responses.
/// - "RESPONSES_WITHOUT_BIDS" : The response had no bids.
/// - "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT" : The response had no bids for the
/// specified account, though it may have included bids on behalf of other
/// accounts. Applies if: 1. Request is on behalf of a bidder and an account
/// filter is present. 2. Request is on behalf of a child seat.
/// - "RESPONSES_WITHOUT_BIDS_FOR_DEAL" : The response had no bids for the
/// specified deal, though it may have included bids on other deals on behalf
/// of the account to which the deal belongs. If request is on behalf of a
/// bidder and an account filter is not present, this also includes responses
/// that have bids on behalf of accounts other than the account to which the
/// deal belongs.
core.String? status;
BidResponseWithoutBidsStatusRow({
this.impressionCount,
this.rowDimensions,
this.status,
});
BidResponseWithoutBidsStatusRow.fromJson(core.Map json_)
: this(
impressionCount: json_.containsKey('impressionCount')
? MetricValue.fromJson(
json_['impressionCount'] as core.Map<core.String, core.dynamic>,
)
: null,
rowDimensions: json_.containsKey('rowDimensions')
? RowDimensions.fromJson(
json_['rowDimensions'] as core.Map<core.String, core.dynamic>,
)
: null,
status: json_['status'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final impressionCount = this.impressionCount;
final rowDimensions = this.rowDimensions;
final status = this.status;
return {
'impressionCount': ?impressionCount,
'rowDimensions': ?rowDimensions,
'status': ?status,
};
}
}
/// Represents a buyer of inventory.
///
/// Each buyer is identified by a unique Authorized Buyers account ID.
class Buyer {
/// Authorized Buyers account ID of the buyer.
core.String? accountId;
Buyer({this.accountId});
Buyer.fromJson(core.Map json_)
: this(accountId: json_['accountId'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final accountId = this.accountId;
return {'accountId': ?accountId};
}
}
/// The number of impressions with the specified dimension values where the
/// corresponding bid request or bid response was not successful, as described
/// by the specified callout status.
class CalloutStatusRow {
/// The ID of the callout status.
///
/// See
/// \[callout-status-codes\](https://developers.google.com/authorized-buyers/rtb/downloads/callout-status-codes).
core.int? calloutStatusId;
/// The number of impressions for which there was a bid request or bid
/// response with the specified callout status.
MetricValue? impressionCount;
/// The values of all dimensions associated with metric values in this row.
RowDimensions? rowDimensions;
CalloutStatusRow({
this.calloutStatusId,
this.impressionCount,
this.rowDimensions,
});
CalloutStatusRow.fromJson(core.Map json_)
: this(
calloutStatusId: json_['calloutStatusId'] as core.int?,
impressionCount: json_.containsKey('impressionCount')
? MetricValue.fromJson(
json_['impressionCount'] as core.Map<core.String, core.dynamic>,
)
: null,
rowDimensions: json_.containsKey('rowDimensions')
? RowDimensions.fromJson(
json_['rowDimensions'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final calloutStatusId = this.calloutStatusId;
final impressionCount = this.impressionCount;
final rowDimensions = this.rowDimensions;
return {
'calloutStatusId': ?calloutStatusId,
'impressionCount': ?impressionCount,
'rowDimensions': ?rowDimensions,
};
}
}
/// Request to cancel an ongoing negotiation.
typedef CancelNegotiationRequest = $Empty;
/// A client resource represents a client buyer—an agency, a brand, or an
/// advertiser customer of the sponsor buyer.
///
/// Users associated with the client buyer have restricted access to the
/// Marketplace and certain other sections of the Authorized Buyers UI based on
/// the role granted to the client buyer. All fields are required unless
/// otherwise specified.
class Client {
/// The globally-unique numerical ID of the client.
///
/// The value of this field is ignored in create and update operations.
core.String? clientAccountId;
/// Name used to represent this client to publishers.
///
/// You may have multiple clients that map to the same entity, but for each
/// client the combination of `clientName` and entity must be unique. You can
/// specify this field as empty. Maximum length of 255 characters is allowed.
core.String? clientName;
/// Numerical identifier of the client entity.
///
/// The entity can be an advertiser, a brand, or an agency. This identifier is
/// unique among all the entities with the same type. The value of this field
/// is ignored if the entity type is not provided. A list of all known
/// advertisers with their identifiers is available in the
/// [advertisers.txt](https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt)
/// file. A list of all known brands with their identifiers is available in
/// the
/// [brands.txt](https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt)
/// file. A list of all known agencies with their identifiers is available in
/// the
/// [agencies.txt](https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt)
/// file.
core.String? entityId;
/// The name of the entity.
///
/// This field is automatically fetched based on the type and ID. The value of
/// this field is ignored in create and update operations.
core.String? entityName;
/// An optional field for specifying the type of the client entity:
/// `ADVERTISER`, `BRAND`, or `AGENCY`.
/// Possible string values are:
/// - "ENTITY_TYPE_UNSPECIFIED" : A placeholder for an undefined client entity
/// type. Should not be used.
/// - "ADVERTISER" : An advertiser.
/// - "BRAND" : A brand.
/// - "AGENCY" : An advertising agency.
/// - "ENTITY_TYPE_UNCLASSIFIED" : An explicit value for a client that was not
/// yet classified as any particular entity.
core.String? entityType;
/// Optional arbitrary unique identifier of this client buyer from the
/// standpoint of its Ad Exchange sponsor buyer.
///
/// This field can be used to associate a client buyer with the identifier in
/// the namespace of its sponsor buyer, lookup client buyers by that
/// identifier and verify whether an Ad Exchange counterpart of a given client
/// buyer already exists. If present, must be unique among all the client
/// buyers for its Ad Exchange sponsor buyer.
core.String? partnerClientId;
/// The role which is assigned to the client buyer.
///
/// Each role implies a set of permissions granted to the client. Must be one
/// of `CLIENT_DEAL_VIEWER`, `CLIENT_DEAL_NEGOTIATOR` or
/// `CLIENT_DEAL_APPROVER`.
/// Possible string values are:
/// - "CLIENT_ROLE_UNSPECIFIED" : A placeholder for an undefined client role.
/// - "CLIENT_DEAL_VIEWER" : Users associated with this client can see
/// publisher deal offers in the Marketplace. They can neither negotiate
/// proposals nor approve deals. If this client is visible to publishers, they
/// can send deal proposals to this client.
/// - "CLIENT_DEAL_NEGOTIATOR" : Users associated with this client can respond
/// to deal proposals sent to them by publishers. They can also initiate deal
/// proposals of their own.
/// - "CLIENT_DEAL_APPROVER" : Users associated with this client can approve
/// eligible deals on your behalf. Some deals may still explicitly require
/// publisher finalization. If this role is not selected, the sponsor buyer
/// will need to manually approve each of their deals.
core.String? role;
/// The status of the client buyer.
/// Possible string values are:
/// - "CLIENT_STATUS_UNSPECIFIED" : A placeholder for an undefined client
/// status.
/// - "DISABLED" : A client that is currently disabled.
/// - "ACTIVE" : A client that is currently active.
core.String? status;
/// Whether the client buyer will be visible to sellers.
core.bool? visibleToSeller;
Client({
this.clientAccountId,
this.clientName,
this.entityId,
this.entityName,
this.entityType,
this.partnerClientId,
this.role,
this.status,
this.visibleToSeller,
});
Client.fromJson(core.Map json_)
: this(
clientAccountId: json_['clientAccountId'] as core.String?,
clientName: json_['clientName'] as core.String?,
entityId: json_['entityId'] as core.String?,
entityName: json_['entityName'] as core.String?,
entityType: json_['entityType'] as core.String?,
partnerClientId: json_['partnerClientId'] as core.String?,
role: json_['role'] as core.String?,
status: json_['status'] as core.String?,
visibleToSeller: json_['visibleToSeller'] as core.bool?,
);
core.Map<core.String, core.dynamic> toJson() {
final clientAccountId = this.clientAccountId;
final clientName = this.clientName;
final entityId = this.entityId;
final entityName = this.entityName;
final entityType = this.entityType;
final partnerClientId = this.partnerClientId;
final role = this.role;
final status = this.status;
final visibleToSeller = this.visibleToSeller;
return {
'clientAccountId': ?clientAccountId,
'clientName': ?clientName,
'entityId': ?entityId,
'entityName': ?entityName,
'entityType': ?entityType,
'partnerClientId': ?partnerClientId,
'role': ?role,
'status': ?status,
'visibleToSeller': ?visibleToSeller,
};
}
}
/// A client user is created under a client buyer and has restricted access to
/// the Marketplace and certain other sections of the Authorized Buyers UI based
/// on the role granted to the associated client buyer.
///
/// The only way a new client user can be created is through accepting an email
/// invitation (see the accounts.clients.invitations.create method). All fields
/// are required unless otherwise specified.
class ClientUser {
/// Numerical account ID of the client buyer with which the user is
/// associated; the buyer must be a client of the current sponsor buyer.
///
/// The value of this field is ignored in an update operation.
core.String? clientAccountId;
/// User's email address.
///
/// The value of this field is ignored in an update operation.
core.String? email;
/// The status of the client user.
/// Possible string values are:
/// - "USER_STATUS_UNSPECIFIED" : A placeholder for an undefined user status.
/// - "PENDING" : A user who was already created but hasn't accepted the
/// invitation yet.
/// - "ACTIVE" : A user that is currently active.
/// - "DISABLED" : A user that is currently disabled.
core.String? status;
/// The unique numerical ID of the client user that has accepted an
/// invitation.
///
/// The value of this field is ignored in an update operation.
core.String? userId;
ClientUser({this.clientAccountId, this.email, this.status, this.userId});
ClientUser.fromJson(core.Map json_)
: this(
clientAccountId: json_['clientAccountId'] as core.String?,
email: json_['email'] as core.String?,
status: json_['status'] as core.String?,
userId: json_['userId'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final clientAccountId = this.clientAccountId;
final email = this.email;
final status = this.status;
final userId = this.userId;
return {
'clientAccountId': ?clientAccountId,
'email': ?email,
'status': ?status,
'userId': ?userId,
};
}
}
/// An invitation for a new client user to get access to the Authorized Buyers
/// UI.
///
/// All fields are required unless otherwise specified.
class ClientUserInvitation {
/// Numerical account ID of the client buyer that the invited user is
/// associated with.
///
/// The value of this field is ignored in create operations.
core.String? clientAccountId;
/// The email address to which the invitation is sent.
///
/// Email addresses should be unique among all client users under each sponsor
/// buyer.
core.String? email;
/// The unique numerical ID of the invitation that is sent to the user.
///
/// The value of this field is ignored in create operations.
core.String? invitationId;
ClientUserInvitation({this.clientAccountId, this.email, this.invitationId});
ClientUserInvitation.fromJson(core.Map json_)
: this(
clientAccountId: json_['clientAccountId'] as core.String?,
email: json_['email'] as core.String?,
invitationId: json_['invitationId'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final clientAccountId = this.clientAccountId;
final email = this.email;
final invitationId = this.invitationId;
return {
'clientAccountId': ?clientAccountId,
'email': ?email,
'invitationId': ?invitationId,
};
}
}
/// Request message for indicating that the proposal's setup step is complete.
typedef CompleteSetupRequest = $Empty;
/// Contains information on how a buyer or seller can be reached.
class ContactInformation {
/// Email address for the contact.
core.String? email;
/// The name of the contact.
core.String? name;
ContactInformation({this.email, this.name});
ContactInformation.fromJson(core.Map json_)
: this(
email: json_['email'] as core.String?,
name: json_['name'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final email = this.email;
final name = this.name;
return {'email': ?email, 'name': ?name};
}
}
/// Shows any corrections that were applied to this creative.
///
/// Output only.
class Correction {
/// The contexts for the correction.
core.List<ServingContext>? contexts;
/// Additional details about what was corrected.
core.List<core.String>? details;
/// The type of correction that was applied to the creative.
/// Possible string values are:
/// - "CORRECTION_TYPE_UNSPECIFIED" : The correction type is unknown. Refer to
/// the details for more information.
/// - "VENDOR_IDS_ADDED" : The ad's declared vendors did not match the vendors
/// that were detected. The detected vendors were added.
/// - "SSL_ATTRIBUTE_REMOVED" : The ad had the SSL attribute declared but was
/// not SSL-compliant. The SSL attribute was removed.
/// - "FLASH_FREE_ATTRIBUTE_REMOVED" : The ad was declared as Flash-free but
/// contained Flash, so the Flash-free attribute was removed.
/// - "FLASH_FREE_ATTRIBUTE_ADDED" : The ad was not declared as Flash-free but
/// it did not reference any flash content, so the Flash-free attribute was
/// added.
/// - "REQUIRED_ATTRIBUTE_ADDED" : The ad did not declare a required creative
/// attribute. The attribute was added.
/// - "REQUIRED_VENDOR_ADDED" : The ad did not declare a required technology
/// vendor. The technology vendor was added.
/// - "SSL_ATTRIBUTE_ADDED" : The ad did not declare the SSL attribute but was
/// SSL-compliant, so the SSL attribute was added.
/// - "IN_BANNER_VIDEO_ATTRIBUTE_ADDED" : Properties consistent with In-banner
/// video were found, so an In-Banner Video attribute was added.
/// - "MRAID_ATTRIBUTE_ADDED" : The ad makes calls to the MRAID API so the
/// MRAID attribute was added.
/// - "FLASH_ATTRIBUTE_REMOVED" : The ad unnecessarily declared the Flash
/// attribute, so the Flash attribute was removed.
/// - "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" : The ad contains video content.
core.String? type;
Correction({this.contexts, this.details, this.type});
Correction.fromJson(core.Map json_)
: this(
contexts: (json_['contexts'] as core.List?)
?.map(
(value) => ServingContext.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
details: (json_['details'] as core.List?)
?.map((value) => value as core.String)
.toList(),
type: json_['type'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final contexts = this.contexts;
final details = this.details;
final type = this.type;
return {'contexts': ?contexts, 'details': ?details, 'type': ?type};
}
}
/// A creative and its classification data.
class Creative {
/// The account that this creative belongs to.
///
/// Can be used to filter the response of the creatives.list method.
core.String? accountId;
/// The link to AdChoices destination page.
core.String? adChoicesDestinationUrl;
/// The detected ad technology providers.
///
/// Output only.
AdTechnologyProviders? adTechnologyProviders;
/// The name of the company being advertised in the creative.
core.String? advertiserName;
/// The agency ID for this creative.
core.String? agencyId;
/// The last update timestamp of the creative through the API.
///
/// Output only.
core.String? apiUpdateTime;
/// All attributes for the ads that may be shown from this creative.
///
/// Can be used to filter the response of the creatives.list method.
core.List<core.String>? attributes;
/// The set of destination URLs for the creative.
core.List<core.String>? clickThroughUrls;
/// Shows any corrections that were applied to this creative.
///
/// Output only.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.List<Correction>? corrections;
/// The buyer-defined creative ID of this creative.
///
/// Can be used to filter the response of the creatives.list method.
core.String? creativeId;
/// The top-level deals status of this creative.
///
/// If disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in
/// serving_restrictions will also exist. Note that this may be nuanced with
/// other contextual restrictions, in which case, it may be preferable to read
/// from serving_restrictions directly. Can be used to filter the response of
/// the creatives.list method.
///
/// Output only.
/// Possible string values are:
/// - "STATUS_UNSPECIFIED" : The status is unknown.
/// - "NOT_CHECKED" : The creative has not been checked.
/// - "CONDITIONALLY_APPROVED" : The creative has been conditionally approved.
/// See serving_restrictions for details.
/// - "APPROVED" : The creative has been approved.
/// - "DISAPPROVED" : The creative has been disapproved.
/// - "PENDING_REVIEW" : Placeholder for transition to v1beta1. Currently not
/// used.
/// - "STATUS_TYPE_UNSPECIFIED" : Placeholder for transition to v1beta1.
/// Currently not used.
core.String? dealsStatus;
/// The set of declared destination URLs for the creative.
core.List<core.String>? declaredClickThroughUrls;
/// Detected advertiser IDs, if any.
///
/// Output only.
core.List<core.String>? detectedAdvertiserIds;
/// The detected domains for this creative.
///
/// Output only.
core.List<core.String>? detectedDomains;
/// The detected languages for this creative.
///
/// The order is arbitrary. The codes are 2 or 5 characters and are documented
/// at https://developers.google.com/adwords/api/docs/appendix/languagecodes.
///
/// Output only.
core.List<core.String>? detectedLanguages;
/// Detected product categories, if any.
///
/// See the ad-product-categories.txt file in the technical documentation for
/// a list of IDs.
///
/// Output only.
core.List<core.int>? detectedProductCategories;
/// Detected sensitive categories, if any.
///
/// See the ad-sensitive-categories.txt file in the technical documentation
/// for a list of IDs. You should use these IDs along with the
/// excluded-sensitive-category field in the bid request to filter your bids.
///
/// Output only.
core.List<core.int>? detectedSensitiveCategories;
/// An HTML creative.
HtmlContent? html;
/// The set of URLs to be called to record an impression.
core.List<core.String>? impressionTrackingUrls;
/// A native creative.
NativeContent? native;
/// The top-level open auction status of this creative.
///
/// If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in
/// serving_restrictions will also exist. Note that this may be nuanced with
/// other contextual restrictions, in which case, it may be preferable to read
/// from serving_restrictions directly. Can be used to filter the response of
/// the creatives.list method.
///
/// Output only.
/// Possible string values are:
/// - "STATUS_UNSPECIFIED" : The status is unknown.
/// - "NOT_CHECKED" : The creative has not been checked.
/// - "CONDITIONALLY_APPROVED" : The creative has been conditionally approved.
/// See serving_restrictions for details.
/// - "APPROVED" : The creative has been approved.
/// - "DISAPPROVED" : The creative has been disapproved.
/// - "PENDING_REVIEW" : Placeholder for transition to v1beta1. Currently not
/// used.
/// - "STATUS_TYPE_UNSPECIFIED" : Placeholder for transition to v1beta1.
/// Currently not used.
core.String? openAuctionStatus;
/// All restricted categories for the ads that may be shown from this
/// creative.
core.List<core.String>? restrictedCategories;
/// The granular status of this ad in specific contexts.
///
/// A context here relates to where something ultimately serves (for example,
/// a physical location, a platform, an HTTPS versus HTTP request, or the type
/// of auction).
///
/// Output only.
core.List<ServingRestriction>? servingRestrictions;
/// All vendor IDs for the ads that may be shown from this creative.
///
/// See https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt for
/// possible values.
core.List<core.int>? vendorIds;
/// The version of this creative.
///
/// Output only.
core.int? version;
/// A video creative.
VideoContent? video;
Creative({
this.accountId,
this.adChoicesDestinationUrl,
this.adTechnologyProviders,
this.advertiserName,
this.agencyId,
this.apiUpdateTime,
this.attributes,
this.clickThroughUrls,
this.corrections,
this.creativeId,
this.dealsStatus,
this.declaredClickThroughUrls,
this.detectedAdvertiserIds,
this.detectedDomains,
this.detectedLanguages,
this.detectedProductCategories,
this.detectedSensitiveCategories,
this.html,
this.impressionTrackingUrls,
this.native,
this.openAuctionStatus,
this.restrictedCategories,
this.servingRestrictions,
this.vendorIds,
this.version,
this.video,
});
Creative.fromJson(core.Map json_)
: this(
accountId: json_['accountId'] as core.String?,
adChoicesDestinationUrl:
json_['adChoicesDestinationUrl'] as core.String?,
adTechnologyProviders: json_.containsKey('adTechnologyProviders')
? AdTechnologyProviders.fromJson(
json_['adTechnologyProviders']
as core.Map<core.String, core.dynamic>,
)
: null,
advertiserName: json_['advertiserName'] as core.String?,
agencyId: json_['agencyId'] as core.String?,
apiUpdateTime: json_['apiUpdateTime'] as core.String?,
attributes: (json_['attributes'] as core.List?)
?.map((value) => value as core.String)
.toList(),
clickThroughUrls: (json_['clickThroughUrls'] as core.List?)
?.map((value) => value as core.String)
.toList(),
corrections: (json_['corrections'] as core.List?)
?.map(
(value) => Correction.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
creativeId: json_['creativeId'] as core.String?,
dealsStatus: json_['dealsStatus'] as core.String?,
declaredClickThroughUrls:
(json_['declaredClickThroughUrls'] as core.List?)
?.map((value) => value as core.String)
.toList(),
detectedAdvertiserIds: (json_['detectedAdvertiserIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
detectedDomains: (json_['detectedDomains'] as core.List?)
?.map((value) => value as core.String)
.toList(),
detectedLanguages: (json_['detectedLanguages'] as core.List?)
?.map((value) => value as core.String)
.toList(),
detectedProductCategories:
(json_['detectedProductCategories'] as core.List?)
?.map((value) => value as core.int)
.toList(),
detectedSensitiveCategories:
(json_['detectedSensitiveCategories'] as core.List?)
?.map((value) => value as core.int)
.toList(),
html: json_.containsKey('html')
? HtmlContent.fromJson(
json_['html'] as core.Map<core.String, core.dynamic>,
)
: null,
impressionTrackingUrls: (json_['impressionTrackingUrls'] as core.List?)
?.map((value) => value as core.String)
.toList(),
native: json_.containsKey('native')
? NativeContent.fromJson(
json_['native'] as core.Map<core.String, core.dynamic>,
)
: null,
openAuctionStatus: json_['openAuctionStatus'] as core.String?,
restrictedCategories: (json_['restrictedCategories'] as core.List?)
?.map((value) => value as core.String)
.toList(),
servingRestrictions: (json_['servingRestrictions'] as core.List?)
?.map(
(value) => ServingRestriction.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
vendorIds: (json_['vendorIds'] as core.List?)
?.map((value) => value as core.int)
.toList(),
version: json_['version'] as core.int?,
video: json_.containsKey('video')
? VideoContent.fromJson(
json_['video'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final accountId = this.accountId;
final adChoicesDestinationUrl = this.adChoicesDestinationUrl;
final adTechnologyProviders = this.adTechnologyProviders;
final advertiserName = this.advertiserName;
final agencyId = this.agencyId;
final apiUpdateTime = this.apiUpdateTime;
final attributes = this.attributes;
final clickThroughUrls = this.clickThroughUrls;
final corrections = this.corrections;
final creativeId = this.creativeId;
final dealsStatus = this.dealsStatus;
final declaredClickThroughUrls = this.declaredClickThroughUrls;
final detectedAdvertiserIds = this.detectedAdvertiserIds;
final detectedDomains = this.detectedDomains;
final detectedLanguages = this.detectedLanguages;
final detectedProductCategories = this.detectedProductCategories;
final detectedSensitiveCategories = this.detectedSensitiveCategories;
final html = this.html;
final impressionTrackingUrls = this.impressionTrackingUrls;
final native = this.native;
final openAuctionStatus = this.openAuctionStatus;
final restrictedCategories = this.restrictedCategories;
final servingRestrictions = this.servingRestrictions;
final vendorIds = this.vendorIds;
final version = this.version;
final video = this.video;
return {
'accountId': ?accountId,
'adChoicesDestinationUrl': ?adChoicesDestinationUrl,
'adTechnologyProviders': ?adTechnologyProviders,
'advertiserName': ?advertiserName,
'agencyId': ?agencyId,
'apiUpdateTime': ?apiUpdateTime,
'attributes': ?attributes,
'clickThroughUrls': ?clickThroughUrls,
'corrections': ?corrections,
'creativeId': ?creativeId,
'dealsStatus': ?dealsStatus,
'declaredClickThroughUrls': ?declaredClickThroughUrls,
'detectedAdvertiserIds': ?detectedAdvertiserIds,
'detectedDomains': ?detectedDomains,
'detectedLanguages': ?detectedLanguages,
'detectedProductCategories': ?detectedProductCategories,
'detectedSensitiveCategories': ?detectedSensitiveCategories,
'html': ?html,
'impressionTrackingUrls': ?impressionTrackingUrls,
'native': ?native,
'openAuctionStatus': ?openAuctionStatus,
'restrictedCategories': ?restrictedCategories,
'servingRestrictions': ?servingRestrictions,
'vendorIds': ?vendorIds,
'version': ?version,
'video': ?video,
};
}
}
/// The association between a creative and a deal.
class CreativeDealAssociation {
/// The account the creative belongs to.
core.String? accountId;
/// The ID of the creative associated with the deal.
core.String? creativeId;
/// The externalDealId for the deal associated with the creative.
core.String? dealsId;
CreativeDealAssociation({this.accountId, this.creativeId, this.dealsId});
CreativeDealAssociation.fromJson(core.Map json_)
: this(
accountId: json_['accountId'] as core.String?,
creativeId: json_['creativeId'] as core.String?,
dealsId: json_['dealsId'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final accountId = this.accountId;
final creativeId = this.creativeId;
final dealsId = this.dealsId;
return {
'accountId': ?accountId,
'creativeId': ?creativeId,
'dealsId': ?dealsId,
};
}
}
/// Represents creative restrictions associated to Programmatic Guaranteed/
/// Preferred Deal in Ad Manager.
///
/// This doesn't apply to Private Auction and AdX Preferred Deals.
class CreativeRestrictions {
/// The format of the environment that the creatives will be displayed in.
/// Possible string values are:
/// - "CREATIVE_FORMAT_UNSPECIFIED" : A placeholder for an undefined creative
/// format.
/// - "DISPLAY" : A creative that will be displayed in environments such as a
/// browser.
/// - "VIDEO" : A video creative that will be displayed in environments such
/// as a video player.
core.String? creativeFormat;
core.List<CreativeSpecification>? creativeSpecifications;
/// Skippable video ads allow viewers to skip ads after 5 seconds.
/// Possible string values are:
/// - "SKIPPABLE_AD_TYPE_UNSPECIFIED" : A placeholder for an undefined
/// skippable ad type.
/// - "SKIPPABLE" : This video ad can be skipped after 5 seconds.
/// - "INSTREAM_SELECT" : This video ad can be skipped after 5 seconds, and is
/// counted as engaged view after 30 seconds. The creative is hosted on
/// YouTube only, and viewcount of the YouTube video increments after the
/// engaged view.
/// - "NOT_SKIPPABLE" : This video ad is not skippable.
core.String? skippableAdType;
CreativeRestrictions({
this.creativeFormat,
this.creativeSpecifications,
this.skippableAdType,
});
CreativeRestrictions.fromJson(core.Map json_)
: this(
creativeFormat: json_['creativeFormat'] as core.String?,
creativeSpecifications: (json_['creativeSpecifications'] as core.List?)
?.map(
(value) => CreativeSpecification.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
skippableAdType: json_['skippableAdType'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final creativeFormat = this.creativeFormat;
final creativeSpecifications = this.creativeSpecifications;
final skippableAdType = this.skippableAdType;
return {
'creativeFormat': ?creativeFormat,
'creativeSpecifications': ?creativeSpecifications,
'skippableAdType': ?skippableAdType,
};
}
}
/// Specifies the size of the creative.
class CreativeSize {
/// What formats are allowed by the publisher.
///
/// If this repeated field is empty then all formats are allowed. For example,
/// if this field contains AllowedFormatType.AUDIO then the publisher only
/// allows an audio ad (without any video).
core.List<core.String>? allowedFormats;
/// For video creatives specifies the sizes of companion ads (if present).
///
/// Companion sizes may be filled in only when creative_size_type = VIDEO
core.List<Size>? companionSizes;
/// The creative size type.
/// Possible string values are:
/// - "CREATIVE_SIZE_TYPE_UNSPECIFIED" : A placeholder for an undefined
/// creative size type.
/// - "REGULAR" : The creative is a regular desktop creative.
/// - "INTERSTITIAL" : The creative is an interstitial creative.
/// - "VIDEO" : The creative is a video creative.
/// - "NATIVE" : The creative is a native (mobile) creative.
core.String? creativeSizeType;
/// The native template for this creative.
///
/// It will have a value only if creative_size_type = CreativeSizeType.NATIVE.
///
/// Output only.
/// Possible string values are:
/// - "UNKNOWN_NATIVE_TEMPLATE" : A placeholder for an undefined native
/// template.
/// - "NATIVE_CONTENT_AD" : The creative is linked to native content ad.
/// - "NATIVE_APP_INSTALL_AD" : The creative is linked to native app install
/// ad.
/// - "NATIVE_VIDEO_CONTENT_AD" : The creative is linked to native video
/// content ad.
/// - "NATIVE_VIDEO_APP_INSTALL_AD" : The creative is linked to native video
/// app install ad.
core.String? nativeTemplate;
/// For regular or video creative size type, specifies the size of the
/// creative
Size? size;
/// The type of skippable ad for this creative.
///
/// It will have a value only if creative_size_type = CreativeSizeType.VIDEO.
/// Possible string values are:
/// - "SKIPPABLE_AD_TYPE_UNSPECIFIED" : A placeholder for an undefined
/// skippable ad type.
/// - "GENERIC" : This video ad can be skipped after 5 seconds.
/// - "INSTREAM_SELECT" : This video ad can be skipped after 5 seconds, and
/// count as engaged view after 30 seconds. The creative is hosted on YouTube
/// only, and viewcount of the YouTube video increments after the engaged
/// view.
/// - "NOT_SKIPPABLE" : This video ad is not skippable.
core.String? skippableAdType;
CreativeSize({
this.allowedFormats,
this.companionSizes,
this.creativeSizeType,
this.nativeTemplate,
this.size,
this.skippableAdType,
});
CreativeSize.fromJson(core.Map json_)
: this(
allowedFormats: (json_['allowedFormats'] as core.List?)
?.map((value) => value as core.String)
.toList(),
companionSizes: (json_['companionSizes'] as core.List?)
?.map(
(value) =>
Size.fromJson(value as core.Map<core.String, core.dynamic>),
)
.toList(),
creativeSizeType: json_['creativeSizeType'] as core.String?,
nativeTemplate: json_['nativeTemplate'] as core.String?,
size: json_.containsKey('size')
? Size.fromJson(
json_['size'] as core.Map<core.String, core.dynamic>,
)
: null,
skippableAdType: json_['skippableAdType'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final allowedFormats = this.allowedFormats;
final companionSizes = this.companionSizes;
final creativeSizeType = this.creativeSizeType;
final nativeTemplate = this.nativeTemplate;
final size = this.size;
final skippableAdType = this.skippableAdType;
return {
'allowedFormats': ?allowedFormats,
'companionSizes': ?companionSizes,
'creativeSizeType': ?creativeSizeType,
'nativeTemplate': ?nativeTemplate,
'size': ?size,
'skippableAdType': ?skippableAdType,
};
}
}
/// Represents information for a creative that is associated with a Programmatic
/// Guaranteed/Preferred Deal in Ad Manager.
class CreativeSpecification {
/// Companion sizes may be filled in only when this is a video creative.
core.List<AdSize>? creativeCompanionSizes;
/// The size of the creative.
AdSize? creativeSize;
CreativeSpecification({this.creativeCompanionSizes, this.creativeSize});
CreativeSpecification.fromJson(core.Map json_)
: this(
creativeCompanionSizes: (json_['creativeCompanionSizes'] as core.List?)
?.map(
(value) =>
AdSize.fromJson(value as core.Map<core.String, core.dynamic>),
)
.toList(),
creativeSize: json_.containsKey('creativeSize')
? AdSize.fromJson(
json_['creativeSize'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final creativeCompanionSizes = this.creativeCompanionSizes;
final creativeSize = this.creativeSize;
return {
'creativeCompanionSizes': ?creativeCompanionSizes,
'creativeSize': ?creativeSize,
};
}
}
/// The number of bids with the specified dimension values that did not win the
/// auction (either were filtered pre-auction or lost the auction), as described
/// by the specified creative status.
class CreativeStatusRow {
/// The number of bids with the specified status.
MetricValue? bidCount;
/// The ID of the creative status.
///
/// See
/// \[creative-status-codes\](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
core.int? creativeStatusId;
/// The values of all dimensions associated with metric values in this row.
RowDimensions? rowDimensions;
CreativeStatusRow({this.bidCount, this.creativeStatusId, this.rowDimensions});
CreativeStatusRow.fromJson(core.Map json_)
: this(
bidCount: json_.containsKey('bidCount')
? MetricValue.fromJson(
json_['bidCount'] as core.Map<core.String, core.dynamic>,
)
: null,
creativeStatusId: json_['creativeStatusId'] as core.int?,
rowDimensions: json_.containsKey('rowDimensions')
? RowDimensions.fromJson(
json_['rowDimensions'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final bidCount = this.bidCount;
final creativeStatusId = this.creativeStatusId;
final rowDimensions = this.rowDimensions;
return {
'bidCount': ?bidCount,
'creativeStatusId': ?creativeStatusId,
'rowDimensions': ?rowDimensions,
};
}
}
/// Generic targeting used for targeting dimensions that contains a list of
/// included and excluded numeric IDs.
class CriteriaTargeting {
/// A list of numeric IDs to be excluded.
core.List<core.String>? excludedCriteriaIds;
/// A list of numeric IDs to be included.
core.List<core.String>? targetedCriteriaIds;
CriteriaTargeting({this.excludedCriteriaIds, this.targetedCriteriaIds});
CriteriaTargeting.fromJson(core.Map json_)
: this(
excludedCriteriaIds: (json_['excludedCriteriaIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
targetedCriteriaIds: (json_['targetedCriteriaIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final excludedCriteriaIds = this.excludedCriteriaIds;
final targetedCriteriaIds = this.targetedCriteriaIds;
return {
'excludedCriteriaIds': ?excludedCriteriaIds,
'targetedCriteriaIds': ?targetedCriteriaIds,
};
}
}
/// Represents a whole or partial calendar date, such as a birthday.
///
/// The time of day and time zone are either specified elsewhere or are
/// insignificant. The date is relative to the Gregorian Calendar. This can
/// represent one of the following: * A full date, with non-zero year, month,
/// and day values. * A month and day, with a zero year (for example, an
/// anniversary). * A year on its own, with a zero month and a zero day. * A
/// year and month, with a zero day (for example, a credit card expiration
/// date). Related types: * google.type.TimeOfDay * google.type.DateTime *
/// google.protobuf.Timestamp
typedef Date = $Date;
/// Daypart targeting message that specifies if the ad can be shown only during
/// certain parts of a day/week.
class DayPart {
/// The day of the week to target.
///
/// If unspecified, applicable to all days.
/// Possible string values are:
/// - "DAY_OF_WEEK_UNSPECIFIED" : A placeholder for when the day of the week
/// is not specified.
/// - "MONDAY" : Monday
/// - "TUESDAY" : Tuesday
/// - "WEDNESDAY" : Wednesday
/// - "THURSDAY" : Thursday
/// - "FRIDAY" : Friday
/// - "SATURDAY" : Saturday
/// - "SUNDAY" : Sunday
core.String? dayOfWeek;
/// The ending time of the day for the ad to show (minute level granularity).
///
/// The end time is exclusive. This field is not available for filtering in
/// PQL queries.
TimeOfDay? endTime;
/// The starting time of day for the ad to show (minute level granularity).
///
/// The start time is inclusive. This field is not available for filtering in
/// PQL queries.
TimeOfDay? startTime;
DayPart({this.dayOfWeek, this.endTime, this.startTime});
DayPart.fromJson(core.Map json_)
: this(
dayOfWeek: json_['dayOfWeek'] as core.String?,
endTime: json_.containsKey('endTime')
? TimeOfDay.fromJson(
json_['endTime'] as core.Map<core.String, core.dynamic>,
)
: null,
startTime: json_.containsKey('startTime')
? TimeOfDay.fromJson(
json_['startTime'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final dayOfWeek = this.dayOfWeek;
final endTime = this.endTime;
final startTime = this.startTime;
return {
'dayOfWeek': ?dayOfWeek,
'endTime': ?endTime,
'startTime': ?startTime,
};
}
}
/// Specifies the day part targeting criteria.
class DayPartTargeting {
/// A list of day part targeting criterion.
core.List<DayPart>? dayParts;
/// The timezone to use for interpreting the day part targeting.
/// Possible string values are:
/// - "TIME_ZONE_SOURCE_UNSPECIFIED" : A placeholder for an undefined time
/// zone source.
/// - "PUBLISHER" : Use publisher's time zone setting.
/// - "USER" : Use the user's time zone setting.
core.String? timeZoneType;
DayPartTargeting({this.dayParts, this.timeZoneType});
DayPartTargeting.fromJson(core.Map json_)
: this(
dayParts: (json_['dayParts'] as core.List?)
?.map(
(value) => DayPart.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
timeZoneType: json_['timeZoneType'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final dayParts = this.dayParts;
final timeZoneType = this.timeZoneType;
return {'dayParts': ?dayParts, 'timeZoneType': ?timeZoneType};
}
}
/// A deal represents a segment of inventory for displaying ads on.
///
/// A proposal can contain multiple deals. A deal contains the terms and
/// targeting information that is used for serving.
class Deal {
/// Proposed flight end time of the deal.
///
/// This will generally be stored in a granularity of a second. A value is not
/// required for Private Auction deals or Preferred Deals.
core.String? availableEndTime;
/// Proposed flight start time of the deal.
///
/// This will generally be stored in the granularity of one second since deal
/// serving starts at seconds boundary. Any time specified with more
/// granularity (for example, in milliseconds) will be truncated towards the
/// start of time in seconds.
///
/// Optional.
core.String? availableStartTime;
/// Buyer private data (hidden from seller).
PrivateData? buyerPrivateData;
/// The product ID from which this deal was created.
///
/// Note: This field may be set only when creating the resource. Modifying
/// this field while updating the resource will result in an error.
core.String? createProductId;
/// Revision number of the product that the deal was created from.
///
/// If present on create, and the server `product_revision` has advanced since
/// the passed-in `create_product_revision`, an `ABORTED` error will be
/// returned. Note: This field may be set only when creating the resource.
/// Modifying this field while updating the resource will result in an error.
///
/// Optional.
core.String? createProductRevision;
/// The time of the deal creation.
///
/// Output only.
core.String? createTime;
/// Specifies the creative pre-approval policy.
///
/// Output only.
/// Possible string values are:
/// - "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED" : A placeholder for an
/// undefined creative pre-approval policy.
/// - "SELLER_PRE_APPROVAL_REQUIRED" : The seller needs to approve each
/// creative before it can serve.
/// - "SELLER_PRE_APPROVAL_NOT_REQUIRED" : The seller does not need to approve
/// each creative before it can serve.
core.String? creativePreApprovalPolicy;
/// Restricitions about the creatives associated with the deal (for example,
/// size) This is available for Programmatic Guaranteed/Preferred Deals in Ad
/// Manager.
///
/// Output only.
CreativeRestrictions? creativeRestrictions;
/// Specifies whether the creative is safeFrame compatible.
///
/// Output only.
/// Possible string values are:
/// - "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED" : A placeholder for an
/// undefined creative safe-frame compatibility.
/// - "COMPATIBLE" : The creatives need to be compatible with the safe frame
/// option.
/// - "INCOMPATIBLE" : The creatives can be incompatible with the safe frame
/// option.
core.String? creativeSafeFrameCompatibility;
/// A unique deal ID for the deal (server-assigned).
///
/// Output only.
core.String? dealId;
/// Metadata about the serving status of this deal.
///
/// Output only.
DealServingMetadata? dealServingMetadata;
/// The negotiable terms of the deal.
DealTerms? dealTerms;
/// The set of fields around delivery control that are interesting for a buyer
/// to see but are non-negotiable.
///
/// These are set by the publisher.
DeliveryControl? deliveryControl;
/// Description for the deal terms.
core.String? description;
/// The name of the deal.
core.String? displayName;
/// The external deal ID assigned to this deal once the deal is finalized.
///
/// This is the deal ID that shows up in serving/reporting etc.
///
/// Output only.
core.String? externalDealId;
/// True, if the buyside inventory setup is complete for this deal.
///
/// Output only.
core.bool? isSetupComplete;
/// Specifies the creative source for programmatic deals.
///
/// PUBLISHER means creative is provided by seller and ADVERTISER means
/// creative is provided by buyer.
///
/// Output only.
/// Possible string values are:
/// - "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED" : A placeholder for an
/// undefined programmatic creative source.
/// - "ADVERTISER" : The advertiser provides the creatives.
/// - "PUBLISHER" : The publisher provides the creatives to be served.
core.String? programmaticCreativeSource;
/// ID of the proposal that this deal is part of.
///
/// Output only.
core.String? proposalId;
/// Seller contact information for the deal.
///
/// Output only.
core.List<ContactInformation>? sellerContacts;
/// The syndication product associated with the deal.
///
/// Note: This field may be set only when creating the resource. Modifying
/// this field while updating the resource will result in an error.
/// Possible string values are:
/// - "SYNDICATION_PRODUCT_UNSPECIFIED" : A placeholder for an undefined
/// syndication product.
/// - "CONTENT" : This typically represents a web page.
/// - "MOBILE" : This represents a mobile property.
/// - "VIDEO" : This represents video ad formats.
/// - "GAMES" : This represents ads shown within games.
core.String? syndicationProduct;
/// Specifies the subset of inventory targeted by the deal.
///
/// Output only.
MarketplaceTargeting? targeting;
/// The shared targeting visible to buyers and sellers.
///
/// Each shared targeting entity is AND'd together.
core.List<TargetingCriteria>? targetingCriterion;
/// The time when the deal was last updated.
///
/// Output only.
core.String? updateTime;
/// The web property code for the seller copied over from the product.
core.String? webPropertyCode;
Deal({
this.availableEndTime,
this.availableStartTime,
this.buyerPrivateData,
this.createProductId,
this.createProductRevision,
this.createTime,
this.creativePreApprovalPolicy,
this.creativeRestrictions,
this.creativeSafeFrameCompatibility,
this.dealId,
this.dealServingMetadata,
this.dealTerms,
this.deliveryControl,
this.description,
this.displayName,
this.externalDealId,
this.isSetupComplete,
this.programmaticCreativeSource,
this.proposalId,
this.sellerContacts,
this.syndicationProduct,
this.targeting,
this.targetingCriterion,
this.updateTime,
this.webPropertyCode,
});
Deal.fromJson(core.Map json_)
: this(
availableEndTime: json_['availableEndTime'] as core.String?,
availableStartTime: json_['availableStartTime'] as core.String?,
buyerPrivateData: json_.containsKey('buyerPrivateData')
? PrivateData.fromJson(
json_['buyerPrivateData']
as core.Map<core.String, core.dynamic>,
)
: null,
createProductId: json_['createProductId'] as core.String?,
createProductRevision: json_['createProductRevision'] as core.String?,
createTime: json_['createTime'] as core.String?,
creativePreApprovalPolicy:
json_['creativePreApprovalPolicy'] as core.String?,
creativeRestrictions: json_.containsKey('creativeRestrictions')
? CreativeRestrictions.fromJson(
json_['creativeRestrictions']
as core.Map<core.String, core.dynamic>,
)
: null,
creativeSafeFrameCompatibility:
json_['creativeSafeFrameCompatibility'] as core.String?,
dealId: json_['dealId'] as core.String?,
dealServingMetadata: json_.containsKey('dealServingMetadata')
? DealServingMetadata.fromJson(
json_['dealServingMetadata']
as core.Map<core.String, core.dynamic>,
)
: null,
dealTerms: json_.containsKey('dealTerms')
? DealTerms.fromJson(
json_['dealTerms'] as core.Map<core.String, core.dynamic>,
)
: null,
deliveryControl: json_.containsKey('deliveryControl')
? DeliveryControl.fromJson(
json_['deliveryControl'] as core.Map<core.String, core.dynamic>,
)
: null,
description: json_['description'] as core.String?,
displayName: json_['displayName'] as core.String?,
externalDealId: json_['externalDealId'] as core.String?,
isSetupComplete: json_['isSetupComplete'] as core.bool?,
programmaticCreativeSource:
json_['programmaticCreativeSource'] as core.String?,
proposalId: json_['proposalId'] as core.String?,
sellerContacts: (json_['sellerContacts'] as core.List?)
?.map(
(value) => ContactInformation.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
syndicationProduct: json_['syndicationProduct'] as core.String?,
targeting: json_.containsKey('targeting')
? MarketplaceTargeting.fromJson(
json_['targeting'] as core.Map<core.String, core.dynamic>,
)
: null,
targetingCriterion: (json_['targetingCriterion'] as core.List?)
?.map(
(value) => TargetingCriteria.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
updateTime: json_['updateTime'] as core.String?,
webPropertyCode: json_['webPropertyCode'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final availableEndTime = this.availableEndTime;
final availableStartTime = this.availableStartTime;
final buyerPrivateData = this.buyerPrivateData;
final createProductId = this.createProductId;
final createProductRevision = this.createProductRevision;
final createTime = this.createTime;
final creativePreApprovalPolicy = this.creativePreApprovalPolicy;
final creativeRestrictions = this.creativeRestrictions;
final creativeSafeFrameCompatibility = this.creativeSafeFrameCompatibility;
final dealId = this.dealId;
final dealServingMetadata = this.dealServingMetadata;
final dealTerms = this.dealTerms;
final deliveryControl = this.deliveryControl;
final description = this.description;
final displayName = this.displayName;
final externalDealId = this.externalDealId;
final isSetupComplete = this.isSetupComplete;
final programmaticCreativeSource = this.programmaticCreativeSource;
final proposalId = this.proposalId;
final sellerContacts = this.sellerContacts;
final syndicationProduct = this.syndicationProduct;
final targeting = this.targeting;
final targetingCriterion = this.targetingCriterion;
final updateTime = this.updateTime;
final webPropertyCode = this.webPropertyCode;
return {
'availableEndTime': ?availableEndTime,
'availableStartTime': ?availableStartTime,
'buyerPrivateData': ?buyerPrivateData,
'createProductId': ?createProductId,
'createProductRevision': ?createProductRevision,
'createTime': ?createTime,
'creativePreApprovalPolicy': ?creativePreApprovalPolicy,
'creativeRestrictions': ?creativeRestrictions,
'creativeSafeFrameCompatibility': ?creativeSafeFrameCompatibility,
'dealId': ?dealId,
'dealServingMetadata': ?dealServingMetadata,
'dealTerms': ?dealTerms,
'deliveryControl': ?deliveryControl,
'description': ?description,
'displayName': ?displayName,
'externalDealId': ?externalDealId,
'isSetupComplete': ?isSetupComplete,
'programmaticCreativeSource': ?programmaticCreativeSource,
'proposalId': ?proposalId,
'sellerContacts': ?sellerContacts,
'syndicationProduct': ?syndicationProduct,
'targeting': ?targeting,
'targetingCriterion': ?targetingCriterion,
'updateTime': ?updateTime,
'webPropertyCode': ?webPropertyCode,
};
}
}
/// Tracks which parties (if any) have paused a deal.
///
/// The deal is considered paused if either hasBuyerPaused or hasSellPaused is
/// true.
class DealPauseStatus {
/// The buyer's reason for pausing, if the buyer paused the deal.
core.String? buyerPauseReason;
/// The role of the person who first paused this deal.
/// Possible string values are:
/// - "BUYER_SELLER_ROLE_UNSPECIFIED" : A placeholder for an undefined
/// buyer/seller role.
/// - "BUYER" : Specifies the role as buyer.
/// - "SELLER" : Specifies the role as seller.
core.String? firstPausedBy;
/// True, if the buyer has paused the deal unilaterally.
core.bool? hasBuyerPaused;
/// True, if the seller has paused the deal unilaterally.
core.bool? hasSellerPaused;
/// The seller's reason for pausing, if the seller paused the deal.
core.String? sellerPauseReason;
DealPauseStatus({
this.buyerPauseReason,
this.firstPausedBy,
this.hasBuyerPaused,
this.hasSellerPaused,
this.sellerPauseReason,
});
DealPauseStatus.fromJson(core.Map json_)
: this(
buyerPauseReason: json_['buyerPauseReason'] as core.String?,
firstPausedBy: json_['firstPausedBy'] as core.String?,
hasBuyerPaused: json_['hasBuyerPaused'] as core.bool?,
hasSellerPaused: json_['hasSellerPaused'] as core.bool?,
sellerPauseReason: json_['sellerPauseReason'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final buyerPauseReason = this.buyerPauseReason;
final firstPausedBy = this.firstPausedBy;
final hasBuyerPaused = this.hasBuyerPaused;
final hasSellerPaused = this.hasSellerPaused;
final sellerPauseReason = this.sellerPauseReason;
return {
'buyerPauseReason': ?buyerPauseReason,
'firstPausedBy': ?firstPausedBy,
'hasBuyerPaused': ?hasBuyerPaused,
'hasSellerPaused': ?hasSellerPaused,
'sellerPauseReason': ?sellerPauseReason,
};
}
}
/// Message captures metadata about the serving status of a deal.
class DealServingMetadata {
/// Tracks which parties (if any) have paused a deal.
///
/// Output only.
DealPauseStatus? dealPauseStatus;
DealServingMetadata({this.dealPauseStatus});
DealServingMetadata.fromJson(core.Map json_)
: this(
dealPauseStatus: json_.containsKey('dealPauseStatus')
? DealPauseStatus.fromJson(
json_['dealPauseStatus'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final dealPauseStatus = this.dealPauseStatus;
return {'dealPauseStatus': ?dealPauseStatus};
}
}
/// The deal terms specify the details of a Product/deal.
///
/// They specify things like price per buyer, the type of pricing model (for
/// example, fixed price, auction) and expected impressions from the publisher.
class DealTerms {
/// Visibility of the URL in bid requests.
///
/// (default: BRANDED)
/// Possible string values are:
/// - "BRANDING_TYPE_UNSPECIFIED" : A placeholder for an undefined branding
/// type.
/// - "BRANDED" : Full URL is included in bid requests.
/// - "SEMI_TRANSPARENT" : A TopLevelDomain or masked URL is sent in bid
/// requests rather than the full one.
core.String? brandingType;
/// Publisher provided description for the terms.
core.String? description;
/// Non-binding estimate of the estimated gross spend for this deal.
///
/// Can be set by buyer or seller.
Price? estimatedGrossSpend;
/// Non-binding estimate of the impressions served per day.
///
/// Can be set by buyer or seller.
core.String? estimatedImpressionsPerDay;
/// The terms for guaranteed fixed price deals.
GuaranteedFixedPriceTerms? guaranteedFixedPriceTerms;
/// The terms for non-guaranteed auction deals.
NonGuaranteedAuctionTerms? nonGuaranteedAuctionTerms;
/// The terms for non-guaranteed fixed price deals.
NonGuaranteedFixedPriceTerms? nonGuaranteedFixedPriceTerms;
/// The time zone name.
///
/// For deals with Cost Per Day billing, defines the time zone used to mark
/// the boundaries of a day. It should be an IANA TZ name, such as
/// "America/Los_Angeles". For more information, see
/// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
core.String? sellerTimeZone;
DealTerms({
this.brandingType,
this.description,
this.estimatedGrossSpend,
this.estimatedImpressionsPerDay,
this.guaranteedFixedPriceTerms,
this.nonGuaranteedAuctionTerms,
this.nonGuaranteedFixedPriceTerms,
this.sellerTimeZone,
});
DealTerms.fromJson(core.Map json_)
: this(
brandingType: json_['brandingType'] as core.String?,
description: json_['description'] as core.String?,
estimatedGrossSpend: json_.containsKey('estimatedGrossSpend')
? Price.fromJson(
json_['estimatedGrossSpend']
as core.Map<core.String, core.dynamic>,
)
: null,
estimatedImpressionsPerDay:
json_['estimatedImpressionsPerDay'] as core.String?,
guaranteedFixedPriceTerms:
json_.containsKey('guaranteedFixedPriceTerms')
? GuaranteedFixedPriceTerms.fromJson(
json_['guaranteedFixedPriceTerms']
as core.Map<core.String, core.dynamic>,
)
: null,
nonGuaranteedAuctionTerms:
json_.containsKey('nonGuaranteedAuctionTerms')
? NonGuaranteedAuctionTerms.fromJson(
json_['nonGuaranteedAuctionTerms']
as core.Map<core.String, core.dynamic>,
)
: null,
nonGuaranteedFixedPriceTerms:
json_.containsKey('nonGuaranteedFixedPriceTerms')
? NonGuaranteedFixedPriceTerms.fromJson(
json_['nonGuaranteedFixedPriceTerms']
as core.Map<core.String, core.dynamic>,
)
: null,
sellerTimeZone: json_['sellerTimeZone'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final brandingType = this.brandingType;
final description = this.description;
final estimatedGrossSpend = this.estimatedGrossSpend;
final estimatedImpressionsPerDay = this.estimatedImpressionsPerDay;
final guaranteedFixedPriceTerms = this.guaranteedFixedPriceTerms;
final nonGuaranteedAuctionTerms = this.nonGuaranteedAuctionTerms;
final nonGuaranteedFixedPriceTerms = this.nonGuaranteedFixedPriceTerms;
final sellerTimeZone = this.sellerTimeZone;
return {
'brandingType': ?brandingType,
'description': ?description,
'estimatedGrossSpend': ?estimatedGrossSpend,
'estimatedImpressionsPerDay': ?estimatedImpressionsPerDay,
'guaranteedFixedPriceTerms': ?guaranteedFixedPriceTerms,
'nonGuaranteedAuctionTerms': ?nonGuaranteedAuctionTerms,
'nonGuaranteedFixedPriceTerms': ?nonGuaranteedFixedPriceTerms,
'sellerTimeZone': ?sellerTimeZone,
};
}
}
/// Message contains details about how the deals will be paced.
class DeliveryControl {
/// Specified the creative blocking levels to be applied.
///
/// Output only.
/// Possible string values are:
/// - "CREATIVE_BLOCKING_LEVEL_UNSPECIFIED" : A placeholder for an undefined
/// creative blocking level.
/// - "PUBLISHER_BLOCKING_RULES" : Publisher blocking rules will be applied.
/// - "ADX_POLICY_BLOCKING_ONLY" : The Ad Exchange policy blocking rules will
/// be applied.
core.String? creativeBlockingLevel;
/// Specifies how the impression delivery will be paced.
///
/// Output only.
/// Possible string values are:
/// - "DELIVERY_RATE_TYPE_UNSPECIFIED" : A placeholder for an undefined
/// delivery rate type.
/// - "EVENLY" : Impressions are served uniformly over the life of the deal.
/// - "FRONT_LOADED" : Impressions are served front-loaded.
/// - "AS_FAST_AS_POSSIBLE" : Impressions are served as fast as possible.
core.String? deliveryRateType;
/// Specifies any frequency caps.
///
/// Output only.
core.List<FrequencyCap>? frequencyCaps;
DeliveryControl({
this.creativeBlockingLevel,
this.deliveryRateType,
this.frequencyCaps,
});
DeliveryControl.fromJson(core.Map json_)
: this(
creativeBlockingLevel: json_['creativeBlockingLevel'] as core.String?,
deliveryRateType: json_['deliveryRateType'] as core.String?,
frequencyCaps: (json_['frequencyCaps'] as core.List?)
?.map(
(value) => FrequencyCap.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final creativeBlockingLevel = this.creativeBlockingLevel;
final deliveryRateType = this.deliveryRateType;
final frequencyCaps = this.frequencyCaps;
return {
'creativeBlockingLevel': ?creativeBlockingLevel,
'deliveryRateType': ?deliveryRateType,
'frequencyCaps': ?frequencyCaps,
};
}
}
/// The reason and details for a disapproval.
///
/// Output only.
class Disapproval {
/// Additional details about the reason for disapproval.
core.List<core.String>? details;
/// The categorized reason for disapproval.
/// Possible string values are:
/// - "LENGTH_OF_IMAGE_ANIMATION" : The length of the image animation is
/// longer than allowed.
/// - "BROKEN_URL" : The click through URL doesn't work properly.
/// - "MEDIA_NOT_FUNCTIONAL" : Something is wrong with the creative itself.
/// - "INVALID_FOURTH_PARTY_CALL" : The ad makes a fourth party call to an
/// unapproved vendor.
/// - "INCORRECT_REMARKETING_DECLARATION" : The ad targets consumers using
/// remarketing lists and/or collects data for subsequent use in retargeting,
/// but does not correctly declare that use.
/// - "LANDING_PAGE_ERROR" : Clicking on the ad leads to an error page.
/// - "AD_SIZE_DOES_NOT_MATCH_AD_SLOT" : The ad size when rendered does not
/// match the declaration.
/// - "NO_BORDER" : Ads with a white background require a border, which was
/// missing.
/// - "FOURTH_PARTY_BROWSER_COOKIES" : The creative attempts to set cookies
/// from a fourth party that is not certified.
/// - "LSO_OBJECTS" : The creative sets an LSO object.
/// - "BLANK_CREATIVE" : The ad serves a blank.
/// - "DESTINATION_URLS_UNDECLARED" : The ad uses rotation, but not all
/// destination URLs were declared.
/// - "PROBLEM_WITH_CLICK_MACRO" : There is a problem with the way the click
/// macro is used.
/// - "INCORRECT_AD_TECHNOLOGY_DECLARATION" : The ad technology declaration is
/// not accurate.
/// - "INCORRECT_DESTINATION_URL_DECLARATION" : The actual destination URL
/// does not match the declared destination URL.
/// - "EXPANDABLE_INCORRECT_DIRECTION" : The declared expanding direction does
/// not match the actual direction.
/// - "EXPANDABLE_DIRECTION_NOT_SUPPORTED" : The ad does not expand in a
/// supported direction.
/// - "EXPANDABLE_INVALID_VENDOR" : The ad uses an expandable vendor that is
/// not supported.
/// - "EXPANDABLE_FUNCTIONALITY" : There was an issue with the expandable ad.
/// - "VIDEO_INVALID_VENDOR" : The ad uses a video vendor that is not
/// supported.
/// - "VIDEO_UNSUPPORTED_LENGTH" : The length of the video ad is not
/// supported.
/// - "VIDEO_UNSUPPORTED_FORMAT" : The format of the video ad is not
/// supported.
/// - "VIDEO_FUNCTIONALITY" : There was an issue with the video ad.
/// - "LANDING_PAGE_DISABLED" : The landing page does not conform to Ad
/// Exchange policy.
/// - "MALWARE_SUSPECTED" : The ad or the landing page may contain malware.
/// - "ADULT_IMAGE_OR_VIDEO" : The ad contains adult images or video content.
/// - "INACCURATE_AD_TEXT" : The ad contains text that is unclear or
/// inaccurate.
/// - "COUNTERFEIT_DESIGNER_GOODS" : The ad promotes counterfeit designer
/// goods.
/// - "POP_UP" : The ad causes a popup window to appear.
/// - "INVALID_RTB_PROTOCOL_USAGE" : The creative does not follow policies set
/// for the RTB protocol.
/// - "RAW_IP_ADDRESS_IN_SNIPPET" : The ad contains a URL that uses a numeric
/// IP address for the domain.
/// - "UNACCEPTABLE_CONTENT_SOFTWARE" : The ad or landing page contains
/// unacceptable content because it initiated a software or executable
/// download.
/// - "UNAUTHORIZED_COOKIE_ON_GOOGLE_DOMAIN" : The ad set an unauthorized
/// cookie on a Google domain.
/// - "UNDECLARED_FLASH_OBJECTS" : Flash content found when no flash was
/// declared.
/// - "INVALID_SSL_DECLARATION" : SSL support declared but not working
/// correctly.
/// - "DIRECT_DOWNLOAD_IN_AD" : Rich Media - Direct Download in Ad (ex. PDF
/// download).
/// - "MAXIMUM_DOWNLOAD_SIZE_EXCEEDED" : Maximum download size exceeded.
/// - "DESTINATION_URL_SITE_NOT_CRAWLABLE" : Bad Destination URL: Site Not
/// Crawlable.
/// - "BAD_URL_LEGAL_DISAPPROVAL" : Bad URL: Legal disapproval.
/// - "PHARMA_GAMBLING_ALCOHOL_NOT_ALLOWED" : Pharmaceuticals, Gambling,
/// Alcohol not allowed and at least one was detected.
/// - "DYNAMIC_DNS_AT_DESTINATION_URL" : Dynamic DNS at Destination URL.
/// - "POOR_IMAGE_OR_VIDEO_QUALITY" : Poor Image / Video Quality.
/// - "UNACCEPTABLE_IMAGE_CONTENT" : For example, Image Trick to Click.
/// - "INCORRECT_IMAGE_LAYOUT" : Incorrect Image Layout.
/// - "IRRELEVANT_IMAGE_OR_VIDEO" : Irrelevant Image / Video.
/// - "DESTINATION_SITE_DOES_NOT_ALLOW_GOING_BACK" : Broken back button.
/// - "MISLEADING_CLAIMS_IN_AD" : Misleading/Inaccurate claims in ads.
/// - "RESTRICTED_PRODUCTS" : Restricted Products.
/// - "UNACCEPTABLE_CONTENT" : Unacceptable content. For example, malware.
/// - "AUTOMATED_AD_CLICKING" : The ad automatically redirects to the
/// destination site without a click, or reports a click when none were made.
/// - "INVALID_URL_PROTOCOL" : The ad uses URL protocols that do not exist or
/// are not allowed on AdX.
/// - "UNDECLARED_RESTRICTED_CONTENT" : Restricted content (for example,
/// alcohol) was found in the ad but not declared.
/// - "INVALID_REMARKETING_LIST_USAGE" : Violation of the remarketing list
/// policy.
/// - "DESTINATION_SITE_NOT_CRAWLABLE_ROBOTS_TXT" : The destination site's
/// robot.txt file prevents it from being crawled.
/// - "CLICK_TO_DOWNLOAD_NOT_AN_APP" : Click to download must link to an app.
/// - "INACCURATE_REVIEW_EXTENSION" : A review extension must be an accurate
/// review.
/// - "SEXUALLY_EXPLICIT_CONTENT" : Sexually explicit content.
/// - "GAINING_AN_UNFAIR_ADVANTAGE" : The ad tries to gain an unfair traffic
/// advantage.
/// - "GAMING_THE_GOOGLE_NETWORK" : The ad tries to circumvent Google's
/// advertising systems.
/// - "DANGEROUS_PRODUCTS_KNIVES" : The ad promotes dangerous knives.
/// - "DANGEROUS_PRODUCTS_EXPLOSIVES" : The ad promotes explosives.
/// - "DANGEROUS_PRODUCTS_GUNS" : The ad promotes guns & parts.
/// - "DANGEROUS_PRODUCTS_DRUGS" : The ad promotes recreational drugs/services
/// & related equipment.
/// - "DANGEROUS_PRODUCTS_TOBACCO" : The ad promotes tobacco products/services
/// & related equipment.
/// - "DANGEROUS_PRODUCTS_WEAPONS" : The ad promotes weapons.
/// - "UNCLEAR_OR_IRRELEVANT_AD" : The ad is unclear or irrelevant to the
/// destination site.
/// - "PROFESSIONAL_STANDARDS" : The ad does not meet professional standards.
/// - "DYSFUNCTIONAL_PROMOTION" : The promotion is unnecessarily difficult to
/// navigate.
/// - "INVALID_INTEREST_BASED_AD" : Violation of Google's policy for
/// interest-based ads.
/// - "MISUSE_OF_PERSONAL_INFORMATION" : Misuse of personal information.
/// - "OMISSION_OF_RELEVANT_INFORMATION" : Omission of relevant information.
/// - "UNAVAILABLE_PROMOTIONS" : Unavailable promotions.
/// - "MISLEADING_PROMOTIONS" : Misleading or unrealistic promotions.
/// - "INAPPROPRIATE_CONTENT" : Offensive or inappropriate content.
/// - "SENSITIVE_EVENTS" : Capitalizing on sensitive events.
/// - "SHOCKING_CONTENT" : Shocking content.
/// - "ENABLING_DISHONEST_BEHAVIOR" : Products & Services that enable
/// dishonest behavior.
/// - "TECHNICAL_REQUIREMENTS" : The ad does not meet technical requirements.
/// - "RESTRICTED_POLITICAL_CONTENT" : Restricted political content.
/// - "UNSUPPORTED_CONTENT" : Unsupported content.
/// - "INVALID_BIDDING_METHOD" : Invalid bidding method.
/// - "VIDEO_TOO_LONG" : Video length exceeds limits.
/// - "VIOLATES_JAPANESE_PHARMACY_LAW" : Unacceptable content: Japanese
/// healthcare.
/// - "UNACCREDITED_PET_PHARMACY" : Online pharmacy ID required.
/// - "ABORTION" : Unacceptable content: Abortion.
/// - "CONTRACEPTIVES" : Unacceptable content: Birth control.
/// - "NEED_CERTIFICATES_TO_ADVERTISE_IN_CHINA" : Restricted in China.
/// - "KCDSP_REGISTRATION" : Unacceptable content: Korean healthcare.
/// - "NOT_FAMILY_SAFE" : Non-family safe or adult content.
/// - "CLINICAL_TRIAL_RECRUITMENT" : Clinical trial recruitment.
/// - "MAXIMUM_NUMBER_OF_HTTP_CALLS_EXCEEDED" : Maximum number of HTTP calls
/// exceeded.
/// - "MAXIMUM_NUMBER_OF_COOKIES_EXCEEDED" : Maximum number of cookies
/// exceeded.
/// - "PERSONAL_LOANS" : Financial service ad does not adhere to
/// specifications.
/// - "UNSUPPORTED_FLASH_CONTENT" : Flash content was found in an unsupported
/// context.
/// - "MISUSE_BY_OMID_SCRIPT" : Misuse by an Open Measurement SDK script.
/// - "NON_WHITELISTED_OMID_VENDOR" : Use of an Open Measurement SDK vendor
/// not on approved vendor list.
/// - "DESTINATION_EXPERIENCE" : Unacceptable landing page.
/// - "UNSUPPORTED_LANGUAGE" : Unsupported language.
/// - "NON_SSL_COMPLIANT" : Non-SSL compliant.
/// - "TEMPORARY_PAUSE" : Temporary pausing of creative.
/// - "BAIL_BONDS" : Promotes services related to bail bonds.
/// - "EXPERIMENTAL_MEDICAL_TREATMENT" : Promotes speculative and/or
/// experimental medical treatments.
core.String? reason;
Disapproval({this.details, this.reason});
Disapproval.fromJson(core.Map json_)
: this(
details: (json_['details'] as core.List?)
?.map((value) => value as core.String)
.toList(),
reason: json_['reason'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final details = this.details;
final reason = this.reason;
return {'details': ?details, 'reason': ?reason};
}
}
/// 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); }
typedef Empty = $Empty;
/// A set of filters that is applied to a request for data.
///
/// Within a filter set, an AND operation is performed across the filters
/// represented by each field. An OR operation is performed across the filters
/// represented by the multiple values of a repeated field, for example,
/// "format=VIDEO AND deal_id=12 AND (seller_network_id=34 OR
/// seller_network_id=56)".
class FilterSet {
/// An absolute date range, defined by a start date and an end date.
///
/// Interpreted relative to Pacific time zone.
AbsoluteDateRange? absoluteDateRange;
/// The set of dimensions along which to break down the response; may be
/// empty.
///
/// If multiple dimensions are requested, the breakdown is along the Cartesian
/// product of the requested dimensions.
core.List<core.String>? breakdownDimensions;
/// The ID of the creative on which to filter; optional.
///
/// This field may be set only for a filter set that accesses account-level
/// troubleshooting data, for example, one whose name matches the `bidders / *
/// /accounts / * /filterSets / * ` pattern.
core.String? creativeId;
/// The ID of the deal on which to filter; optional.
///
/// This field may be set only for a filter set that accesses account-level
/// troubleshooting data, for example, one whose name matches the `bidders / *
/// /accounts / * /filterSets / * ` pattern.
core.String? dealId;
/// The environment on which to filter; optional.
/// Possible string values are:
/// - "ENVIRONMENT_UNSPECIFIED" : A placeholder for an undefined environment;
/// indicates that no environment filter will be applied.
/// - "WEB" : The ad impression appears on the web.
/// - "APP" : The ad impression appears in an app.
core.String? environment;
/// Creative format bidded on or allowed to bid on, can be empty.
/// Possible string values are:
/// - "FORMAT_UNSPECIFIED" : A placeholder for an undefined format; indicates
/// that no format filter will be applied.
/// - "NATIVE_DISPLAY" : The ad impression is a native ad, and display (for
/// example, image) format.
/// - "NATIVE_VIDEO" : The ad impression is a native ad, and video format.
/// - "NON_NATIVE_DISPLAY" : The ad impression is not a native ad, and display
/// (for example, image) format.
/// - "NON_NATIVE_VIDEO" : The ad impression is not a native ad, and video
/// format.
core.String? format;
/// Creative formats bidded on or allowed to bid on, can be empty.
///
/// Although this field is a list, it can only be populated with a single
/// item. A HTTP 400 bad request error will be returned in the response if you
/// specify multiple items.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.List<core.String>? formats;
/// A user-defined name of the filter set.
///
/// Filter set names must be unique globally and match one of the patterns: -
/// `bidders / * /filterSets / * ` (for accessing bidder-level troubleshooting
/// data) - `bidders / * /accounts / * /filterSets / * ` (for accessing
/// account-level troubleshooting data) This field is required in create
/// operations.
core.String? name;
/// The list of platforms on which to filter; may be empty.
///
/// The filters represented by multiple platforms are ORed together (for
/// example, if non-empty, results must match any one of the platforms).
core.List<core.String>? platforms;
/// For Open Bidding partners only.
///
/// The list of publisher identifiers on which to filter; may be empty. The
/// filters represented by multiple publisher identifiers are ORed together.
core.List<core.String>? publisherIdentifiers;
/// An open-ended realtime time range, defined by the aggregation start
/// timestamp.
RealtimeTimeRange? realtimeTimeRange;
/// A relative date range, defined by an offset from today and a duration.
///
/// Interpreted relative to Pacific time zone.
RelativeDateRange? relativeDateRange;
/// For Authorized Buyers only.
///
/// The list of IDs of the seller (publisher) networks on which to filter; may
/// be empty. The filters represented by multiple seller network IDs are ORed
/// together (for example, if non-empty, results must match any one of the
/// publisher networks). See
/// \[seller-network-ids\](https://developers.google.com/authorized-buyers/rtb/downloads/seller-network-ids)
/// file for the set of existing seller network IDs.
core.List<core.int>? sellerNetworkIds;
/// The granularity of time intervals if a time series breakdown is preferred;
/// optional.
/// Possible string values are:
/// - "TIME_SERIES_GRANULARITY_UNSPECIFIED" : A placeholder for an unspecified
/// interval; no time series is applied. All rows in response will contain
/// data for the entire requested time range.
/// - "HOURLY" : Indicates that data will be broken down by the hour.
/// - "DAILY" : Indicates that data will be broken down by the day.
core.String? timeSeriesGranularity;
FilterSet({
this.absoluteDateRange,
this.breakdownDimensions,
this.creativeId,
this.dealId,
this.environment,
this.format,
this.formats,
this.name,
this.platforms,
this.publisherIdentifiers,
this.realtimeTimeRange,
this.relativeDateRange,
this.sellerNetworkIds,
this.timeSeriesGranularity,
});
FilterSet.fromJson(core.Map json_)
: this(
absoluteDateRange: json_.containsKey('absoluteDateRange')
? AbsoluteDateRange.fromJson(
json_['absoluteDateRange']
as core.Map<core.String, core.dynamic>,
)
: null,
breakdownDimensions: (json_['breakdownDimensions'] as core.List?)
?.map((value) => value as core.String)
.toList(),
creativeId: json_['creativeId'] as core.String?,
dealId: json_['dealId'] as core.String?,
environment: json_['environment'] as core.String?,
format: json_['format'] as core.String?,
formats: (json_['formats'] as core.List?)
?.map((value) => value as core.String)
.toList(),
name: json_['name'] as core.String?,
platforms: (json_['platforms'] as core.List?)
?.map((value) => value as core.String)
.toList(),
publisherIdentifiers: (json_['publisherIdentifiers'] as core.List?)
?.map((value) => value as core.String)
.toList(),
realtimeTimeRange: json_.containsKey('realtimeTimeRange')
? RealtimeTimeRange.fromJson(
json_['realtimeTimeRange']
as core.Map<core.String, core.dynamic>,
)
: null,
relativeDateRange: json_.containsKey('relativeDateRange')
? RelativeDateRange.fromJson(
json_['relativeDateRange']
as core.Map<core.String, core.dynamic>,
)
: null,
sellerNetworkIds: (json_['sellerNetworkIds'] as core.List?)
?.map((value) => value as core.int)
.toList(),
timeSeriesGranularity: json_['timeSeriesGranularity'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final absoluteDateRange = this.absoluteDateRange;
final breakdownDimensions = this.breakdownDimensions;
final creativeId = this.creativeId;
final dealId = this.dealId;
final environment = this.environment;
final format = this.format;
final formats = this.formats;
final name = this.name;
final platforms = this.platforms;
final publisherIdentifiers = this.publisherIdentifiers;
final realtimeTimeRange = this.realtimeTimeRange;
final relativeDateRange = this.relativeDateRange;
final sellerNetworkIds = this.sellerNetworkIds;
final timeSeriesGranularity = this.timeSeriesGranularity;
return {
'absoluteDateRange': ?absoluteDateRange,
'breakdownDimensions': ?breakdownDimensions,
'creativeId': ?creativeId,
'dealId': ?dealId,
'environment': ?environment,
'format': ?format,
'formats': ?formats,
'name': ?name,
'platforms': ?platforms,
'publisherIdentifiers': ?publisherIdentifiers,
'realtimeTimeRange': ?realtimeTimeRange,
'relativeDateRange': ?relativeDateRange,
'sellerNetworkIds': ?sellerNetworkIds,
'timeSeriesGranularity': ?timeSeriesGranularity,
};
}
}
/// The number of filtered bids with the specified dimension values that have
/// the specified creative.
class FilteredBidCreativeRow {
/// The number of bids with the specified creative.
MetricValue? bidCount;
/// The ID of the creative.
core.String? creativeId;
/// The values of all dimensions associated with metric values in this row.
RowDimensions? rowDimensions;
FilteredBidCreativeRow({this.bidCount, this.creativeId, this.rowDimensions});
FilteredBidCreativeRow.fromJson(core.Map json_)
: this(
bidCount: json_.containsKey('bidCount')
? MetricValue.fromJson(
json_['bidCount'] as core.Map<core.String, core.dynamic>,
)
: null,
creativeId: json_['creativeId'] as core.String?,
rowDimensions: json_.containsKey('rowDimensions')
? RowDimensions.fromJson(
json_['rowDimensions'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final bidCount = this.bidCount;
final creativeId = this.creativeId;
final rowDimensions = this.rowDimensions;
return {
'bidCount': ?bidCount,
'creativeId': ?creativeId,
'rowDimensions': ?rowDimensions,
};
}
}
/// The number of filtered bids with the specified dimension values, among those
/// filtered due to the requested filtering reason (for example, creative
/// status), that have the specified detail.
class FilteredBidDetailRow {
/// The number of bids with the specified detail.
MetricValue? bidCount;
/// The ID of the detail, can be numeric or text.
///
/// The associated value can be looked up in the dictionary file corresponding
/// to the DetailType in the response message.
core.String? detail;
/// Note: this field will be deprecated, use "detail" field instead.
///
/// When "detail" field represents an integer value, this field is populated
/// as the same integer value "detail" field represents, otherwise this field
/// will be 0. The ID of the detail. The associated value can be looked up in
/// the dictionary file corresponding to the DetailType in the response
/// message.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.int? detailId;
/// The values of all dimensions associated with metric values in this row.
RowDimensions? rowDimensions;
FilteredBidDetailRow({
this.bidCount,
this.detail,
this.detailId,
this.rowDimensions,
});
FilteredBidDetailRow.fromJson(core.Map json_)
: this(
bidCount: json_.containsKey('bidCount')
? MetricValue.fromJson(
json_['bidCount'] as core.Map<core.String, core.dynamic>,
)
: null,
detail: json_['detail'] as core.String?,
detailId: json_['detailId'] as core.int?,
rowDimensions: json_.containsKey('rowDimensions')
? RowDimensions.fromJson(
json_['rowDimensions'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final bidCount = this.bidCount;
final detail = this.detail;
final detailId = this.detailId;
final rowDimensions = this.rowDimensions;
return {
'bidCount': ?bidCount,
'detail': ?detail,
'detailId': ?detailId,
'rowDimensions': ?rowDimensions,
};
}
}
/// Represents a list of targeted and excluded mobile application IDs that
/// publishers own.
///
/// Mobile application IDs are from App Store and Google Play Store. Android App
/// ID, for example, com.google.android.apps.maps, can be found in Google Play
/// Store URL. iOS App ID (which is a number) can be found at the end of iTunes
/// store URL. First party mobile applications is either included or excluded.
class FirstPartyMobileApplicationTargeting {
/// A list of application IDs to be excluded.
core.List<core.String>? excludedAppIds;
/// A list of application IDs to be included.
core.List<core.String>? targetedAppIds;
FirstPartyMobileApplicationTargeting({
this.excludedAppIds,
this.targetedAppIds,
});
FirstPartyMobileApplicationTargeting.fromJson(core.Map json_)
: this(
excludedAppIds: (json_['excludedAppIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
targetedAppIds: (json_['targetedAppIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final excludedAppIds = this.excludedAppIds;
final targetedAppIds = this.targetedAppIds;
return {
'excludedAppIds': ?excludedAppIds,
'targetedAppIds': ?targetedAppIds,
};
}
}
/// Frequency cap.
class FrequencyCap {
/// The maximum number of impressions that can be served to a user within the
/// specified time period.
core.int? maxImpressions;
/// The amount of time, in the units specified by time_unit_type.
///
/// Defines the amount of time over which impressions per user are counted and
/// capped.
core.int? numTimeUnits;
/// The time unit.
///
/// Along with num_time_units defines the amount of time over which
/// impressions per user are counted and capped.
/// Possible string values are:
/// - "TIME_UNIT_TYPE_UNSPECIFIED" : A placeholder for an undefined time unit
/// type. This just indicates the variable with this value hasn't been
/// initialized.
/// - "MINUTE" : Minute
/// - "HOUR" : Hour
/// - "DAY" : Day
/// - "WEEK" : Week
/// - "MONTH" : Month
/// - "LIFETIME" : Lifetime
/// - "POD" : Pod
/// - "STREAM" : Stream
core.String? timeUnitType;
FrequencyCap({this.maxImpressions, this.numTimeUnits, this.timeUnitType});
FrequencyCap.fromJson(core.Map json_)
: this(
maxImpressions: json_['maxImpressions'] as core.int?,
numTimeUnits: json_['numTimeUnits'] as core.int?,
timeUnitType: json_['timeUnitType'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final maxImpressions = this.maxImpressions;
final numTimeUnits = this.numTimeUnits;
final timeUnitType = this.timeUnitType;
return {
'maxImpressions': ?maxImpressions,
'numTimeUnits': ?numTimeUnits,
'timeUnitType': ?timeUnitType,
};
}
}
/// Terms for Programmatic Guaranteed Deals.
class GuaranteedFixedPriceTerms {
/// Fixed price for the specified buyer.
core.List<PricePerBuyer>? fixedPrices;
/// Guaranteed impressions as a percentage.
///
/// This is the percentage of guaranteed looks that the buyer is guaranteeing
/// to buy.
core.String? guaranteedImpressions;
/// Count of guaranteed looks.
///
/// Required for deal, optional for product. For CPD deals, buyer changes to
/// guaranteed_looks will be ignored.
core.String? guaranteedLooks;
/// The lifetime impression cap for CPM sponsorship deals.
///
/// The deal will stop serving when the cap is reached.
core.String? impressionCap;
/// Daily minimum looks for CPD deal types.
///
/// For CPD deals, buyer should negotiate on this field instead of
/// guaranteed_looks.
core.String? minimumDailyLooks;
/// For sponsorship deals, this is the percentage of the seller's eligible
/// impressions that the deal will serve until the cap is reached.
core.String? percentShareOfVoice;
/// The reservation type for a Programmatic Guaranteed deal.
///
/// This indicates whether the number of impressions is fixed, or a percent of
/// available impressions. If not specified, the default reservation type is
/// STANDARD.
/// Possible string values are:
/// - "RESERVATION_TYPE_UNSPECIFIED" : An unspecified reservation type.
/// - "STANDARD" : Non-sponsorship deal.
/// - "SPONSORSHIP" : Sponsorship deals don't have impression goal
/// (guaranteed_looks) and they are served based on the flight dates. For CPM
/// Sponsorship deals, impression_cap is the lifetime impression limit.
core.String? reservationType;
GuaranteedFixedPriceTerms({
this.fixedPrices,
this.guaranteedImpressions,
this.guaranteedLooks,
this.impressionCap,
this.minimumDailyLooks,
this.percentShareOfVoice,
this.reservationType,
});
GuaranteedFixedPriceTerms.fromJson(core.Map json_)
: this(
fixedPrices: (json_['fixedPrices'] as core.List?)
?.map(
(value) => PricePerBuyer.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
guaranteedImpressions: json_['guaranteedImpressions'] as core.String?,
guaranteedLooks: json_['guaranteedLooks'] as core.String?,
impressionCap: json_['impressionCap'] as core.String?,
minimumDailyLooks: json_['minimumDailyLooks'] as core.String?,
percentShareOfVoice: json_['percentShareOfVoice'] as core.String?,
reservationType: json_['reservationType'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final fixedPrices = this.fixedPrices;
final guaranteedImpressions = this.guaranteedImpressions;
final guaranteedLooks = this.guaranteedLooks;
final impressionCap = this.impressionCap;
final minimumDailyLooks = this.minimumDailyLooks;
final percentShareOfVoice = this.percentShareOfVoice;
final reservationType = this.reservationType;
return {
'fixedPrices': ?fixedPrices,
'guaranteedImpressions': ?guaranteedImpressions,
'guaranteedLooks': ?guaranteedLooks,
'impressionCap': ?impressionCap,
'minimumDailyLooks': ?minimumDailyLooks,
'percentShareOfVoice': ?percentShareOfVoice,
'reservationType': ?reservationType,
};
}
}
/// HTML content for a creative.
class HtmlContent {
/// The height of the HTML snippet in pixels.
core.int? height;
/// The HTML snippet that displays the ad when inserted in the web page.
core.String? snippet;
/// The width of the HTML snippet in pixels.
core.int? width;
HtmlContent({this.height, this.snippet, this.width});
HtmlContent.fromJson(core.Map json_)
: this(
height: json_['height'] as core.int?,
snippet: json_['snippet'] as core.String?,
width: json_['width'] as core.int?,
);
core.Map<core.String, core.dynamic> toJson() {
final height = this.height;
final snippet = this.snippet;
final width = this.width;
return {'height': ?height, 'snippet': ?snippet, 'width': ?width};
}
}
/// An image resource.
///
/// You may provide a larger image than was requested, so long as the aspect
/// ratio is preserved.
class Image {
/// Image height in pixels.
core.int? height;
/// The URL of the image.
core.String? url;
/// Image width in pixels.
core.int? width;
Image({this.height, this.url, this.width});
Image.fromJson(core.Map json_)
: this(
height: json_['height'] as core.int?,
url: json_['url'] as core.String?,
width: json_['width'] as core.int?,
);
core.Map<core.String, core.dynamic> toJson() {
final height = this.height;
final url = this.url;
final width = this.width;
return {'height': ?height, 'url': ?url, 'width': ?width};
}
}
/// The set of metrics that are measured in numbers of impressions, representing
/// how many impressions with the specified dimension values were considered
/// eligible at each stage of the bidding funnel.
class ImpressionMetricsRow {
/// The number of impressions available to the buyer on Ad Exchange.
///
/// In some cases this value may be unavailable.
MetricValue? availableImpressions;
/// The number of impressions for which Ad Exchange sent the buyer a bid
/// request.
MetricValue? bidRequests;
/// The number of impressions that match the buyer's inventory pretargeting.
MetricValue? inventoryMatches;
/// The number of impressions for which Ad Exchange received a response from
/// the buyer that contained at least one applicable bid.
MetricValue? responsesWithBids;
/// The values of all dimensions associated with metric values in this row.
RowDimensions? rowDimensions;
/// The number of impressions for which the buyer successfully sent a response
/// to Ad Exchange.
MetricValue? successfulResponses;
ImpressionMetricsRow({
this.availableImpressions,
this.bidRequests,
this.inventoryMatches,
this.responsesWithBids,
this.rowDimensions,
this.successfulResponses,
});
ImpressionMetricsRow.fromJson(core.Map json_)
: this(
availableImpressions: json_.containsKey('availableImpressions')
? MetricValue.fromJson(
json_['availableImpressions']
as core.Map<core.String, core.dynamic>,
)
: null,
bidRequests: json_.containsKey('bidRequests')
? MetricValue.fromJson(
json_['bidRequests'] as core.Map<core.String, core.dynamic>,
)
: null,
inventoryMatches: json_.containsKey('inventoryMatches')
? MetricValue.fromJson(
json_['inventoryMatches']
as core.Map<core.String, core.dynamic>,
)
: null,
responsesWithBids: json_.containsKey('responsesWithBids')
? MetricValue.fromJson(
json_['responsesWithBids']
as core.Map<core.String, core.dynamic>,
)
: null,
rowDimensions: json_.containsKey('rowDimensions')
? RowDimensions.fromJson(
json_['rowDimensions'] as core.Map<core.String, core.dynamic>,
)
: null,
successfulResponses: json_.containsKey('successfulResponses')
? MetricValue.fromJson(
json_['successfulResponses']
as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final availableImpressions = this.availableImpressions;
final bidRequests = this.bidRequests;
final inventoryMatches = this.inventoryMatches;
final responsesWithBids = this.responsesWithBids;
final rowDimensions = this.rowDimensions;
final successfulResponses = this.successfulResponses;
return {
'availableImpressions': ?availableImpressions,
'bidRequests': ?bidRequests,
'inventoryMatches': ?inventoryMatches,
'responsesWithBids': ?responsesWithBids,
'rowDimensions': ?rowDimensions,
'successfulResponses': ?successfulResponses,
};
}
}
/// Represents the size of an ad unit that can be targeted on an ad request.
///
/// It only applies to Private Auction, AdX Preferred Deals and Auction
/// Packages. This targeting does not apply to Programmatic Guaranteed and
/// Preferred Deals in Ad Manager.
class InventorySizeTargeting {
/// A list of inventory sizes to be excluded.
core.List<AdSize>? excludedInventorySizes;
/// A list of inventory sizes to be included.
core.List<AdSize>? targetedInventorySizes;
InventorySizeTargeting({
this.excludedInventorySizes,
this.targetedInventorySizes,
});
InventorySizeTargeting.fromJson(core.Map json_)
: this(
excludedInventorySizes: (json_['excludedInventorySizes'] as core.List?)
?.map(
(value) =>
AdSize.fromJson(value as core.Map<core.String, core.dynamic>),
)
.toList(),
targetedInventorySizes: (json_['targetedInventorySizes'] as core.List?)
?.map(
(value) =>
AdSize.fromJson(value as core.Map<core.String, core.dynamic>),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final excludedInventorySizes = this.excludedInventorySizes;
final targetedInventorySizes = this.targetedInventorySizes;
return {
'excludedInventorySizes': ?excludedInventorySizes,
'targetedInventorySizes': ?targetedInventorySizes,
};
}
}
/// Response message for listing the metrics that are measured in number of
/// bids.
class ListBidMetricsResponse {
/// List of rows, each containing a set of bid metrics.
core.List<BidMetricsRow>? bidMetricsRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListBidMetricsRequest.pageToken field in the
/// subsequent call to the bidMetrics.list method to retrieve the next page of
/// results.
core.String? nextPageToken;
ListBidMetricsResponse({this.bidMetricsRows, this.nextPageToken});
ListBidMetricsResponse.fromJson(core.Map json_)
: this(
bidMetricsRows: (json_['bidMetricsRows'] as core.List?)
?.map(
(value) => BidMetricsRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final bidMetricsRows = this.bidMetricsRows;
final nextPageToken = this.nextPageToken;
return {'bidMetricsRows': ?bidMetricsRows, 'nextPageToken': ?nextPageToken};
}
}
/// Response message for listing all reasons that bid responses resulted in an
/// error.
class ListBidResponseErrorsResponse {
/// List of rows, with counts of bid responses aggregated by callout status.
core.List<CalloutStatusRow>? calloutStatusRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListBidResponseErrorsRequest.pageToken field in the
/// subsequent call to the bidResponseErrors.list method to retrieve the next
/// page of results.
core.String? nextPageToken;
ListBidResponseErrorsResponse({this.calloutStatusRows, this.nextPageToken});
ListBidResponseErrorsResponse.fromJson(core.Map json_)
: this(
calloutStatusRows: (json_['calloutStatusRows'] as core.List?)
?.map(
(value) => CalloutStatusRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final calloutStatusRows = this.calloutStatusRows;
final nextPageToken = this.nextPageToken;
return {
'calloutStatusRows': ?calloutStatusRows,
'nextPageToken': ?nextPageToken,
};
}
}
/// Response message for listing all reasons that bid responses were considered
/// to have no applicable bids.
class ListBidResponsesWithoutBidsResponse {
/// List of rows, with counts of bid responses without bids aggregated by
/// status.
core.List<BidResponseWithoutBidsStatusRow>? bidResponseWithoutBidsStatusRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListBidResponsesWithoutBidsRequest.pageToken field
/// in the subsequent call to the bidResponsesWithoutBids.list method to
/// retrieve the next page of results.
core.String? nextPageToken;
ListBidResponsesWithoutBidsResponse({
this.bidResponseWithoutBidsStatusRows,
this.nextPageToken,
});
ListBidResponsesWithoutBidsResponse.fromJson(core.Map json_)
: this(
bidResponseWithoutBidsStatusRows:
(json_['bidResponseWithoutBidsStatusRows'] as core.List?)
?.map(
(value) => BidResponseWithoutBidsStatusRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final bidResponseWithoutBidsStatusRows =
this.bidResponseWithoutBidsStatusRows;
final nextPageToken = this.nextPageToken;
return {
'bidResponseWithoutBidsStatusRows': ?bidResponseWithoutBidsStatusRows,
'nextPageToken': ?nextPageToken,
};
}
}
class ListClientUserInvitationsResponse {
/// The returned list of client users.
core.List<ClientUserInvitation>? invitations;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListClientUserInvitationsRequest.pageToken field in
/// the subsequent call to the clients.invitations.list method to retrieve the
/// next page of results.
core.String? nextPageToken;
ListClientUserInvitationsResponse({this.invitations, this.nextPageToken});
ListClientUserInvitationsResponse.fromJson(core.Map json_)
: this(
invitations: (json_['invitations'] as core.List?)
?.map(
(value) => ClientUserInvitation.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final invitations = this.invitations;
final nextPageToken = this.nextPageToken;
return {'invitations': ?invitations, 'nextPageToken': ?nextPageToken};
}
}
class ListClientUsersResponse {
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListClientUsersRequest.pageToken field in the
/// subsequent call to the clients.invitations.list method to retrieve the
/// next page of results.
core.String? nextPageToken;
/// The returned list of client users.
core.List<ClientUser>? users;
ListClientUsersResponse({this.nextPageToken, this.users});
ListClientUsersResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_['nextPageToken'] as core.String?,
users: (json_['users'] as core.List?)
?.map(
(value) => ClientUser.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final nextPageToken = this.nextPageToken;
final users = this.users;
return {'nextPageToken': ?nextPageToken, 'users': ?users};
}
}
class ListClientsResponse {
/// The returned list of clients.
core.List<Client>? clients;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListClientsRequest.pageToken field in the
/// subsequent call to the accounts.clients.list method to retrieve the next
/// page of results.
core.String? nextPageToken;
ListClientsResponse({this.clients, this.nextPageToken});
ListClientsResponse.fromJson(core.Map json_)
: this(
clients: (json_['clients'] as core.List?)
?.map(
(value) =>
Client.fromJson(value as core.Map<core.String, core.dynamic>),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final clients = this.clients;
final nextPageToken = this.nextPageToken;
return {'clients': ?clients, 'nextPageToken': ?nextPageToken};
}
}
/// Response message for listing all creatives associated with a given filtered
/// bid reason.
class ListCreativeStatusBreakdownByCreativeResponse {
/// List of rows, with counts of bids with a given creative status aggregated
/// by creative.
core.List<FilteredBidCreativeRow>? filteredBidCreativeRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the
/// ListCreativeStatusBreakdownByCreativeRequest.pageToken field in the
/// subsequent call to the filteredBids.creatives.list method to retrieve the
/// next page of results.
core.String? nextPageToken;
ListCreativeStatusBreakdownByCreativeResponse({
this.filteredBidCreativeRows,
this.nextPageToken,
});
ListCreativeStatusBreakdownByCreativeResponse.fromJson(core.Map json_)
: this(
filteredBidCreativeRows:
(json_['filteredBidCreativeRows'] as core.List?)
?.map(
(value) => FilteredBidCreativeRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final filteredBidCreativeRows = this.filteredBidCreativeRows;
final nextPageToken = this.nextPageToken;
return {
'filteredBidCreativeRows': ?filteredBidCreativeRows,
'nextPageToken': ?nextPageToken,
};
}
}
/// Response message for listing all details associated with a given filtered
/// bid reason.
class ListCreativeStatusBreakdownByDetailResponse {
/// The type of detail that the detail IDs represent.
/// Possible string values are:
/// - "DETAIL_TYPE_UNSPECIFIED" : A placeholder for an undefined status. This
/// value will never be returned in responses.
/// - "CREATIVE_ATTRIBUTE" : Indicates that the detail ID refers to a creative
/// attribute; see
/// \[publisher-excludable-creative-attributes\](https://developers.google.com/authorized-buyers/rtb/downloads/publisher-excludable-creative-attributes).
/// - "VENDOR" : Indicates that the detail ID refers to a vendor; see
/// [vendors](https://developers.google.com/authorized-buyers/rtb/downloads/vendors).
/// This namespace is different from that of the `ATP_VENDOR` detail type.
/// - "SENSITIVE_CATEGORY" : Indicates that the detail ID refers to a
/// sensitive category; see
/// \[ad-sensitive-categories\](https://developers.google.com/authorized-buyers/rtb/downloads/ad-sensitive-categories).
/// - "PRODUCT_CATEGORY" : Indicates that the detail ID refers to a product
/// category; see
/// \[ad-product-categories\](https://developers.google.com/authorized-buyers/rtb/downloads/ad-product-categories).
/// - "DISAPPROVAL_REASON" : Indicates that the detail ID refers to a
/// disapproval reason; see DisapprovalReason enum in
/// \[snippet-status-report-proto\](https://developers.google.com/authorized-buyers/rtb/downloads/snippet-status-report-proto).
/// - "POLICY_TOPIC" : Indicates that the detail ID refers to a policy topic.
/// - "ATP_VENDOR" : Indicates that the detail ID refers to an ad technology
/// provider (ATP); see
/// [providers](https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv).
/// This namespace is different from the `VENDOR` detail type; see
/// [ad technology providers](https://support.google.com/admanager/answer/9012903)
/// for more information.
/// - "VENDOR_DOMAIN" : Indicates that the detail string refers the domain of
/// an unknown vendor.
/// - "GVL_ID" : Indicates that the detail ID refers an IAB GVL ID which
/// Google did not detect in the latest TCF Vendor List. See
/// [Global Vendor List](https://vendor-list.consensu.org/v2/vendor-list.json)
core.String? detailType;
/// List of rows, with counts of bids with a given creative status aggregated
/// by detail.
core.List<FilteredBidDetailRow>? filteredBidDetailRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the
/// ListCreativeStatusBreakdownByDetailRequest.pageToken field in the
/// subsequent call to the filteredBids.details.list method to retrieve the
/// next page of results.
core.String? nextPageToken;
ListCreativeStatusBreakdownByDetailResponse({
this.detailType,
this.filteredBidDetailRows,
this.nextPageToken,
});
ListCreativeStatusBreakdownByDetailResponse.fromJson(core.Map json_)
: this(
detailType: json_['detailType'] as core.String?,
filteredBidDetailRows: (json_['filteredBidDetailRows'] as core.List?)
?.map(
(value) => FilteredBidDetailRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final detailType = this.detailType;
final filteredBidDetailRows = this.filteredBidDetailRows;
final nextPageToken = this.nextPageToken;
return {
'detailType': ?detailType,
'filteredBidDetailRows': ?filteredBidDetailRows,
'nextPageToken': ?nextPageToken,
};
}
}
/// A response for listing creatives.
class ListCreativesResponse {
/// The list of creatives.
core.List<Creative>? creatives;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListCreativesRequest.page_token field in the
/// subsequent call to `ListCreatives` method to retrieve the next page of
/// results.
core.String? nextPageToken;
ListCreativesResponse({this.creatives, this.nextPageToken});
ListCreativesResponse.fromJson(core.Map json_)
: this(
creatives: (json_['creatives'] as core.List?)
?.map(
(value) => Creative.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final creatives = this.creatives;
final nextPageToken = this.nextPageToken;
return {'creatives': ?creatives, 'nextPageToken': ?nextPageToken};
}
}
/// A response for listing creative and deal associations
class ListDealAssociationsResponse {
/// The list of associations.
core.List<CreativeDealAssociation>? associations;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListDealAssociationsRequest.page_token field in the
/// subsequent call to 'ListDealAssociation' method to retrieve the next page
/// of results.
core.String? nextPageToken;
ListDealAssociationsResponse({this.associations, this.nextPageToken});
ListDealAssociationsResponse.fromJson(core.Map json_)
: this(
associations: (json_['associations'] as core.List?)
?.map(
(value) => CreativeDealAssociation.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final associations = this.associations;
final nextPageToken = this.nextPageToken;
return {'associations': ?associations, 'nextPageToken': ?nextPageToken};
}
}
/// Response message for listing filter sets.
class ListFilterSetsResponse {
/// The filter sets belonging to the buyer.
core.List<FilterSet>? filterSets;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListFilterSetsRequest.pageToken field in the
/// subsequent call to the accounts.filterSets.list method to retrieve the
/// next page of results.
core.String? nextPageToken;
ListFilterSetsResponse({this.filterSets, this.nextPageToken});
ListFilterSetsResponse.fromJson(core.Map json_)
: this(
filterSets: (json_['filterSets'] as core.List?)
?.map(
(value) => FilterSet.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final filterSets = this.filterSets;
final nextPageToken = this.nextPageToken;
return {'filterSets': ?filterSets, 'nextPageToken': ?nextPageToken};
}
}
/// Response message for listing all reasons that bid requests were filtered and
/// not sent to the buyer.
class ListFilteredBidRequestsResponse {
/// List of rows, with counts of filtered bid requests aggregated by callout
/// status.
core.List<CalloutStatusRow>? calloutStatusRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListFilteredBidRequestsRequest.pageToken field in
/// the subsequent call to the filteredBidRequests.list method to retrieve the
/// next page of results.
core.String? nextPageToken;
ListFilteredBidRequestsResponse({this.calloutStatusRows, this.nextPageToken});
ListFilteredBidRequestsResponse.fromJson(core.Map json_)
: this(
calloutStatusRows: (json_['calloutStatusRows'] as core.List?)
?.map(
(value) => CalloutStatusRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final calloutStatusRows = this.calloutStatusRows;
final nextPageToken = this.nextPageToken;
return {
'calloutStatusRows': ?calloutStatusRows,
'nextPageToken': ?nextPageToken,
};
}
}
/// Response message for listing all reasons that bids were filtered from the
/// auction.
class ListFilteredBidsResponse {
/// List of rows, with counts of filtered bids aggregated by filtering reason
/// (for example, creative status).
core.List<CreativeStatusRow>? creativeStatusRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListFilteredBidsRequest.pageToken field in the
/// subsequent call to the filteredBids.list method to retrieve the next page
/// of results.
core.String? nextPageToken;
ListFilteredBidsResponse({this.creativeStatusRows, this.nextPageToken});
ListFilteredBidsResponse.fromJson(core.Map json_)
: this(
creativeStatusRows: (json_['creativeStatusRows'] as core.List?)
?.map(
(value) => CreativeStatusRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final creativeStatusRows = this.creativeStatusRows;
final nextPageToken = this.nextPageToken;
return {
'creativeStatusRows': ?creativeStatusRows,
'nextPageToken': ?nextPageToken,
};
}
}
/// Response message for listing the metrics that are measured in number of
/// impressions.
class ListImpressionMetricsResponse {
/// List of rows, each containing a set of impression metrics.
core.List<ImpressionMetricsRow>? impressionMetricsRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListImpressionMetricsRequest.pageToken field in the
/// subsequent call to the impressionMetrics.list method to retrieve the next
/// page of results.
core.String? nextPageToken;
ListImpressionMetricsResponse({
this.impressionMetricsRows,
this.nextPageToken,
});
ListImpressionMetricsResponse.fromJson(core.Map json_)
: this(
impressionMetricsRows: (json_['impressionMetricsRows'] as core.List?)
?.map(
(value) => ImpressionMetricsRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final impressionMetricsRows = this.impressionMetricsRows;
final nextPageToken = this.nextPageToken;
return {
'impressionMetricsRows': ?impressionMetricsRows,
'nextPageToken': ?nextPageToken,
};
}
}
/// Response message for listing all reasons that bids lost in the auction.
class ListLosingBidsResponse {
/// List of rows, with counts of losing bids aggregated by loss reason (for
/// example, creative status).
core.List<CreativeStatusRow>? creativeStatusRows;
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListLosingBidsRequest.pageToken field in the
/// subsequent call to the losingBids.list method to retrieve the next page of
/// results.
core.String? nextPageToken;
ListLosingBidsResponse({this.creativeStatusRows, this.nextPageToken});
ListLosingBidsResponse.fromJson(core.Map json_)
: this(
creativeStatusRows: (json_['creativeStatusRows'] as core.List?)
?.map(
(value) => CreativeStatusRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
nextPageToken: json_['nextPageToken'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final creativeStatusRows = this.creativeStatusRows;
final nextPageToken = this.nextPageToken;
return {
'creativeStatusRows': ?creativeStatusRows,
'nextPageToken': ?nextPageToken,
};
}
}
/// Response message for listing all reasons for which a buyer was not billed
/// for a winning bid.
class ListNonBillableWinningBidsResponse {
/// A token to retrieve the next page of results.
///
/// Pass this value in the ListNonBillableWinningBidsRequest.pageToken field
/// in the subsequent call to the nonBillableWinningBids.list method to
/// retrieve the next page of results.
core.String? nextPageToken;
/// List of rows, with counts of bids not billed aggregated by reason.
core.List<NonBillableWinningBidStatusRow>? nonBillableWinningBidStatusRows;
ListNonBillableWinningBidsResponse({
this.nextPageToken,
this.nonBillableWinningBidStatusRows,
});
ListNonBillableWinningBidsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_['nextPageToken'] as core.String?,
nonBillableWinningBidStatusRows:
(json_['nonBillableWinningBidStatusRows'] as core.List?)
?.map(
(value) => NonBillableWinningBidStatusRow.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final nextPageToken = this.nextPageToken;
final nonBillableWinningBidStatusRows =
this.nonBillableWinningBidStatusRows;
return {
'nextPageToken': ?nextPageToken,
'nonBillableWinningBidStatusRows': ?nonBillableWinningBidStatusRows,
};
}
}
/// Response message for listing products visible to the buyer.
class ListProductsResponse {
/// List pagination support.
core.String? nextPageToken;
/// The list of matching products at their head revision number.
core.List<Product>? products;
ListProductsResponse({this.nextPageToken, this.products});
ListProductsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_['nextPageToken'] as core.String?,
products: (json_['products'] as core.List?)
?.map(
(value) => Product.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final nextPageToken = this.nextPageToken;
final products = this.products;
return {'nextPageToken': ?nextPageToken, 'products': ?products};
}
}
/// Response message for listing proposals.
class ListProposalsResponse {
/// Continuation token for fetching the next page of results.
core.String? nextPageToken;
/// The list of proposals.
core.List<Proposal>? proposals;
ListProposalsResponse({this.nextPageToken, this.proposals});
ListProposalsResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_['nextPageToken'] as core.String?,
proposals: (json_['proposals'] as core.List?)
?.map(
(value) => Proposal.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final nextPageToken = this.nextPageToken;
final proposals = this.proposals;
return {'nextPageToken': ?nextPageToken, 'proposals': ?proposals};
}
}
/// Response message for profiles visible to the buyer.
class ListPublisherProfilesResponse {
/// List pagination support
core.String? nextPageToken;
/// The list of matching publisher profiles.
core.List<PublisherProfile>? publisherProfiles;
ListPublisherProfilesResponse({this.nextPageToken, this.publisherProfiles});
ListPublisherProfilesResponse.fromJson(core.Map json_)
: this(
nextPageToken: json_['nextPageToken'] as core.String?,
publisherProfiles: (json_['publisherProfiles'] as core.List?)
?.map(
(value) => PublisherProfile.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final nextPageToken = this.nextPageToken;
final publisherProfiles = this.publisherProfiles;
return {
'nextPageToken': ?nextPageToken,
'publisherProfiles': ?publisherProfiles,
};
}
}
/// The Geo criteria the restriction applies to.
///
/// Output only.
class LocationContext {
/// IDs representing the geo location for this context.
///
/// Refer to the
/// \[geo-table.csv\](https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv)
/// file for different geo criteria IDs.
core.List<core.int>? geoCriteriaIds;
LocationContext({this.geoCriteriaIds});
LocationContext.fromJson(core.Map json_)
: this(
geoCriteriaIds: (json_['geoCriteriaIds'] as core.List?)
?.map((value) => value as core.int)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final geoCriteriaIds = this.geoCriteriaIds;
return {'geoCriteriaIds': ?geoCriteriaIds};
}
}
/// Targeting represents different criteria that can be used by advertisers to
/// target ad inventory.
///
/// For example, they can choose to target ad requests only if the user is in
/// the US. Multiple types of targeting are always applied as a logical AND,
/// unless noted otherwise.
class MarketplaceTargeting {
/// Geo criteria IDs to be included/excluded.
CriteriaTargeting? geoTargeting;
/// Inventory sizes to be included/excluded.
InventorySizeTargeting? inventorySizeTargeting;
/// Placement targeting information, for example, URL, mobile applications.
PlacementTargeting? placementTargeting;
/// Technology targeting information, for example, operating system, device
/// category.
TechnologyTargeting? technologyTargeting;
/// Video targeting information.
VideoTargeting? videoTargeting;
MarketplaceTargeting({
this.geoTargeting,
this.inventorySizeTargeting,
this.placementTargeting,
this.technologyTargeting,
this.videoTargeting,
});
MarketplaceTargeting.fromJson(core.Map json_)
: this(
geoTargeting: json_.containsKey('geoTargeting')
? CriteriaTargeting.fromJson(
json_['geoTargeting'] as core.Map<core.String, core.dynamic>,
)
: null,
inventorySizeTargeting: json_.containsKey('inventorySizeTargeting')
? InventorySizeTargeting.fromJson(
json_['inventorySizeTargeting']
as core.Map<core.String, core.dynamic>,
)
: null,
placementTargeting: json_.containsKey('placementTargeting')
? PlacementTargeting.fromJson(
json_['placementTargeting']
as core.Map<core.String, core.dynamic>,
)
: null,
technologyTargeting: json_.containsKey('technologyTargeting')
? TechnologyTargeting.fromJson(
json_['technologyTargeting']
as core.Map<core.String, core.dynamic>,
)
: null,
videoTargeting: json_.containsKey('videoTargeting')
? VideoTargeting.fromJson(
json_['videoTargeting'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final geoTargeting = this.geoTargeting;
final inventorySizeTargeting = this.inventorySizeTargeting;
final placementTargeting = this.placementTargeting;
final technologyTargeting = this.technologyTargeting;
final videoTargeting = this.videoTargeting;
return {
'geoTargeting': ?geoTargeting,
'inventorySizeTargeting': ?inventorySizeTargeting,
'placementTargeting': ?placementTargeting,
'technologyTargeting': ?technologyTargeting,
'videoTargeting': ?videoTargeting,
};
}
}
/// A metric value, with an expected value and a variance; represents a count
/// that may be either exact or estimated (for example, when sampled).
class MetricValue {
/// The expected value of the metric.
core.String? value;
/// The variance (for example, square of the standard deviation) of the metric
/// value.
///
/// If value is exact, variance is 0. Can be used to calculate margin of error
/// as a percentage of value, using the following formula, where Z is the
/// standard constant that depends on the preferred size of the confidence
/// interval (for example, for 90% confidence interval, use Z = 1.645):
/// marginOfError = 100 * Z * sqrt(variance) / value
core.String? variance;
MetricValue({this.value, this.variance});
MetricValue.fromJson(core.Map json_)
: this(
value: json_['value'] as core.String?,
variance: json_['variance'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final value = this.value;
final variance = this.variance;
return {'value': ?value, 'variance': ?variance};
}
}
/// Mobile application targeting settings.
class MobileApplicationTargeting {
/// Publisher owned apps to be targeted or excluded by the publisher to
/// display the ads in.
FirstPartyMobileApplicationTargeting? firstPartyTargeting;
MobileApplicationTargeting({this.firstPartyTargeting});
MobileApplicationTargeting.fromJson(core.Map json_)
: this(
firstPartyTargeting: json_.containsKey('firstPartyTargeting')
? FirstPartyMobileApplicationTargeting.fromJson(
json_['firstPartyTargeting']
as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final firstPartyTargeting = this.firstPartyTargeting;
return {'firstPartyTargeting': ?firstPartyTargeting};
}
}
/// Represents an amount of money with its currency type.
class Money {
/// The three-letter currency code defined in ISO 4217.
core.String? currencyCode;
/// Number of nano (10^-9) units of the amount.
///
/// The value must be between -999,999,999 and +999,999,999 inclusive. If
/// `units` is positive, `nanos` must be positive or zero. If `units` is zero,
/// `nanos` can be positive, zero, or negative. If `units` is negative,
/// `nanos` must be negative or zero. For example $-1.75 is represented as
/// `units`=-1 and `nanos`=-750,000,000.
core.int? nanos;
/// The whole units of the amount.
///
/// For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
core.String? units;
Money({this.currencyCode, this.nanos, this.units});
Money.fromJson(core.Map json_)
: this(
currencyCode: json_['currencyCode'] as core.String?,
nanos: json_['nanos'] as core.int?,
units: json_['units'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final currencyCode = this.currencyCode;
final nanos = this.nanos;
final units = this.units;
return {'currencyCode': ?currencyCode, 'nanos': ?nanos, 'units': ?units};
}
}
/// Native content for a creative.
class NativeContent {
/// The name of the advertiser or sponsor, to be displayed in the ad creative.
core.String? advertiserName;
/// The app icon, for app download ads.
Image? appIcon;
/// A long description of the ad.
core.String? body;
/// A label for the button that the user is supposed to click.
core.String? callToAction;
/// The URL that the browser/SDK will load when the user clicks the ad.
core.String? clickLinkUrl;
/// The URL to use for click tracking.
core.String? clickTrackingUrl;
/// A short title for the ad.
core.String? headline;
/// A large image.
Image? image;
/// A smaller image, for the advertiser's logo.
Image? logo;
/// The price of the promoted app including currency info.
core.String? priceDisplayText;
/// The app rating in the app store.
///
/// Must be in the range \[0-5\].
core.double? starRating;
/// The URL to the app store to purchase/download the promoted app.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.String? storeUrl;
/// The URL to fetch a native video ad.
core.String? videoUrl;
NativeContent({
this.advertiserName,
this.appIcon,
this.body,
this.callToAction,
this.clickLinkUrl,
this.clickTrackingUrl,
this.headline,
this.image,
this.logo,
this.priceDisplayText,
this.starRating,
this.storeUrl,
this.videoUrl,
});
NativeContent.fromJson(core.Map json_)
: this(
advertiserName: json_['advertiserName'] as core.String?,
appIcon: json_.containsKey('appIcon')
? Image.fromJson(
json_['appIcon'] as core.Map<core.String, core.dynamic>,
)
: null,
body: json_['body'] as core.String?,
callToAction: json_['callToAction'] as core.String?,
clickLinkUrl: json_['clickLinkUrl'] as core.String?,
clickTrackingUrl: json_['clickTrackingUrl'] as core.String?,
headline: json_['headline'] as core.String?,
image: json_.containsKey('image')
? Image.fromJson(
json_['image'] as core.Map<core.String, core.dynamic>,
)
: null,
logo: json_.containsKey('logo')
? Image.fromJson(
json_['logo'] as core.Map<core.String, core.dynamic>,
)
: null,
priceDisplayText: json_['priceDisplayText'] as core.String?,
starRating: (json_['starRating'] as core.num?)?.toDouble(),
storeUrl: json_['storeUrl'] as core.String?,
videoUrl: json_['videoUrl'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final advertiserName = this.advertiserName;
final appIcon = this.appIcon;
final body = this.body;
final callToAction = this.callToAction;
final clickLinkUrl = this.clickLinkUrl;
final clickTrackingUrl = this.clickTrackingUrl;
final headline = this.headline;
final image = this.image;
final logo = this.logo;
final priceDisplayText = this.priceDisplayText;
final starRating = this.starRating;
final storeUrl = this.storeUrl;
final videoUrl = this.videoUrl;
return {
'advertiserName': ?advertiserName,
'appIcon': ?appIcon,
'body': ?body,
'callToAction': ?callToAction,
'clickLinkUrl': ?clickLinkUrl,
'clickTrackingUrl': ?clickTrackingUrl,
'headline': ?headline,
'image': ?image,
'logo': ?logo,
'priceDisplayText': ?priceDisplayText,
'starRating': ?starRating,
'storeUrl': ?storeUrl,
'videoUrl': ?videoUrl,
};
}
}
/// The number of winning bids with the specified dimension values for which the
/// buyer was not billed, as described by the specified status.
class NonBillableWinningBidStatusRow {
/// The number of bids with the specified status.
MetricValue? bidCount;
/// The values of all dimensions associated with metric values in this row.
RowDimensions? rowDimensions;
/// The status specifying why the winning bids were not billed.
/// Possible string values are:
/// - "STATUS_UNSPECIFIED" : A placeholder for an undefined status. This value
/// will never be returned in responses.
/// - "AD_NOT_RENDERED" : The buyer was not billed because the ad was not
/// rendered by the publisher.
/// - "INVALID_IMPRESSION" : The buyer was not billed because the impression
/// won by the bid was determined to be invalid.
/// - "FATAL_VAST_ERROR" : A video impression was served but a fatal error was
/// reported from the client during playback.
/// - "LOST_IN_MEDIATION" : The buyer was not billed because the ad was
/// outplaced in the mediation waterfall.
/// - "OVERDELIVERED_IMPRESSION" : The impression was not billed because it
/// exceeded a guaranteed deal delivery goal.
core.String? status;
NonBillableWinningBidStatusRow({
this.bidCount,
this.rowDimensions,
this.status,
});
NonBillableWinningBidStatusRow.fromJson(core.Map json_)
: this(
bidCount: json_.containsKey('bidCount')
? MetricValue.fromJson(
json_['bidCount'] as core.Map<core.String, core.dynamic>,
)
: null,
rowDimensions: json_.containsKey('rowDimensions')
? RowDimensions.fromJson(
json_['rowDimensions'] as core.Map<core.String, core.dynamic>,
)
: null,
status: json_['status'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final bidCount = this.bidCount;
final rowDimensions = this.rowDimensions;
final status = this.status;
return {
'bidCount': ?bidCount,
'rowDimensions': ?rowDimensions,
'status': ?status,
};
}
}
/// Terms for Private Auctions.
///
/// Note that Private Auctions can be created only by the seller, but they can
/// be returned in a get or list request.
class NonGuaranteedAuctionTerms {
/// True if open auction buyers are allowed to compete with invited buyers in
/// this private auction.
core.bool? autoOptimizePrivateAuction;
/// Reserve price for the specified buyer.
core.List<PricePerBuyer>? reservePricesPerBuyer;
NonGuaranteedAuctionTerms({
this.autoOptimizePrivateAuction,
this.reservePricesPerBuyer,
});
NonGuaranteedAuctionTerms.fromJson(core.Map json_)
: this(
autoOptimizePrivateAuction:
json_['autoOptimizePrivateAuction'] as core.bool?,
reservePricesPerBuyer: (json_['reservePricesPerBuyer'] as core.List?)
?.map(
(value) => PricePerBuyer.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final autoOptimizePrivateAuction = this.autoOptimizePrivateAuction;
final reservePricesPerBuyer = this.reservePricesPerBuyer;
return {
'autoOptimizePrivateAuction': ?autoOptimizePrivateAuction,
'reservePricesPerBuyer': ?reservePricesPerBuyer,
};
}
}
/// Terms for Preferred Deals.
class NonGuaranteedFixedPriceTerms {
/// Fixed price for the specified buyer.
core.List<PricePerBuyer>? fixedPrices;
NonGuaranteedFixedPriceTerms({this.fixedPrices});
NonGuaranteedFixedPriceTerms.fromJson(core.Map json_)
: this(
fixedPrices: (json_['fixedPrices'] as core.List?)
?.map(
(value) => PricePerBuyer.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final fixedPrices = this.fixedPrices;
return {'fixedPrices': ?fixedPrices};
}
}
/// A proposal may be associated to several notes.
class Note {
/// The timestamp for when this note was created.
///
/// Output only.
core.String? createTime;
/// The role of the person (buyer/seller) creating the note.
///
/// Output only.
/// Possible string values are:
/// - "BUYER_SELLER_ROLE_UNSPECIFIED" : A placeholder for an undefined
/// buyer/seller role.
/// - "BUYER" : Specifies the role as buyer.
/// - "SELLER" : Specifies the role as seller.
core.String? creatorRole;
/// The actual note to attach.
///
/// (max-length: 1024 unicode code units) Note: This field may be set only
/// when creating the resource. Modifying this field while updating the
/// resource will result in an error.
core.String? note;
/// The unique ID for the note.
///
/// Output only.
core.String? noteId;
/// The revision number of the proposal when the note is created.
///
/// Output only.
core.String? proposalRevision;
Note({
this.createTime,
this.creatorRole,
this.note,
this.noteId,
this.proposalRevision,
});
Note.fromJson(core.Map json_)
: this(
createTime: json_['createTime'] as core.String?,
creatorRole: json_['creatorRole'] as core.String?,
note: json_['note'] as core.String?,
noteId: json_['noteId'] as core.String?,
proposalRevision: json_['proposalRevision'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final createTime = this.createTime;
final creatorRole = this.creatorRole;
final note = this.note;
final noteId = this.noteId;
final proposalRevision = this.proposalRevision;
return {
'createTime': ?createTime,
'creatorRole': ?creatorRole,
'note': ?note,
'noteId': ?noteId,
'proposalRevision': ?proposalRevision,
};
}
}
/// Represents targeting information for operating systems.
class OperatingSystemTargeting {
/// IDs of operating systems to be included/excluded.
CriteriaTargeting? operatingSystemCriteria;
/// IDs of operating system versions to be included/excluded.
CriteriaTargeting? operatingSystemVersionCriteria;
OperatingSystemTargeting({
this.operatingSystemCriteria,
this.operatingSystemVersionCriteria,
});
OperatingSystemTargeting.fromJson(core.Map json_)
: this(
operatingSystemCriteria: json_.containsKey('operatingSystemCriteria')
? CriteriaTargeting.fromJson(
json_['operatingSystemCriteria']
as core.Map<core.String, core.dynamic>,
)
: null,
operatingSystemVersionCriteria:
json_.containsKey('operatingSystemVersionCriteria')
? CriteriaTargeting.fromJson(
json_['operatingSystemVersionCriteria']
as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final operatingSystemCriteria = this.operatingSystemCriteria;
final operatingSystemVersionCriteria = this.operatingSystemVersionCriteria;
return {
'operatingSystemCriteria': ?operatingSystemCriteria,
'operatingSystemVersionCriteria': ?operatingSystemVersionCriteria,
};
}
}
/// Request message to pause serving for finalized deals.
class PauseProposalDealsRequest {
/// The external_deal_id's of the deals to be paused.
///
/// If empty, all the deals in the proposal will be paused.
core.List<core.String>? externalDealIds;
/// The reason why the deals are being paused.
///
/// This human readable message will be displayed in the seller's UI. (Max
/// length: 1000 unicode code units.)
core.String? reason;
PauseProposalDealsRequest({this.externalDealIds, this.reason});
PauseProposalDealsRequest.fromJson(core.Map json_)
: this(
externalDealIds: (json_['externalDealIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
reason: json_['reason'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final externalDealIds = this.externalDealIds;
final reason = this.reason;
return {'externalDealIds': ?externalDealIds, 'reason': ?reason};
}
}
/// Request message to pause serving for an already-finalized proposal.
class PauseProposalRequest {
/// The reason why the proposal is being paused.
///
/// This human readable message will be displayed in the seller's UI. (Max
/// length: 1000 unicode code units.)
core.String? reason;
PauseProposalRequest({this.reason});
PauseProposalRequest.fromJson(core.Map json_)
: this(reason: json_['reason'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final reason = this.reason;
return {'reason': ?reason};
}
}
/// Represents targeting about where the ads can appear, for example, certain
/// sites or mobile applications.
///
/// Different placement targeting types will be logically OR'ed.
class PlacementTargeting {
/// Mobile application targeting information in a deal.
///
/// This doesn't apply to Auction Packages.
MobileApplicationTargeting? mobileApplicationTargeting;
/// URLs to be included/excluded.
UrlTargeting? urlTargeting;
PlacementTargeting({this.mobileApplicationTargeting, this.urlTargeting});
PlacementTargeting.fromJson(core.Map json_)
: this(
mobileApplicationTargeting:
json_.containsKey('mobileApplicationTargeting')
? MobileApplicationTargeting.fromJson(
json_['mobileApplicationTargeting']
as core.Map<core.String, core.dynamic>,
)
: null,
urlTargeting: json_.containsKey('urlTargeting')
? UrlTargeting.fromJson(
json_['urlTargeting'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final mobileApplicationTargeting = this.mobileApplicationTargeting;
final urlTargeting = this.urlTargeting;
return {
'mobileApplicationTargeting': ?mobileApplicationTargeting,
'urlTargeting': ?urlTargeting,
};
}
}
/// The type of platform the restriction applies to.
///
/// Output only.
class PlatformContext {
/// The platforms this restriction applies to.
core.List<core.String>? platforms;
PlatformContext({this.platforms});
PlatformContext.fromJson(core.Map json_)
: this(
platforms: (json_['platforms'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final platforms = this.platforms;
return {'platforms': ?platforms};
}
}
/// Represents a price and a pricing type for a product / deal.
class Price {
/// The actual price with currency specified.
Money? amount;
/// The pricing type for the deal/product.
///
/// (default: CPM)
/// Possible string values are:
/// - "PRICING_TYPE_UNSPECIFIED" : A placeholder for an undefined pricing
/// type. If the pricing type is unspecified, `COST_PER_MILLE` will be used
/// instead.
/// - "COST_PER_MILLE" : Cost per thousand impressions.
/// - "COST_PER_DAY" : Cost per day
core.String? pricingType;
Price({this.amount, this.pricingType});
Price.fromJson(core.Map json_)
: this(
amount: json_.containsKey('amount')
? Money.fromJson(
json_['amount'] as core.Map<core.String, core.dynamic>,
)
: null,
pricingType: json_['pricingType'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final amount = this.amount;
final pricingType = this.pricingType;
return {'amount': ?amount, 'pricingType': ?pricingType};
}
}
/// Used to specify pricing rules for buyers/advertisers.
///
/// Each PricePerBuyer in a product can become 0 or 1 deals. To check if there
/// is a PricePerBuyer for a particular buyer or buyer/advertiser pair, we look
/// for the most specific matching rule - we first look for a rule matching the
/// buyer and advertiser, next a rule with the buyer but an empty advertiser
/// list, and otherwise look for a matching rule where no buyer is set.
class PricePerBuyer {
/// The list of advertisers for this price when associated with this buyer.
///
/// If empty, all advertisers with this buyer pay this price.
core.List<core.String>? advertiserIds;
/// The buyer who will pay this price.
///
/// If unset, all buyers can pay this price (if the advertisers match, and
/// there's no more specific rule matching the buyer).
Buyer? buyer;
/// The specified price.
Price? price;
PricePerBuyer({this.advertiserIds, this.buyer, this.price});
PricePerBuyer.fromJson(core.Map json_)
: this(
advertiserIds: (json_['advertiserIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
buyer: json_.containsKey('buyer')
? Buyer.fromJson(
json_['buyer'] as core.Map<core.String, core.dynamic>,
)
: null,
price: json_.containsKey('price')
? Price.fromJson(
json_['price'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final advertiserIds = this.advertiserIds;
final buyer = this.buyer;
final price = this.price;
return {'advertiserIds': ?advertiserIds, 'buyer': ?buyer, 'price': ?price};
}
}
/// Buyers are allowed to store certain types of private data in a
/// proposal/deal.
class PrivateData {
/// A buyer or seller specified reference ID.
///
/// This can be queried in the list operations (max-length: 1024 unicode code
/// units).
core.String? referenceId;
PrivateData({this.referenceId});
PrivateData.fromJson(core.Map json_)
: this(referenceId: json_['referenceId'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final referenceId = this.referenceId;
return {'referenceId': ?referenceId};
}
}
/// A product is a segment of inventory that a seller wants to sell.
///
/// It is associated with certain terms and targeting information which helps
/// the buyer know more about the inventory.
class Product {
/// The proposed end time for the deal.
///
/// The field will be truncated to the order of seconds during serving.
core.String? availableEndTime;
/// Inventory availability dates.
///
/// The start time will be truncated to seconds during serving. Thus, a field
/// specified as 3:23:34.456 (HH:mm:ss.SSS) will be truncated to 3:23:34 when
/// serving.
core.String? availableStartTime;
/// Creation time.
core.String? createTime;
/// Optional contact information for the creator of this product.
core.List<ContactInformation>? creatorContacts;
/// The display name for this product as set by the seller.
core.String? displayName;
/// If the creator has already signed off on the product, then the buyer can
/// finalize the deal by accepting the product as is.
///
/// When copying to a proposal, if any of the terms are changed, then
/// auto_finalize is automatically set to false.
core.bool? hasCreatorSignedOff;
/// The unique ID for the product.
core.String? productId;
/// The revision number of the product (auto-assigned by Marketplace).
core.String? productRevision;
/// An ID which can be used by the Publisher Profile API to get more
/// information about the seller that created this product.
core.String? publisherProfileId;
/// Information about the seller that created this product.
Seller? seller;
/// The syndication product associated with the deal.
/// Possible string values are:
/// - "SYNDICATION_PRODUCT_UNSPECIFIED" : A placeholder for an undefined
/// syndication product.
/// - "CONTENT" : This typically represents a web page.
/// - "MOBILE" : This represents a mobile property.
/// - "VIDEO" : This represents video ad formats.
/// - "GAMES" : This represents ads shown within games.
core.String? syndicationProduct;
/// Targeting that is shared between the buyer and the seller.
///
/// Each targeting criterion has a specified key and for each key there is a
/// list of inclusion value or exclusion values.
core.List<TargetingCriteria>? targetingCriterion;
/// The negotiable terms of the deal.
DealTerms? terms;
/// Time of last update.
core.String? updateTime;
/// The web-property code for the seller.
///
/// This needs to be copied as is when adding a new deal to a proposal.
core.String? webPropertyCode;
Product({
this.availableEndTime,
this.availableStartTime,
this.createTime,
this.creatorContacts,
this.displayName,
this.hasCreatorSignedOff,
this.productId,
this.productRevision,
this.publisherProfileId,
this.seller,
this.syndicationProduct,
this.targetingCriterion,
this.terms,
this.updateTime,
this.webPropertyCode,
});
Product.fromJson(core.Map json_)
: this(
availableEndTime: json_['availableEndTime'] as core.String?,
availableStartTime: json_['availableStartTime'] as core.String?,
createTime: json_['createTime'] as core.String?,
creatorContacts: (json_['creatorContacts'] as core.List?)
?.map(
(value) => ContactInformation.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
displayName: json_['displayName'] as core.String?,
hasCreatorSignedOff: json_['hasCreatorSignedOff'] as core.bool?,
productId: json_['productId'] as core.String?,
productRevision: json_['productRevision'] as core.String?,
publisherProfileId: json_['publisherProfileId'] as core.String?,
seller: json_.containsKey('seller')
? Seller.fromJson(
json_['seller'] as core.Map<core.String, core.dynamic>,
)
: null,
syndicationProduct: json_['syndicationProduct'] as core.String?,
targetingCriterion: (json_['targetingCriterion'] as core.List?)
?.map(
(value) => TargetingCriteria.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
terms: json_.containsKey('terms')
? DealTerms.fromJson(
json_['terms'] as core.Map<core.String, core.dynamic>,
)
: null,
updateTime: json_['updateTime'] as core.String?,
webPropertyCode: json_['webPropertyCode'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final availableEndTime = this.availableEndTime;
final availableStartTime = this.availableStartTime;
final createTime = this.createTime;
final creatorContacts = this.creatorContacts;
final displayName = this.displayName;
final hasCreatorSignedOff = this.hasCreatorSignedOff;
final productId = this.productId;
final productRevision = this.productRevision;
final publisherProfileId = this.publisherProfileId;
final seller = this.seller;
final syndicationProduct = this.syndicationProduct;
final targetingCriterion = this.targetingCriterion;
final terms = this.terms;
final updateTime = this.updateTime;
final webPropertyCode = this.webPropertyCode;
return {
'availableEndTime': ?availableEndTime,
'availableStartTime': ?availableStartTime,
'createTime': ?createTime,
'creatorContacts': ?creatorContacts,
'displayName': ?displayName,
'hasCreatorSignedOff': ?hasCreatorSignedOff,
'productId': ?productId,
'productRevision': ?productRevision,
'publisherProfileId': ?publisherProfileId,
'seller': ?seller,
'syndicationProduct': ?syndicationProduct,
'targetingCriterion': ?targetingCriterion,
'terms': ?terms,
'updateTime': ?updateTime,
'webPropertyCode': ?webPropertyCode,
};
}
}
/// Represents a proposal in the Marketplace.
///
/// A proposal is the unit of negotiation between a seller and a buyer and
/// contains deals which are served. Note: You can't update, create, or
/// otherwise modify Private Auction deals through the API. Fields are updatable
/// unless noted otherwise.
class Proposal {
/// Reference to the buyer that will get billed for this proposal.
///
/// Output only.
Buyer? billedBuyer;
/// Reference to the buyer on the proposal.
///
/// Note: This field may be set only when creating the resource. Modifying
/// this field while updating the resource will result in an error.
Buyer? buyer;
/// Contact information for the buyer.
core.List<ContactInformation>? buyerContacts;
/// Private data for buyer.
///
/// (hidden from seller).
PrivateData? buyerPrivateData;
/// The deals associated with this proposal.
///
/// For Private Auction proposals (whose deals have
/// NonGuaranteedAuctionTerms), there will only be one deal.
core.List<Deal>? deals;
/// The name for the proposal.
core.String? displayName;
/// True if the proposal is being renegotiated.
///
/// Output only.
core.bool? isRenegotiating;
/// True, if the buyside inventory setup is complete for this proposal.
///
/// Output only.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.bool? isSetupComplete;
/// The role of the last user that either updated the proposal or left a
/// comment.
///
/// Output only.
/// Possible string values are:
/// - "BUYER_SELLER_ROLE_UNSPECIFIED" : A placeholder for an undefined
/// buyer/seller role.
/// - "BUYER" : Specifies the role as buyer.
/// - "SELLER" : Specifies the role as seller.
core.String? lastUpdaterOrCommentorRole;
/// The notes associated with this proposal.
///
/// Output only.
core.List<Note>? notes;
/// Indicates whether the buyer/seller created the proposal.
///
/// Output only.
/// Possible string values are:
/// - "BUYER_SELLER_ROLE_UNSPECIFIED" : A placeholder for an undefined
/// buyer/seller role.
/// - "BUYER" : Specifies the role as buyer.
/// - "SELLER" : Specifies the role as seller.
core.String? originatorRole;
/// Private auction ID if this proposal is a private auction proposal.
///
/// Output only.
core.String? privateAuctionId;
/// The unique ID of the proposal.
///
/// Output only.
core.String? proposalId;
/// The revision number for the proposal.
///
/// Each update to the proposal or the deal causes the proposal revision
/// number to auto-increment. The buyer keeps track of the last revision
/// number they know of and pass it in when making an update. If the head
/// revision number on the server has since incremented, then an ABORTED error
/// is returned during the update operation to let the buyer know that a
/// subsequent update was made.
///
/// Output only.
core.String? proposalRevision;
/// The current state of the proposal.
///
/// Output only.
/// Possible string values are:
/// - "PROPOSAL_STATE_UNSPECIFIED" : A placeholder for an undefined proposal
/// state.
/// - "PROPOSED" : The proposal is under negotiation or renegotiation.
/// - "BUYER_ACCEPTED" : The proposal has been accepted by the buyer.
/// - "SELLER_ACCEPTED" : The proposal has been accepted by the seller.
/// - "CANCELED" : The negotiations on the proposal were canceled and the
/// proposal was never finalized.
/// - "FINALIZED" : The proposal is finalized. During renegotiation, the
/// proposal may not be in this state.
core.String? proposalState;
/// Reference to the seller on the proposal.
///
/// Note: This field may be set only when creating the resource. Modifying
/// this field while updating the resource will result in an error.
Seller? seller;
/// Contact information for the seller.
///
/// Output only.
core.List<ContactInformation>? sellerContacts;
/// The terms and conditions set by the publisher for this proposal.
///
/// Output only.
core.String? termsAndConditions;
/// The time when the proposal was last revised.
///
/// Output only.
core.String? updateTime;
Proposal({
this.billedBuyer,
this.buyer,
this.buyerContacts,
this.buyerPrivateData,
this.deals,
this.displayName,
this.isRenegotiating,
this.isSetupComplete,
this.lastUpdaterOrCommentorRole,
this.notes,
this.originatorRole,
this.privateAuctionId,
this.proposalId,
this.proposalRevision,
this.proposalState,
this.seller,
this.sellerContacts,
this.termsAndConditions,
this.updateTime,
});
Proposal.fromJson(core.Map json_)
: this(
billedBuyer: json_.containsKey('billedBuyer')
? Buyer.fromJson(
json_['billedBuyer'] as core.Map<core.String, core.dynamic>,
)
: null,
buyer: json_.containsKey('buyer')
? Buyer.fromJson(
json_['buyer'] as core.Map<core.String, core.dynamic>,
)
: null,
buyerContacts: (json_['buyerContacts'] as core.List?)
?.map(
(value) => ContactInformation.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
buyerPrivateData: json_.containsKey('buyerPrivateData')
? PrivateData.fromJson(
json_['buyerPrivateData']
as core.Map<core.String, core.dynamic>,
)
: null,
deals: (json_['deals'] as core.List?)
?.map(
(value) =>
Deal.fromJson(value as core.Map<core.String, core.dynamic>),
)
.toList(),
displayName: json_['displayName'] as core.String?,
isRenegotiating: json_['isRenegotiating'] as core.bool?,
isSetupComplete: json_['isSetupComplete'] as core.bool?,
lastUpdaterOrCommentorRole:
json_['lastUpdaterOrCommentorRole'] as core.String?,
notes: (json_['notes'] as core.List?)
?.map(
(value) =>
Note.fromJson(value as core.Map<core.String, core.dynamic>),
)
.toList(),
originatorRole: json_['originatorRole'] as core.String?,
privateAuctionId: json_['privateAuctionId'] as core.String?,
proposalId: json_['proposalId'] as core.String?,
proposalRevision: json_['proposalRevision'] as core.String?,
proposalState: json_['proposalState'] as core.String?,
seller: json_.containsKey('seller')
? Seller.fromJson(
json_['seller'] as core.Map<core.String, core.dynamic>,
)
: null,
sellerContacts: (json_['sellerContacts'] as core.List?)
?.map(
(value) => ContactInformation.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
termsAndConditions: json_['termsAndConditions'] as core.String?,
updateTime: json_['updateTime'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final billedBuyer = this.billedBuyer;
final buyer = this.buyer;
final buyerContacts = this.buyerContacts;
final buyerPrivateData = this.buyerPrivateData;
final deals = this.deals;
final displayName = this.displayName;
final isRenegotiating = this.isRenegotiating;
final isSetupComplete = this.isSetupComplete;
final lastUpdaterOrCommentorRole = this.lastUpdaterOrCommentorRole;
final notes = this.notes;
final originatorRole = this.originatorRole;
final privateAuctionId = this.privateAuctionId;
final proposalId = this.proposalId;
final proposalRevision = this.proposalRevision;
final proposalState = this.proposalState;
final seller = this.seller;
final sellerContacts = this.sellerContacts;
final termsAndConditions = this.termsAndConditions;
final updateTime = this.updateTime;
return {
'billedBuyer': ?billedBuyer,
'buyer': ?buyer,
'buyerContacts': ?buyerContacts,
'buyerPrivateData': ?buyerPrivateData,
'deals': ?deals,
'displayName': ?displayName,
'isRenegotiating': ?isRenegotiating,
'isSetupComplete': ?isSetupComplete,
'lastUpdaterOrCommentorRole': ?lastUpdaterOrCommentorRole,
'notes': ?notes,
'originatorRole': ?originatorRole,
'privateAuctionId': ?privateAuctionId,
'proposalId': ?proposalId,
'proposalRevision': ?proposalRevision,
'proposalState': ?proposalState,
'seller': ?seller,
'sellerContacts': ?sellerContacts,
'termsAndConditions': ?termsAndConditions,
'updateTime': ?updateTime,
};
}
}
/// Represents a publisher profile
/// (https://support.google.com/admanager/answer/6035806) in Marketplace.
///
/// All fields are read only. All string fields are free-form text entered by
/// the publisher unless noted otherwise.
class PublisherProfile {
/// Description on the publisher's audience.
core.String? audienceDescription;
/// Statement explaining what's unique about publisher's business, and why
/// buyers should partner with the publisher.
core.String? buyerPitchStatement;
/// Contact information for direct reservation deals.
///
/// This is free text entered by the publisher and may include information
/// like names, phone numbers and email addresses.
core.String? directDealsContact;
/// Name of the publisher profile.
core.String? displayName;
/// The list of domains represented in this publisher profile.
///
/// Empty if this is a parent profile. These are top private domains, meaning
/// that these will not contain a string like "photos.google.co.uk/123", but
/// will instead contain "google.co.uk".
core.List<core.String>? domains;
/// URL to publisher's Google+ page.
core.String? googlePlusUrl;
/// Indicates if this profile is the parent profile of the seller.
///
/// A parent profile represents all the inventory from the seller, as opposed
/// to child profile that is created to brand a portion of inventory. One
/// seller should have only one parent publisher profile, and can have
/// multiple child profiles. Publisher profiles for the same seller will have
/// same value of field
/// google.ads.adexchange.buyer.v2beta1.PublisherProfile.seller. See
/// https://support.google.com/admanager/answer/6035806 for details.
core.bool? isParent;
/// A Google public URL to the logo for this publisher profile.
///
/// The logo is stored as a PNG, JPG, or GIF image.
core.String? logoUrl;
/// URL to additional marketing and sales materials.
core.String? mediaKitUrl;
/// The list of apps represented in this publisher profile.
///
/// Empty if this is a parent profile.
core.List<PublisherProfileMobileApplication>? mobileApps;
/// Overview of the publisher.
core.String? overview;
/// Contact information for programmatic deals.
///
/// This is free text entered by the publisher and may include information
/// like names, phone numbers and email addresses.
core.String? programmaticDealsContact;
/// Unique ID for publisher profile.
core.String? publisherProfileId;
/// URL to a publisher rate card.
core.String? rateCardInfoUrl;
/// URL to a sample content page.
core.String? samplePageUrl;
/// Seller of the publisher profile.
Seller? seller;
/// Up to three key metrics and rankings.
///
/// Max 100 characters each. For example "#1 Mobile News Site for 20 Straight
/// Months".
core.List<core.String>? topHeadlines;
PublisherProfile({
this.audienceDescription,
this.buyerPitchStatement,
this.directDealsContact,
this.displayName,
this.domains,
this.googlePlusUrl,
this.isParent,
this.logoUrl,
this.mediaKitUrl,
this.mobileApps,
this.overview,
this.programmaticDealsContact,
this.publisherProfileId,
this.rateCardInfoUrl,
this.samplePageUrl,
this.seller,
this.topHeadlines,
});
PublisherProfile.fromJson(core.Map json_)
: this(
audienceDescription: json_['audienceDescription'] as core.String?,
buyerPitchStatement: json_['buyerPitchStatement'] as core.String?,
directDealsContact: json_['directDealsContact'] as core.String?,
displayName: json_['displayName'] as core.String?,
domains: (json_['domains'] as core.List?)
?.map((value) => value as core.String)
.toList(),
googlePlusUrl: json_['googlePlusUrl'] as core.String?,
isParent: json_['isParent'] as core.bool?,
logoUrl: json_['logoUrl'] as core.String?,
mediaKitUrl: json_['mediaKitUrl'] as core.String?,
mobileApps: (json_['mobileApps'] as core.List?)
?.map(
(value) => PublisherProfileMobileApplication.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
overview: json_['overview'] as core.String?,
programmaticDealsContact:
json_['programmaticDealsContact'] as core.String?,
publisherProfileId: json_['publisherProfileId'] as core.String?,
rateCardInfoUrl: json_['rateCardInfoUrl'] as core.String?,
samplePageUrl: json_['samplePageUrl'] as core.String?,
seller: json_.containsKey('seller')
? Seller.fromJson(
json_['seller'] as core.Map<core.String, core.dynamic>,
)
: null,
topHeadlines: (json_['topHeadlines'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final audienceDescription = this.audienceDescription;
final buyerPitchStatement = this.buyerPitchStatement;
final directDealsContact = this.directDealsContact;
final displayName = this.displayName;
final domains = this.domains;
final googlePlusUrl = this.googlePlusUrl;
final isParent = this.isParent;
final logoUrl = this.logoUrl;
final mediaKitUrl = this.mediaKitUrl;
final mobileApps = this.mobileApps;
final overview = this.overview;
final programmaticDealsContact = this.programmaticDealsContact;
final publisherProfileId = this.publisherProfileId;
final rateCardInfoUrl = this.rateCardInfoUrl;
final samplePageUrl = this.samplePageUrl;
final seller = this.seller;
final topHeadlines = this.topHeadlines;
return {
'audienceDescription': ?audienceDescription,
'buyerPitchStatement': ?buyerPitchStatement,
'directDealsContact': ?directDealsContact,
'displayName': ?displayName,
'domains': ?domains,
'googlePlusUrl': ?googlePlusUrl,
'isParent': ?isParent,
'logoUrl': ?logoUrl,
'mediaKitUrl': ?mediaKitUrl,
'mobileApps': ?mobileApps,
'overview': ?overview,
'programmaticDealsContact': ?programmaticDealsContact,
'publisherProfileId': ?publisherProfileId,
'rateCardInfoUrl': ?rateCardInfoUrl,
'samplePageUrl': ?samplePageUrl,
'seller': ?seller,
'topHeadlines': ?topHeadlines,
};
}
}
/// A mobile application that contains a external app ID, name, and app store.
class PublisherProfileMobileApplication {
/// The app store the app belongs to.
/// Possible string values are:
/// - "APP_STORE_TYPE_UNSPECIFIED" : A placeholder for an unknown app store.
/// - "APPLE_ITUNES" : Apple iTunes
/// - "GOOGLE_PLAY" : Google Play
/// - "ROKU" : Roku
/// - "AMAZON_FIRETV" : Amazon Fire TV
/// - "PLAYSTATION" : Playstation
/// - "XBOX" : Xbox
/// - "SAMSUNG_TV" : Samsung TV
/// - "AMAZON" : Amazon Appstore
/// - "OPPO" : OPPO App Market
/// - "SAMSUNG" : Samsung Galaxy Store
/// - "VIVO" : VIVO App Store
/// - "XIAOMI" : Xiaomi GetApps
/// - "LG_TV" : LG TV
core.String? appStore;
/// The external ID for the app from its app store.
core.String? externalAppId;
/// The name of the app.
core.String? name;
PublisherProfileMobileApplication({
this.appStore,
this.externalAppId,
this.name,
});
PublisherProfileMobileApplication.fromJson(core.Map json_)
: this(
appStore: json_['appStore'] as core.String?,
externalAppId: json_['externalAppId'] as core.String?,
name: json_['name'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final appStore = this.appStore;
final externalAppId = this.externalAppId;
final name = this.name;
return {
'appStore': ?appStore,
'externalAppId': ?externalAppId,
'name': ?name,
};
}
}
/// An open-ended realtime time range specified by the start timestamp.
///
/// For filter sets that specify a realtime time range RTB metrics continue to
/// be aggregated throughout the lifetime of the filter set.
class RealtimeTimeRange {
/// The start timestamp of the real-time RTB metrics aggregation.
core.String? startTimestamp;
RealtimeTimeRange({this.startTimestamp});
RealtimeTimeRange.fromJson(core.Map json_)
: this(startTimestamp: json_['startTimestamp'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final startTimestamp = this.startTimestamp;
return {'startTimestamp': ?startTimestamp};
}
}
/// A relative date range, specified by an offset and a duration.
///
/// The supported range of dates begins 30 days before today and ends today, for
/// example, the limits for these values are: offset_days \>= 0 duration_days
/// \>= 1 offset_days + duration_days \<= 30
class RelativeDateRange {
/// The number of days in the requested date range, for example, for a range
/// spanning today: 1.
///
/// For a range spanning the last 7 days: 7.
core.int? durationDays;
/// The end date of the filter set, specified as the number of days before
/// today, for example, for a range where the last date is today: 0.
core.int? offsetDays;
RelativeDateRange({this.durationDays, this.offsetDays});
RelativeDateRange.fromJson(core.Map json_)
: this(
durationDays: json_['durationDays'] as core.int?,
offsetDays: json_['offsetDays'] as core.int?,
);
core.Map<core.String, core.dynamic> toJson() {
final durationDays = this.durationDays;
final offsetDays = this.offsetDays;
return {'durationDays': ?durationDays, 'offsetDays': ?offsetDays};
}
}
/// A request for removing the association between a deal and a creative.
class RemoveDealAssociationRequest {
/// The association between a creative and a deal that should be removed.
CreativeDealAssociation? association;
RemoveDealAssociationRequest({this.association});
RemoveDealAssociationRequest.fromJson(core.Map json_)
: this(
association: json_.containsKey('association')
? CreativeDealAssociation.fromJson(
json_['association'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final association = this.association;
return {'association': ?association};
}
}
/// Request message to resume (unpause) serving for already-finalized deals.
class ResumeProposalDealsRequest {
/// The external_deal_id's of the deals to resume.
///
/// If empty, all the deals in the proposal will be resumed.
core.List<core.String>? externalDealIds;
ResumeProposalDealsRequest({this.externalDealIds});
ResumeProposalDealsRequest.fromJson(core.Map json_)
: this(
externalDealIds: (json_['externalDealIds'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final externalDealIds = this.externalDealIds;
return {'externalDealIds': ?externalDealIds};
}
}
/// Request message to resume (unpause) serving for an already-finalized
/// proposal.
typedef ResumeProposalRequest = $Empty;
/// A response may include multiple rows, breaking down along various
/// dimensions.
///
/// Encapsulates the values of all dimensions for a given row.
class RowDimensions {
/// The publisher identifier for this row, if a breakdown by
/// [BreakdownDimension.PUBLISHER_IDENTIFIER](https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/bidders.accounts.filterSets#FilterSet.BreakdownDimension)
/// was requested.
core.String? publisherIdentifier;
/// The time interval that this row represents.
TimeInterval? timeInterval;
RowDimensions({this.publisherIdentifier, this.timeInterval});
RowDimensions.fromJson(core.Map json_)
: this(
publisherIdentifier: json_['publisherIdentifier'] as core.String?,
timeInterval: json_.containsKey('timeInterval')
? TimeInterval.fromJson(
json_['timeInterval'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final publisherIdentifier = this.publisherIdentifier;
final timeInterval = this.timeInterval;
return {
'publisherIdentifier': ?publisherIdentifier,
'timeInterval': ?timeInterval,
};
}
}
/// A security context.
///
/// Output only.
class SecurityContext {
/// The security types in this context.
core.List<core.String>? securities;
SecurityContext({this.securities});
SecurityContext.fromJson(core.Map json_)
: this(
securities: (json_['securities'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final securities = this.securities;
return {'securities': ?securities};
}
}
/// Represents a seller of inventory.
///
/// Each seller is identified by a unique Ad Manager account ID.
class Seller {
/// The unique ID for the seller.
///
/// The seller fills in this field. The seller account ID is then available to
/// buyer in the product.
core.String? accountId;
/// Ad manager network code for the seller.
///
/// Output only.
core.String? subAccountId;
Seller({this.accountId, this.subAccountId});
Seller.fromJson(core.Map json_)
: this(
accountId: json_['accountId'] as core.String?,
subAccountId: json_['subAccountId'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final accountId = this.accountId;
final subAccountId = this.subAccountId;
return {'accountId': ?accountId, 'subAccountId': ?subAccountId};
}
}
/// The serving context for this restriction.
class ServingContext {
/// Matches all contexts.
/// Possible string values are:
/// - "SIMPLE_CONTEXT" : A simple context.
core.String? all;
/// Matches impressions for a particular app type.
AppContext? appType;
/// Matches impressions for a particular auction type.
AuctionContext? auctionType;
/// Matches impressions coming from users *or* publishers in a specific
/// location.
LocationContext? location;
/// Matches impressions coming from a particular platform.
PlatformContext? platform;
/// Matches impressions for a particular security type.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
SecurityContext? securityType;
ServingContext({
this.all,
this.appType,
this.auctionType,
this.location,
this.platform,
this.securityType,
});
ServingContext.fromJson(core.Map json_)
: this(
all: json_['all'] as core.String?,
appType: json_.containsKey('appType')
? AppContext.fromJson(
json_['appType'] as core.Map<core.String, core.dynamic>,
)
: null,
auctionType: json_.containsKey('auctionType')
? AuctionContext.fromJson(
json_['auctionType'] as core.Map<core.String, core.dynamic>,
)
: null,
location: json_.containsKey('location')
? LocationContext.fromJson(
json_['location'] as core.Map<core.String, core.dynamic>,
)
: null,
platform: json_.containsKey('platform')
? PlatformContext.fromJson(
json_['platform'] as core.Map<core.String, core.dynamic>,
)
: null,
securityType: json_.containsKey('securityType')
? SecurityContext.fromJson(
json_['securityType'] as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final all = this.all;
final appType = this.appType;
final auctionType = this.auctionType;
final location = this.location;
final platform = this.platform;
final securityType = this.securityType;
return {
'all': ?all,
'appType': ?appType,
'auctionType': ?auctionType,
'location': ?location,
'platform': ?platform,
'securityType': ?securityType,
};
}
}
/// A representation of the status of an ad in a specific context.
///
/// A context here relates to where something ultimately serves (for example, a
/// user or publisher geo, a platform, an HTTPS versus HTTP request, or the type
/// of auction).
///
/// Output only.
class ServingRestriction {
/// The contexts for the restriction.
core.List<ServingContext>? contexts;
/// Disapproval bound to this restriction.
///
/// Only present if status=DISAPPROVED. Can be used to filter the response of
/// the creatives.list method.
Disapproval? disapproval;
/// Any disapprovals bound to this restriction.
///
/// Only present if status=DISAPPROVED. Can be used to filter the response of
/// the creatives.list method. Deprecated; use disapproval field instead.
@core.Deprecated(
'Not supported. Member documentation may have more information.',
)
core.List<Disapproval>? disapprovalReasons;
/// The status of the creative in this context (for example, it has been
/// explicitly disapproved or is pending review).
/// Possible string values are:
/// - "STATUS_UNSPECIFIED" : The status is not known.
/// - "DISAPPROVAL" : The ad was disapproved in this context.
/// - "PENDING_REVIEW" : The ad is pending review in this context.
core.String? status;
ServingRestriction({
this.contexts,
this.disapproval,
this.disapprovalReasons,
this.status,
});
ServingRestriction.fromJson(core.Map json_)
: this(
contexts: (json_['contexts'] as core.List?)
?.map(
(value) => ServingContext.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
disapproval: json_.containsKey('disapproval')
? Disapproval.fromJson(
json_['disapproval'] as core.Map<core.String, core.dynamic>,
)
: null,
disapprovalReasons: (json_['disapprovalReasons'] as core.List?)
?.map(
(value) => Disapproval.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
status: json_['status'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final contexts = this.contexts;
final disapproval = this.disapproval;
final disapprovalReasons = this.disapprovalReasons;
final status = this.status;
return {
'contexts': ?contexts,
'disapproval': ?disapproval,
'disapprovalReasons': ?disapprovalReasons,
'status': ?status,
};
}
}
/// Message depicting the size of the creative.
///
/// The units of width and height depend on the type of the targeting.
class Size {
/// The height of the creative.
core.int? height;
/// The width of the creative
core.int? width;
Size({this.height, this.width});
Size.fromJson(core.Map json_)
: this(
height: json_['height'] as core.int?,
width: json_['width'] as core.int?,
);
core.Map<core.String, core.dynamic> toJson() {
final height = this.height;
final width = this.width;
return {'height': ?height, 'width': ?width};
}
}
/// A request for stopping notifications for changes to creative Status.
typedef StopWatchingCreativeRequest = $Empty;
/// Advertisers can target different attributes of an ad slot.
///
/// For example, they can choose to show ads only if the user is in the U.S.
/// Such targeting criteria can be specified as part of Shared Targeting.
class TargetingCriteria {
/// The list of values to exclude from targeting.
///
/// Each value is AND'd together.
core.List<TargetingValue>? exclusions;
/// The list of value to include as part of the targeting.
///
/// Each value is OR'd together.
core.List<TargetingValue>? inclusions;
/// The key representing the shared targeting criterion.
///
/// Targeting criteria defined by Google ad servers will begin with GOOG_.
/// Third parties may define their own keys. A list of permissible keys along
/// with the acceptable values will be provided as part of the external
/// documentation.
core.String? key;
TargetingCriteria({this.exclusions, this.inclusions, this.key});
TargetingCriteria.fromJson(core.Map json_)
: this(
exclusions: (json_['exclusions'] as core.List?)
?.map(
(value) => TargetingValue.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
inclusions: (json_['inclusions'] as core.List?)
?.map(
(value) => TargetingValue.fromJson(
value as core.Map<core.String, core.dynamic>,
),
)
.toList(),
key: json_['key'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final exclusions = this.exclusions;
final inclusions = this.inclusions;
final key = this.key;
return {'exclusions': ?exclusions, 'inclusions': ?inclusions, 'key': ?key};
}
}
/// A polymorphic targeting value used as part of Shared Targeting.
class TargetingValue {
/// The creative size value to include/exclude.
///
/// Filled in when key = GOOG_CREATIVE_SIZE
CreativeSize? creativeSizeValue;
/// The daypart targeting to include / exclude.
///
/// Filled in when the key is GOOG_DAYPART_TARGETING. The definition of this
/// targeting is derived from the structure used by Ad Manager.
DayPartTargeting? dayPartTargetingValue;
/// The long value to include/exclude.
core.String? longValue;
/// The string value to include/exclude.
core.String? stringValue;
TargetingValue({
this.creativeSizeValue,
this.dayPartTargetingValue,
this.longValue,
this.stringValue,
});
TargetingValue.fromJson(core.Map json_)
: this(
creativeSizeValue: json_.containsKey('creativeSizeValue')
? CreativeSize.fromJson(
json_['creativeSizeValue']
as core.Map<core.String, core.dynamic>,
)
: null,
dayPartTargetingValue: json_.containsKey('dayPartTargetingValue')
? DayPartTargeting.fromJson(
json_['dayPartTargetingValue']
as core.Map<core.String, core.dynamic>,
)
: null,
longValue: json_['longValue'] as core.String?,
stringValue: json_['stringValue'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final creativeSizeValue = this.creativeSizeValue;
final dayPartTargetingValue = this.dayPartTargetingValue;
final longValue = this.longValue;
final stringValue = this.stringValue;
return {
'creativeSizeValue': ?creativeSizeValue,
'dayPartTargetingValue': ?dayPartTargetingValue,
'longValue': ?longValue,
'stringValue': ?stringValue,
};
}
}
/// Represents targeting about various types of technology.
class TechnologyTargeting {
/// IDs of device capabilities to be included/excluded.
CriteriaTargeting? deviceCapabilityTargeting;
/// IDs of device categories to be included/excluded.
CriteriaTargeting? deviceCategoryTargeting;
/// Operating system related targeting information.
OperatingSystemTargeting? operatingSystemTargeting;
TechnologyTargeting({
this.deviceCapabilityTargeting,
this.deviceCategoryTargeting,
this.operatingSystemTargeting,
});
TechnologyTargeting.fromJson(core.Map json_)
: this(
deviceCapabilityTargeting:
json_.containsKey('deviceCapabilityTargeting')
? CriteriaTargeting.fromJson(
json_['deviceCapabilityTargeting']
as core.Map<core.String, core.dynamic>,
)
: null,
deviceCategoryTargeting: json_.containsKey('deviceCategoryTargeting')
? CriteriaTargeting.fromJson(
json_['deviceCategoryTargeting']
as core.Map<core.String, core.dynamic>,
)
: null,
operatingSystemTargeting: json_.containsKey('operatingSystemTargeting')
? OperatingSystemTargeting.fromJson(
json_['operatingSystemTargeting']
as core.Map<core.String, core.dynamic>,
)
: null,
);
core.Map<core.String, core.dynamic> toJson() {
final deviceCapabilityTargeting = this.deviceCapabilityTargeting;
final deviceCategoryTargeting = this.deviceCategoryTargeting;
final operatingSystemTargeting = this.operatingSystemTargeting;
return {
'deviceCapabilityTargeting': ?deviceCapabilityTargeting,
'deviceCategoryTargeting': ?deviceCategoryTargeting,
'operatingSystemTargeting': ?operatingSystemTargeting,
};
}
}
/// An interval of time, with an absolute start and end.
class TimeInterval {
/// The timestamp marking the end of the range (exclusive) for which data is
/// included.
core.String? endTime;
/// The timestamp marking the start of the range (inclusive) for which data is
/// included.
core.String? startTime;
TimeInterval({this.endTime, this.startTime});
TimeInterval.fromJson(core.Map json_)
: this(
endTime: json_['endTime'] as core.String?,
startTime: json_['startTime'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final endTime = this.endTime;
final startTime = this.startTime;
return {'endTime': ?endTime, 'startTime': ?startTime};
}
}
/// Represents a time of day.
///
/// The date and time zone are either not significant or are specified
/// elsewhere. An API may choose to allow leap seconds. Related types are
/// google.type.Date and `google.protobuf.Timestamp`.
class TimeOfDay {
/// Hours of a day in 24 hour format.
///
/// Must be greater than or equal to 0 and typically must be less than or
/// equal to 23. An API may choose to allow the value "24:00:00" for scenarios
/// like business closing time.
core.int? hours;
/// Minutes of an hour.
///
/// Must be greater than or equal to 0 and less than or equal to 59.
core.int? minutes;
/// Fractions of seconds, in nanoseconds.
///
/// Must be greater than or equal to 0 and less than or equal to 999,999,999.
core.int? nanos;
/// Seconds of a minute.
///
/// Must be greater than or equal to 0 and typically must be less than or
/// equal to 59. An API may allow the value 60 if it allows leap-seconds.
core.int? seconds;
TimeOfDay({this.hours, this.minutes, this.nanos, this.seconds});
TimeOfDay.fromJson(core.Map json_)
: this(
hours: json_['hours'] as core.int?,
minutes: json_['minutes'] as core.int?,
nanos: json_['nanos'] as core.int?,
seconds: json_['seconds'] as core.int?,
);
core.Map<core.String, core.dynamic> toJson() {
final hours = this.hours;
final minutes = this.minutes;
final nanos = this.nanos;
final seconds = this.seconds;
return {
'hours': ?hours,
'minutes': ?minutes,
'nanos': ?nanos,
'seconds': ?seconds,
};
}
}
/// Represents a list of targeted and excluded URLs (for example, google.com).
///
/// For Private Auction and AdX Preferred Deals, URLs are either included or
/// excluded. For Programmatic Guaranteed and Preferred Deals, this doesn't
/// apply.
class UrlTargeting {
/// A list of URLs to be excluded.
core.List<core.String>? excludedUrls;
/// A list of URLs to be included.
core.List<core.String>? targetedUrls;
UrlTargeting({this.excludedUrls, this.targetedUrls});
UrlTargeting.fromJson(core.Map json_)
: this(
excludedUrls: (json_['excludedUrls'] as core.List?)
?.map((value) => value as core.String)
.toList(),
targetedUrls: (json_['targetedUrls'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final excludedUrls = this.excludedUrls;
final targetedUrls = this.targetedUrls;
return {'excludedUrls': ?excludedUrls, 'targetedUrls': ?targetedUrls};
}
}
/// Video content for a creative.
class VideoContent {
/// The URL to fetch a video ad.
core.String? videoUrl;
/// The contents of a VAST document for a video ad.
///
/// This document should conform to the VAST 2.0 or 3.0 standard.
core.String? videoVastXml;
VideoContent({this.videoUrl, this.videoVastXml});
VideoContent.fromJson(core.Map json_)
: this(
videoUrl: json_['videoUrl'] as core.String?,
videoVastXml: json_['videoVastXml'] as core.String?,
);
core.Map<core.String, core.dynamic> toJson() {
final videoUrl = this.videoUrl;
final videoVastXml = this.videoVastXml;
return {'videoUrl': ?videoUrl, 'videoVastXml': ?videoVastXml};
}
}
/// Represents targeting information about video.
class VideoTargeting {
/// A list of video positions to be excluded.
///
/// Position types can either be included or excluded (XOR).
core.List<core.String>? excludedPositionTypes;
/// A list of video positions to be included.
///
/// When the included list is present, the excluded list must be empty. When
/// the excluded list is present, the included list must be empty.
core.List<core.String>? targetedPositionTypes;
VideoTargeting({this.excludedPositionTypes, this.targetedPositionTypes});
VideoTargeting.fromJson(core.Map json_)
: this(
excludedPositionTypes: (json_['excludedPositionTypes'] as core.List?)
?.map((value) => value as core.String)
.toList(),
targetedPositionTypes: (json_['targetedPositionTypes'] as core.List?)
?.map((value) => value as core.String)
.toList(),
);
core.Map<core.String, core.dynamic> toJson() {
final excludedPositionTypes = this.excludedPositionTypes;
final targetedPositionTypes = this.targetedPositionTypes;
return {
'excludedPositionTypes': ?excludedPositionTypes,
'targetedPositionTypes': ?targetedPositionTypes,
};
}
}
/// A request for watching changes to creative Status.
class WatchCreativeRequest {
/// The Pub/Sub topic to publish notifications to.
///
/// This topic must already exist and must give permission to
/// ad-exchange-buyside-reports@google.com to write to the topic. This should
/// be the full resource name in "projects/{project_id}/topics/{topic_id}"
/// format.
core.String? topic;
WatchCreativeRequest({this.topic});
WatchCreativeRequest.fromJson(core.Map json_)
: this(topic: json_['topic'] as core.String?);
core.Map<core.String, core.dynamic> toJson() {
final topic = this.topic;
return {'topic': ?topic};
}
}