~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/google.golang.org/api/adexchangeseller/v2.0/adexchangeseller-gen.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Package adexchangeseller provides access to the Ad Exchange Seller API.
 
2
//
 
3
// See https://developers.google.com/ad-exchange/seller-rest/
 
4
//
 
5
// Usage example:
 
6
//
 
7
//   import "google.golang.org/api/adexchangeseller/v2.0"
 
8
//   ...
 
9
//   adexchangesellerService, err := adexchangeseller.New(oauthHttpClient)
 
10
package adexchangeseller
 
11
 
 
12
import (
 
13
        "bytes"
 
14
        "encoding/json"
 
15
        "errors"
 
16
        "fmt"
 
17
        "google.golang.org/api/googleapi"
 
18
        "io"
 
19
        "net/http"
 
20
        "net/url"
 
21
        "strconv"
 
22
        "strings"
 
23
)
 
24
 
 
25
// Always reference these packages, just in case the auto-generated code
 
26
// below doesn't.
 
27
var _ = bytes.NewBuffer
 
28
var _ = strconv.Itoa
 
29
var _ = fmt.Sprintf
 
30
var _ = json.NewDecoder
 
31
var _ = io.Copy
 
32
var _ = url.Parse
 
33
var _ = googleapi.Version
 
34
var _ = errors.New
 
35
var _ = strings.Replace
 
36
 
 
37
const apiId = "adexchangeseller:v2.0"
 
38
const apiName = "adexchangeseller"
 
39
const apiVersion = "v2.0"
 
40
const basePath = "https://www.googleapis.com/adexchangeseller/v2.0/"
 
41
 
 
42
// OAuth2 scopes used by this API.
 
43
const (
 
44
        // View and manage your Ad Exchange data
 
45
        AdexchangeSellerScope = "https://www.googleapis.com/auth/adexchange.seller"
 
46
 
 
47
        // View your Ad Exchange data
 
48
        AdexchangeSellerReadonlyScope = "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
49
)
 
50
 
 
51
func New(client *http.Client) (*Service, error) {
 
52
        if client == nil {
 
53
                return nil, errors.New("client is nil")
 
54
        }
 
55
        s := &Service{client: client, BasePath: basePath}
 
56
        s.Accounts = NewAccountsService(s)
 
57
        return s, nil
 
58
}
 
59
 
 
60
type Service struct {
 
61
        client   *http.Client
 
62
        BasePath string // API endpoint base URL
 
63
 
 
64
        Accounts *AccountsService
 
65
}
 
66
 
 
67
func NewAccountsService(s *Service) *AccountsService {
 
68
        rs := &AccountsService{s: s}
 
69
        rs.Adclients = NewAccountsAdclientsService(s)
 
70
        rs.Alerts = NewAccountsAlertsService(s)
 
71
        rs.Customchannels = NewAccountsCustomchannelsService(s)
 
72
        rs.Metadata = NewAccountsMetadataService(s)
 
73
        rs.Preferreddeals = NewAccountsPreferreddealsService(s)
 
74
        rs.Reports = NewAccountsReportsService(s)
 
75
        rs.Urlchannels = NewAccountsUrlchannelsService(s)
 
76
        return rs
 
77
}
 
78
 
 
79
type AccountsService struct {
 
80
        s *Service
 
81
 
 
82
        Adclients *AccountsAdclientsService
 
83
 
 
84
        Alerts *AccountsAlertsService
 
85
 
 
86
        Customchannels *AccountsCustomchannelsService
 
87
 
 
88
        Metadata *AccountsMetadataService
 
89
 
 
90
        Preferreddeals *AccountsPreferreddealsService
 
91
 
 
92
        Reports *AccountsReportsService
 
93
 
 
94
        Urlchannels *AccountsUrlchannelsService
 
95
}
 
96
 
 
97
func NewAccountsAdclientsService(s *Service) *AccountsAdclientsService {
 
98
        rs := &AccountsAdclientsService{s: s}
 
99
        return rs
 
100
}
 
101
 
 
102
type AccountsAdclientsService struct {
 
103
        s *Service
 
104
}
 
105
 
 
106
func NewAccountsAlertsService(s *Service) *AccountsAlertsService {
 
107
        rs := &AccountsAlertsService{s: s}
 
108
        return rs
 
109
}
 
110
 
 
111
type AccountsAlertsService struct {
 
112
        s *Service
 
113
}
 
114
 
 
115
func NewAccountsCustomchannelsService(s *Service) *AccountsCustomchannelsService {
 
116
        rs := &AccountsCustomchannelsService{s: s}
 
117
        return rs
 
118
}
 
119
 
 
120
type AccountsCustomchannelsService struct {
 
121
        s *Service
 
122
}
 
123
 
 
124
func NewAccountsMetadataService(s *Service) *AccountsMetadataService {
 
125
        rs := &AccountsMetadataService{s: s}
 
126
        rs.Dimensions = NewAccountsMetadataDimensionsService(s)
 
127
        rs.Metrics = NewAccountsMetadataMetricsService(s)
 
128
        return rs
 
129
}
 
130
 
 
131
type AccountsMetadataService struct {
 
132
        s *Service
 
133
 
 
134
        Dimensions *AccountsMetadataDimensionsService
 
135
 
 
136
        Metrics *AccountsMetadataMetricsService
 
137
}
 
138
 
 
139
func NewAccountsMetadataDimensionsService(s *Service) *AccountsMetadataDimensionsService {
 
140
        rs := &AccountsMetadataDimensionsService{s: s}
 
141
        return rs
 
142
}
 
143
 
 
144
type AccountsMetadataDimensionsService struct {
 
145
        s *Service
 
146
}
 
147
 
 
148
func NewAccountsMetadataMetricsService(s *Service) *AccountsMetadataMetricsService {
 
149
        rs := &AccountsMetadataMetricsService{s: s}
 
150
        return rs
 
151
}
 
152
 
 
153
type AccountsMetadataMetricsService struct {
 
154
        s *Service
 
155
}
 
156
 
 
157
func NewAccountsPreferreddealsService(s *Service) *AccountsPreferreddealsService {
 
158
        rs := &AccountsPreferreddealsService{s: s}
 
159
        return rs
 
160
}
 
161
 
 
162
type AccountsPreferreddealsService struct {
 
163
        s *Service
 
164
}
 
165
 
 
166
func NewAccountsReportsService(s *Service) *AccountsReportsService {
 
167
        rs := &AccountsReportsService{s: s}
 
168
        rs.Saved = NewAccountsReportsSavedService(s)
 
169
        return rs
 
170
}
 
171
 
 
172
type AccountsReportsService struct {
 
173
        s *Service
 
174
 
 
175
        Saved *AccountsReportsSavedService
 
176
}
 
177
 
 
178
func NewAccountsReportsSavedService(s *Service) *AccountsReportsSavedService {
 
179
        rs := &AccountsReportsSavedService{s: s}
 
180
        return rs
 
181
}
 
182
 
 
183
type AccountsReportsSavedService struct {
 
184
        s *Service
 
185
}
 
186
 
 
187
func NewAccountsUrlchannelsService(s *Service) *AccountsUrlchannelsService {
 
188
        rs := &AccountsUrlchannelsService{s: s}
 
189
        return rs
 
190
}
 
191
 
 
192
type AccountsUrlchannelsService struct {
 
193
        s *Service
 
194
}
 
195
 
 
196
type Account struct {
 
197
        // Id: Unique identifier of this account.
 
198
        Id string `json:"id,omitempty"`
 
199
 
 
200
        // Kind: Kind of resource this is, in this case
 
201
        // adexchangeseller#account.
 
202
        Kind string `json:"kind,omitempty"`
 
203
 
 
204
        // Name: Name of this account.
 
205
        Name string `json:"name,omitempty"`
 
206
}
 
207
 
 
208
type Accounts struct {
 
209
        // Etag: ETag of this response for caching purposes.
 
210
        Etag string `json:"etag,omitempty"`
 
211
 
 
212
        // Items: The accounts returned in this list response.
 
213
        Items []*Account `json:"items,omitempty"`
 
214
 
 
215
        // Kind: Kind of list this is, in this case adexchangeseller#accounts.
 
216
        Kind string `json:"kind,omitempty"`
 
217
 
 
218
        // NextPageToken: Continuation token used to page through accounts. To
 
219
        // retrieve the next page of results, set the next request's "pageToken"
 
220
        // value to this.
 
221
        NextPageToken string `json:"nextPageToken,omitempty"`
 
222
}
 
223
 
 
224
type AdClient struct {
 
225
        // ArcOptIn: Whether this ad client is opted in to ARC.
 
226
        ArcOptIn bool `json:"arcOptIn,omitempty"`
 
227
 
 
228
        // Id: Unique identifier of this ad client.
 
229
        Id string `json:"id,omitempty"`
 
230
 
 
231
        // Kind: Kind of resource this is, in this case
 
232
        // adexchangeseller#adClient.
 
233
        Kind string `json:"kind,omitempty"`
 
234
 
 
235
        // ProductCode: This ad client's product code, which corresponds to the
 
236
        // PRODUCT_CODE report dimension.
 
237
        ProductCode string `json:"productCode,omitempty"`
 
238
 
 
239
        // SupportsReporting: Whether this ad client supports being reported on.
 
240
        SupportsReporting bool `json:"supportsReporting,omitempty"`
 
241
}
 
242
 
 
243
type AdClients struct {
 
244
        // Etag: ETag of this response for caching purposes.
 
245
        Etag string `json:"etag,omitempty"`
 
246
 
 
247
        // Items: The ad clients returned in this list response.
 
248
        Items []*AdClient `json:"items,omitempty"`
 
249
 
 
250
        // Kind: Kind of list this is, in this case adexchangeseller#adClients.
 
251
        Kind string `json:"kind,omitempty"`
 
252
 
 
253
        // NextPageToken: Continuation token used to page through ad clients. To
 
254
        // retrieve the next page of results, set the next request's "pageToken"
 
255
        // value to this.
 
256
        NextPageToken string `json:"nextPageToken,omitempty"`
 
257
}
 
258
 
 
259
type Alert struct {
 
260
        // Id: Unique identifier of this alert. This should be considered an
 
261
        // opaque identifier; it is not safe to rely on it being in any
 
262
        // particular format.
 
263
        Id string `json:"id,omitempty"`
 
264
 
 
265
        // Kind: Kind of resource this is, in this case adexchangeseller#alert.
 
266
        Kind string `json:"kind,omitempty"`
 
267
 
 
268
        // Message: The localized alert message.
 
269
        Message string `json:"message,omitempty"`
 
270
 
 
271
        // Severity: Severity of this alert. Possible values: INFO, WARNING,
 
272
        // SEVERE.
 
273
        Severity string `json:"severity,omitempty"`
 
274
 
 
275
        // Type: Type of this alert. Possible values: SELF_HOLD,
 
276
        // MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION,
 
277
        // PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, GRAYLISTED_PUBLISHER,
 
278
        // API_HOLD.
 
279
        Type string `json:"type,omitempty"`
 
280
}
 
