@google-ads/admanager 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -150
- package/build/protos/google/ads/admanager/v1/ad_break_messages.proto +134 -0
- package/build/protos/google/ads/admanager/v1/ad_break_service.proto +269 -0
- package/build/protos/google/ads/admanager/v1/ad_unit_enums.proto +1 -1
- package/build/protos/google/ads/admanager/v1/ad_unit_messages.proto +32 -26
- package/build/protos/google/ads/admanager/v1/ad_unit_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/admanager_error.proto +1 -1
- package/build/protos/google/ads/admanager/v1/applied_label.proto +1 -1
- package/build/protos/google/ads/admanager/v1/bandwidth_group_messages.proto +46 -0
- package/build/protos/google/ads/admanager/v1/bandwidth_group_service.proto +129 -0
- package/build/protos/google/ads/admanager/v1/company_enums.proto +123 -0
- package/build/protos/google/ads/admanager/v1/company_messages.proto +6 -7
- package/build/protos/google/ads/admanager/v1/company_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/contact_messages.proto +4 -4
- package/build/protos/google/ads/admanager/v1/custom_field_enums.proto +1 -1
- package/build/protos/google/ads/admanager/v1/custom_field_messages.proto +12 -11
- package/build/protos/google/ads/admanager/v1/custom_field_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/custom_field_value.proto +1 -2
- package/build/protos/google/ads/admanager/v1/custom_targeting_key_enums.proto +1 -1
- package/build/protos/google/ads/admanager/v1/custom_targeting_key_messages.proto +1 -1
- package/build/protos/google/ads/admanager/v1/custom_targeting_key_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/custom_targeting_value_enums.proto +1 -1
- package/build/protos/google/ads/admanager/v1/custom_targeting_value_messages.proto +14 -3
- package/build/protos/google/ads/admanager/v1/custom_targeting_value_service.proto +14 -6
- package/build/protos/google/ads/admanager/v1/deal_buyer_permission_type_enum.proto +41 -0
- package/build/protos/google/ads/admanager/v1/device_category_messages.proto +45 -0
- package/build/protos/google/ads/admanager/v1/device_category_service.proto +129 -0
- package/build/protos/google/ads/admanager/v1/early_ad_break_notification_enums.proto +47 -0
- package/build/protos/google/ads/admanager/v1/entity_signals_mapping_messages.proto +4 -4
- package/build/protos/google/ads/admanager/v1/entity_signals_mapping_service.proto +6 -4
- package/build/protos/google/ads/admanager/v1/environment_type_enum.proto +1 -1
- package/build/protos/google/ads/admanager/v1/frequency_cap.proto +1 -1
- package/build/protos/google/ads/admanager/v1/geo_target_messages.proto +70 -0
- package/build/protos/google/ads/admanager/v1/geo_target_service.proto +128 -0
- package/build/protos/google/ads/admanager/v1/label_messages.proto +1 -1
- package/build/protos/google/ads/admanager/v1/live_stream_event_messages.proto +47 -0
- package/build/protos/google/ads/admanager/v1/network_messages.proto +2 -2
- package/build/protos/google/ads/admanager/v1/network_service.proto +4 -2
- package/build/protos/google/ads/admanager/v1/operating_system_messages.proto +45 -0
- package/build/protos/google/ads/admanager/v1/operating_system_service.proto +129 -0
- package/build/protos/google/ads/admanager/v1/operating_system_version_messages.proto +52 -0
- package/build/protos/google/ads/admanager/v1/operating_system_version_service.proto +133 -0
- package/build/protos/google/ads/admanager/v1/order_enums.proto +1 -1
- package/build/protos/google/ads/admanager/v1/order_messages.proto +24 -20
- package/build/protos/google/ads/admanager/v1/order_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/placement_enums.proto +1 -1
- package/build/protos/google/ads/admanager/v1/placement_messages.proto +14 -14
- package/build/protos/google/ads/admanager/v1/placement_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/private_auction_deal_messages.proto +119 -0
- package/build/protos/google/ads/admanager/v1/private_auction_deal_service.proto +184 -0
- package/build/protos/google/ads/admanager/v1/private_auction_messages.proto +74 -0
- package/build/protos/google/ads/admanager/v1/private_auction_service.proto +180 -0
- package/build/protos/google/ads/admanager/v1/private_marketplace_enums.proto +50 -0
- package/build/protos/google/ads/admanager/v1/programmatic_buyer_messages.proto +72 -0
- package/build/protos/google/ads/admanager/v1/programmatic_buyer_service.proto +131 -0
- package/build/protos/google/ads/admanager/v1/report_messages.proto +3536 -0
- package/build/protos/google/ads/admanager/v1/report_service.proto +5 -3247
- package/build/protos/google/ads/admanager/v1/request_platform_enum.proto +49 -0
- package/build/protos/google/ads/admanager/v1/role_enums.proto +1 -1
- package/build/protos/google/ads/admanager/v1/role_messages.proto +6 -6
- package/build/protos/google/ads/admanager/v1/role_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/size.proto +7 -11
- package/build/protos/google/ads/admanager/v1/size_type_enum.proto +1 -1
- package/build/protos/google/ads/admanager/v1/targeted_video_bumper_type_enum.proto +44 -0
- package/build/protos/google/ads/admanager/v1/targeting.proto +328 -0
- package/build/protos/google/ads/admanager/v1/taxonomy_category_messages.proto +7 -6
- package/build/protos/google/ads/admanager/v1/taxonomy_category_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/taxonomy_type_enum.proto +1 -1
- package/build/protos/google/ads/admanager/v1/team_messages.proto +1 -5
- package/build/protos/google/ads/admanager/v1/time_unit_enum.proto +1 -1
- package/build/protos/google/ads/admanager/v1/user_messages.proto +10 -9
- package/build/protos/google/ads/admanager/v1/user_service.proto +3 -1
- package/build/protos/google/ads/admanager/v1/video_position_enum.proto +47 -0
- package/build/protos/protos.d.ts +15832 -7575
- package/build/protos/protos.js +57744 -36372
- package/build/protos/protos.json +5795 -2511
- package/build/src/index.d.ts +28 -1
- package/build/src/index.js +20 -17
- package/build/src/index.js.map +1 -1
- package/build/src/v1/ad_break_service_client.d.ts +1040 -0
- package/build/src/v1/ad_break_service_client.js +1483 -0
- package/build/src/v1/ad_break_service_client.js.map +1 -0
- package/build/src/v1/ad_break_service_client_config.json +46 -0
- package/build/src/v1/ad_break_service_proto_list.json +74 -0
- package/build/src/v1/ad_unit_service_client.d.ts +331 -91
- package/build/src/v1/ad_unit_service_client.js +414 -106
- package/build/src/v1/ad_unit_service_client.js.map +1 -1
- package/build/src/v1/ad_unit_service_proto_list.json +29 -3
- package/build/src/v1/bandwidth_group_service_client.d.ts +904 -0
- package/build/src/v1/bandwidth_group_service_client.js +1369 -0
- package/build/src/v1/bandwidth_group_service_client.js.map +1 -0
- package/build/src/v1/bandwidth_group_service_client_config.json +34 -0
- package/build/src/v1/bandwidth_group_service_proto_list.json +74 -0
- package/build/src/v1/company_service_client.d.ts +291 -51
- package/build/src/v1/company_service_client.js +402 -81
- package/build/src/v1/company_service_client.js.map +1 -1
- package/build/src/v1/company_service_proto_list.json +29 -3
- package/build/src/v1/custom_field_service_client.d.ts +291 -51
- package/build/src/v1/custom_field_service_client.js +403 -85
- package/build/src/v1/custom_field_service_client.js.map +1 -1
- package/build/src/v1/custom_field_service_proto_list.json +29 -3
- package/build/src/v1/custom_targeting_key_service_client.d.ts +291 -51
- package/build/src/v1/custom_targeting_key_service_client.js +404 -88
- package/build/src/v1/custom_targeting_key_service_client.js.map +1 -1
- package/build/src/v1/custom_targeting_key_service_proto_list.json +29 -3
- package/build/src/v1/custom_targeting_value_service_client.d.ts +298 -58
- package/build/src/v1/custom_targeting_value_service_client.js +406 -90
- package/build/src/v1/custom_targeting_value_service_client.js.map +1 -1
- package/build/src/v1/custom_targeting_value_service_proto_list.json +29 -3
- package/build/src/v1/device_category_service_client.d.ts +904 -0
- package/build/src/v1/device_category_service_client.js +1369 -0
- package/build/src/v1/device_category_service_client.js.map +1 -0
- package/build/src/v1/device_category_service_client_config.json +34 -0
- package/build/src/v1/device_category_service_proto_list.json +74 -0
- package/build/src/v1/entity_signals_mapping_service_client.d.ts +298 -58
- package/build/src/v1/entity_signals_mapping_service_client.js +444 -124
- package/build/src/v1/entity_signals_mapping_service_client.js.map +1 -1
- package/build/src/v1/entity_signals_mapping_service_proto_list.json +29 -3
- package/build/src/v1/gapic_metadata.json +412 -0
- package/build/src/v1/geo_target_service_client.d.ts +904 -0
- package/build/src/v1/geo_target_service_client.js +1369 -0
- package/build/src/v1/geo_target_service_client.js.map +1 -0
- package/build/src/v1/geo_target_service_client_config.json +34 -0
- package/build/src/v1/geo_target_service_proto_list.json +74 -0
- package/build/src/v1/index.d.ts +9 -0
- package/build/src/v1/index.js +19 -1
- package/build/src/v1/index.js.map +1 -1
- package/build/src/v1/network_service_client.d.ts +252 -12
- package/build/src/v1/network_service_client.js +397 -65
- package/build/src/v1/network_service_client.js.map +1 -1
- package/build/src/v1/network_service_proto_list.json +29 -3
- package/build/src/v1/operating_system_service_client.d.ts +904 -0
- package/build/src/v1/operating_system_service_client.js +1369 -0
- package/build/src/v1/operating_system_service_client.js.map +1 -0
- package/build/src/v1/operating_system_service_client_config.json +34 -0
- package/build/src/v1/operating_system_service_proto_list.json +74 -0
- package/build/src/v1/operating_system_version_service_client.d.ts +911 -0
- package/build/src/v1/operating_system_version_service_client.js +1373 -0
- package/build/src/v1/operating_system_version_service_client.js.map +1 -0
- package/build/src/v1/operating_system_version_service_client_config.json +34 -0
- package/build/src/v1/operating_system_version_service_proto_list.json +74 -0
- package/build/src/v1/order_service_client.d.ts +296 -56
- package/build/src/v1/order_service_client.js +402 -81
- package/build/src/v1/order_service_client.js.map +1 -1
- package/build/src/v1/order_service_proto_list.json +29 -3
- package/build/src/v1/placement_service_client.d.ts +291 -51
- package/build/src/v1/placement_service_client.js +402 -81
- package/build/src/v1/placement_service_client.js.map +1 -1
- package/build/src/v1/placement_service_proto_list.json +29 -3
- package/build/src/v1/private_auction_deal_service_client.d.ts +965 -0
- package/build/src/v1/private_auction_deal_service_client.js +1445 -0
- package/build/src/v1/private_auction_deal_service_client.js.map +1 -0
- package/build/src/v1/private_auction_deal_service_client_config.json +42 -0
- package/build/src/v1/private_auction_deal_service_proto_list.json +74 -0
- package/build/src/v1/private_auction_service_client.d.ts +962 -0
- package/build/src/v1/private_auction_service_client.js +1443 -0
- package/build/src/v1/private_auction_service_client.js.map +1 -0
- package/build/src/v1/private_auction_service_client_config.json +42 -0
- package/build/src/v1/private_auction_service_proto_list.json +74 -0
- package/build/src/v1/programmatic_buyer_service_client.d.ts +905 -0
- package/build/src/v1/programmatic_buyer_service_client.js +1369 -0
- package/build/src/v1/programmatic_buyer_service_client.js.map +1 -0
- package/build/src/v1/programmatic_buyer_service_client_config.json +34 -0
- package/build/src/v1/programmatic_buyer_service_proto_list.json +74 -0
- package/build/src/v1/report_service_client.d.ts +350 -110
- package/build/src/v1/report_service_client.js +471 -177
- package/build/src/v1/report_service_client.js.map +1 -1
- package/build/src/v1/report_service_proto_list.json +29 -3
- package/build/src/v1/role_service_client.d.ts +290 -50
- package/build/src/v1/role_service_client.js +402 -81
- package/build/src/v1/role_service_client.js.map +1 -1
- package/build/src/v1/role_service_proto_list.json +29 -3
- package/build/src/v1/taxonomy_category_service_client.d.ts +291 -51
- package/build/src/v1/taxonomy_category_service_client.js +404 -87
- package/build/src/v1/taxonomy_category_service_client.js.map +1 -1
- package/build/src/v1/taxonomy_category_service_proto_list.json +29 -3
- package/build/src/v1/user_service_client.d.ts +251 -11
- package/build/src/v1/user_service_client.js +388 -59
- package/build/src/v1/user_service_client.js.map +1 -1
- package/build/src/v1/user_service_proto_list.json +29 -3
- package/package.json +4 -4
- package/CHANGELOG.md +0 -40
|
@@ -96,19 +96,11 @@ class AdUnitServiceClient {
|
|
|
96
96
|
constructor(opts, gaxInstance) {
|
|
97
97
|
// Ensure that options include all the required fields.
|
|
98
98
|
const staticMembers = this.constructor;
|
|
99
|
-
if (opts?.universe_domain &&
|
|
100
|
-
opts?.universeDomain &&
|
|
101
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
|
99
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
|
102
100
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
103
101
|
}
|
|
104
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
105
|
-
|
|
106
|
-
: undefined;
|
|
107
|
-
this._universeDomain =
|
|
108
|
-
opts?.universeDomain ??
|
|
109
|
-
opts?.universe_domain ??
|
|
110
|
-
universeDomainEnvVar ??
|
|
111
|
-
'googleapis.com';
|
|
102
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
|
103
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
|
112
104
|
this._servicePath = 'admanager.' + this._universeDomain;
|
|
113
105
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
|
114
106
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
|
@@ -121,8 +113,7 @@ class AdUnitServiceClient {
|
|
|
121
113
|
else {
|
|
122
114
|
opts.fallback = opts.fallback ?? true;
|
|
123
115
|
}
|
|
124
|
-
const fallback = opts?.fallback ??
|
|
125
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
116
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
126
117
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
127
118
|
// Request numeric enum values if REST transport is used.
|
|
128
119
|
opts.numericEnums = true;
|
|
@@ -151,7 +142,10 @@ class AdUnitServiceClient {
|
|
|
151
142
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
152
143
|
}
|
|
153
144
|
// Determine the client header string.
|
|
154
|
-
const clientHeader = [
|
|
145
|
+
const clientHeader = [
|
|
146
|
+
`gax/${this._gaxModule.version}`,
|
|
147
|
+
`gapic/${version}`,
|
|
148
|
+
];
|
|
155
149
|
if (typeof process === 'object' && 'versions' in process) {
|
|
156
150
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
|
157
151
|
}
|
|
@@ -173,17 +167,27 @@ class AdUnitServiceClient {
|
|
|
173
167
|
// identifiers to uniquely identify resources within the API.
|
|
174
168
|
// Create useful helper objects for these.
|
|
175
169
|
this.pathTemplates = {
|
|
170
|
+
adBreakPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEventsByAssetKey/{asset_key}/adBreaks/{ad_break}'),
|
|
176
171
|
adUnitPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/adUnits/{ad_unit}'),
|
|
172
|
+
bandwidthGroupPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/bandwidthGroups/{bandwidth_group}'),
|
|
177
173
|
companyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/companies/{company}'),
|
|
178
174
|
contactPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/contacts/{contact}'),
|
|
179
175
|
customFieldPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customFields/{custom_field}'),
|
|
180
176
|
customTargetingKeyPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingKeys/{custom_targeting_key}'),
|
|
181
|
-
customTargetingValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/
|
|
177
|
+
customTargetingValuePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/customTargetingValues/{custom_targeting_value}'),
|
|
178
|
+
deviceCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/deviceCategories/{device_category}'),
|
|
182
179
|
entitySignalsMappingPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/entitySignalsMappings/{entity_signals_mapping}'),
|
|
180
|
+
geoTargetPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/geoTargets/{geo_target}'),
|
|
183
181
|
labelPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/labels/{label}'),
|
|
182
|
+
liveStreamEventPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/liveStreamEvents/{live_stream_event}'),
|
|
184
183
|
networkPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}'),
|
|
184
|
+
operatingSystemPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/operatingSystems/{operating_system}'),
|
|
185
|
+
operatingSystemVersionPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/operatingSystemVersions/{operating_system_version}'),
|
|
185
186
|
orderPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/orders/{order}'),
|
|
186
187
|
placementPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/placements/{placement}'),
|
|
188
|
+
privateAuctionPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/privateAuctions/{private_auction}'),
|
|
189
|
+
privateAuctionDealPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/privateAuctionDeals/{private_auction_deal}'),
|
|
190
|
+
programmaticBuyerPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/programmaticBuyers/{programmatic_buyer}'),
|
|
187
191
|
reportPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/reports/{report}'),
|
|
188
192
|
rolePathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/roles/{role}'),
|
|
189
193
|
taxonomyCategoryPathTemplate: new this._gaxModule.PathTemplate('networks/{network_code}/taxonomyCategories/{taxonomy_category}'),
|
|
@@ -195,7 +199,7 @@ class AdUnitServiceClient {
|
|
|
195
199
|
// pages). Denote the keys used for pagination and results.
|
|
196
200
|
this.descriptors.page = {
|
|
197
201
|
listAdUnits: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'adUnits'),
|
|
198
|
-
listAdUnitSizes: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'adUnitSizes')
|
|
202
|
+
listAdUnitSizes: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'adUnitSizes')
|
|
199
203
|
};
|
|
200
204
|
// Put together the default options sent with requests.
|
|
201
205
|
this._defaults = this._gaxGrpc.constructSettings('google.ads.admanager.v1.AdUnitService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
|
@@ -224,17 +228,13 @@ class AdUnitServiceClient {
|
|
|
224
228
|
}
|
|
225
229
|
// Put together the "service stub" for
|
|
226
230
|
// google.ads.admanager.v1.AdUnitService.
|
|
227
|
-
this.adUnitServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
+
this.adUnitServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
|
232
|
+
this._protos.lookupService('google.ads.admanager.v1.AdUnitService') :
|
|
233
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
234
|
+
this._protos.google.ads.admanager.v1.AdUnitService, this._opts, this._providedCustomServicePath);
|
|
231
235
|
// Iterate over each of the methods that the service provides
|
|
232
236
|
// and create an API call method for each.
|
|
233
|
-
const adUnitServiceStubMethods = [
|
|
234
|
-
'getAdUnit',
|
|
235
|
-
'listAdUnits',
|
|
236
|
-
'listAdUnitSizes',
|
|
237
|
-
];
|
|
237
|
+
const adUnitServiceStubMethods = ['getAdUnit', 'listAdUnits', 'listAdUnitSizes'];
|
|
238
238
|
for (const methodName of adUnitServiceStubMethods) {
|
|
239
239
|
const callPromise = this.adUnitServiceStub.then(stub => (...args) => {
|
|
240
240
|
if (this._terminated) {
|
|
@@ -245,7 +245,8 @@ class AdUnitServiceClient {
|
|
|
245
245
|
}, (err) => () => {
|
|
246
246
|
throw err;
|
|
247
247
|
});
|
|
248
|
-
const descriptor = this.descriptors.page[methodName] ||
|
|
248
|
+
const descriptor = this.descriptors.page[methodName] ||
|
|
249
|
+
undefined;
|
|
249
250
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
|
250
251
|
this.innerApiCalls[methodName] = apiCall;
|
|
251
252
|
}
|
|
@@ -257,8 +258,7 @@ class AdUnitServiceClient {
|
|
|
257
258
|
* @returns {string} The DNS address for this service.
|
|
258
259
|
*/
|
|
259
260
|
static get servicePath() {
|
|
260
|
-
if (typeof process === 'object' &&
|
|
261
|
-
typeof process.emitWarning === 'function') {
|
|
261
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
|
262
262
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
263
263
|
}
|
|
264
264
|
return 'admanager.googleapis.com';
|
|
@@ -269,8 +269,7 @@ class AdUnitServiceClient {
|
|
|
269
269
|
* @returns {string} The DNS address for this service.
|
|
270
270
|
*/
|
|
271
271
|
static get apiEndpoint() {
|
|
272
|
-
if (typeof process === 'object' &&
|
|
273
|
-
typeof process.emitWarning === 'function') {
|
|
272
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
|
274
273
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
275
274
|
}
|
|
276
275
|
return 'admanager.googleapis.com';
|
|
@@ -298,7 +297,9 @@ class AdUnitServiceClient {
|
|
|
298
297
|
* @returns {string[]} List of default scopes.
|
|
299
298
|
*/
|
|
300
299
|
static get scopes() {
|
|
301
|
-
return [
|
|
300
|
+
return [
|
|
301
|
+
'https://www.googleapis.com/auth/admanager'
|
|
302
|
+
];
|
|
302
303
|
}
|
|
303
304
|
/**
|
|
304
305
|
* Return the project ID used by this class.
|
|
@@ -324,13 +325,10 @@ class AdUnitServiceClient {
|
|
|
324
325
|
options = options || {};
|
|
325
326
|
options.otherArgs = options.otherArgs || {};
|
|
326
327
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
327
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
328
|
-
|
|
329
|
-
name: request.name ?? '',
|
|
330
|
-
});
|
|
331
|
-
this.initialize().catch(err => {
|
|
332
|
-
throw err;
|
|
328
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
329
|
+
'name': request.name ?? '',
|
|
333
330
|
});
|
|
331
|
+
this.initialize().catch(err => { throw err; });
|
|
334
332
|
this._log.info('getAdUnit request %j', request);
|
|
335
333
|
const wrappedCallback = callback
|
|
336
334
|
? (error, response, options, rawResponse) => {
|
|
@@ -338,11 +336,16 @@ class AdUnitServiceClient {
|
|
|
338
336
|
callback(error, response, options, rawResponse); // We verified callback above.
|
|
339
337
|
}
|
|
340
338
|
: undefined;
|
|
341
|
-
return this.innerApiCalls
|
|
342
|
-
.getAdUnit(request, options, wrappedCallback)
|
|
339
|
+
return this.innerApiCalls.getAdUnit(request, options, wrappedCallback)
|
|
343
340
|
?.then(([response, options, rawResponse]) => {
|
|
344
341
|
this._log.info('getAdUnit response %j', response);
|
|
345
342
|
return [response, options, rawResponse];
|
|
343
|
+
}).catch((error) => {
|
|
344
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
|
345
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
|
346
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
|
347
|
+
}
|
|
348
|
+
throw error;
|
|
346
349
|
});
|
|
347
350
|
}
|
|
348
351
|
listAdUnits(request, optionsOrCallback, callback) {
|
|
@@ -358,13 +361,10 @@ class AdUnitServiceClient {
|
|
|
358
361
|
options = options || {};
|
|
359
362
|
options.otherArgs = options.otherArgs || {};
|
|
360
363
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
361
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
362
|
-
|
|
363
|
-
parent: request.parent ?? '',
|
|
364
|
-
});
|
|
365
|
-
this.initialize().catch(err => {
|
|
366
|
-
throw err;
|
|
364
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
365
|
+
'parent': request.parent ?? '',
|
|
367
366
|
});
|
|
367
|
+
this.initialize().catch(err => { throw err; });
|
|
368
368
|
const wrappedCallback = callback
|
|
369
369
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
370
370
|
this._log.info('listAdUnits values %j', values);
|
|
@@ -423,15 +423,12 @@ class AdUnitServiceClient {
|
|
|
423
423
|
options = options || {};
|
|
424
424
|
options.otherArgs = options.otherArgs || {};
|
|
425
425
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
426
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
});
|
|
426
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
427
|
+
'parent': request.parent ?? '',
|
|
428
|
+
});
|
|
430
429
|
const defaultCallSettings = this._defaults['listAdUnits'];
|
|
431
430
|
const callSettings = defaultCallSettings.merge(options);
|
|
432
|
-
this.initialize().catch(err => {
|
|
433
|
-
throw err;
|
|
434
|
-
});
|
|
431
|
+
this.initialize().catch(err => { throw err; });
|
|
435
432
|
this._log.info('listAdUnits stream %j', request);
|
|
436
433
|
return this.descriptors.page.listAdUnits.createStream(this.innerApiCalls.listAdUnits, request, callSettings);
|
|
437
434
|
}
|
|
@@ -482,15 +479,12 @@ class AdUnitServiceClient {
|
|
|
482
479
|
options = options || {};
|
|
483
480
|
options.otherArgs = options.otherArgs || {};
|
|
484
481
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
485
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
});
|
|
482
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
483
|
+
'parent': request.parent ?? '',
|
|
484
|
+
});
|
|
489
485
|
const defaultCallSettings = this._defaults['listAdUnits'];
|
|
490
486
|
const callSettings = defaultCallSettings.merge(options);
|
|
491
|
-
this.initialize().catch(err => {
|
|
492
|
-
throw err;
|
|
493
|
-
});
|
|
487
|
+
this.initialize().catch(err => { throw err; });
|
|
494
488
|
this._log.info('listAdUnits iterate %j', request);
|
|
495
489
|
return this.descriptors.page.listAdUnits.asyncIterate(this.innerApiCalls['listAdUnits'], request, callSettings);
|
|
496
490
|
}
|
|
@@ -507,13 +501,10 @@ class AdUnitServiceClient {
|
|
|
507
501
|
options = options || {};
|
|
508
502
|
options.otherArgs = options.otherArgs || {};
|
|
509
503
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
510
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
511
|
-
|
|
512
|
-
parent: request.parent ?? '',
|
|
513
|
-
});
|
|
514
|
-
this.initialize().catch(err => {
|
|
515
|
-
throw err;
|
|
504
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
505
|
+
'parent': request.parent ?? '',
|
|
516
506
|
});
|
|
507
|
+
this.initialize().catch(err => { throw err; });
|
|
517
508
|
const wrappedCallback = callback
|
|
518
509
|
? (error, values, nextPageRequest, rawResponse) => {
|
|
519
510
|
this._log.info('listAdUnitSizes values %j', values);
|
|
@@ -572,15 +563,12 @@ class AdUnitServiceClient {
|
|
|
572
563
|
options = options || {};
|
|
573
564
|
options.otherArgs = options.otherArgs || {};
|
|
574
565
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
575
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
});
|
|
566
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
567
|
+
'parent': request.parent ?? '',
|
|
568
|
+
});
|
|
579
569
|
const defaultCallSettings = this._defaults['listAdUnitSizes'];
|
|
580
570
|
const callSettings = defaultCallSettings.merge(options);
|
|
581
|
-
this.initialize().catch(err => {
|
|
582
|
-
throw err;
|
|
583
|
-
});
|
|
571
|
+
this.initialize().catch(err => { throw err; });
|
|
584
572
|
this._log.info('listAdUnitSizes stream %j', request);
|
|
585
573
|
return this.descriptors.page.listAdUnitSizes.createStream(this.innerApiCalls.listAdUnitSizes, request, callSettings);
|
|
586
574
|
}
|
|
@@ -631,21 +619,63 @@ class AdUnitServiceClient {
|
|
|
631
619
|
options = options || {};
|
|
632
620
|
options.otherArgs = options.otherArgs || {};
|
|
633
621
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
634
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
});
|
|
622
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
|
623
|
+
'parent': request.parent ?? '',
|
|
624
|
+
});
|
|
638
625
|
const defaultCallSettings = this._defaults['listAdUnitSizes'];
|
|
639
626
|
const callSettings = defaultCallSettings.merge(options);
|
|
640
|
-
this.initialize().catch(err => {
|
|
641
|
-
throw err;
|
|
642
|
-
});
|
|
627
|
+
this.initialize().catch(err => { throw err; });
|
|
643
628
|
this._log.info('listAdUnitSizes iterate %j', request);
|
|
644
629
|
return this.descriptors.page.listAdUnitSizes.asyncIterate(this.innerApiCalls['listAdUnitSizes'], request, callSettings);
|
|
645
630
|
}
|
|
646
631
|
// --------------------
|
|
647
632
|
// -- Path templates --
|
|
648
633
|
// --------------------
|
|
634
|
+
/**
|
|
635
|
+
* Return a fully-qualified adBreak resource name string.
|
|
636
|
+
*
|
|
637
|
+
* @param {string} network_code
|
|
638
|
+
* @param {string} asset_key
|
|
639
|
+
* @param {string} ad_break
|
|
640
|
+
* @returns {string} Resource name string.
|
|
641
|
+
*/
|
|
642
|
+
adBreakPath(networkCode, assetKey, adBreak) {
|
|
643
|
+
return this.pathTemplates.adBreakPathTemplate.render({
|
|
644
|
+
network_code: networkCode,
|
|
645
|
+
asset_key: assetKey,
|
|
646
|
+
ad_break: adBreak,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Parse the network_code from AdBreak resource.
|
|
651
|
+
*
|
|
652
|
+
* @param {string} adBreakName
|
|
653
|
+
* A fully-qualified path representing AdBreak resource.
|
|
654
|
+
* @returns {string} A string representing the network_code.
|
|
655
|
+
*/
|
|
656
|
+
matchNetworkCodeFromAdBreakName(adBreakName) {
|
|
657
|
+
return this.pathTemplates.adBreakPathTemplate.match(adBreakName).network_code;
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* Parse the asset_key from AdBreak resource.
|
|
661
|
+
*
|
|
662
|
+
* @param {string} adBreakName
|
|
663
|
+
* A fully-qualified path representing AdBreak resource.
|
|
664
|
+
* @returns {string} A string representing the asset_key.
|
|
665
|
+
*/
|
|
666
|
+
matchAssetKeyFromAdBreakName(adBreakName) {
|
|
667
|
+
return this.pathTemplates.adBreakPathTemplate.match(adBreakName).asset_key;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Parse the ad_break from AdBreak resource.
|
|
671
|
+
*
|
|
672
|
+
* @param {string} adBreakName
|
|
673
|
+
* A fully-qualified path representing AdBreak resource.
|
|
674
|
+
* @returns {string} A string representing the ad_break.
|
|
675
|
+
*/
|
|
676
|
+
matchAdBreakFromAdBreakName(adBreakName) {
|
|
677
|
+
return this.pathTemplates.adBreakPathTemplate.match(adBreakName).ad_break;
|
|
678
|
+
}
|
|
649
679
|
/**
|
|
650
680
|
* Return a fully-qualified adUnit resource name string.
|
|
651
681
|
*
|
|
@@ -679,6 +709,39 @@ class AdUnitServiceClient {
|
|
|
679
709
|
matchAdUnitFromAdUnitName(adUnitName) {
|
|
680
710
|
return this.pathTemplates.adUnitPathTemplate.match(adUnitName).ad_unit;
|
|
681
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* Return a fully-qualified bandwidthGroup resource name string.
|
|
714
|
+
*
|
|
715
|
+
* @param {string} network_code
|
|
716
|
+
* @param {string} bandwidth_group
|
|
717
|
+
* @returns {string} Resource name string.
|
|
718
|
+
*/
|
|
719
|
+
bandwidthGroupPath(networkCode, bandwidthGroup) {
|
|
720
|
+
return this.pathTemplates.bandwidthGroupPathTemplate.render({
|
|
721
|
+
network_code: networkCode,
|
|
722
|
+
bandwidth_group: bandwidthGroup,
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Parse the network_code from BandwidthGroup resource.
|
|
727
|
+
*
|
|
728
|
+
* @param {string} bandwidthGroupName
|
|
729
|
+
* A fully-qualified path representing BandwidthGroup resource.
|
|
730
|
+
* @returns {string} A string representing the network_code.
|
|
731
|
+
*/
|
|
732
|
+
matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName) {
|
|
733
|
+
return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).network_code;
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Parse the bandwidth_group from BandwidthGroup resource.
|
|
737
|
+
*
|
|
738
|
+
* @param {string} bandwidthGroupName
|
|
739
|
+
* A fully-qualified path representing BandwidthGroup resource.
|
|
740
|
+
* @returns {string} A string representing the bandwidth_group.
|
|
741
|
+
*/
|
|
742
|
+
matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName) {
|
|
743
|
+
return this.pathTemplates.bandwidthGroupPathTemplate.match(bandwidthGroupName).bandwidth_group;
|
|
744
|
+
}
|
|
682
745
|
/**
|
|
683
746
|
* Return a fully-qualified company resource name string.
|
|
684
747
|
*
|
|
@@ -700,8 +763,7 @@ class AdUnitServiceClient {
|
|
|
700
763
|
* @returns {string} A string representing the network_code.
|
|
701
764
|
*/
|
|
702
765
|
matchNetworkCodeFromCompanyName(companyName) {
|
|
703
|
-
return this.pathTemplates.companyPathTemplate.match(companyName)
|
|
704
|
-
.network_code;
|
|
766
|
+
return this.pathTemplates.companyPathTemplate.match(companyName).network_code;
|
|
705
767
|
}
|
|
706
768
|
/**
|
|
707
769
|
* Parse the company from Company resource.
|
|
@@ -734,8 +796,7 @@ class AdUnitServiceClient {
|
|
|
734
796
|
* @returns {string} A string representing the network_code.
|
|
735
797
|
*/
|
|
736
798
|
matchNetworkCodeFromContactName(contactName) {
|
|
737
|
-
return this.pathTemplates.contactPathTemplate.match(contactName)
|
|
738
|
-
.network_code;
|
|
799
|
+
return this.pathTemplates.contactPathTemplate.match(contactName).network_code;
|
|
739
800
|
}
|
|
740
801
|
/**
|
|
741
802
|
* Parse the contact from Contact resource.
|
|
@@ -768,8 +829,7 @@ class AdUnitServiceClient {
|
|
|
768
829
|
* @returns {string} A string representing the network_code.
|
|
769
830
|
*/
|
|
770
831
|
matchNetworkCodeFromCustomFieldName(customFieldName) {
|
|
771
|
-
return this.pathTemplates.customFieldPathTemplate.match(customFieldName)
|
|
772
|
-
.network_code;
|
|
832
|
+
return this.pathTemplates.customFieldPathTemplate.match(customFieldName).network_code;
|
|
773
833
|
}
|
|
774
834
|
/**
|
|
775
835
|
* Parse the custom_field from CustomField resource.
|
|
@@ -779,8 +839,7 @@ class AdUnitServiceClient {
|
|
|
779
839
|
* @returns {string} A string representing the custom_field.
|
|
780
840
|
*/
|
|
781
841
|
matchCustomFieldFromCustomFieldName(customFieldName) {
|
|
782
|
-
return this.pathTemplates.customFieldPathTemplate.match(customFieldName)
|
|
783
|
-
.custom_field;
|
|
842
|
+
return this.pathTemplates.customFieldPathTemplate.match(customFieldName).custom_field;
|
|
784
843
|
}
|
|
785
844
|
/**
|
|
786
845
|
* Return a fully-qualified customTargetingKey resource name string.
|
|
@@ -819,14 +878,12 @@ class AdUnitServiceClient {
|
|
|
819
878
|
* Return a fully-qualified customTargetingValue resource name string.
|
|
820
879
|
*
|
|
821
880
|
* @param {string} network_code
|
|
822
|
-
* @param {string} custom_targeting_key
|
|
823
881
|
* @param {string} custom_targeting_value
|
|
824
882
|
* @returns {string} Resource name string.
|
|
825
883
|
*/
|
|
826
|
-
customTargetingValuePath(networkCode,
|
|
884
|
+
customTargetingValuePath(networkCode, customTargetingValue) {
|
|
827
885
|
return this.pathTemplates.customTargetingValuePathTemplate.render({
|
|
828
886
|
network_code: networkCode,
|
|
829
|
-
custom_targeting_key: customTargetingKey,
|
|
830
887
|
custom_targeting_value: customTargetingValue,
|
|
831
888
|
});
|
|
832
889
|
}
|
|
@@ -840,16 +897,6 @@ class AdUnitServiceClient {
|
|
|
840
897
|
matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName) {
|
|
841
898
|
return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).network_code;
|
|
842
899
|
}
|
|
843
|
-
/**
|
|
844
|
-
* Parse the custom_targeting_key from CustomTargetingValue resource.
|
|
845
|
-
*
|
|
846
|
-
* @param {string} customTargetingValueName
|
|
847
|
-
* A fully-qualified path representing CustomTargetingValue resource.
|
|
848
|
-
* @returns {string} A string representing the custom_targeting_key.
|
|
849
|
-
*/
|
|
850
|
-
matchCustomTargetingKeyFromCustomTargetingValueName(customTargetingValueName) {
|
|
851
|
-
return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_key;
|
|
852
|
-
}
|
|
853
900
|
/**
|
|
854
901
|
* Parse the custom_targeting_value from CustomTargetingValue resource.
|
|
855
902
|
*
|
|
@@ -860,6 +907,39 @@ class AdUnitServiceClient {
|
|
|
860
907
|
matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName) {
|
|
861
908
|
return this.pathTemplates.customTargetingValuePathTemplate.match(customTargetingValueName).custom_targeting_value;
|
|
862
909
|
}
|
|
910
|
+
/**
|
|
911
|
+
* Return a fully-qualified deviceCategory resource name string.
|
|
912
|
+
*
|
|
913
|
+
* @param {string} network_code
|
|
914
|
+
* @param {string} device_category
|
|
915
|
+
* @returns {string} Resource name string.
|
|
916
|
+
*/
|
|
917
|
+
deviceCategoryPath(networkCode, deviceCategory) {
|
|
918
|
+
return this.pathTemplates.deviceCategoryPathTemplate.render({
|
|
919
|
+
network_code: networkCode,
|
|
920
|
+
device_category: deviceCategory,
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* Parse the network_code from DeviceCategory resource.
|
|
925
|
+
*
|
|
926
|
+
* @param {string} deviceCategoryName
|
|
927
|
+
* A fully-qualified path representing DeviceCategory resource.
|
|
928
|
+
* @returns {string} A string representing the network_code.
|
|
929
|
+
*/
|
|
930
|
+
matchNetworkCodeFromDeviceCategoryName(deviceCategoryName) {
|
|
931
|
+
return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).network_code;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Parse the device_category from DeviceCategory resource.
|
|
935
|
+
*
|
|
936
|
+
* @param {string} deviceCategoryName
|
|
937
|
+
* A fully-qualified path representing DeviceCategory resource.
|
|
938
|
+
* @returns {string} A string representing the device_category.
|
|
939
|
+
*/
|
|
940
|
+
matchDeviceCategoryFromDeviceCategoryName(deviceCategoryName) {
|
|
941
|
+
return this.pathTemplates.deviceCategoryPathTemplate.match(deviceCategoryName).device_category;
|
|
942
|
+
}
|
|
863
943
|
/**
|
|
864
944
|
* Return a fully-qualified entitySignalsMapping resource name string.
|
|
865
945
|
*
|
|
@@ -893,6 +973,39 @@ class AdUnitServiceClient {
|
|
|
893
973
|
matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName) {
|
|
894
974
|
return this.pathTemplates.entitySignalsMappingPathTemplate.match(entitySignalsMappingName).entity_signals_mapping;
|
|
895
975
|
}
|
|
976
|
+
/**
|
|
977
|
+
* Return a fully-qualified geoTarget resource name string.
|
|
978
|
+
*
|
|
979
|
+
* @param {string} network_code
|
|
980
|
+
* @param {string} geo_target
|
|
981
|
+
* @returns {string} Resource name string.
|
|
982
|
+
*/
|
|
983
|
+
geoTargetPath(networkCode, geoTarget) {
|
|
984
|
+
return this.pathTemplates.geoTargetPathTemplate.render({
|
|
985
|
+
network_code: networkCode,
|
|
986
|
+
geo_target: geoTarget,
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* Parse the network_code from GeoTarget resource.
|
|
991
|
+
*
|
|
992
|
+
* @param {string} geoTargetName
|
|
993
|
+
* A fully-qualified path representing GeoTarget resource.
|
|
994
|
+
* @returns {string} A string representing the network_code.
|
|
995
|
+
*/
|
|
996
|
+
matchNetworkCodeFromGeoTargetName(geoTargetName) {
|
|
997
|
+
return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).network_code;
|
|
998
|
+
}
|
|
999
|
+
/**
|
|
1000
|
+
* Parse the geo_target from GeoTarget resource.
|
|
1001
|
+
*
|
|
1002
|
+
* @param {string} geoTargetName
|
|
1003
|
+
* A fully-qualified path representing GeoTarget resource.
|
|
1004
|
+
* @returns {string} A string representing the geo_target.
|
|
1005
|
+
*/
|
|
1006
|
+
matchGeoTargetFromGeoTargetName(geoTargetName) {
|
|
1007
|
+
return this.pathTemplates.geoTargetPathTemplate.match(geoTargetName).geo_target;
|
|
1008
|
+
}
|
|
896
1009
|
/**
|
|
897
1010
|
* Return a fully-qualified label resource name string.
|
|
898
1011
|
*
|
|
@@ -926,6 +1039,39 @@ class AdUnitServiceClient {
|
|
|
926
1039
|
matchLabelFromLabelName(labelName) {
|
|
927
1040
|
return this.pathTemplates.labelPathTemplate.match(labelName).label;
|
|
928
1041
|
}
|
|
1042
|
+
/**
|
|
1043
|
+
* Return a fully-qualified liveStreamEvent resource name string.
|
|
1044
|
+
*
|
|
1045
|
+
* @param {string} network_code
|
|
1046
|
+
* @param {string} live_stream_event
|
|
1047
|
+
* @returns {string} Resource name string.
|
|
1048
|
+
*/
|
|
1049
|
+
liveStreamEventPath(networkCode, liveStreamEvent) {
|
|
1050
|
+
return this.pathTemplates.liveStreamEventPathTemplate.render({
|
|
1051
|
+
network_code: networkCode,
|
|
1052
|
+
live_stream_event: liveStreamEvent,
|
|
1053
|
+
});
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Parse the network_code from LiveStreamEvent resource.
|
|
1057
|
+
*
|
|
1058
|
+
* @param {string} liveStreamEventName
|
|
1059
|
+
* A fully-qualified path representing LiveStreamEvent resource.
|
|
1060
|
+
* @returns {string} A string representing the network_code.
|
|
1061
|
+
*/
|
|
1062
|
+
matchNetworkCodeFromLiveStreamEventName(liveStreamEventName) {
|
|
1063
|
+
return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).network_code;
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Parse the live_stream_event from LiveStreamEvent resource.
|
|
1067
|
+
*
|
|
1068
|
+
* @param {string} liveStreamEventName
|
|
1069
|
+
* A fully-qualified path representing LiveStreamEvent resource.
|
|
1070
|
+
* @returns {string} A string representing the live_stream_event.
|
|
1071
|
+
*/
|
|
1072
|
+
matchLiveStreamEventFromLiveStreamEventName(liveStreamEventName) {
|
|
1073
|
+
return this.pathTemplates.liveStreamEventPathTemplate.match(liveStreamEventName).live_stream_event;
|
|
1074
|
+
}
|
|
929
1075
|
/**
|
|
930
1076
|
* Return a fully-qualified network resource name string.
|
|
931
1077
|
*
|
|
@@ -945,8 +1091,73 @@ class AdUnitServiceClient {
|
|
|
945
1091
|
* @returns {string} A string representing the network_code.
|
|
946
1092
|
*/
|
|
947
1093
|
matchNetworkCodeFromNetworkName(networkName) {
|
|
948
|
-
return this.pathTemplates.networkPathTemplate.match(networkName)
|
|
949
|
-
|
|
1094
|
+
return this.pathTemplates.networkPathTemplate.match(networkName).network_code;
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* Return a fully-qualified operatingSystem resource name string.
|
|
1098
|
+
*
|
|
1099
|
+
* @param {string} network_code
|
|
1100
|
+
* @param {string} operating_system
|
|
1101
|
+
* @returns {string} Resource name string.
|
|
1102
|
+
*/
|
|
1103
|
+
operatingSystemPath(networkCode, operatingSystem) {
|
|
1104
|
+
return this.pathTemplates.operatingSystemPathTemplate.render({
|
|
1105
|
+
network_code: networkCode,
|
|
1106
|
+
operating_system: operatingSystem,
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Parse the network_code from OperatingSystem resource.
|
|
1111
|
+
*
|
|
1112
|
+
* @param {string} operatingSystemName
|
|
1113
|
+
* A fully-qualified path representing OperatingSystem resource.
|
|
1114
|
+
* @returns {string} A string representing the network_code.
|
|
1115
|
+
*/
|
|
1116
|
+
matchNetworkCodeFromOperatingSystemName(operatingSystemName) {
|
|
1117
|
+
return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).network_code;
|
|
1118
|
+
}
|
|
1119
|
+
/**
|
|
1120
|
+
* Parse the operating_system from OperatingSystem resource.
|
|
1121
|
+
*
|
|
1122
|
+
* @param {string} operatingSystemName
|
|
1123
|
+
* A fully-qualified path representing OperatingSystem resource.
|
|
1124
|
+
* @returns {string} A string representing the operating_system.
|
|
1125
|
+
*/
|
|
1126
|
+
matchOperatingSystemFromOperatingSystemName(operatingSystemName) {
|
|
1127
|
+
return this.pathTemplates.operatingSystemPathTemplate.match(operatingSystemName).operating_system;
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Return a fully-qualified operatingSystemVersion resource name string.
|
|
1131
|
+
*
|
|
1132
|
+
* @param {string} network_code
|
|
1133
|
+
* @param {string} operating_system_version
|
|
1134
|
+
* @returns {string} Resource name string.
|
|
1135
|
+
*/
|
|
1136
|
+
operatingSystemVersionPath(networkCode, operatingSystemVersion) {
|
|
1137
|
+
return this.pathTemplates.operatingSystemVersionPathTemplate.render({
|
|
1138
|
+
network_code: networkCode,
|
|
1139
|
+
operating_system_version: operatingSystemVersion,
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Parse the network_code from OperatingSystemVersion resource.
|
|
1144
|
+
*
|
|
1145
|
+
* @param {string} operatingSystemVersionName
|
|
1146
|
+
* A fully-qualified path representing OperatingSystemVersion resource.
|
|
1147
|
+
* @returns {string} A string representing the network_code.
|
|
1148
|
+
*/
|
|
1149
|
+
matchNetworkCodeFromOperatingSystemVersionName(operatingSystemVersionName) {
|
|
1150
|
+
return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).network_code;
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Parse the operating_system_version from OperatingSystemVersion resource.
|
|
1154
|
+
*
|
|
1155
|
+
* @param {string} operatingSystemVersionName
|
|
1156
|
+
* A fully-qualified path representing OperatingSystemVersion resource.
|
|
1157
|
+
* @returns {string} A string representing the operating_system_version.
|
|
1158
|
+
*/
|
|
1159
|
+
matchOperatingSystemVersionFromOperatingSystemVersionName(operatingSystemVersionName) {
|
|
1160
|
+
return this.pathTemplates.operatingSystemVersionPathTemplate.match(operatingSystemVersionName).operating_system_version;
|
|
950
1161
|
}
|
|
951
1162
|
/**
|
|
952
1163
|
* Return a fully-qualified order resource name string.
|
|
@@ -1002,8 +1213,7 @@ class AdUnitServiceClient {
|
|
|
1002
1213
|
* @returns {string} A string representing the network_code.
|
|
1003
1214
|
*/
|
|
1004
1215
|
matchNetworkCodeFromPlacementName(placementName) {
|
|
1005
|
-
return this.pathTemplates.placementPathTemplate.match(placementName)
|
|
1006
|
-
.network_code;
|
|
1216
|
+
return this.pathTemplates.placementPathTemplate.match(placementName).network_code;
|
|
1007
1217
|
}
|
|
1008
1218
|
/**
|
|
1009
1219
|
* Parse the placement from Placement resource.
|
|
@@ -1013,8 +1223,106 @@ class AdUnitServiceClient {
|
|
|
1013
1223
|
* @returns {string} A string representing the placement.
|
|
1014
1224
|
*/
|
|
1015
1225
|
matchPlacementFromPlacementName(placementName) {
|
|
1016
|
-
return this.pathTemplates.placementPathTemplate.match(placementName)
|
|
1017
|
-
|
|
1226
|
+
return this.pathTemplates.placementPathTemplate.match(placementName).placement;
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Return a fully-qualified privateAuction resource name string.
|
|
1230
|
+
*
|
|
1231
|
+
* @param {string} network_code
|
|
1232
|
+
* @param {string} private_auction
|
|
1233
|
+
* @returns {string} Resource name string.
|
|
1234
|
+
*/
|
|
1235
|
+
privateAuctionPath(networkCode, privateAuction) {
|
|
1236
|
+
return this.pathTemplates.privateAuctionPathTemplate.render({
|
|
1237
|
+
network_code: networkCode,
|
|
1238
|
+
private_auction: privateAuction,
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Parse the network_code from PrivateAuction resource.
|
|
1243
|
+
*
|
|
1244
|
+
* @param {string} privateAuctionName
|
|
1245
|
+
* A fully-qualified path representing PrivateAuction resource.
|
|
1246
|
+
* @returns {string} A string representing the network_code.
|
|
1247
|
+
*/
|
|
1248
|
+
matchNetworkCodeFromPrivateAuctionName(privateAuctionName) {
|
|
1249
|
+
return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).network_code;
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Parse the private_auction from PrivateAuction resource.
|
|
1253
|
+
*
|
|
1254
|
+
* @param {string} privateAuctionName
|
|
1255
|
+
* A fully-qualified path representing PrivateAuction resource.
|
|
1256
|
+
* @returns {string} A string representing the private_auction.
|
|
1257
|
+
*/
|
|
1258
|
+
matchPrivateAuctionFromPrivateAuctionName(privateAuctionName) {
|
|
1259
|
+
return this.pathTemplates.privateAuctionPathTemplate.match(privateAuctionName).private_auction;
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Return a fully-qualified privateAuctionDeal resource name string.
|
|
1263
|
+
*
|
|
1264
|
+
* @param {string} network_code
|
|
1265
|
+
* @param {string} private_auction_deal
|
|
1266
|
+
* @returns {string} Resource name string.
|
|
1267
|
+
*/
|
|
1268
|
+
privateAuctionDealPath(networkCode, privateAuctionDeal) {
|
|
1269
|
+
return this.pathTemplates.privateAuctionDealPathTemplate.render({
|
|
1270
|
+
network_code: networkCode,
|
|
1271
|
+
private_auction_deal: privateAuctionDeal,
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Parse the network_code from PrivateAuctionDeal resource.
|
|
1276
|
+
*
|
|
1277
|
+
* @param {string} privateAuctionDealName
|
|
1278
|
+
* A fully-qualified path representing PrivateAuctionDeal resource.
|
|
1279
|
+
* @returns {string} A string representing the network_code.
|
|
1280
|
+
*/
|
|
1281
|
+
matchNetworkCodeFromPrivateAuctionDealName(privateAuctionDealName) {
|
|
1282
|
+
return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).network_code;
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* Parse the private_auction_deal from PrivateAuctionDeal resource.
|
|
1286
|
+
*
|
|
1287
|
+
* @param {string} privateAuctionDealName
|
|
1288
|
+
* A fully-qualified path representing PrivateAuctionDeal resource.
|
|
1289
|
+
* @returns {string} A string representing the private_auction_deal.
|
|
1290
|
+
*/
|
|
1291
|
+
matchPrivateAuctionDealFromPrivateAuctionDealName(privateAuctionDealName) {
|
|
1292
|
+
return this.pathTemplates.privateAuctionDealPathTemplate.match(privateAuctionDealName).private_auction_deal;
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1295
|
+
* Return a fully-qualified programmaticBuyer resource name string.
|
|
1296
|
+
*
|
|
1297
|
+
* @param {string} network_code
|
|
1298
|
+
* @param {string} programmatic_buyer
|
|
1299
|
+
* @returns {string} Resource name string.
|
|
1300
|
+
*/
|
|
1301
|
+
programmaticBuyerPath(networkCode, programmaticBuyer) {
|
|
1302
|
+
return this.pathTemplates.programmaticBuyerPathTemplate.render({
|
|
1303
|
+
network_code: networkCode,
|
|
1304
|
+
programmatic_buyer: programmaticBuyer,
|
|
1305
|
+
});
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Parse the network_code from ProgrammaticBuyer resource.
|
|
1309
|
+
*
|
|
1310
|
+
* @param {string} programmaticBuyerName
|
|
1311
|
+
* A fully-qualified path representing ProgrammaticBuyer resource.
|
|
1312
|
+
* @returns {string} A string representing the network_code.
|
|
1313
|
+
*/
|
|
1314
|
+
matchNetworkCodeFromProgrammaticBuyerName(programmaticBuyerName) {
|
|
1315
|
+
return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).network_code;
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* Parse the programmatic_buyer from ProgrammaticBuyer resource.
|
|
1319
|
+
*
|
|
1320
|
+
* @param {string} programmaticBuyerName
|
|
1321
|
+
* A fully-qualified path representing ProgrammaticBuyer resource.
|
|
1322
|
+
* @returns {string} A string representing the programmatic_buyer.
|
|
1323
|
+
*/
|
|
1324
|
+
matchProgrammaticBuyerFromProgrammaticBuyerName(programmaticBuyerName) {
|
|
1325
|
+
return this.pathTemplates.programmaticBuyerPathTemplate.match(programmaticBuyerName).programmatic_buyer;
|
|
1018
1326
|
}
|
|
1019
1327
|
/**
|
|
1020
1328
|
* Return a fully-qualified report resource name string.
|