/
v2.0.ts
1870 lines (1732 loc) · 63.6 KB
/
v2.0.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {AxiosPromise} from 'axios';
import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library';
import {GoogleApis} from '../..';
import {BodyResponseCallback, GlobalOptions, MethodOptions} from '../../lib/api';
import {createAPIRequest} from '../../lib/apirequest';
// TODO: We will eventually get the `any` in here cleared out, but in the
// interim we want to turn on no-implicit-any.
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
export namespace adexchangeseller_v2_0 {
export interface Options extends GlobalOptions {
version: 'v2_0';
}
/**
* Ad Exchange Seller API
*
* Accesses the inventory of Ad Exchange seller users and generates reports.
*
* @example
* const google = require('googleapis');
* const adexchangeseller = google.adexchangeseller('v2.0');
*
* @namespace adexchangeseller
* @type {Function}
* @version v2.0
* @variation v2.0
* @param {object=} options Options for Adexchangeseller
*/
export class Adexchangeseller {
_options: GlobalOptions;
google: GoogleApis;
root = this;
accounts: Resource$Accounts;
constructor(options: GlobalOptions, google: GoogleApis) {
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.accounts = new Resource$Accounts(this);
}
getRoot() {
return this.root;
}
}
export interface Schema$Account {
/**
* Unique identifier of this account.
*/
id?: string;
/**
* Kind of resource this is, in this case adexchangeseller#account.
*/
kind?: string;
/**
* Name of this account.
*/
name?: string;
}
export interface Schema$Accounts {
/**
* ETag of this response for caching purposes.
*/
etag?: string;
/**
* The accounts returned in this list response.
*/
items?: Schema$Account[];
/**
* Kind of list this is, in this case adexchangeseller#accounts.
*/
kind?: string;
/**
* Continuation token used to page through accounts. To retrieve the next
* page of results, set the next request's "pageToken" value
* to this.
*/
nextPageToken?: string;
}
export interface Schema$AdClient {
/**
* Whether this ad client is opted in to ARC.
*/
arcOptIn?: boolean;
/**
* Unique identifier of this ad client.
*/
id?: string;
/**
* Kind of resource this is, in this case adexchangeseller#adClient.
*/
kind?: string;
/**
* This ad client's product code, which corresponds to the PRODUCT_CODE
* report dimension.
*/
productCode?: string;
/**
* Whether this ad client supports being reported on.
*/
supportsReporting?: boolean;
}
export interface Schema$AdClients {
/**
* ETag of this response for caching purposes.
*/
etag?: string;
/**
* The ad clients returned in this list response.
*/
items?: Schema$AdClient[];
/**
* Kind of list this is, in this case adexchangeseller#adClients.
*/
kind?: string;
/**
* Continuation token used to page through ad clients. To retrieve the next
* page of results, set the next request's "pageToken" value
* to this.
*/
nextPageToken?: string;
}
export interface Schema$Alert {
/**
* Unique identifier of this alert. This should be considered an opaque
* identifier; it is not safe to rely on it being in any particular format.
*/
id?: string;
/**
* Kind of resource this is, in this case adexchangeseller#alert.
*/
kind?: string;
/**
* The localized alert message.
*/
message?: string;
/**
* Severity of this alert. Possible values: INFO, WARNING, SEVERE.
*/
severity?: string;
/**
* Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3,
* ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY,
* GRAYLISTED_PUBLISHER, API_HOLD.
*/
type?: string;
}
export interface Schema$Alerts {
/**
* The alerts returned in this list response.
*/
items?: Schema$Alert[];
/**
* Kind of list this is, in this case adexchangeseller#alerts.
*/
kind?: string;
}
export interface Schema$CustomChannel {
/**
* Code of this custom channel, not necessarily unique across ad clients.
*/
code?: string;
/**
* Unique identifier of this custom channel. This should be considered an
* opaque identifier; it is not safe to rely on it being in any particular
* format.
*/
id?: string;
/**
* Kind of resource this is, in this case adexchangeseller#customChannel.
*/
kind?: string;
/**
* Name of this custom channel.
*/
name?: string;
/**
* The targeting information of this custom channel, if activated.
*/
targetingInfo?: any;
}
export interface Schema$CustomChannels {
/**
* ETag of this response for caching purposes.
*/
etag?: string;
/**
* The custom channels returned in this list response.
*/
items?: Schema$CustomChannel[];
/**
* Kind of list this is, in this case adexchangeseller#customChannels.
*/
kind?: string;
/**
* Continuation token used to page through custom channels. To retrieve the
* next page of results, set the next request's "pageToken"
* value to this.
*/
nextPageToken?: string;
}
export interface Schema$Metadata {
items?: Schema$ReportingMetadataEntry[];
/**
* Kind of list this is, in this case adexchangeseller#metadata.
*/
kind?: string;
}
export interface Schema$PreferredDeal {
/**
* The name of the advertiser this deal is for.
*/
advertiserName?: string;
/**
* The name of the buyer network this deal is for.
*/
buyerNetworkName?: string;
/**
* The currency code that applies to the fixed_cpm value. If not set then
* assumed to be USD.
*/
currencyCode?: string;
/**
* Time when this deal stops being active in seconds since the epoch (GMT).
* If not set then this deal is valid until manually disabled by the
* publisher.
*/
endTime?: string;
/**
* The fixed price for this preferred deal. In cpm micros of currency
* according to currencyCode. If set, then this preferred deal is eligible
* for the fixed price tier of buying (highest priority, pay exactly the
* configured fixed price).
*/
fixedCpm?: string;
/**
* Unique identifier of this preferred deal.
*/
id?: string;
/**
* Kind of resource this is, in this case adexchangeseller#preferredDeal.
*/
kind?: string;
/**
* Time when this deal becomes active in seconds since the epoch (GMT). If
* not set then this deal is active immediately upon creation.
*/
startTime?: string;
}
export interface Schema$PreferredDeals {
/**
* The preferred deals returned in this list response.
*/
items?: Schema$PreferredDeal[];
/**
* Kind of list this is, in this case adexchangeseller#preferredDeals.
*/
kind?: string;
}
export interface Schema$Report {
/**
* The averages of the report. This is the same length as any other row in
* the report; cells corresponding to dimension columns are empty.
*/
averages?: string[];
/**
* The header information of the columns requested in the report. This is a
* list of headers; one for each dimension in the request, followed by one
* for each metric in the request.
*/
headers?: any[];
/**
* Kind this is, in this case adexchangeseller#report.
*/
kind?: string;
/**
* The output rows of the report. Each row is a list of cells; one for each
* dimension in the request, followed by one for each metric in the request.
* The dimension cells contain strings, and the metric cells contain
* numbers.
*/
rows?: string[][];
/**
* The total number of rows matched by the report request. Fewer rows may be
* returned in the response due to being limited by the row count requested
* or the report row limit.
*/
totalMatchedRows?: string;
/**
* The totals of the report. This is the same length as any other row in the
* report; cells corresponding to dimension columns are empty.
*/
totals?: string[];
/**
* Any warnings associated with generation of the report.
*/
warnings?: string[];
}
export interface Schema$ReportingMetadataEntry {
/**
* For metrics this is a list of dimension IDs which the metric is
* compatible with, for dimensions it is a list of compatibility groups the
* dimension belongs to.
*/
compatibleDimensions?: string[];
/**
* The names of the metrics the dimension or metric this reporting metadata
* entry describes is compatible with.
*/
compatibleMetrics?: string[];
/**
* Unique identifier of this reporting metadata entry, corresponding to the
* name of the appropriate dimension or metric.
*/
id?: string;
/**
* Kind of resource this is, in this case
* adexchangeseller#reportingMetadataEntry.
*/
kind?: string;
/**
* The names of the dimensions which the dimension or metric this reporting
* metadata entry describes requires to also be present in order for the
* report to be valid. Omitting these will not cause an error or warning,
* but may result in data which cannot be correctly interpreted.
*/
requiredDimensions?: string[];
/**
* The names of the metrics which the dimension or metric this reporting
* metadata entry describes requires to also be present in order for the
* report to be valid. Omitting these will not cause an error or warning,
* but may result in data which cannot be correctly interpreted.
*/
requiredMetrics?: string[];
/**
* The codes of the projects supported by the dimension or metric this
* reporting metadata entry describes.
*/
supportedProducts?: string[];
}
export interface Schema$SavedReport {
/**
* Unique identifier of this saved report.
*/
id?: string;
/**
* Kind of resource this is, in this case adexchangeseller#savedReport.
*/
kind?: string;
/**
* This saved report's name.
*/
name?: string;
}
export interface Schema$SavedReports {
/**
* ETag of this response for caching purposes.
*/
etag?: string;
/**
* The saved reports returned in this list response.
*/
items?: Schema$SavedReport[];
/**
* Kind of list this is, in this case adexchangeseller#savedReports.
*/
kind?: string;
/**
* Continuation token used to page through saved reports. To retrieve the
* next page of results, set the next request's "pageToken"
* value to this.
*/
nextPageToken?: string;
}
export interface Schema$UrlChannel {
/**
* Unique identifier of this URL channel. This should be considered an
* opaque identifier; it is not safe to rely on it being in any particular
* format.
*/
id?: string;
/**
* Kind of resource this is, in this case adexchangeseller#urlChannel.
*/
kind?: string;
/**
* URL Pattern of this URL channel. Does not include "http://" or
* "https://". Example: www.example.com/home
*/
urlPattern?: string;
}
export interface Schema$UrlChannels {
/**
* ETag of this response for caching purposes.
*/
etag?: string;
/**
* The URL channels returned in this list response.
*/
items?: Schema$UrlChannel[];
/**
* Kind of list this is, in this case adexchangeseller#urlChannels.
*/
kind?: string;
/**
* Continuation token used to page through URL channels. To retrieve the
* next page of results, set the next request's "pageToken"
* value to this.
*/
nextPageToken?: string;
}
export class Resource$Accounts {
root: Adexchangeseller;
adclients: Resource$Accounts$Adclients;
alerts: Resource$Accounts$Alerts;
customchannels: Resource$Accounts$Customchannels;
metadata: Resource$Accounts$Metadata;
preferreddeals: Resource$Accounts$Preferreddeals;
reports: Resource$Accounts$Reports;
urlchannels: Resource$Accounts$Urlchannels;
constructor(root: Adexchangeseller) {
this.root = root;
this.getRoot.bind(this);
this.adclients = new Resource$Accounts$Adclients(root);
this.alerts = new Resource$Accounts$Alerts(root);
this.customchannels = new Resource$Accounts$Customchannels(root);
this.metadata = new Resource$Accounts$Metadata(root);
this.preferreddeals = new Resource$Accounts$Preferreddeals(root);
this.reports = new Resource$Accounts$Reports(root);
this.urlchannels = new Resource$Accounts$Urlchannels(root);
}
getRoot() {
return this.root;
}
/**
* adexchangeseller.accounts.get
* @desc Get information about the selected Ad Exchange account.
* @alias adexchangeseller.accounts.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.accountId Account to get information about. Tip: 'myaccount' is a valid ID.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Accounts$Get,
options?: MethodOptions): AxiosPromise<Schema$Account>;
get(params: Params$Resource$Accounts$Get,
options: MethodOptions|BodyResponseCallback<Schema$Account>,
callback: BodyResponseCallback<Schema$Account>): void;
get(params: Params$Resource$Accounts$Get,
callback: BodyResponseCallback<Schema$Account>): void;
get(callback: BodyResponseCallback<Schema$Account>): void;
get(paramsOrCallback?: Params$Resource$Accounts$Get|
BodyResponseCallback<Schema$Account>,
optionsOrCallback?: MethodOptions|BodyResponseCallback<Schema$Account>,
callback?: BodyResponseCallback<Schema$Account>):
void|AxiosPromise<Schema$Account> {
let params = (paramsOrCallback || {}) as Params$Resource$Accounts$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Accounts$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/adexchangeseller/v2.0/accounts/{accountId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
},
options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
createAPIRequest<Schema$Account>(parameters, callback);
} else {
return createAPIRequest<Schema$Account>(parameters);
}
}
/**
* adexchangeseller.accounts.list
* @desc List all accounts available to this Ad Exchange account.
* @alias adexchangeseller.accounts.list
* @memberOf! ()
*
* @param {object=} params Parameters for request
* @param {integer=} params.maxResults The maximum number of accounts to include in the response, used for paging.
* @param {string=} params.pageToken A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Accounts$List, options?: MethodOptions):
AxiosPromise<Schema$Accounts>;
list(
params: Params$Resource$Accounts$List,
options: MethodOptions|BodyResponseCallback<Schema$Accounts>,
callback: BodyResponseCallback<Schema$Accounts>): void;
list(
params: Params$Resource$Accounts$List,
callback: BodyResponseCallback<Schema$Accounts>): void;
list(callback: BodyResponseCallback<Schema$Accounts>): void;
list(
paramsOrCallback?: Params$Resource$Accounts$List|
BodyResponseCallback<Schema$Accounts>,
optionsOrCallback?: MethodOptions|BodyResponseCallback<Schema$Accounts>,
callback?: BodyResponseCallback<Schema$Accounts>):
void|AxiosPromise<Schema$Accounts> {
let params = (paramsOrCallback || {}) as Params$Resource$Accounts$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Accounts$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl + '/adexchangeseller/v2.0/accounts')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
},
options),
params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
createAPIRequest<Schema$Accounts>(parameters, callback);
} else {
return createAPIRequest<Schema$Accounts>(parameters);
}
}
}
export interface Params$Resource$Accounts$Get {
/**
* Auth client or API Key for the request
*/
auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;
/**
* Account to get information about. Tip: 'myaccount' is a valid ID.
*/
accountId?: string;
}
export interface Params$Resource$Accounts$List {
/**
* Auth client or API Key for the request
*/
auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;
/**
* The maximum number of accounts to include in the response, used for
* paging.
*/
maxResults?: number;
/**
* A continuation token, used to page through accounts. To retrieve the next
* page, set this parameter to the value of "nextPageToken" from the
* previous response.
*/
pageToken?: string;
}
export class Resource$Accounts$Adclients {
root: Adexchangeseller;
constructor(root: Adexchangeseller) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
/**
* adexchangeseller.accounts.adclients.list
* @desc List all ad clients in this Ad Exchange account.
* @alias adexchangeseller.accounts.adclients.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.accountId Account to which the ad client belongs.
* @param {integer=} params.maxResults The maximum number of ad clients to include in the response, used for paging.
* @param {string=} params.pageToken A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(
params?: Params$Resource$Accounts$Adclients$List,
options?: MethodOptions): AxiosPromise<Schema$AdClients>;
list(
params: Params$Resource$Accounts$Adclients$List,
options: MethodOptions|BodyResponseCallback<Schema$AdClients>,
callback: BodyResponseCallback<Schema$AdClients>): void;
list(
params: Params$Resource$Accounts$Adclients$List,
callback: BodyResponseCallback<Schema$AdClients>): void;
list(callback: BodyResponseCallback<Schema$AdClients>): void;
list(
paramsOrCallback?: Params$Resource$Accounts$Adclients$List|
BodyResponseCallback<Schema$AdClients>,
optionsOrCallback?: MethodOptions|
BodyResponseCallback<Schema$AdClients>,
callback?: BodyResponseCallback<Schema$AdClients>):
void|AxiosPromise<Schema$AdClients> {
let params =
(paramsOrCallback || {}) as Params$Resource$Accounts$Adclients$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Accounts$Adclients$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl +
'/adexchangeseller/v2.0/accounts/{accountId}/adclients')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
},
options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
createAPIRequest<Schema$AdClients>(parameters, callback);
} else {
return createAPIRequest<Schema$AdClients>(parameters);
}
}
}
export interface Params$Resource$Accounts$Adclients$List {
/**
* Auth client or API Key for the request
*/
auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;
/**
* Account to which the ad client belongs.
*/
accountId?: string;
/**
* The maximum number of ad clients to include in the response, used for
* paging.
*/
maxResults?: number;
/**
* A continuation token, used to page through ad clients. To retrieve the
* next page, set this parameter to the value of "nextPageToken" from the
* previous response.
*/
pageToken?: string;
}
export class Resource$Accounts$Alerts {
root: Adexchangeseller;
constructor(root: Adexchangeseller) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
/**
* adexchangeseller.accounts.alerts.list
* @desc List the alerts for this Ad Exchange account.
* @alias adexchangeseller.accounts.alerts.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.accountId Account owning the alerts.
* @param {string=} params.locale The locale to use for translating alert messages. The account locale will be used if this is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or unsupported.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(
params?: Params$Resource$Accounts$Alerts$List,
options?: MethodOptions): AxiosPromise<Schema$Alerts>;
list(
params: Params$Resource$Accounts$Alerts$List,
options: MethodOptions|BodyResponseCallback<Schema$Alerts>,
callback: BodyResponseCallback<Schema$Alerts>): void;
list(
params: Params$Resource$Accounts$Alerts$List,
callback: BodyResponseCallback<Schema$Alerts>): void;
list(callback: BodyResponseCallback<Schema$Alerts>): void;
list(
paramsOrCallback?: Params$Resource$Accounts$Alerts$List|
BodyResponseCallback<Schema$Alerts>,
optionsOrCallback?: MethodOptions|BodyResponseCallback<Schema$Alerts>,
callback?: BodyResponseCallback<Schema$Alerts>):
void|AxiosPromise<Schema$Alerts> {
let params =
(paramsOrCallback || {}) as Params$Resource$Accounts$Alerts$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Accounts$Alerts$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url: (rootUrl +
'/adexchangeseller/v2.0/accounts/{accountId}/alerts')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
},
options),
params,
requiredParams: ['accountId'],
pathParams: ['accountId'],
context: this.getRoot()
};
if (callback) {
createAPIRequest<Schema$Alerts>(parameters, callback);
} else {
return createAPIRequest<Schema$Alerts>(parameters);
}
}
}
export interface Params$Resource$Accounts$Alerts$List {
/**
* Auth client or API Key for the request
*/
auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;
/**
* Account owning the alerts.
*/
accountId?: string;
/**
* The locale to use for translating alert messages. The account locale will
* be used if this is not supplied. The AdSense default (English) will be
* used if the supplied locale is invalid or unsupported.
*/
locale?: string;
}
export class Resource$Accounts$Customchannels {
root: Adexchangeseller;
constructor(root: Adexchangeseller) {
this.root = root;
this.getRoot.bind(this);
}
getRoot() {
return this.root;
}
/**
* adexchangeseller.accounts.customchannels.get
* @desc Get the specified custom channel from the specified ad client.
* @alias adexchangeseller.accounts.customchannels.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.accountId Account to which the ad client belongs.
* @param {string} params.adClientId Ad client which contains the custom channel.
* @param {string} params.customChannelId Custom channel to retrieve.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Accounts$Customchannels$Get,
options?: MethodOptions): AxiosPromise<Schema$CustomChannel>;
get(params: Params$Resource$Accounts$Customchannels$Get,
options: MethodOptions|BodyResponseCallback<Schema$CustomChannel>,
callback: BodyResponseCallback<Schema$CustomChannel>): void;
get(params: Params$Resource$Accounts$Customchannels$Get,
callback: BodyResponseCallback<Schema$CustomChannel>): void;
get(callback: BodyResponseCallback<Schema$CustomChannel>): void;
get(paramsOrCallback?: Params$Resource$Accounts$Customchannels$Get|
BodyResponseCallback<Schema$CustomChannel>,
optionsOrCallback?: MethodOptions|
BodyResponseCallback<Schema$CustomChannel>,
callback?: BodyResponseCallback<Schema$CustomChannel>):
void|AxiosPromise<Schema$CustomChannel> {
let params = (paramsOrCallback || {}) as
Params$Resource$Accounts$Customchannels$Get;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Accounts$Customchannels$Get;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url:
(rootUrl +
'/adexchangeseller/v2.0/accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
},
options),
params,
requiredParams: ['accountId', 'adClientId', 'customChannelId'],
pathParams: ['accountId', 'adClientId', 'customChannelId'],
context: this.getRoot()
};
if (callback) {
createAPIRequest<Schema$CustomChannel>(parameters, callback);
} else {
return createAPIRequest<Schema$CustomChannel>(parameters);
}
}
/**
* adexchangeseller.accounts.customchannels.list
* @desc List all custom channels in the specified ad client for this Ad
* Exchange account.
* @alias adexchangeseller.accounts.customchannels.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.accountId Account to which the ad client belongs.
* @param {string} params.adClientId Ad client for which to list custom channels.
* @param {integer=} params.maxResults The maximum number of custom channels to include in the response, used for paging.
* @param {string=} params.pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(
params?: Params$Resource$Accounts$Customchannels$List,
options?: MethodOptions): AxiosPromise<Schema$CustomChannels>;
list(
params: Params$Resource$Accounts$Customchannels$List,
options: MethodOptions|BodyResponseCallback<Schema$CustomChannels>,
callback: BodyResponseCallback<Schema$CustomChannels>): void;
list(
params: Params$Resource$Accounts$Customchannels$List,
callback: BodyResponseCallback<Schema$CustomChannels>): void;
list(callback: BodyResponseCallback<Schema$CustomChannels>): void;
list(
paramsOrCallback?: Params$Resource$Accounts$Customchannels$List|
BodyResponseCallback<Schema$CustomChannels>,
optionsOrCallback?: MethodOptions|
BodyResponseCallback<Schema$CustomChannels>,
callback?: BodyResponseCallback<Schema$CustomChannels>):
void|AxiosPromise<Schema$CustomChannels> {
let params = (paramsOrCallback || {}) as
Params$Resource$Accounts$Customchannels$List;
let options = (optionsOrCallback || {}) as MethodOptions;
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {} as Params$Resource$Accounts$Customchannels$List;
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}
const rootUrl = options.rootUrl || 'https://www.googleapis.com/';
const parameters = {
options: Object.assign(
{
url:
(rootUrl +
'/adexchangeseller/v2.0/accounts/{accountId}/adclients/{adClientId}/customchannels')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
},
options),
params,
requiredParams: ['accountId', 'adClientId'],
pathParams: ['accountId', 'adClientId'],
context: this.getRoot()
};
if (callback) {
createAPIRequest<Schema$CustomChannels>(parameters, callback);
} else {
return createAPIRequest<Schema$CustomChannels>(parameters);
}
}
}
export interface Params$Resource$Accounts$Customchannels$Get {
/**
* Auth client or API Key for the request
*/
auth?: string|OAuth2Client|JWT|Compute|UserRefreshClient;
/**
* Account to which the ad client belongs.
*/
accountId?: string;
/**
* Ad client which contains the custom channel.
*/
adClientId?: string;
/**
* Custom channel to retrieve.
*/
customChannelId?: string;
}
export interface Params$Resource$Accounts$Customchannels$List {
/**