281
 
 
282
type Alerts struct {
 
283
        // Items: The alerts returned in this list response.
 
284
        Items []*Alert `json:"items,omitempty"`
 
285
 
 
286
        // Kind: Kind of list this is, in this case adexchangeseller#alerts.
 
287
        Kind string `json:"kind,omitempty"`
 
288
}
 
289
 
 
290
type CustomChannel struct {
 
291
        // Code: Code of this custom channel, not necessarily unique across ad
 
292
        // clients.
 
293
        Code string `json:"code,omitempty"`
 
294
 
 
295
        // Id: Unique identifier of this custom channel. This should be
 
296
        // considered an opaque identifier; it is not safe to rely on it being
 
297
        // in any particular format.
 
298
        Id string `json:"id,omitempty"`
 
299
 
 
300
        // Kind: Kind of resource this is, in this case
 
301
        // adexchangeseller#customChannel.
 
302
        Kind string `json:"kind,omitempty"`
 
303
 
 
304
        // Name: Name of this custom channel.
 
305
        Name string `json:"name,omitempty"`
 
306
 
 
307
        // TargetingInfo: The targeting information of this custom channel, if
 
308
        // activated.
 
309
        TargetingInfo *CustomChannelTargetingInfo `json:"targetingInfo,omitempty"`
 
310
}
 
311
 
 
312
type CustomChannelTargetingInfo struct {
 
313
        // AdsAppearOn: The name used to describe this channel externally.
 
314
        AdsAppearOn string `json:"adsAppearOn,omitempty"`
 
315
 
 
316
        // Description: The external description of the channel.
 
317
        Description string `json:"description,omitempty"`
 
318
 
 
319
        // Location: The locations in which ads appear. (Only valid for content
 
320
        // and mobile content ads). Acceptable values for content ads are:
 
321
        // TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER,
 
322
        // MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT,
 
323
        // MULTIPLE_LOCATIONS. Acceptable values for mobile content ads are:
 
324
        // TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS.
 
325
        Location string `json:"location,omitempty"`
 
326
 
 
327
        // SiteLanguage: The language of the sites ads will be displayed on.
 
328
        SiteLanguage string `json:"siteLanguage,omitempty"`
 
329
}
 
330
 
 
331
type CustomChannels struct {
 
332
        // Etag: ETag of this response for caching purposes.
 
333
        Etag string `json:"etag,omitempty"`
 
334
 
 
335
        // Items: The custom channels returned in this list response.
 
336
        Items []*CustomChannel `json:"items,omitempty"`
 
337
 
 
338
        // Kind: Kind of list this is, in this case
 
339
        // adexchangeseller#customChannels.
 
340
        Kind string `json:"kind,omitempty"`
 
341
 
 
342
        // NextPageToken: Continuation token used to page through custom
 
343
        // channels. To retrieve the next page of results, set the next
 
344
        // request's "pageToken" value to this.
 
345
        NextPageToken string `json:"nextPageToken,omitempty"`
 
346
}
 
347
 
 
348
type Metadata struct {
 
349
        Items []*ReportingMetadataEntry `json:"items,omitempty"`
 
350
 
 
351
        // Kind: Kind of list this is, in this case adexchangeseller#metadata.
 
352
        Kind string `json:"kind,omitempty"`
 
353
}
 
354
 
 
355
type PreferredDeal struct {
 
356
        // AdvertiserName: The name of the advertiser this deal is for.
 
357
        AdvertiserName string `json:"advertiserName,omitempty"`
 
358
 
 
359
        // BuyerNetworkName: The name of the buyer network this deal is for.
 
360
        BuyerNetworkName string `json:"buyerNetworkName,omitempty"`
 
361
 
 
362
        // CurrencyCode: The currency code that applies to the fixed_cpm value.
 
363
        // If not set then assumed to be USD.
 
364
        CurrencyCode string `json:"currencyCode,omitempty"`
 
365
 
 
366
        // EndTime: Time when this deal stops being active in seconds since the
 
367
        // epoch (GMT). If not set then this deal is valid until manually
 
368
        // disabled by the publisher.
 
369
        EndTime uint64 `json:"endTime,omitempty,string"`
 
370
 
 
371
        // FixedCpm: The fixed price for this preferred deal. In cpm micros of
 
372
        // currency according to currencyCode. If set, then this preferred deal
 
373
        // is eligible for the fixed price tier of buying (highest priority, pay
 
374
        // exactly the configured fixed price).
 
375
        FixedCpm int64 `json:"fixedCpm,omitempty,string"`
 
376
 
 
377
        // Id: Unique identifier of this preferred deal.
 
378
        Id int64 `json:"id,omitempty,string"`
 
379
 
 
380
        // Kind: Kind of resource this is, in this case
 
381
        // adexchangeseller#preferredDeal.
 
382
        Kind string `json:"kind,omitempty"`
 
383
 
 
384
        // StartTime: Time when this deal becomes active in seconds since the
 
385
        // epoch (GMT). If not set then this deal is active immediately upon
 
386
        // creation.
 
387
        StartTime uint64 `json:"startTime,omitempty,string"`
 
388
}
 
389
 
 
390
type PreferredDeals struct {
 
391
        // Items: The preferred deals returned in this list response.
 
392
        Items []*PreferredDeal `json:"items,omitempty"`
 
393
 
 
394
        // Kind: Kind of list this is, in this case
 
395
        // adexchangeseller#preferredDeals.
 
396
        Kind string `json:"kind,omitempty"`
 
397
}
 
398
 
 
399
type Report struct {
 
400
        // Averages: The averages of the report. This is the same length as any
 
401
        // other row in the report; cells corresponding to dimension columns are
 
402
        // empty.
 
403
        Averages []string `json:"averages,omitempty"`
 
404
 
 
405
        // Headers: The header information of the columns requested in the
 
406
        // report. This is a list of headers; one for each dimension in the
 
407
        // request, followed by one for each metric in the request.
 
408
        Headers []*ReportHeaders `json:"headers,omitempty"`
 
409
 
 
410
        // Kind: Kind this is, in this case adexchangeseller#report.
 
411
        Kind string `json:"kind,omitempty"`
 
412
 
 
413
        // Rows: The output rows of the report. Each row is a list of cells; one
 
414
        // for each dimension in the request, followed by one for each metric in
 
415
        // the request. The dimension cells contain strings, and the metric
 
416
        // cells contain numbers.
 
417
        Rows [][]string `json:"rows,omitempty"`
 
418
 
 
419
        // TotalMatchedRows: The total number of rows matched by the report
 
420
        // request. Fewer rows may be returned in the response due to being
 
421
        // limited by the row count requested or the report row limit.
 
422
        TotalMatchedRows int64 `json:"totalMatchedRows,omitempty,string"`
 
423
 
 
424
        // Totals: The totals of the report. This is the same length as any
 
425
        // other row in the report; cells corresponding to dimension columns are
 
426
        // empty.
 
427
        Totals []string `json:"totals,omitempty"`
 
428
 
 
429
        // Warnings: Any warnings associated with generation of the report.
 
430
        Warnings []string `json:"warnings,omitempty"`
 
431
}
 
432
 
 
433
type ReportHeaders struct {
 
434
        // Currency: The currency of this column. Only present if the header
 
435
        // type is METRIC_CURRENCY.
 
436
        Currency string `json:"currency,omitempty"`
 
437
 
 
438
        // Name: The name of the header.
 
439
        Name string `json:"name,omitempty"`
 
440
 
 
441
        // Type: The type of the header; one of DIMENSION, METRIC_TALLY,
 
442
        // METRIC_RATIO, or METRIC_CURRENCY.
 
443
        Type string `json:"type,omitempty"`
 
444
}
 
445
 
 
446
type ReportingMetadataEntry struct {
 
447
        // CompatibleDimensions: For metrics this is a list of dimension IDs
 
448
        // which the metric is compatible with, for dimensions it is a list of
 
449
        // compatibility groups the dimension belongs to.
 
450
        CompatibleDimensions []string `json:"compatibleDimensions,omitempty"`
 
451
 
 
452
        // CompatibleMetrics: The names of the metrics the dimension or metric
 
453
        // this reporting metadata entry describes is compatible with.
 
454
        CompatibleMetrics []string `json:"compatibleMetrics,omitempty"`
 
455
 
 
456
        // Id: Unique identifier of this reporting metadata entry, corresponding
 
457
        // to the name of the appropriate dimension or metric.
 
458
        Id string `json:"id,omitempty"`
 
459
 
 
460
        // Kind: Kind of resource this is, in this case
 
461
        // adexchangeseller#reportingMetadataEntry.
 
462
        Kind string `json:"kind,omitempty"`
 
463
 
 
464
        // RequiredDimensions: The names of the dimensions which the dimension
 
465
        // or metric this reporting metadata entry describes requires to also be
 
466
        // present in order for the report to be valid. Omitting these will not
 
467
        // cause an error or warning, but may result in data which cannot be
 
468
        // correctly interpreted.
 
469
        RequiredDimensions []string `json:"requiredDimensions,omitempty"`
 
470
 
 
471
        // RequiredMetrics: The names of the metrics which the dimension or
 
472
        // metric this reporting metadata entry describes requires to also be
 
473
        // present in order for the report to be valid. Omitting these will not
 
474
        // cause an error or warning, but may result in data which cannot be
 
475
        // correctly interpreted.
 
476
        RequiredMetrics []string `json:"requiredMetrics,omitempty"`
 
477
 
 
478
        // SupportedProducts: The codes of the projects supported by the
 
479
        // dimension or metric this reporting metadata entry describes.
 
480
        SupportedProducts []string `json:"supportedProducts,omitempty"`
 
481
}
 
482
 
 
483
type SavedReport struct {
 
484
        // Id: Unique identifier of this saved report.
 
485
        Id string `json:"id,omitempty"`
 
486
 
 
487
        // Kind: Kind of resource this is, in this case
 
488
        // adexchangeseller#savedReport.
 
489
        Kind string `json:"kind,omitempty"`
 
490
 
 
491
        // Name: This saved report's name.
 
492
        Name string `json:"name,omitempty"`
 
493
}
 
494
 
 
495
type SavedReports struct {
 
496
        // Etag: ETag of this response for caching purposes.
 
497
        Etag string `json:"etag,omitempty"`
 
498
 
 
499
        // Items: The saved reports returned in this list response.
 
500
        Items []*SavedReport `json:"items,omitempty"`
 
501
 
 
502
        // Kind: Kind of list this is, in this case
 
503
        // adexchangeseller#savedReports.
 
504
        Kind string `json:"kind,omitempty"`
 
505
 
 
506
        // NextPageToken: Continuation token used to page through saved reports.
 
507
        // To retrieve the next page of results, set the next request's
 
508
        // "pageToken" value to this.
 
509
        NextPageToken string `json:"nextPageToken,omitempty"`
 
510
}
 
511
 
 
512
type UrlChannel struct {
 
513
        // Id: Unique identifier of this URL channel. This should be considered
 
514
        // an opaque identifier; it is not safe to rely on it being in any
 
515
        // particular format.
 
516
        Id string `json:"id,omitempty"`
 
517
 
 
518
        // Kind: Kind of resource this is, in this case
 
519
        // adexchangeseller#urlChannel.
 
520
        Kind string `json:"kind,omitempty"`
 
521
 
 
522
        // UrlPattern: URL Pattern of this URL channel. Does not include
 
523
        // "http://" or "https://". Example: www.example.com/home
 
524
        UrlPattern string `json:"urlPattern,omitempty"`
 
525
}
 
526
 
 
527
type UrlChannels struct {
 
528
        // Etag: ETag of this response for caching purposes.
 
529
        Etag string `json:"etag,omitempty"`
 
530
 
 
531
        // Items: The URL channels returned in this list response.
 
532
        Items []*UrlChannel `json:"items,omitempty"`
 
533
 
 
534
        // Kind: Kind of list this is, in this case
 
535
        // adexchangeseller#urlChannels.
 
536
        Kind string `json:"kind,omitempty"`
 
537
 
 
538
        // NextPageToken: Continuation token used to page through URL channels.
 
539
        // To retrieve the next page of results, set the next request's
 
540
        // "pageToken" value to this.
 
541
        NextPageToken string `json:"nextPageToken,omitempty"`
 
542
}
 
543
 
 
544
// method id "adexchangeseller.accounts.get":
 
545
 
 
546
type AccountsGetCall struct {
 
547
        s         *Service
 
548
        accountId string
 
549
        opt_      map[string]interface{}
 
550
}
 
551
 
 
552
// Get: Get information about the selected Ad Exchange account.
 
553
func (r *AccountsService) Get(accountId string) *AccountsGetCall {
 
554
        c := &AccountsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
555
        c.accountId = accountId
 
556
        return c
 
557
}
 
558
 
 
559
// Fields allows partial responses to be retrieved.
 
560
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
561
// for more information.
 
562
func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
 
563
        c.opt_["fields"] = googleapi.CombineFields(s)
 
564
        return c
 
565
}
 
566
 
 
567
func (c *AccountsGetCall) Do() (*Account, error) {
 
568
        var body io.Reader = nil
 
569
        params := make(url.Values)
 
570
        params.Set("alt", "json")
 
571
        if v, ok := c.opt_["fields"]; ok {
 
572
                params.Set("fields", fmt.Sprintf("%v", v))
 
573
        }
 
574
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}")
 
575
        urls += "?" + params.Encode()
 
576
        req, _ := http.NewRequest("GET", urls, body)
 
577
        googleapi.Expand(req.URL, map[string]string{
 
578
                "accountId": c.accountId,
 
579
        })
 
580
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
581
        res, err := c.s.client.Do(req)
 
582
        if err != nil {
 
583
                return nil, err
 
584
        }
 
585
        defer googleapi.CloseBody(res)
 
586
        if err := googleapi.CheckResponse(res); err != nil {
 
587
                return nil, err
 
588
        }
 
589
        var ret *Account
 
590
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
591
                return nil, err
 
592
        }
 
593
        return ret, nil
 
594
        // {
 
595
        //   "description": "Get information about the selected Ad Exchange account.",
 
596
        //   "httpMethod": "GET",
 
597
        //   "id": "adexchangeseller.accounts.get",
 
598
        //   "parameterOrder": [
 
599
        //     "accountId"
 
600
        //   ],
 
601
        //   "parameters": {
 
602
        //     "accountId": {
 
603
        //       "description": "Account to get information about. Tip: 'myaccount' is a valid ID.",
 
604
        //       "location": "path",
 
605
        //       "required": true,
 
606
        //       "type": "string"
 
607
        //     }
 
608
        //   },
 
609
        //   "path": "accounts/{accountId}",
 
610
        //   "response": {
 
611
        //     "$ref": "Account"
 
612
        //   },
 
613
        //   "scopes": [
 
614
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
615
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
616
        //   ]
 
617
        // }
 
618
 
 
619
}
 
620
 
 
621
// method id "adexchangeseller.accounts.list":
 
622
 
 
623
type AccountsListCall struct {
 
624
        s    *Service
 
625
        opt_ map[string]interface{}
 
626
}
 
627
 
 
628
// List: List all accounts available to this Ad Exchange account.
 
629
func (r *AccountsService) List() *AccountsListCall {
 
630
        c := &AccountsListCall{s: r.s, opt_: make(map[string]interface{})}
 
631
        return c
 
632
}
 
633
 
 
634
// MaxResults sets the optional parameter "maxResults": The maximum
 
635
// number of accounts to include in the response, used for paging.
 
636
func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
 
637
        c.opt_["maxResults"] = maxResults
 
638
        return c
 
639
}
 
640
 
 
641
// PageToken sets the optional parameter "pageToken": A continuation
 
642
// token, used to page through accounts. To retrieve the next page, set
 
643
// this parameter to the value of "nextPageToken" from the previous
 
644
// response.
 
645
func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
 
646
        c.opt_["pageToken"] = pageToken
 
647
        return c
 
648
}
 
649
 
 
650
// Fields allows partial responses to be retrieved.
 
651
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
652
// for more information.
 
653
func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
 
654
        c.opt_["fields"] = googleapi.CombineFields(s)
 
655
        return c
 
656
}
 
657
 
 
658
func (c *AccountsListCall) Do() (*Accounts, error) {
 
659
        var body io.Reader = nil
 
660
        params := make(url.Values)
 
661
        params.Set("alt", "json")
 
662
        if v, ok := c.opt_["maxResults"]; ok {
 
663
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
664
        }
 
665
        if v, ok := c.opt_["pageToken"]; ok {
 
666
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
667
        }
 
668
        if v, ok := c.opt_["fields"]; ok {
 
669
                params.Set("fields", fmt.Sprintf("%v", v))
 
670
        }
 
671
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts")
 
672
        urls += "?" + params.Encode()
 
673
        req, _ := http.NewRequest("GET", urls, body)
 
674
        googleapi.SetOpaque(req.URL)
 
675
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
676
        res, err := c.s.client.Do(req)
 
677
        if err != nil {
 
678
                return nil, err
 
679
        }
 
680
        defer googleapi.CloseBody(res)
 
681
        if err := googleapi.CheckResponse(res); err != nil {
 
682
                return nil, err
 
683
        }
 
684
        var ret *Accounts
 
685
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
686
                return nil, err
 
687
        }
 
688
        return ret, nil
 
689
        // {
 
690
        //   "description": "List all accounts available to this Ad Exchange account.",
 
691
        //   "httpMethod": "GET",
 
692
        //   "id": "adexchangeseller.accounts.list",
 
693
        //   "parameters": {
 
694
        //     "maxResults": {
 
695
        //       "description": "The maximum number of accounts to include in the response, used for paging.",
 
696
        //       "format": "int32",
 
697
        //       "location": "query",
 
698
        //       "maximum": "10000",
 
699
        //       "minimum": "0",
 
700
        //       "type": "integer"
 
701
        //     },
 
702
        //     "pageToken": {
 
703
        //       "description": "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.",
 
704
        //       "location": "query",
 
705
        //       "type": "string"
 
706
        //     }
 
707
        //   },
 
708
        //   "path": "accounts",
 
709
        //   "response": {
 
710
        //     "$ref": "Accounts"
 
711
        //   },
 
712
        //   "scopes": [
 
713
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
714
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
715
        //   ]
 
716
        // }
 
717
 
 
718
}
 
719
 
 
720
// method id "adexchangeseller.accounts.adclients.list":
 
721
 
 
722
type AccountsAdclientsListCall struct {
 
723
        s         *Service
 
724
        accountId string
 
725
        opt_      map[string]interface{}
 
726
}
 
727
 
 
728
// List: List all ad clients in this Ad Exchange account.
 
729
func (r *AccountsAdclientsService) List(accountId string) *AccountsAdclientsListCall {
 
730
        c := &AccountsAdclientsListCall{s: r.s, opt_: make(map[string]interface{})}
 
731
        c.accountId = accountId
 
732
        return c
 
733
}
 
734
 
 
735
// MaxResults sets the optional parameter "maxResults": The maximum
 
736
// number of ad clients to include in the response, used for paging.
 
737
func (c *AccountsAdclientsListCall) MaxResults(maxResults int64) *AccountsAdclientsListCall {
 
738
        c.opt_["maxResults"] = maxResults
 
739
        return c
 
740
}
 
741
 
 
742
// PageToken sets the optional parameter "pageToken": A continuation
 
743
// token, used to page through ad clients. To retrieve the next page,
 
744
// set this parameter to the value of "nextPageToken" from the previous
 
745
// response.
 
746
func (c *AccountsAdclientsListCall) PageToken(pageToken string) *AccountsAdclientsListCall {
 
747
        c.opt_["pageToken"] = pageToken
 
748
        return c
 
749
}
 
750
 
 
751
// Fields allows partial responses to be retrieved.
 
752
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
753
// for more information.
 
754
func (c *AccountsAdclientsListCall) Fields(s ...googleapi.Field) *AccountsAdclientsListCall {
 
755
        c.opt_["fields"] = googleapi.CombineFields(s)
 
756
        return c
 
757
}
 
758
 
 
759
func (c *AccountsAdclientsListCall) Do() (*AdClients, error) {
 
760
        var body io.Reader = nil
 
761
        params := make(url.Values)
 
762
        params.Set("alt", "json")
 
763
        if v, ok := c.opt_["maxResults"]; ok {
 
764
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
765
        }
 
766
        if v, ok := c.opt_["pageToken"]; ok {
 
767
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
768
        }
 
769
        if v, ok := c.opt_["fields"]; ok {
 
770
                params.Set("fields", fmt.Sprintf("%v", v))
 
771
        }
 
772
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/adclients")
 
773
        urls += "?" + params.Encode()
 
774
        req, _ := http.NewRequest("GET", urls, body)
 
775
        googleapi.Expand(req.URL, map[string]string{
 
776
                "accountId": c.accountId,
 
777
        })
 
778
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
779
        res, err := c.s.client.Do(req)
 
780
        if err != nil {
 
781
                return nil, err
 
782
        }
 
783
        defer googleapi.CloseBody(res)
 
784
        if err := googleapi.CheckResponse(res); err != nil {
 
785
                return nil, err
 
786
        }
 
787
        var ret *AdClients
 
788
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
789
                return nil, err
 
790
        }
 
791
        return ret, nil
 
792
        // {
 
793
        //   "description": "List all ad clients in this Ad Exchange account.",
 
794
        //   "httpMethod": "GET",
 
795
        //   "id": "adexchangeseller.accounts.adclients.list",
 
796
        //   "parameterOrder": [
 
797
        //     "accountId"
 
798
        //   ],
 
799
        //   "parameters": {
 
800
        //     "accountId": {
 
801
        //       "description": "Account to which the ad client belongs.",
 
802
        //       "location": "path",
 
803
        //       "required": true,
 
804
        //       "type": "string"
 
805
        //     },
 
806
        //     "maxResults": {
 
807
        //       "description": "The maximum number of ad clients to include in the response, used for paging.",
 
808
        //       "format": "uint32",
 
809
        //       "location": "query",
 
810
        //       "maximum": "10000",
 
811
        //       "minimum": "0",
 
812
        //       "type": "integer"
 
813
        //     },
 
814
        //     "pageToken": {
 
815
        //       "description": "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.",
 
816
        //       "location": "query",
 
817
        //       "type": "string"
 
818
        //     }
 
819
        //   },
 
820
        //   "path": "accounts/{accountId}/adclients",
 
821
        //   "response": {
 
822
        //     "$ref": "AdClients"
 
823
        //   },
 
824
        //   "scopes": [
 
825
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
826
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
827
        //   ]
 
828
        // }
 
829
 
 
830
}
 
831
 
 
832
// method id "adexchangeseller.accounts.alerts.list":
 
833
 
 
834
type AccountsAlertsListCall struct {
 
835
        s         *Service
 
836
        accountId string
 
837
        opt_      map[string]interface{}
 
838
}
 
839
 
 
840
// List: List the alerts for this Ad Exchange account.
 
841
func (r *AccountsAlertsService) List(accountId string) *AccountsAlertsListCall {
 
842
        c := &AccountsAlertsListCall{s: r.s, opt_: make(map[string]interface{})}
 
843
        c.accountId = accountId
 
844
        return c
 
845
}
 
846
 
 
847
// Locale sets the optional parameter "locale": The locale to use for
 
848
// translating alert messages. The account locale will be used if this
 
849
// is not supplied. The AdSense default (English) will be used if the
 
850
// supplied locale is invalid or unsupported.
 
851
func (c *AccountsAlertsListCall) Locale(locale string) *AccountsAlertsListCall {
 
852
        c.opt_["locale"] = locale
 
853
        return c
 
854
}
 
855
 
 
856
// Fields allows partial responses to be retrieved.
 
857
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
858
// for more information.
 
859
func (c *AccountsAlertsListCall) Fields(s ...googleapi.Field) *AccountsAlertsListCall {
 
860
        c.opt_["fields"] = googleapi.CombineFields(s)
 
861
        return c
 
862
}
 
863
 
 
864
func (c *AccountsAlertsListCall) Do() (*Alerts, error) {
 
865
        var body io.Reader = nil
 
866
        params := make(url.Values)
 
867
        params.Set("alt", "json")
 
868
        if v, ok := c.opt_["locale"]; ok {
 
869
                params.Set("locale", fmt.Sprintf("%v", v))
 
870
        }
 
871
        if v, ok := c.opt_["fields"]; ok {
 
872
                params.Set("fields", fmt.Sprintf("%v", v))
 
873
        }
 
874
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/alerts")
 
875
        urls += "?" + params.Encode()
 
876
        req, _ := http.NewRequest("GET", urls, body)
 
877
        googleapi.Expand(req.URL, map[string]string{
 
878
                "accountId": c.accountId,
 
879
        })
 
880
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
881
        res, err := c.s.client.Do(req)
 
882
        if err != nil {
 
883
                return nil, err
 
884
        }
 
885
        defer googleapi.CloseBody(res)
 
886
        if err := googleapi.CheckResponse(res); err != nil {
 
887
                return nil, err
 
888
        }
 
889
        var ret *Alerts
 
890
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
891
                return nil, err
 
892
        }
 
893
        return ret, nil
 
894
        // {
 
895
        //   "description": "List the alerts for this Ad Exchange account.",
 
896
        //   "httpMethod": "GET",
 
897
        //   "id": "adexchangeseller.accounts.alerts.list",
 
898
        //   "parameterOrder": [
 
899
        //     "accountId"
 
900
        //   ],
 
901
        //   "parameters": {
 
902
        //     "accountId": {
 
903
        //       "description": "Account owning the alerts.",
 
904
        //       "location": "path",
 
905
        //       "required": true,
 
906
        //       "type": "string"
 
907
        //     },
 
908
        //     "locale": {
 
909
        //       "description": "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.",
 
910
        //       "location": "query",
 
911
        //       "type": "string"
 
912
        //     }
 
913
        //   },
 
914
        //   "path": "accounts/{accountId}/alerts",
 
915
        //   "response": {
 
916
        //     "$ref": "Alerts"
 
917
        //   },
 
918
        //   "scopes": [
 
919
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
920
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
921
        //   ]
 
922
        // }
 
923
 
 
924
}
 
925
 
 
926
// method id "adexchangeseller.accounts.customchannels.get":
 
927
 
 
928
type AccountsCustomchannelsGetCall struct {
 
929
        s               *Service
 
930
        accountId       string
 
931
        adClientId      string
 
932
        customChannelId string
 
933
        opt_            map[string]interface{}
 
934
}
 
935
 
 
936
// Get: Get the specified custom channel from the specified ad client.
 
937
func (r *AccountsCustomchannelsService) Get(accountId string, adClientId string, customChannelId string) *AccountsCustomchannelsGetCall {
 
938
        c := &AccountsCustomchannelsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
939
        c.accountId = accountId
 
940
        c.adClientId = adClientId
 
941
        c.customChannelId = customChannelId
 
942
        return c
 
943
}
 
944
 
 
945
// Fields allows partial responses to be retrieved.
 
946
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
947
// for more information.
 
948
func (c *AccountsCustomchannelsGetCall) Fields(s ...googleapi.Field) *AccountsCustomchannelsGetCall {
 
949
        c.opt_["fields"] = googleapi.CombineFields(s)
 
950
        return c
 
951
}
 
952
 
 
953
func (c *AccountsCustomchannelsGetCall) Do() (*CustomChannel, error) {
 
954
        var body io.Reader = nil
 
955
        params := make(url.Values)
 
956
        params.Set("alt", "json")
 
957
        if v, ok := c.opt_["fields"]; ok {
 
958
                params.Set("fields", fmt.Sprintf("%v", v))
 
959
        }
 
960
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}")
 
961
        urls += "?" + params.Encode()
 
962
        req, _ := http.NewRequest("GET", urls, body)
 
963
        googleapi.Expand(req.URL, map[string]string{
 
964
                "accountId":       c.accountId,
 
965
                "adClientId":      c.adClientId,
 
966
                "customChannelId": c.customChannelId,
 
967
        })
 
968
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
969
        res, err := c.s.client.Do(req)
 
970
        if err != nil {
 
971
                return nil, err
 
972
        }
 
973
        defer googleapi.CloseBody(res)
 
974
        if err := googleapi.CheckResponse(res); err != nil {
 
975
                return nil, err
 
976
        }
 
977
        var ret *CustomChannel
 
978
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
979
                return nil, err
 
980
        }
 
981
        return ret, nil
 
982
        // {
 
983
        //   "description": "Get the specified custom channel from the specified ad client.",
 
984
        //   "httpMethod": "GET",
 
985
        //   "id": "adexchangeseller.accounts.customchannels.get",
 
986
        //   "parameterOrder": [
 
987
        //     "accountId",
 
988
        //     "adClientId",
 
989
        //     "customChannelId"
 
990
        //   ],
 
991
        //   "parameters": {
 
992
        //     "accountId": {
 
993
        //       "description": "Account to which the ad client belongs.",
 
994
        //       "location": "path",
 
995
        //       "required": true,
 
996
        //       "type": "string"
 
997
        //     },
 
998
        //     "adClientId": {
 
999
        //       "description": "Ad client which contains the custom channel.",
 
1000
        //       "location": "path",
 
1001
        //       "required": true,
 
1002
        //       "type": "string"
 
1003
        //     },
 
1004
        //     "customChannelId": {
 
1005
        //       "description": "Custom channel to retrieve.",
 
1006
        //       "location": "path",
 
1007
        //       "required": true,
 
1008
        //       "type": "string"
 
1009
        //     }
 
1010
        //   },
 
1011
        //   "path": "accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}",
 
1012
        //   "response": {
 
1013
        //     "$ref": "CustomChannel"
 
1014
        //   },
 
1015
        //   "scopes": [
 
1016
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1017
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1018
        //   ]
 
1019
        // }
 
1020
 
 
1021
}
 
1022
 
 
1023
// method id "adexchangeseller.accounts.customchannels.list":
 
1024
 
 
1025
type AccountsCustomchannelsListCall struct {
 
1026
        s          *Service
 
1027
        accountId  string
 
1028
        adClientId string
 
1029
        opt_       map[string]interface{}
 
1030
}
 
1031
 
 
1032
// List: List all custom channels in the specified ad client for this Ad
 
1033
// Exchange account.
 
1034
func (r *AccountsCustomchannelsService) List(accountId string, adClientId string) *AccountsCustomchannelsListCall {
 
1035
        c := &AccountsCustomchannelsListCall{s: r.s, opt_: make(map[string]interface{})}
 
1036
        c.accountId = accountId
 
1037
        c.adClientId = adClientId
 
1038
        return c
 
1039
}
 
1040
 
 
1041
// MaxResults sets the optional parameter "maxResults": The maximum
 
1042
// number of custom channels to include in the response, used for
 
1043
// paging.
 
1044
func (c *AccountsCustomchannelsListCall) MaxResults(maxResults int64) *AccountsCustomchannelsListCall {
 
1045
        c.opt_["maxResults"] = maxResults
 
1046
        return c
 
1047
}
 
1048
 
 
1049
// PageToken sets the optional parameter "pageToken": A continuation
 
1050
// token, used to page through custom channels. To retrieve the next
 
1051
// page, set this parameter to the value of "nextPageToken" from the
 
1052
// previous response.
 
1053
func (c *AccountsCustomchannelsListCall) PageToken(pageToken string) *AccountsCustomchannelsListCall {
 
1054
        c.opt_["pageToken"] = pageToken
 
1055
        return c
 
1056
}
 
1057
 
 
1058
// Fields allows partial responses to be retrieved.
 
1059
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1060
// for more information.
 
1061
func (c *AccountsCustomchannelsListCall) Fields(s ...googleapi.Field) *AccountsCustomchannelsListCall {
 
1062
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1063
        return c
 
1064
}
 
1065
 
 
1066
func (c *AccountsCustomchannelsListCall) Do() (*CustomChannels, error) {
 
1067
        var body io.Reader = nil
 
1068
        params := make(url.Values)
 
1069
        params.Set("alt", "json")
 
1070
        if v, ok := c.opt_["maxResults"]; ok {
 
1071
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1072
        }
 
1073
        if v, ok := c.opt_["pageToken"]; ok {
 
1074
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1075
        }
 
1076
        if v, ok := c.opt_["fields"]; ok {
 
1077
                params.Set("fields", fmt.Sprintf("%v", v))
 
1078
        }
 
1079
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/adclients/{adClientId}/customchannels")
 
1080
        urls += "?" + params.Encode()
 
1081
        req, _ := http.NewRequest("GET", urls, body)
 
1082
        googleapi.Expand(req.URL, map[string]string{
 
1083
                "accountId":  c.accountId,
 
1084
                "adClientId": c.adClientId,
 
1085
        })
 
1086
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1087
        res, err := c.s.client.Do(req)
 
1088
        if err != nil {
 
1089
                return nil, err
 
1090
        }
 
1091
        defer googleapi.CloseBody(res)
 
1092
        if err := googleapi.CheckResponse(res); err != nil {
 
1093
                return nil, err
 
1094
        }
 
1095
        var ret *CustomChannels
 
1096
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1097
                return nil, err
 
1098
        }
 
1099
        return ret, nil
 
1100
        // {
 
1101
        //   "description": "List all custom channels in the specified ad client for this Ad Exchange account.",
 
1102
        //   "httpMethod": "GET",
 
1103
        //   "id": "adexchangeseller.accounts.customchannels.list",
 
1104
        //   "parameterOrder": [
 
1105
        //     "accountId",
 
1106
        //     "adClientId"
 
1107
        //   ],
 
1108
        //   "parameters": {
 
1109
        //     "accountId": {
 
1110
        //       "description": "Account to which the ad client belongs.",
 
1111
        //       "location": "path",
 
1112
        //       "required": true,
 
1113
        //       "type": "string"
 
1114
        //     },
 
1115
        //     "adClientId": {
 
1116
        //       "description": "Ad client for which to list custom channels.",
 
1117
        //       "location": "path",
 
1118
        //       "required": true,
 
1119
        //       "type": "string"
 
1120
        //     },
 
1121
        //     "maxResults": {
 
1122
        //       "description": "The maximum number of custom channels to include in the response, used for paging.",
 
1123
        //       "format": "uint32",
 
1124
        //       "location": "query",
 
1125
        //       "maximum": "10000",
 
1126
        //       "minimum": "0",
 
1127
        //       "type": "integer"
 
1128
        //     },
 
1129
        //     "pageToken": {
 
1130
        //       "description": "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.",
 
1131
        //       "location": "query",
 
1132
        //       "type": "string"
 
1133
        //     }
 
1134
        //   },
 
1135
        //   "path": "accounts/{accountId}/adclients/{adClientId}/customchannels",
 
1136
        //   "response": {
 
1137
        //     "$ref": "CustomChannels"
 
1138
        //   },
 
1139
        //   "scopes": [
 
1140
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1141
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1142
        //   ]
 
1143
        // }
 
1144
 
 
1145
}
 
1146
 
 
1147
// method id "adexchangeseller.accounts.metadata.dimensions.list":
 
1148
 
 
1149
type AccountsMetadataDimensionsListCall struct {
 
1150
        s         *Service
 
1151
        accountId string
 
1152
        opt_      map[string]interface{}
 
1153
}
 
1154
 
 
1155
// List: List the metadata for the dimensions available to this
 
1156
// AdExchange account.
 
1157
func (r *AccountsMetadataDimensionsService) List(accountId string) *AccountsMetadataDimensionsListCall {
 
1158
        c := &AccountsMetadataDimensionsListCall{s: r.s, opt_: make(map[string]interface{})}
 
1159
        c.accountId = accountId
 
1160
        return c
 
1161
}
 
1162
 
 
1163
// Fields allows partial responses to be retrieved.
 
1164
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1165
// for more information.
 
1166
func (c *AccountsMetadataDimensionsListCall) Fields(s ...googleapi.Field) *AccountsMetadataDimensionsListCall {
 
1167
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1168
        return c
 
1169
}
 
1170
 
 
1171
func (c *AccountsMetadataDimensionsListCall) Do() (*Metadata, error) {
 
1172
        var body io.Reader = nil
 
1173
        params := make(url.Values)
 
1174
        params.Set("alt", "json")
 
1175
        if v, ok := c.opt_["fields"]; ok {
 
1176
                params.Set("fields", fmt.Sprintf("%v", v))
 
1177
        }
 
1178
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/metadata/dimensions")
 
1179
        urls += "?" + params.Encode()
 
1180
        req, _ := http.NewRequest("GET", urls, body)
 
1181
        googleapi.Expand(req.URL, map[string]string{
 
1182
                "accountId": c.accountId,
 
1183
        })
 
1184
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1185
        res, err := c.s.client.Do(req)
 
1186
        if err != nil {
 
1187
                return nil, err
 
1188
        }
 
1189
        defer googleapi.CloseBody(res)
 
1190
        if err := googleapi.CheckResponse(res); err != nil {
 
1191
                return nil, err
 
1192
        }
 
1193
        var ret *Metadata
 
1194
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1195
                return nil, err
 
1196
        }
 
1197
        return ret, nil
 
1198
        // {
 
1199
        //   "description": "List the metadata for the dimensions available to this AdExchange account.",
 
1200
        //   "httpMethod": "GET",
 
1201
        //   "id": "adexchangeseller.accounts.metadata.dimensions.list",
 
1202
        //   "parameterOrder": [
 
1203
        //     "accountId"
 
1204
        //   ],
 
1205
        //   "parameters": {
 
1206
        //     "accountId": {
 
1207
        //       "description": "Account with visibility to the dimensions.",
 
1208
        //       "location": "path",
 
1209
        //       "required": true,
 
1210
        //       "type": "string"
 
1211
        //     }
 
1212
        //   },
 
1213
        //   "path": "accounts/{accountId}/metadata/dimensions",
 
1214
        //   "response": {
 
1215
        //     "$ref": "Metadata"
 
1216
        //   },
 
1217
        //   "scopes": [
 
1218
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1219
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1220
        //   ]
 
1221
        // }
 
1222
 
 
1223
}
 
1224
 
 
1225
// method id "adexchangeseller.accounts.metadata.metrics.list":
 
1226
 
 
1227
type AccountsMetadataMetricsListCall struct {
 
1228
        s         *Service
 
1229
        accountId string
 
1230
        opt_      map[string]interface{}
 
1231
}
 
1232
 
 
1233
// List: List the metadata for the metrics available to this AdExchange
 
1234
// account.
 
1235
func (r *AccountsMetadataMetricsService) List(accountId string) *AccountsMetadataMetricsListCall {
 
1236
        c := &AccountsMetadataMetricsListCall{s: r.s, opt_: make(map[string]interface{})}
 
1237
        c.accountId = accountId
 
1238
        return c
 
1239
}
 
1240
 
 
1241
// Fields allows partial responses to be retrieved.
 
1242
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1243
// for more information.
 
1244
func (c *AccountsMetadataMetricsListCall) Fields(s ...googleapi.Field) *AccountsMetadataMetricsListCall {
 
1245
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1246
        return c
 
1247
}
 
1248
 
 
1249
func (c *AccountsMetadataMetricsListCall) Do() (*Metadata, error) {
 
1250
        var body io.Reader = nil
 
1251
        params := make(url.Values)
 
1252
        params.Set("alt", "json")
 
1253
        if v, ok := c.opt_["fields"]; ok {
 
1254
                params.Set("fields", fmt.Sprintf("%v", v))
 
1255
        }
 
1256
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/metadata/metrics")
 
1257
        urls += "?" + params.Encode()
 
1258
        req, _ := http.NewRequest("GET", urls, body)
 
1259
        googleapi.Expand(req.URL, map[string]string{
 
1260
                "accountId": c.accountId,
 
1261
        })
 
1262
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1263
        res, err := c.s.client.Do(req)
 
1264
        if err != nil {
 
1265
                return nil, err
 
1266
        }
 
1267
        defer googleapi.CloseBody(res)
 
1268
        if err := googleapi.CheckResponse(res); err != nil {
 
1269
                return nil, err
 
1270
        }
 
1271
        var ret *Metadata
 
1272
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1273
                return nil, err
 
1274
        }
 
1275
        return ret, nil
 
1276
        // {
 
1277
        //   "description": "List the metadata for the metrics available to this AdExchange account.",
 
1278
        //   "httpMethod": "GET",
 
1279
        //   "id": "adexchangeseller.accounts.metadata.metrics.list",
 
1280
        //   "parameterOrder": [
 
1281
        //     "accountId"
 
1282
        //   ],
 
1283
        //   "parameters": {
 
1284
        //     "accountId": {
 
1285
        //       "description": "Account with visibility to the metrics.",
 
1286
        //       "location": "path",
 
1287
        //       "required": true,
 
1288
        //       "type": "string"
 
1289
        //     }
 
1290
        //   },
 
1291
        //   "path": "accounts/{accountId}/metadata/metrics",
 
1292
        //   "response": {
 
1293
        //     "$ref": "Metadata"
 
1294
        //   },
 
1295
        //   "scopes": [
 
1296
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1297
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1298
        //   ]
 
1299
        // }
 
1300
 
 
1301
}
 
1302
 
 
1303
// method id "adexchangeseller.accounts.preferreddeals.get":
 
1304
 
 
1305
type AccountsPreferreddealsGetCall struct {
 
1306
        s         *Service
 
1307
        accountId string
 
1308
        dealId    string
 
1309
        opt_      map[string]interface{}
 
1310
}
 
1311
 
 
1312
// Get: Get information about the selected Ad Exchange Preferred Deal.
 
1313
func (r *AccountsPreferreddealsService) Get(accountId string, dealId string) *AccountsPreferreddealsGetCall {
 
1314
        c := &AccountsPreferreddealsGetCall{s: r.s, opt_: make(map[string]interface{})}
 
1315
        c.accountId = accountId
 
1316
        c.dealId = dealId
 
1317
        return c
 
1318
}
 
1319
 
 
1320
// Fields allows partial responses to be retrieved.
 
1321
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1322
// for more information.
 
1323
func (c *AccountsPreferreddealsGetCall) Fields(s ...googleapi.Field) *AccountsPreferreddealsGetCall {
 
1324
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1325
        return c
 
1326
}
 
1327
 
 
1328
func (c *AccountsPreferreddealsGetCall) Do() (*PreferredDeal, error) {
 
1329
        var body io.Reader = nil
 
1330
        params := make(url.Values)
 
1331
        params.Set("alt", "json")
 
1332
        if v, ok := c.opt_["fields"]; ok {
 
1333
                params.Set("fields", fmt.Sprintf("%v", v))
 
1334
        }
 
1335
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/preferreddeals/{dealId}")
 
1336
        urls += "?" + params.Encode()
 
1337
        req, _ := http.NewRequest("GET", urls, body)
 
1338
        googleapi.Expand(req.URL, map[string]string{
 
1339
                "accountId": c.accountId,
 
1340
                "dealId":    c.dealId,
 
1341
        })
 
1342
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1343
        res, err := c.s.client.Do(req)
 
1344
        if err != nil {
 
1345
                return nil, err
 
1346
        }
 
1347
        defer googleapi.CloseBody(res)
 
1348
        if err := googleapi.CheckResponse(res); err != nil {
 
1349
                return nil, err
 
1350
        }
 
1351
        var ret *PreferredDeal
 
1352
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1353
                return nil, err
 
1354
        }
 
1355
        return ret, nil
 
1356
        // {
 
1357
        //   "description": "Get information about the selected Ad Exchange Preferred Deal.",
 
1358
        //   "httpMethod": "GET",
 
1359
        //   "id": "adexchangeseller.accounts.preferreddeals.get",
 
1360
        //   "parameterOrder": [
 
1361
        //     "accountId",
 
1362
        //     "dealId"
 
1363
        //   ],
 
1364
        //   "parameters": {
 
1365
        //     "accountId": {
 
1366
        //       "description": "Account owning the deal.",
 
1367
        //       "location": "path",
 
1368
        //       "required": true,
 
1369
        //       "type": "string"
 
1370
        //     },
 
1371
        //     "dealId": {
 
1372
        //       "description": "Preferred deal to get information about.",
 
1373
        //       "location": "path",
 
1374
        //       "required": true,
 
1375
        //       "type": "string"
 
1376
        //     }
 
1377
        //   },
 
1378
        //   "path": "accounts/{accountId}/preferreddeals/{dealId}",
 
1379
        //   "response": {
 
1380
        //     "$ref": "PreferredDeal"
 
1381
        //   },
 
1382
        //   "scopes": [
 
1383
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1384
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1385
        //   ]
 
1386
        // }
 
1387
 
 
1388
}
 
1389
 
 
1390
// method id "adexchangeseller.accounts.preferreddeals.list":
 
1391
 
 
1392
type AccountsPreferreddealsListCall struct {
 
1393
        s         *Service
 
1394
        accountId string
 
1395
        opt_      map[string]interface{}
 
1396
}
 
1397
 
 
1398
// List: List the preferred deals for this Ad Exchange account.
 
1399
func (r *AccountsPreferreddealsService) List(accountId string) *AccountsPreferreddealsListCall {
 
1400
        c := &AccountsPreferreddealsListCall{s: r.s, opt_: make(map[string]interface{})}
 
1401
        c.accountId = accountId
 
1402
        return c
 
1403
}
 
1404
 
 
1405
// Fields allows partial responses to be retrieved.
 
1406
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1407
// for more information.
 
1408
func (c *AccountsPreferreddealsListCall) Fields(s ...googleapi.Field) *AccountsPreferreddealsListCall {
 
1409
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1410
        return c
 
1411
}
 
1412
 
 
1413
func (c *AccountsPreferreddealsListCall) Do() (*PreferredDeals, error) {
 
1414
        var body io.Reader = nil
 
1415
        params := make(url.Values)
 
1416
        params.Set("alt", "json")
 
1417
        if v, ok := c.opt_["fields"]; ok {
 
1418
                params.Set("fields", fmt.Sprintf("%v", v))
 
1419
        }
 
1420
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/preferreddeals")
 
1421
        urls += "?" + params.Encode()
 
1422
        req, _ := http.NewRequest("GET", urls, body)
 
1423
        googleapi.Expand(req.URL, map[string]string{
 
1424
                "accountId": c.accountId,
 
1425
        })
 
1426
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1427
        res, err := c.s.client.Do(req)
 
1428
        if err != nil {
 
1429
                return nil, err
 
1430
        }
 
1431
        defer googleapi.CloseBody(res)
 
1432
        if err := googleapi.CheckResponse(res); err != nil {
 
1433
                return nil, err
 
1434
        }
 
1435
        var ret *PreferredDeals
 
1436
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1437
                return nil, err
 
1438
        }
 
1439
        return ret, nil
 
1440
        // {
 
1441
        //   "description": "List the preferred deals for this Ad Exchange account.",
 
1442
        //   "httpMethod": "GET",
 
1443
        //   "id": "adexchangeseller.accounts.preferreddeals.list",
 
1444
        //   "parameterOrder": [
 
1445
        //     "accountId"
 
1446
        //   ],
 
1447
        //   "parameters": {
 
1448
        //     "accountId": {
 
1449
        //       "description": "Account owning the deals.",
 
1450
        //       "location": "path",
 
1451
        //       "required": true,
 
1452
        //       "type": "string"
 
1453
        //     }
 
1454
        //   },
 
1455
        //   "path": "accounts/{accountId}/preferreddeals",
 
1456
        //   "response": {
 
1457
        //     "$ref": "PreferredDeals"
 
1458
        //   },
 
1459
        //   "scopes": [
 
1460
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1461
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1462
        //   ]
 
1463
        // }
 
1464
 
 
1465
}
 
1466
 
 
1467
// method id "adexchangeseller.accounts.reports.generate":
 
1468
 
 
1469
type AccountsReportsGenerateCall struct {
 
1470
        s         *Service
 
1471
        accountId string
 
1472
        startDate string
 
1473
        endDate   string
 
1474
        opt_      map[string]interface{}
 
1475
}
 
1476
 
 
1477
// Generate: Generate an Ad Exchange report based on the report request
 
1478
// sent in the query parameters. Returns the result as JSON; to retrieve
 
1479
// output in CSV format specify "alt=csv" as a query parameter.
 
1480
func (r *AccountsReportsService) Generate(accountId string, startDate string, endDate string) *AccountsReportsGenerateCall {
 
1481
        c := &AccountsReportsGenerateCall{s: r.s, opt_: make(map[string]interface{})}
 
1482
        c.accountId = accountId
 
1483
        c.startDate = startDate
 
1484
        c.endDate = endDate
 
1485
        return c
 
1486
}
 
1487
 
 
1488
// Dimension sets the optional parameter "dimension": Dimensions to base
 
1489
// the report on.
 
1490
func (c *AccountsReportsGenerateCall) Dimension(dimension string) *AccountsReportsGenerateCall {
 
1491
        c.opt_["dimension"] = dimension
 
1492
        return c
 
1493
}
 
1494
 
 
1495
// Filter sets the optional parameter "filter": Filters to be run on the
 
1496
// report.
 
1497
func (c *AccountsReportsGenerateCall) Filter(filter string) *AccountsReportsGenerateCall {
 
1498
        c.opt_["filter"] = filter
 
1499
        return c
 
1500
}
 
1501
 
 
1502
// Locale sets the optional parameter "locale": Optional locale to use
 
1503
// for translating report output to a local language. Defaults to
 
1504
// "en_US" if not specified.
 
1505
func (c *AccountsReportsGenerateCall) Locale(locale string) *AccountsReportsGenerateCall {
 
1506
        c.opt_["locale"] = locale
 
1507
        return c
 
1508
}
 
1509
 
 
1510
// MaxResults sets the optional parameter "maxResults": The maximum
 
1511
// number of rows of report data to return.
 
1512
func (c *AccountsReportsGenerateCall) MaxResults(maxResults int64) *AccountsReportsGenerateCall {
 
1513
        c.opt_["maxResults"] = maxResults
 
1514
        return c
 
1515
}
 
1516
 
 
1517
// Metric sets the optional parameter "metric": Numeric columns to
 
1518
// include in the report.
 
1519
func (c *AccountsReportsGenerateCall) Metric(metric string) *AccountsReportsGenerateCall {
 
1520
        c.opt_["metric"] = metric
 
1521
        return c
 
1522
}
 
1523
 
 
1524
// Sort sets the optional parameter "sort": The name of a dimension or
 
1525
// metric to sort the resulting report on, optionally prefixed with "+"
 
1526
// to sort ascending or "-" to sort descending. If no prefix is
 
1527
// specified, the column is sorted ascending.
 
1528
func (c *AccountsReportsGenerateCall) Sort(sort string) *AccountsReportsGenerateCall {
 
1529
        c.opt_["sort"] = sort
 
1530
        return c
 
1531
}
 
1532
 
 
1533
// StartIndex sets the optional parameter "startIndex": Index of the
 
1534
// first row of report data to return.
 
1535
func (c *AccountsReportsGenerateCall) StartIndex(startIndex int64) *AccountsReportsGenerateCall {
 
1536
        c.opt_["startIndex"] = startIndex
 
1537
        return c
 
1538
}
 
1539
 
 
1540
// Fields allows partial responses to be retrieved.
 
1541
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1542
// for more information.
 
1543
func (c *AccountsReportsGenerateCall) Fields(s ...googleapi.Field) *AccountsReportsGenerateCall {
 
1544
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1545
        return c
 
1546
}
 
1547
 
 
1548
func (c *AccountsReportsGenerateCall) Do() (*Report, error) {
 
1549
        var body io.Reader = nil
 
1550
        params := make(url.Values)
 
1551
        params.Set("alt", "json")
 
1552
        params.Set("endDate", fmt.Sprintf("%v", c.endDate))
 
1553
        params.Set("startDate", fmt.Sprintf("%v", c.startDate))
 
1554
        if v, ok := c.opt_["dimension"]; ok {
 
1555
                params.Set("dimension", fmt.Sprintf("%v", v))
 
1556
        }
 
1557
        if v, ok := c.opt_["filter"]; ok {
 
1558
                params.Set("filter", fmt.Sprintf("%v", v))
 
1559
        }
 
1560
        if v, ok := c.opt_["locale"]; ok {
 
1561
                params.Set("locale", fmt.Sprintf("%v", v))
 
1562
        }
 
1563
        if v, ok := c.opt_["maxResults"]; ok {
 
1564
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1565
        }
 
1566
        if v, ok := c.opt_["metric"]; ok {
 
1567
                params.Set("metric", fmt.Sprintf("%v", v))
 
1568
        }
 
1569
        if v, ok := c.opt_["sort"]; ok {
 
1570
                params.Set("sort", fmt.Sprintf("%v", v))
 
1571
        }
 
1572
        if v, ok := c.opt_["startIndex"]; ok {
 
1573
                params.Set("startIndex", fmt.Sprintf("%v", v))
 
1574
        }
 
1575
        if v, ok := c.opt_["fields"]; ok {
 
1576
                params.Set("fields", fmt.Sprintf("%v", v))
 
1577
        }
 
1578
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/reports")
 
1579
        urls += "?" + params.Encode()
 
1580
        req, _ := http.NewRequest("GET", urls, body)
 
1581
        googleapi.Expand(req.URL, map[string]string{
 
1582
                "accountId": c.accountId,
 
1583
        })
 
1584
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1585
        res, err := c.s.client.Do(req)
 
1586
        if err != nil {
 
1587
                return nil, err
 
1588
        }
 
1589
        defer googleapi.CloseBody(res)
 
1590
        if err := googleapi.CheckResponse(res); err != nil {
 
1591
                return nil, err
 
1592
        }
 
1593
        var ret *Report
 
1594
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1595
                return nil, err
 
1596
        }
 
1597
        return ret, nil
 
1598
        // {
 
1599
        //   "description": "Generate an Ad Exchange report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify \"alt=csv\" as a query parameter.",
 
1600
        //   "httpMethod": "GET",
 
1601
        //   "id": "adexchangeseller.accounts.reports.generate",
 
1602
        //   "parameterOrder": [
 
1603
        //     "accountId",
 
1604
        //     "startDate",
 
1605
        //     "endDate"
 
1606
        //   ],
 
1607
        //   "parameters": {
 
1608
        //     "accountId": {
 
1609
        //       "description": "Account which owns the generated report.",
 
1610
        //       "location": "path",
 
1611
        //       "required": true,
 
1612
        //       "type": "string"
 
1613
        //     },
 
1614
        //     "dimension": {
 
1615
        //       "description": "Dimensions to base the report on.",
 
1616
        //       "location": "query",
 
1617
        //       "pattern": "[a-zA-Z_]+",
 
1618
        //       "repeated": true,
 
1619
        //       "type": "string"
 
1620
        //     },
 
1621
        //     "endDate": {
 
1622
        //       "description": "End of the date range to report on in \"YYYY-MM-DD\" format, inclusive.",
 
1623
        //       "location": "query",
 
1624
        //       "pattern": "\\d{4}-\\d{2}-\\d{2}|(today|startOfMonth|startOfYear)(([\\-\\+]\\d+[dwmy]){0,3}?)",
 
1625
        //       "required": true,
 
1626
        //       "type": "string"
 
1627
        //     },
 
1628
        //     "filter": {
 
1629
        //       "description": "Filters to be run on the report.",
 
1630
        //       "location": "query",
 
1631
        //       "pattern": "[a-zA-Z_]+(==|=@).+",
 
1632
        //       "repeated": true,
 
1633
        //       "type": "string"
 
1634
        //     },
 
1635
        //     "locale": {
 
1636
        //       "description": "Optional locale to use for translating report output to a local language. Defaults to \"en_US\" if not specified.",
 
1637
        //       "location": "query",
 
1638
        //       "pattern": "[a-zA-Z_]+",
 
1639
        //       "type": "string"
 
1640
        //     },
 
1641
        //     "maxResults": {
 
1642
        //       "description": "The maximum number of rows of report data to return.",
 
1643
        //       "format": "uint32",
 
1644
        //       "location": "query",
 
1645
        //       "maximum": "50000",
 
1646
        //       "minimum": "0",
 
1647
        //       "type": "integer"
 
1648
        //     },
 
1649
        //     "metric": {
 
1650
        //       "description": "Numeric columns to include in the report.",
 
1651
        //       "location": "query",
 
1652
        //       "pattern": "[a-zA-Z_]+",
 
1653
        //       "repeated": true,
 
1654
        //       "type": "string"
 
1655
        //     },
 
1656
        //     "sort": {
 
1657
        //       "description": "The name of a dimension or metric to sort the resulting report on, optionally prefixed with \"+\" to sort ascending or \"-\" to sort descending. If no prefix is specified, the column is sorted ascending.",
 
1658
        //       "location": "query",
 
1659
        //       "pattern": "(\\+|-)?[a-zA-Z_]+",
 
1660
        //       "repeated": true,
 
1661
        //       "type": "string"
 
1662
        //     },
 
1663
        //     "startDate": {
 
1664
        //       "description": "Start of the date range to report on in \"YYYY-MM-DD\" format, inclusive.",
 
1665
        //       "location": "query",
 
1666
        //       "pattern": "\\d{4}-\\d{2}-\\d{2}|(today|startOfMonth|startOfYear)(([\\-\\+]\\d+[dwmy]){0,3}?)",
 
1667
        //       "required": true,
 
1668
        //       "type": "string"
 
1669
        //     },
 
1670
        //     "startIndex": {
 
1671
        //       "description": "Index of the first row of report data to return.",
 
1672
        //       "format": "uint32",
 
1673
        //       "location": "query",
 
1674
        //       "maximum": "5000",
 
1675
        //       "minimum": "0",
 
1676
        //       "type": "integer"
 
1677
        //     }
 
1678
        //   },
 
1679
        //   "path": "accounts/{accountId}/reports",
 
1680
        //   "response": {
 
1681
        //     "$ref": "Report"
 
1682
        //   },
 
1683
        //   "scopes": [
 
1684
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1685
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1686
        //   ],
 
1687
        //   "supportsMediaDownload": true
 
1688
        // }
 
1689
 
 
1690
}
 
1691
 
 
1692
// method id "adexchangeseller.accounts.reports.saved.generate":
 
1693
 
 
1694
type AccountsReportsSavedGenerateCall struct {
 
1695
        s             *Service
 
1696
        accountId     string
 
1697
        savedReportId string
 
1698
        opt_          map[string]interface{}
 
1699
}
 
1700
 
 
1701
// Generate: Generate an Ad Exchange report based on the saved report ID
 
1702
// sent in the query parameters.
 
1703
func (r *AccountsReportsSavedService) Generate(accountId string, savedReportId string) *AccountsReportsSavedGenerateCall {
 
1704
        c := &AccountsReportsSavedGenerateCall{s: r.s, opt_: make(map[string]interface{})}
 
1705
        c.accountId = accountId
 
1706
        c.savedReportId = savedReportId
 
1707
        return c
 
1708
}
 
1709
 
 
1710
// Locale sets the optional parameter "locale": Optional locale to use
 
1711
// for translating report output to a local language. Defaults to
 
1712
// "en_US" if not specified.
 
1713
func (c *AccountsReportsSavedGenerateCall) Locale(locale string) *AccountsReportsSavedGenerateCall {
 
1714
        c.opt_["locale"] = locale
 
1715
        return c
 
1716
}
 
1717
 
 
1718
// MaxResults sets the optional parameter "maxResults": The maximum
 
1719
// number of rows of report data to return.
 
1720
func (c *AccountsReportsSavedGenerateCall) MaxResults(maxResults int64) *AccountsReportsSavedGenerateCall {
 
1721
        c.opt_["maxResults"] = maxResults
 
1722
        return c
 
1723
}
 
1724
 
 
1725
// StartIndex sets the optional parameter "startIndex": Index of the
 
1726
// first row of report data to return.
 
1727
func (c *AccountsReportsSavedGenerateCall) StartIndex(startIndex int64) *AccountsReportsSavedGenerateCall {
 
1728
        c.opt_["startIndex"] = startIndex
 
1729
        return c
 
1730
}
 
1731
 
 
1732
// Fields allows partial responses to be retrieved.
 
1733
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1734
// for more information.
 
1735
func (c *AccountsReportsSavedGenerateCall) Fields(s ...googleapi.Field) *AccountsReportsSavedGenerateCall {
 
1736
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1737
        return c
 
1738
}
 
1739
 
 
1740
func (c *AccountsReportsSavedGenerateCall) Do() (*Report, error) {
 
1741
        var body io.Reader = nil
 
1742
        params := make(url.Values)
 
1743
        params.Set("alt", "json")
 
1744
        if v, ok := c.opt_["locale"]; ok {
 
1745
                params.Set("locale", fmt.Sprintf("%v", v))
 
1746
        }
 
1747
        if v, ok := c.opt_["maxResults"]; ok {
 
1748
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1749
        }
 
1750
        if v, ok := c.opt_["startIndex"]; ok {
 
1751
                params.Set("startIndex", fmt.Sprintf("%v", v))
 
1752
        }
 
1753
        if v, ok := c.opt_["fields"]; ok {
 
1754
                params.Set("fields", fmt.Sprintf("%v", v))
 
1755
        }
 
1756
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/reports/{savedReportId}")
 
1757
        urls += "?" + params.Encode()
 
1758
        req, _ := http.NewRequest("GET", urls, body)
 
1759
        googleapi.Expand(req.URL, map[string]string{
 
1760
                "accountId":     c.accountId,
 
1761
                "savedReportId": c.savedReportId,
 
1762
        })
 
1763
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1764
        res, err := c.s.client.Do(req)
 
1765
        if err != nil {
 
1766
                return nil, err
 
1767
        }
 
1768
        defer googleapi.CloseBody(res)
 
1769
        if err := googleapi.CheckResponse(res); err != nil {
 
1770
                return nil, err
 
1771
        }
 
1772
        var ret *Report
 
1773
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1774
                return nil, err
 
1775
        }
 
1776
        return ret, nil
 
1777
        // {
 
1778
        //   "description": "Generate an Ad Exchange report based on the saved report ID sent in the query parameters.",
 
1779
        //   "httpMethod": "GET",
 
1780
        //   "id": "adexchangeseller.accounts.reports.saved.generate",
 
1781
        //   "parameterOrder": [
 
1782
        //     "accountId",
 
1783
        //     "savedReportId"
 
1784
        //   ],
 
1785
        //   "parameters": {
 
1786
        //     "accountId": {
 
1787
        //       "description": "Account owning the saved report.",
 
1788
        //       "location": "path",
 
1789
        //       "required": true,
 
1790
        //       "type": "string"
 
1791
        //     },
 
1792
        //     "locale": {
 
1793
        //       "description": "Optional locale to use for translating report output to a local language. Defaults to \"en_US\" if not specified.",
 
1794
        //       "location": "query",
 
1795
        //       "pattern": "[a-zA-Z_]+",
 
1796
        //       "type": "string"
 
1797
        //     },
 
1798
        //     "maxResults": {
 
1799
        //       "description": "The maximum number of rows of report data to return.",
 
1800
        //       "format": "int32",
 
1801
        //       "location": "query",
 
1802
        //       "maximum": "50000",
 
1803
        //       "minimum": "0",
 
1804
        //       "type": "integer"
 
1805
        //     },
 
1806
        //     "savedReportId": {
 
1807
        //       "description": "The saved report to retrieve.",
 
1808
        //       "location": "path",
 
1809
        //       "required": true,
 
1810
        //       "type": "string"
 
1811
        //     },
 
1812
        //     "startIndex": {
 
1813
        //       "description": "Index of the first row of report data to return.",
 
1814
        //       "format": "int32",
 
1815
        //       "location": "query",
 
1816
        //       "maximum": "5000",
 
1817
        //       "minimum": "0",
 
1818
        //       "type": "integer"
 
1819
        //     }
 
1820
        //   },
 
1821
        //   "path": "accounts/{accountId}/reports/{savedReportId}",
 
1822
        //   "response": {
 
1823
        //     "$ref": "Report"
 
1824
        //   },
 
1825
        //   "scopes": [
 
1826
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1827
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1828
        //   ]
 
1829
        // }
 
1830
 
 
1831
}
 
1832
 
 
1833
// method id "adexchangeseller.accounts.reports.saved.list":
 
1834
 
 
1835
type AccountsReportsSavedListCall struct {
 
1836
        s         *Service
 
1837
        accountId string
 
1838
        opt_      map[string]interface{}
 
1839
}
 
1840
 
 
1841
// List: List all saved reports in this Ad Exchange account.
 
1842
func (r *AccountsReportsSavedService) List(accountId string) *AccountsReportsSavedListCall {
 
1843
        c := &AccountsReportsSavedListCall{s: r.s, opt_: make(map[string]interface{})}
 
1844
        c.accountId = accountId
 
1845
        return c
 
1846
}
 
1847
 
 
1848
// MaxResults sets the optional parameter "maxResults": The maximum
 
1849
// number of saved reports to include in the response, used for paging.
 
1850
func (c *AccountsReportsSavedListCall) MaxResults(maxResults int64) *AccountsReportsSavedListCall {
 
1851
        c.opt_["maxResults"] = maxResults
 
1852
        return c
 
1853
}
 
1854
 
 
1855
// PageToken sets the optional parameter "pageToken": A continuation
 
1856
// token, used to page through saved reports. To retrieve the next page,
 
1857
// set this parameter to the value of "nextPageToken" from the previous
 
1858
// response.
 
1859
func (c *AccountsReportsSavedListCall) PageToken(pageToken string) *AccountsReportsSavedListCall {
 
1860
        c.opt_["pageToken"] = pageToken
 
1861
        return c
 
1862
}
 
1863
 
 
1864
// Fields allows partial responses to be retrieved.
 
1865
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1866
// for more information.
 
1867
func (c *AccountsReportsSavedListCall) Fields(s ...googleapi.Field) *AccountsReportsSavedListCall {
 
1868
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1869
        return c
 
1870
}
 
1871
 
 
1872
func (c *AccountsReportsSavedListCall) Do() (*SavedReports, error) {
 
1873
        var body io.Reader = nil
 
1874
        params := make(url.Values)
 
1875
        params.Set("alt", "json")
 
1876
        if v, ok := c.opt_["maxResults"]; ok {
 
1877
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1878
        }
 
1879
        if v, ok := c.opt_["pageToken"]; ok {
 
1880
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1881
        }
 
1882
        if v, ok := c.opt_["fields"]; ok {
 
1883
                params.Set("fields", fmt.Sprintf("%v", v))
 
1884
        }
 
1885
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/reports/saved")
 
1886
        urls += "?" + params.Encode()
 
1887
        req, _ := http.NewRequest("GET", urls, body)
 
1888
        googleapi.Expand(req.URL, map[string]string{
 
1889
                "accountId": c.accountId,
 
1890
        })
 
1891
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
1892
        res, err := c.s.client.Do(req)
 
1893
        if err != nil {
 
1894
                return nil, err
 
1895
        }
 
1896
        defer googleapi.CloseBody(res)
 
1897
        if err := googleapi.CheckResponse(res); err != nil {
 
1898
                return nil, err
 
1899
        }
 
1900
        var ret *SavedReports
 
1901
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
1902
                return nil, err
 
1903
        }
 
1904
        return ret, nil
 
1905
        // {
 
1906
        //   "description": "List all saved reports in this Ad Exchange account.",
 
1907
        //   "httpMethod": "GET",
 
1908
        //   "id": "adexchangeseller.accounts.reports.saved.list",
 
1909
        //   "parameterOrder": [
 
1910
        //     "accountId"
 
1911
        //   ],
 
1912
        //   "parameters": {
 
1913
        //     "accountId": {
 
1914
        //       "description": "Account owning the saved reports.",
 
1915
        //       "location": "path",
 
1916
        //       "required": true,
 
1917
        //       "type": "string"
 
1918
        //     },
 
1919
        //     "maxResults": {
 
1920
        //       "description": "The maximum number of saved reports to include in the response, used for paging.",
 
1921
        //       "format": "int32",
 
1922
        //       "location": "query",
 
1923
        //       "maximum": "100",
 
1924
        //       "minimum": "0",
 
1925
        //       "type": "integer"
 
1926
        //     },
 
1927
        //     "pageToken": {
 
1928
        //       "description": "A continuation token, used to page through saved reports. To retrieve the next page, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
1929
        //       "location": "query",
 
1930
        //       "type": "string"
 
1931
        //     }
 
1932
        //   },
 
1933
        //   "path": "accounts/{accountId}/reports/saved",
 
1934
        //   "response": {
 
1935
        //     "$ref": "SavedReports"
 
1936
        //   },
 
1937
        //   "scopes": [
 
1938
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
1939
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
1940
        //   ]
 
1941
        // }
 
1942
 
 
1943
}
 
1944
 
 
1945
// method id "adexchangeseller.accounts.urlchannels.list":
 
1946
 
 
1947
type AccountsUrlchannelsListCall struct {
 
1948
        s          *Service
 
1949
        accountId  string
 
1950
        adClientId string
 
1951
        opt_       map[string]interface{}
 
1952
}
 
1953
 
 
1954
// List: List all URL channels in the specified ad client for this Ad
 
1955
// Exchange account.
 
1956
func (r *AccountsUrlchannelsService) List(accountId string, adClientId string) *AccountsUrlchannelsListCall {
 
1957
        c := &AccountsUrlchannelsListCall{s: r.s, opt_: make(map[string]interface{})}
 
1958
        c.accountId = accountId
 
1959
        c.adClientId = adClientId
 
1960
        return c
 
1961
}
 
1962
 
 
1963
// MaxResults sets the optional parameter "maxResults": The maximum
 
1964
// number of URL channels to include in the response, used for paging.
 
1965
func (c *AccountsUrlchannelsListCall) MaxResults(maxResults int64) *AccountsUrlchannelsListCall {
 
1966
        c.opt_["maxResults"] = maxResults
 
1967
        return c
 
1968
}
 
1969
 
 
1970
// PageToken sets the optional parameter "pageToken": A continuation
 
1971
// token, used to page through URL channels. To retrieve the next page,
 
1972
// set this parameter to the value of "nextPageToken" from the previous
 
1973
// response.
 
1974
func (c *AccountsUrlchannelsListCall) PageToken(pageToken string) *AccountsUrlchannelsListCall {
 
1975
        c.opt_["pageToken"] = pageToken
 
1976
        return c
 
1977
}
 
1978
 
 
1979
// Fields allows partial responses to be retrieved.
 
1980
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
 
1981
// for more information.
 
1982
func (c *AccountsUrlchannelsListCall) Fields(s ...googleapi.Field) *AccountsUrlchannelsListCall {
 
1983
        c.opt_["fields"] = googleapi.CombineFields(s)
 
1984
        return c
 
1985
}
 
1986
 
 
1987
func (c *AccountsUrlchannelsListCall) Do() (*UrlChannels, error) {
 
1988
        var body io.Reader = nil
 
1989
        params := make(url.Values)
 
1990
        params.Set("alt", "json")
 
1991
        if v, ok := c.opt_["maxResults"]; ok {
 
1992
                params.Set("maxResults", fmt.Sprintf("%v", v))
 
1993
        }
 
1994
        if v, ok := c.opt_["pageToken"]; ok {
 
1995
                params.Set("pageToken", fmt.Sprintf("%v", v))
 
1996
        }
 
1997
        if v, ok := c.opt_["fields"]; ok {
 
1998
                params.Set("fields", fmt.Sprintf("%v", v))
 
1999
        }
 
2000
        urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/adclients/{adClientId}/urlchannels")
 
2001
        urls += "?" + params.Encode()
 
2002
        req, _ := http.NewRequest("GET", urls, body)
 
2003
        googleapi.Expand(req.URL, map[string]string{
 
2004
                "accountId":  c.accountId,
 
2005
                "adClientId": c.adClientId,
 
2006
        })
 
2007
        req.Header.Set("User-Agent", "google-api-go-client/0.5")
 
2008
        res, err := c.s.client.Do(req)
 
2009
        if err != nil {
 
2010
                return nil, err
 
2011
        }
 
2012
        defer googleapi.CloseBody(res)
 
2013
        if err := googleapi.CheckResponse(res); err != nil {
 
2014
                return nil, err
 
2015
        }
 
2016
        var ret *UrlChannels
 
2017
        if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
 
2018
                return nil, err
 
2019
        }
 
2020
        return ret, nil
 
2021
        // {
 
2022
        //   "description": "List all URL channels in the specified ad client for this Ad Exchange account.",
 
2023
        //   "httpMethod": "GET",
 
2024
        //   "id": "adexchangeseller.accounts.urlchannels.list",
 
2025
        //   "parameterOrder": [
 
2026
        //     "accountId",
 
2027
        //     "adClientId"
 
2028
        //   ],
 
2029
        //   "parameters": {
 
2030
        //     "accountId": {
 
2031
        //       "description": "Account to which the ad client belongs.",
 
2032
        //       "location": "path",
 
2033
        //       "required": true,
 
2034
        //       "type": "string"
 
2035
        //     },
 
2036
        //     "adClientId": {
 
2037
        //       "description": "Ad client for which to list URL channels.",
 
2038
        //       "location": "path",
 
2039
        //       "required": true,
 
2040
        //       "type": "string"
 
2041
        //     },
 
2042
        //     "maxResults": {
 
2043
        //       "description": "The maximum number of URL channels to include in the response, used for paging.",
 
2044
        //       "format": "uint32",
 
2045
        //       "location": "query",
 
2046
        //       "maximum": "10000",
 
2047
        //       "minimum": "0",
 
2048
        //       "type": "integer"
 
2049
        //     },
 
2050
        //     "pageToken": {
 
2051
        //       "description": "A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of \"nextPageToken\" from the previous response.",
 
2052
        //       "location": "query",
 
2053
        //       "type": "string"
 
2054
        //     }
 
2055
        //   },
 
2056
        //   "path": "accounts/{accountId}/adclients/{adClientId}/urlchannels",
 
2057
        //   "response": {
 
2058
        //     "$ref": "UrlChannels"
 
2059
        //   },
 
2060
        //   "scopes": [
 
2061
        //     "https://www.googleapis.com/auth/adexchange.seller",
 
2062
        //     "https://www.googleapis.com/auth/adexchange.seller.readonly"
 
2063
        //   ]
 
2064
        // }
 
2065
 
 
2066
}