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 package displayvideo
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "displayvideo:v2"
95 const apiName = "displayvideo"
96 const apiVersion = "v2"
97 const basePath = "https://displayvideo.googleapis.com/"
98 const basePathTemplate = "https://displayvideo.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://displayvideo.mtls.googleapis.com/"
100
101
102 const (
103
104
105 DisplayVideoScope = "https://www.googleapis.com/auth/display-video"
106
107
108
109 DisplayVideoMediaplanningScope = "https://www.googleapis.com/auth/display-video-mediaplanning"
110
111
112
113 DisplayVideoUserManagementScope = "https://www.googleapis.com/auth/display-video-user-management"
114
115
116 DoubleclickbidmanagerScope = "https://www.googleapis.com/auth/doubleclickbidmanager"
117 )
118
119
120 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
121 scopesOption := internaloption.WithDefaultScopes(
122 "https://www.googleapis.com/auth/display-video",
123 "https://www.googleapis.com/auth/display-video-mediaplanning",
124 "https://www.googleapis.com/auth/display-video-user-management",
125 "https://www.googleapis.com/auth/doubleclickbidmanager",
126 )
127
128 opts = append([]option.ClientOption{scopesOption}, opts...)
129 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
130 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
131 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
132 opts = append(opts, internaloption.EnableNewAuthLibrary())
133 client, endpoint, err := htransport.NewClient(ctx, opts...)
134 if err != nil {
135 return nil, err
136 }
137 s, err := New(client)
138 if err != nil {
139 return nil, err
140 }
141 if endpoint != "" {
142 s.BasePath = endpoint
143 }
144 return s, nil
145 }
146
147
148
149
150
151
152 func New(client *http.Client) (*Service, error) {
153 if client == nil {
154 return nil, errors.New("client is nil")
155 }
156 s := &Service{client: client, BasePath: basePath}
157 s.Advertisers = NewAdvertisersService(s)
158 s.CombinedAudiences = NewCombinedAudiencesService(s)
159 s.CustomBiddingAlgorithms = NewCustomBiddingAlgorithmsService(s)
160 s.CustomLists = NewCustomListsService(s)
161 s.FirstAndThirdPartyAudiences = NewFirstAndThirdPartyAudiencesService(s)
162 s.FloodlightGroups = NewFloodlightGroupsService(s)
163 s.GoogleAudiences = NewGoogleAudiencesService(s)
164 s.GuaranteedOrders = NewGuaranteedOrdersService(s)
165 s.InventorySourceGroups = NewInventorySourceGroupsService(s)
166 s.InventorySources = NewInventorySourcesService(s)
167 s.Media = NewMediaService(s)
168 s.Partners = NewPartnersService(s)
169 s.Sdfdownloadtasks = NewSdfdownloadtasksService(s)
170 s.TargetingTypes = NewTargetingTypesService(s)
171 s.Users = NewUsersService(s)
172 return s, nil
173 }
174
175 type Service struct {
176 client *http.Client
177 BasePath string
178 UserAgent string
179
180 Advertisers *AdvertisersService
181
182 CombinedAudiences *CombinedAudiencesService
183
184 CustomBiddingAlgorithms *CustomBiddingAlgorithmsService
185
186 CustomLists *CustomListsService
187
188 FirstAndThirdPartyAudiences *FirstAndThirdPartyAudiencesService
189
190 FloodlightGroups *FloodlightGroupsService
191
192 GoogleAudiences *GoogleAudiencesService
193
194 GuaranteedOrders *GuaranteedOrdersService
195
196 InventorySourceGroups *InventorySourceGroupsService
197
198 InventorySources *InventorySourcesService
199
200 Media *MediaService
201
202 Partners *PartnersService
203
204 Sdfdownloadtasks *SdfdownloadtasksService
205
206 TargetingTypes *TargetingTypesService
207
208 Users *UsersService
209 }
210
211 func (s *Service) userAgent() string {
212 if s.UserAgent == "" {
213 return googleapi.UserAgent
214 }
215 return googleapi.UserAgent + " " + s.UserAgent
216 }
217
218 func NewAdvertisersService(s *Service) *AdvertisersService {
219 rs := &AdvertisersService{s: s}
220 rs.Assets = NewAdvertisersAssetsService(s)
221 rs.Campaigns = NewAdvertisersCampaignsService(s)
222 rs.Channels = NewAdvertisersChannelsService(s)
223 rs.Creatives = NewAdvertisersCreativesService(s)
224 rs.InsertionOrders = NewAdvertisersInsertionOrdersService(s)
225 rs.Invoices = NewAdvertisersInvoicesService(s)
226 rs.LineItems = NewAdvertisersLineItemsService(s)
227 rs.LocationLists = NewAdvertisersLocationListsService(s)
228 rs.ManualTriggers = NewAdvertisersManualTriggersService(s)
229 rs.NegativeKeywordLists = NewAdvertisersNegativeKeywordListsService(s)
230 rs.TargetingTypes = NewAdvertisersTargetingTypesService(s)
231 rs.YoutubeAdGroupAds = NewAdvertisersYoutubeAdGroupAdsService(s)
232 rs.YoutubeAdGroups = NewAdvertisersYoutubeAdGroupsService(s)
233 return rs
234 }
235
236 type AdvertisersService struct {
237 s *Service
238
239 Assets *AdvertisersAssetsService
240
241 Campaigns *AdvertisersCampaignsService
242
243 Channels *AdvertisersChannelsService
244
245 Creatives *AdvertisersCreativesService
246
247 InsertionOrders *AdvertisersInsertionOrdersService
248
249 Invoices *AdvertisersInvoicesService
250
251 LineItems *AdvertisersLineItemsService
252
253 LocationLists *AdvertisersLocationListsService
254
255 ManualTriggers *AdvertisersManualTriggersService
256
257 NegativeKeywordLists *AdvertisersNegativeKeywordListsService
258
259 TargetingTypes *AdvertisersTargetingTypesService
260
261 YoutubeAdGroupAds *AdvertisersYoutubeAdGroupAdsService
262
263 YoutubeAdGroups *AdvertisersYoutubeAdGroupsService
264 }
265
266 func NewAdvertisersAssetsService(s *Service) *AdvertisersAssetsService {
267 rs := &AdvertisersAssetsService{s: s}
268 return rs
269 }
270
271 type AdvertisersAssetsService struct {
272 s *Service
273 }
274
275 func NewAdvertisersCampaignsService(s *Service) *AdvertisersCampaignsService {
276 rs := &AdvertisersCampaignsService{s: s}
277 rs.TargetingTypes = NewAdvertisersCampaignsTargetingTypesService(s)
278 return rs
279 }
280
281 type AdvertisersCampaignsService struct {
282 s *Service
283
284 TargetingTypes *AdvertisersCampaignsTargetingTypesService
285 }
286
287 func NewAdvertisersCampaignsTargetingTypesService(s *Service) *AdvertisersCampaignsTargetingTypesService {
288 rs := &AdvertisersCampaignsTargetingTypesService{s: s}
289 rs.AssignedTargetingOptions = NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s)
290 return rs
291 }
292
293 type AdvertisersCampaignsTargetingTypesService struct {
294 s *Service
295
296 AssignedTargetingOptions *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService
297 }
298
299 func NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService {
300 rs := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService{s: s}
301 return rs
302 }
303
304 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService struct {
305 s *Service
306 }
307
308 func NewAdvertisersChannelsService(s *Service) *AdvertisersChannelsService {
309 rs := &AdvertisersChannelsService{s: s}
310 rs.Sites = NewAdvertisersChannelsSitesService(s)
311 return rs
312 }
313
314 type AdvertisersChannelsService struct {
315 s *Service
316
317 Sites *AdvertisersChannelsSitesService
318 }
319
320 func NewAdvertisersChannelsSitesService(s *Service) *AdvertisersChannelsSitesService {
321 rs := &AdvertisersChannelsSitesService{s: s}
322 return rs
323 }
324
325 type AdvertisersChannelsSitesService struct {
326 s *Service
327 }
328
329 func NewAdvertisersCreativesService(s *Service) *AdvertisersCreativesService {
330 rs := &AdvertisersCreativesService{s: s}
331 return rs
332 }
333
334 type AdvertisersCreativesService struct {
335 s *Service
336 }
337
338 func NewAdvertisersInsertionOrdersService(s *Service) *AdvertisersInsertionOrdersService {
339 rs := &AdvertisersInsertionOrdersService{s: s}
340 rs.TargetingTypes = NewAdvertisersInsertionOrdersTargetingTypesService(s)
341 return rs
342 }
343
344 type AdvertisersInsertionOrdersService struct {
345 s *Service
346
347 TargetingTypes *AdvertisersInsertionOrdersTargetingTypesService
348 }
349
350 func NewAdvertisersInsertionOrdersTargetingTypesService(s *Service) *AdvertisersInsertionOrdersTargetingTypesService {
351 rs := &AdvertisersInsertionOrdersTargetingTypesService{s: s}
352 rs.AssignedTargetingOptions = NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s)
353 return rs
354 }
355
356 type AdvertisersInsertionOrdersTargetingTypesService struct {
357 s *Service
358
359 AssignedTargetingOptions *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService
360 }
361
362 func NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService {
363 rs := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService{s: s}
364 return rs
365 }
366
367 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService struct {
368 s *Service
369 }
370
371 func NewAdvertisersInvoicesService(s *Service) *AdvertisersInvoicesService {
372 rs := &AdvertisersInvoicesService{s: s}
373 return rs
374 }
375
376 type AdvertisersInvoicesService struct {
377 s *Service
378 }
379
380 func NewAdvertisersLineItemsService(s *Service) *AdvertisersLineItemsService {
381 rs := &AdvertisersLineItemsService{s: s}
382 rs.TargetingTypes = NewAdvertisersLineItemsTargetingTypesService(s)
383 return rs
384 }
385
386 type AdvertisersLineItemsService struct {
387 s *Service
388
389 TargetingTypes *AdvertisersLineItemsTargetingTypesService
390 }
391
392 func NewAdvertisersLineItemsTargetingTypesService(s *Service) *AdvertisersLineItemsTargetingTypesService {
393 rs := &AdvertisersLineItemsTargetingTypesService{s: s}
394 rs.AssignedTargetingOptions = NewAdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService(s)
395 return rs
396 }
397
398 type AdvertisersLineItemsTargetingTypesService struct {
399 s *Service
400
401 AssignedTargetingOptions *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService
402 }
403
404 func NewAdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService {
405 rs := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService{s: s}
406 return rs
407 }
408
409 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService struct {
410 s *Service
411 }
412
413 func NewAdvertisersLocationListsService(s *Service) *AdvertisersLocationListsService {
414 rs := &AdvertisersLocationListsService{s: s}
415 rs.AssignedLocations = NewAdvertisersLocationListsAssignedLocationsService(s)
416 return rs
417 }
418
419 type AdvertisersLocationListsService struct {
420 s *Service
421
422 AssignedLocations *AdvertisersLocationListsAssignedLocationsService
423 }
424
425 func NewAdvertisersLocationListsAssignedLocationsService(s *Service) *AdvertisersLocationListsAssignedLocationsService {
426 rs := &AdvertisersLocationListsAssignedLocationsService{s: s}
427 return rs
428 }
429
430 type AdvertisersLocationListsAssignedLocationsService struct {
431 s *Service
432 }
433
434 func NewAdvertisersManualTriggersService(s *Service) *AdvertisersManualTriggersService {
435 rs := &AdvertisersManualTriggersService{s: s}
436 return rs
437 }
438
439 type AdvertisersManualTriggersService struct {
440 s *Service
441 }
442
443 func NewAdvertisersNegativeKeywordListsService(s *Service) *AdvertisersNegativeKeywordListsService {
444 rs := &AdvertisersNegativeKeywordListsService{s: s}
445 rs.NegativeKeywords = NewAdvertisersNegativeKeywordListsNegativeKeywordsService(s)
446 return rs
447 }
448
449 type AdvertisersNegativeKeywordListsService struct {
450 s *Service
451
452 NegativeKeywords *AdvertisersNegativeKeywordListsNegativeKeywordsService
453 }
454
455 func NewAdvertisersNegativeKeywordListsNegativeKeywordsService(s *Service) *AdvertisersNegativeKeywordListsNegativeKeywordsService {
456 rs := &AdvertisersNegativeKeywordListsNegativeKeywordsService{s: s}
457 return rs
458 }
459
460 type AdvertisersNegativeKeywordListsNegativeKeywordsService struct {
461 s *Service
462 }
463
464 func NewAdvertisersTargetingTypesService(s *Service) *AdvertisersTargetingTypesService {
465 rs := &AdvertisersTargetingTypesService{s: s}
466 rs.AssignedTargetingOptions = NewAdvertisersTargetingTypesAssignedTargetingOptionsService(s)
467 return rs
468 }
469
470 type AdvertisersTargetingTypesService struct {
471 s *Service
472
473 AssignedTargetingOptions *AdvertisersTargetingTypesAssignedTargetingOptionsService
474 }
475
476 func NewAdvertisersTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersTargetingTypesAssignedTargetingOptionsService {
477 rs := &AdvertisersTargetingTypesAssignedTargetingOptionsService{s: s}
478 return rs
479 }
480
481 type AdvertisersTargetingTypesAssignedTargetingOptionsService struct {
482 s *Service
483 }
484
485 func NewAdvertisersYoutubeAdGroupAdsService(s *Service) *AdvertisersYoutubeAdGroupAdsService {
486 rs := &AdvertisersYoutubeAdGroupAdsService{s: s}
487 return rs
488 }
489
490 type AdvertisersYoutubeAdGroupAdsService struct {
491 s *Service
492 }
493
494 func NewAdvertisersYoutubeAdGroupsService(s *Service) *AdvertisersYoutubeAdGroupsService {
495 rs := &AdvertisersYoutubeAdGroupsService{s: s}
496 rs.TargetingTypes = NewAdvertisersYoutubeAdGroupsTargetingTypesService(s)
497 return rs
498 }
499
500 type AdvertisersYoutubeAdGroupsService struct {
501 s *Service
502
503 TargetingTypes *AdvertisersYoutubeAdGroupsTargetingTypesService
504 }
505
506 func NewAdvertisersYoutubeAdGroupsTargetingTypesService(s *Service) *AdvertisersYoutubeAdGroupsTargetingTypesService {
507 rs := &AdvertisersYoutubeAdGroupsTargetingTypesService{s: s}
508 rs.AssignedTargetingOptions = NewAdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsService(s)
509 return rs
510 }
511
512 type AdvertisersYoutubeAdGroupsTargetingTypesService struct {
513 s *Service
514
515 AssignedTargetingOptions *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsService
516 }
517
518 func NewAdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsService {
519 rs := &AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsService{s: s}
520 return rs
521 }
522
523 type AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsService struct {
524 s *Service
525 }
526
527 func NewCombinedAudiencesService(s *Service) *CombinedAudiencesService {
528 rs := &CombinedAudiencesService{s: s}
529 return rs
530 }
531
532 type CombinedAudiencesService struct {
533 s *Service
534 }
535
536 func NewCustomBiddingAlgorithmsService(s *Service) *CustomBiddingAlgorithmsService {
537 rs := &CustomBiddingAlgorithmsService{s: s}
538 rs.Scripts = NewCustomBiddingAlgorithmsScriptsService(s)
539 return rs
540 }
541
542 type CustomBiddingAlgorithmsService struct {
543 s *Service
544
545 Scripts *CustomBiddingAlgorithmsScriptsService
546 }
547
548 func NewCustomBiddingAlgorithmsScriptsService(s *Service) *CustomBiddingAlgorithmsScriptsService {
549 rs := &CustomBiddingAlgorithmsScriptsService{s: s}
550 return rs
551 }
552
553 type CustomBiddingAlgorithmsScriptsService struct {
554 s *Service
555 }
556
557 func NewCustomListsService(s *Service) *CustomListsService {
558 rs := &CustomListsService{s: s}
559 return rs
560 }
561
562 type CustomListsService struct {
563 s *Service
564 }
565
566 func NewFirstAndThirdPartyAudiencesService(s *Service) *FirstAndThirdPartyAudiencesService {
567 rs := &FirstAndThirdPartyAudiencesService{s: s}
568 return rs
569 }
570
571 type FirstAndThirdPartyAudiencesService struct {
572 s *Service
573 }
574
575 func NewFloodlightGroupsService(s *Service) *FloodlightGroupsService {
576 rs := &FloodlightGroupsService{s: s}
577 rs.FloodlightActivities = NewFloodlightGroupsFloodlightActivitiesService(s)
578 return rs
579 }
580
581 type FloodlightGroupsService struct {
582 s *Service
583
584 FloodlightActivities *FloodlightGroupsFloodlightActivitiesService
585 }
586
587 func NewFloodlightGroupsFloodlightActivitiesService(s *Service) *FloodlightGroupsFloodlightActivitiesService {
588 rs := &FloodlightGroupsFloodlightActivitiesService{s: s}
589 return rs
590 }
591
592 type FloodlightGroupsFloodlightActivitiesService struct {
593 s *Service
594 }
595
596 func NewGoogleAudiencesService(s *Service) *GoogleAudiencesService {
597 rs := &GoogleAudiencesService{s: s}
598 return rs
599 }
600
601 type GoogleAudiencesService struct {
602 s *Service
603 }
604
605 func NewGuaranteedOrdersService(s *Service) *GuaranteedOrdersService {
606 rs := &GuaranteedOrdersService{s: s}
607 return rs
608 }
609
610 type GuaranteedOrdersService struct {
611 s *Service
612 }
613
614 func NewInventorySourceGroupsService(s *Service) *InventorySourceGroupsService {
615 rs := &InventorySourceGroupsService{s: s}
616 rs.AssignedInventorySources = NewInventorySourceGroupsAssignedInventorySourcesService(s)
617 return rs
618 }
619
620 type InventorySourceGroupsService struct {
621 s *Service
622
623 AssignedInventorySources *InventorySourceGroupsAssignedInventorySourcesService
624 }
625
626 func NewInventorySourceGroupsAssignedInventorySourcesService(s *Service) *InventorySourceGroupsAssignedInventorySourcesService {
627 rs := &InventorySourceGroupsAssignedInventorySourcesService{s: s}
628 return rs
629 }
630
631 type InventorySourceGroupsAssignedInventorySourcesService struct {
632 s *Service
633 }
634
635 func NewInventorySourcesService(s *Service) *InventorySourcesService {
636 rs := &InventorySourcesService{s: s}
637 return rs
638 }
639
640 type InventorySourcesService struct {
641 s *Service
642 }
643
644 func NewMediaService(s *Service) *MediaService {
645 rs := &MediaService{s: s}
646 return rs
647 }
648
649 type MediaService struct {
650 s *Service
651 }
652
653 func NewPartnersService(s *Service) *PartnersService {
654 rs := &PartnersService{s: s}
655 rs.Channels = NewPartnersChannelsService(s)
656 rs.TargetingTypes = NewPartnersTargetingTypesService(s)
657 return rs
658 }
659
660 type PartnersService struct {
661 s *Service
662
663 Channels *PartnersChannelsService
664
665 TargetingTypes *PartnersTargetingTypesService
666 }
667
668 func NewPartnersChannelsService(s *Service) *PartnersChannelsService {
669 rs := &PartnersChannelsService{s: s}
670 rs.Sites = NewPartnersChannelsSitesService(s)
671 return rs
672 }
673
674 type PartnersChannelsService struct {
675 s *Service
676
677 Sites *PartnersChannelsSitesService
678 }
679
680 func NewPartnersChannelsSitesService(s *Service) *PartnersChannelsSitesService {
681 rs := &PartnersChannelsSitesService{s: s}
682 return rs
683 }
684
685 type PartnersChannelsSitesService struct {
686 s *Service
687 }
688
689 func NewPartnersTargetingTypesService(s *Service) *PartnersTargetingTypesService {
690 rs := &PartnersTargetingTypesService{s: s}
691 rs.AssignedTargetingOptions = NewPartnersTargetingTypesAssignedTargetingOptionsService(s)
692 return rs
693 }
694
695 type PartnersTargetingTypesService struct {
696 s *Service
697
698 AssignedTargetingOptions *PartnersTargetingTypesAssignedTargetingOptionsService
699 }
700
701 func NewPartnersTargetingTypesAssignedTargetingOptionsService(s *Service) *PartnersTargetingTypesAssignedTargetingOptionsService {
702 rs := &PartnersTargetingTypesAssignedTargetingOptionsService{s: s}
703 return rs
704 }
705
706 type PartnersTargetingTypesAssignedTargetingOptionsService struct {
707 s *Service
708 }
709
710 func NewSdfdownloadtasksService(s *Service) *SdfdownloadtasksService {
711 rs := &SdfdownloadtasksService{s: s}
712 rs.Operations = NewSdfdownloadtasksOperationsService(s)
713 return rs
714 }
715
716 type SdfdownloadtasksService struct {
717 s *Service
718
719 Operations *SdfdownloadtasksOperationsService
720 }
721
722 func NewSdfdownloadtasksOperationsService(s *Service) *SdfdownloadtasksOperationsService {
723 rs := &SdfdownloadtasksOperationsService{s: s}
724 return rs
725 }
726
727 type SdfdownloadtasksOperationsService struct {
728 s *Service
729 }
730
731 func NewTargetingTypesService(s *Service) *TargetingTypesService {
732 rs := &TargetingTypesService{s: s}
733 rs.TargetingOptions = NewTargetingTypesTargetingOptionsService(s)
734 return rs
735 }
736
737 type TargetingTypesService struct {
738 s *Service
739
740 TargetingOptions *TargetingTypesTargetingOptionsService
741 }
742
743 func NewTargetingTypesTargetingOptionsService(s *Service) *TargetingTypesTargetingOptionsService {
744 rs := &TargetingTypesTargetingOptionsService{s: s}
745 return rs
746 }
747
748 type TargetingTypesTargetingOptionsService struct {
749 s *Service
750 }
751
752 func NewUsersService(s *Service) *UsersService {
753 rs := &UsersService{s: s}
754 return rs
755 }
756
757 type UsersService struct {
758 s *Service
759 }
760
761
762
763 type ActivateManualTriggerRequest struct {
764 }
765
766
767
768 type ActiveViewVideoViewabilityMetricConfig struct {
769
770 DisplayName string `json:"displayName,omitempty"`
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 MinimumDuration string `json:"minimumDuration,omitempty"`
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814 MinimumQuartile string `json:"minimumQuartile,omitempty"`
815
816
817
818
819
820
821
822
823
824
825
826 MinimumViewability string `json:"minimumViewability,omitempty"`
827
828
829
830
831
832
833
834
835 MinimumVolume string `json:"minimumVolume,omitempty"`
836
837
838
839
840
841 ForceSendFields []string `json:"-"`
842
843
844
845
846 NullFields []string `json:"-"`
847 }
848
849 func (s *ActiveViewVideoViewabilityMetricConfig) MarshalJSON() ([]byte, error) {
850 type NoMethod ActiveViewVideoViewabilityMetricConfig
851 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
852 }
853
854
855 type AdUrl struct {
856
857
858
859
860
861
862
863
864
865
866
867
868 Type string `json:"type,omitempty"`
869
870 Url string `json:"url,omitempty"`
871
872
873
874
875
876 ForceSendFields []string `json:"-"`
877
878
879
880
881 NullFields []string `json:"-"`
882 }
883
884 func (s *AdUrl) MarshalJSON() ([]byte, error) {
885 type NoMethod AdUrl
886 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
887 }
888
889
890 type Adloox struct {
891
892
893
894
895
896
897
898
899
900
901
902
903
904 ExcludedAdlooxCategories []string `json:"excludedAdlooxCategories,omitempty"`
905
906
907
908
909
910 ForceSendFields []string `json:"-"`
911
912
913
914
915 NullFields []string `json:"-"`
916 }
917
918 func (s *Adloox) MarshalJSON() ([]byte, error) {
919 type NoMethod Adloox
920 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
921 }
922
923
924 type Advertiser struct {
925
926
927 AdServerConfig *AdvertiserAdServerConfig `json:"adServerConfig,omitempty"`
928
929
930 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
931
932
933 BillingConfig *AdvertiserBillingConfig `json:"billingConfig,omitempty"`
934
935 CreativeConfig *AdvertiserCreativeConfig `json:"creativeConfig,omitempty"`
936
937 DataAccessConfig *AdvertiserDataAccessConfig `json:"dataAccessConfig,omitempty"`
938
939
940 DisplayName string `json:"displayName,omitempty"`
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961 EntityStatus string `json:"entityStatus,omitempty"`
962
963 GeneralConfig *AdvertiserGeneralConfig `json:"generalConfig,omitempty"`
964
965
966
967 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"`
968
969 Name string `json:"name,omitempty"`
970
971
972 PartnerId int64 `json:"partnerId,omitempty,string"`
973
974
975
976
977
978
979 PrismaEnabled bool `json:"prismaEnabled,omitempty"`
980
981 ServingConfig *AdvertiserTargetingConfig `json:"servingConfig,omitempty"`
982
983
984 UpdateTime string `json:"updateTime,omitempty"`
985
986
987 googleapi.ServerResponse `json:"-"`
988
989
990
991
992
993 ForceSendFields []string `json:"-"`
994
995
996
997
998 NullFields []string `json:"-"`
999 }
1000
1001 func (s *Advertiser) MarshalJSON() ([]byte, error) {
1002 type NoMethod Advertiser
1003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1004 }
1005
1006
1007 type AdvertiserAdServerConfig struct {
1008
1009
1010 CmHybridConfig *CmHybridConfig `json:"cmHybridConfig,omitempty"`
1011
1012
1013 ThirdPartyOnlyConfig *ThirdPartyOnlyConfig `json:"thirdPartyOnlyConfig,omitempty"`
1014
1015
1016
1017
1018
1019 ForceSendFields []string `json:"-"`
1020
1021
1022
1023
1024 NullFields []string `json:"-"`
1025 }
1026
1027 func (s *AdvertiserAdServerConfig) MarshalJSON() ([]byte, error) {
1028 type NoMethod AdvertiserAdServerConfig
1029 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1030 }
1031
1032
1033 type AdvertiserBillingConfig struct {
1034
1035
1036 BillingProfileId int64 `json:"billingProfileId,omitempty,string"`
1037
1038
1039
1040
1041
1042 ForceSendFields []string `json:"-"`
1043
1044
1045
1046
1047 NullFields []string `json:"-"`
1048 }
1049
1050 func (s *AdvertiserBillingConfig) MarshalJSON() ([]byte, error) {
1051 type NoMethod AdvertiserBillingConfig
1052 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1053 }
1054
1055
1056 type AdvertiserCreativeConfig struct {
1057
1058
1059 DynamicCreativeEnabled bool `json:"dynamicCreativeEnabled,omitempty"`
1060
1061
1062
1063 IasClientId int64 `json:"iasClientId,omitempty,string"`
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082 ObaComplianceDisabled bool `json:"obaComplianceDisabled,omitempty"`
1083
1084
1085
1086
1087
1088 VideoCreativeDataSharingAuthorized bool `json:"videoCreativeDataSharingAuthorized,omitempty"`
1089
1090
1091
1092
1093
1094 ForceSendFields []string `json:"-"`
1095
1096
1097
1098
1099 NullFields []string `json:"-"`
1100 }
1101
1102 func (s *AdvertiserCreativeConfig) MarshalJSON() ([]byte, error) {
1103 type NoMethod AdvertiserCreativeConfig
1104 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1105 }
1106
1107
1108
1109 type AdvertiserDataAccessConfig struct {
1110
1111
1112 SdfConfig *AdvertiserSdfConfig `json:"sdfConfig,omitempty"`
1113
1114
1115
1116
1117
1118 ForceSendFields []string `json:"-"`
1119
1120
1121
1122
1123 NullFields []string `json:"-"`
1124 }
1125
1126 func (s *AdvertiserDataAccessConfig) MarshalJSON() ([]byte, error) {
1127 type NoMethod AdvertiserDataAccessConfig
1128 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1129 }
1130
1131
1132 type AdvertiserGeneralConfig struct {
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147 CurrencyCode string `json:"currencyCode,omitempty"`
1148
1149
1150
1151
1152
1153 DomainUrl string `json:"domainUrl,omitempty"`
1154
1155
1156
1157
1158
1159
1160 TimeZone string `json:"timeZone,omitempty"`
1161
1162
1163
1164
1165
1166 ForceSendFields []string `json:"-"`
1167
1168
1169
1170
1171 NullFields []string `json:"-"`
1172 }
1173
1174 func (s *AdvertiserGeneralConfig) MarshalJSON() ([]byte, error) {
1175 type NoMethod AdvertiserGeneralConfig
1176 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1177 }
1178
1179
1180 type AdvertiserSdfConfig struct {
1181
1182
1183
1184
1185
1186 OverridePartnerSdfConfig bool `json:"overridePartnerSdfConfig,omitempty"`
1187
1188
1189
1190 SdfConfig *SdfConfig `json:"sdfConfig,omitempty"`
1191
1192
1193
1194
1195
1196 ForceSendFields []string `json:"-"`
1197
1198
1199
1200
1201 NullFields []string `json:"-"`
1202 }
1203
1204 func (s *AdvertiserSdfConfig) MarshalJSON() ([]byte, error) {
1205 type NoMethod AdvertiserSdfConfig
1206 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1207 }
1208
1209
1210
1211 type AdvertiserTargetingConfig struct {
1212
1213
1214
1215 ExemptTvFromViewabilityTargeting bool `json:"exemptTvFromViewabilityTargeting,omitempty"`
1216
1217
1218
1219
1220
1221
1222 ForceSendFields []string `json:"-"`
1223
1224
1225
1226
1227
1228 NullFields []string `json:"-"`
1229 }
1230
1231 func (s *AdvertiserTargetingConfig) MarshalJSON() ([]byte, error) {
1232 type NoMethod AdvertiserTargetingConfig
1233 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1234 }
1235
1236
1237
1238
1239 type AgeRangeAssignedTargetingOptionDetails struct {
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277 AgeRange string `json:"ageRange,omitempty"`
1278
1279
1280
1281
1282
1283 ForceSendFields []string `json:"-"`
1284
1285
1286
1287
1288 NullFields []string `json:"-"`
1289 }
1290
1291 func (s *AgeRangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
1292 type NoMethod AgeRangeAssignedTargetingOptionDetails
1293 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1294 }
1295
1296
1297
1298
1299 type AgeRangeTargetingOptionDetails struct {
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333 AgeRange string `json:"ageRange,omitempty"`
1334
1335
1336
1337
1338
1339 ForceSendFields []string `json:"-"`
1340
1341
1342
1343
1344 NullFields []string `json:"-"`
1345 }
1346
1347 func (s *AgeRangeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
1348 type NoMethod AgeRangeTargetingOptionDetails
1349 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1350 }
1351
1352
1353
1354
1355 type AppAssignedTargetingOptionDetails struct {
1356
1357
1358
1359 AppId string `json:"appId,omitempty"`
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381 AppPlatform string `json:"appPlatform,omitempty"`
1382
1383 DisplayName string `json:"displayName,omitempty"`
1384
1385 Negative bool `json:"negative,omitempty"`
1386
1387
1388
1389
1390
1391 ForceSendFields []string `json:"-"`
1392
1393
1394
1395
1396 NullFields []string `json:"-"`
1397 }
1398
1399 func (s *AppAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
1400 type NoMethod AppAssignedTargetingOptionDetails
1401 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1402 }
1403
1404
1405
1406
1407
1408 type AppCategoryAssignedTargetingOptionDetails struct {
1409
1410 DisplayName string `json:"displayName,omitempty"`
1411
1412 Negative bool `json:"negative,omitempty"`
1413
1414
1415 TargetingOptionId string `json:"targetingOptionId,omitempty"`
1416
1417
1418
1419
1420
1421 ForceSendFields []string `json:"-"`
1422
1423
1424
1425
1426 NullFields []string `json:"-"`
1427 }
1428
1429 func (s *AppCategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
1430 type NoMethod AppCategoryAssignedTargetingOptionDetails
1431 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1432 }
1433
1434
1435
1436
1437
1438
1439 type AppCategoryTargetingOptionDetails struct {
1440
1441 DisplayName string `json:"displayName,omitempty"`
1442
1443
1444
1445
1446
1447 ForceSendFields []string `json:"-"`
1448
1449
1450
1451
1452 NullFields []string `json:"-"`
1453 }
1454
1455 func (s *AppCategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) {
1456 type NoMethod AppCategoryTargetingOptionDetails
1457 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1458 }
1459
1460
1461 type Asset struct {
1462
1463
1464 Content string `json:"content,omitempty"`
1465
1466
1467
1468
1469
1470
1471 MediaId int64 `json:"mediaId,omitempty,string"`
1472
1473
1474
1475
1476
1477 ForceSendFields []string `json:"-"`
1478
1479
1480
1481
1482 NullFields []string `json:"-"`
1483 }
1484
1485 func (s *Asset) MarshalJSON() ([]byte, error) {
1486 type NoMethod Asset
1487 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1488 }
1489
1490
1491 type AssetAssociation struct {
1492
1493 Asset *Asset `json:"asset,omitempty"`
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565 Role string `json:"role,omitempty"`
1566
1567
1568
1569
1570
1571 ForceSendFields []string `json:"-"`
1572
1573
1574
1575
1576 NullFields []string `json:"-"`
1577 }
1578
1579 func (s *AssetAssociation) MarshalJSON() ([]byte, error) {
1580 type NoMethod AssetAssociation
1581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1582 }
1583
1584
1585
1586 type AssignedInventorySource struct {
1587
1588
1589
1590 AssignedInventorySourceId int64 `json:"assignedInventorySourceId,omitempty,string"`
1591
1592
1593 InventorySourceId string `json:"inventorySourceId,omitempty"`
1594
1595 Name string `json:"name,omitempty"`
1596
1597
1598 googleapi.ServerResponse `json:"-"`
1599
1600
1601
1602
1603
1604 ForceSendFields []string `json:"-"`
1605
1606
1607
1608
1609 NullFields []string `json:"-"`
1610 }
1611
1612 func (s *AssignedInventorySource) MarshalJSON() ([]byte, error) {
1613 type NoMethod AssignedInventorySource
1614 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1615 }
1616
1617
1618
1619 type AssignedLocation struct {
1620
1621
1622
1623 AssignedLocationId int64 `json:"assignedLocationId,omitempty,string"`
1624
1625 Name string `json:"name,omitempty"`
1626
1627
1628 TargetingOptionId string `json:"targetingOptionId,omitempty"`
1629
1630
1631 googleapi.ServerResponse `json:"-"`
1632
1633
1634
1635
1636
1637 ForceSendFields []string `json:"-"`
1638
1639
1640
1641
1642 NullFields []string `json:"-"`
1643 }
1644
1645 func (s *AssignedLocation) MarshalJSON() ([]byte, error) {
1646 type NoMethod AssignedLocation
1647 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1648 }
1649
1650
1651
1652 type AssignedTargetingOption struct {
1653
1654
1655 AgeRangeDetails *AgeRangeAssignedTargetingOptionDetails `json:"ageRangeDetails,omitempty"`
1656
1657
1658 AppCategoryDetails *AppCategoryAssignedTargetingOptionDetails `json:"appCategoryDetails,omitempty"`
1659
1660
1661 AppDetails *AppAssignedTargetingOptionDetails `json:"appDetails,omitempty"`
1662
1663
1664
1665 AssignedTargetingOptionId string `json:"assignedTargetingOptionId,omitempty"`
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682 AssignedTargetingOptionIdAlias string `json:"assignedTargetingOptionIdAlias,omitempty"`
1683
1684
1685
1686 AudienceGroupDetails *AudienceGroupAssignedTargetingOptionDetails `json:"audienceGroupDetails,omitempty"`
1687
1688
1689 AudioContentTypeDetails *AudioContentTypeAssignedTargetingOptionDetails `json:"audioContentTypeDetails,omitempty"`
1690
1691
1692
1693
1694
1695
1696 AuthorizedSellerStatusDetails *AuthorizedSellerStatusAssignedTargetingOptionDetails `json:"authorizedSellerStatusDetails,omitempty"`
1697
1698
1699 BrowserDetails *BrowserAssignedTargetingOptionDetails `json:"browserDetails,omitempty"`
1700
1701
1702 BusinessChainDetails *BusinessChainAssignedTargetingOptionDetails `json:"businessChainDetails,omitempty"`
1703
1704
1705 CarrierAndIspDetails *CarrierAndIspAssignedTargetingOptionDetails `json:"carrierAndIspDetails,omitempty"`
1706
1707
1708
1709
1710 CategoryDetails *CategoryAssignedTargetingOptionDetails `json:"categoryDetails,omitempty"`
1711
1712
1713 ChannelDetails *ChannelAssignedTargetingOptionDetails `json:"channelDetails,omitempty"`
1714
1715
1716 ContentDurationDetails *ContentDurationAssignedTargetingOptionDetails `json:"contentDurationDetails,omitempty"`
1717
1718
1719 ContentGenreDetails *ContentGenreAssignedTargetingOptionDetails `json:"contentGenreDetails,omitempty"`
1720
1721
1722
1723 ContentInstreamPositionDetails *ContentInstreamPositionAssignedTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"`
1724
1725
1726
1727 ContentOutstreamPositionDetails *ContentOutstreamPositionAssignedTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"`
1728
1729
1730 ContentStreamTypeDetails *ContentStreamTypeAssignedTargetingOptionDetails `json:"contentStreamTypeDetails,omitempty"`
1731
1732
1733 DayAndTimeDetails *DayAndTimeAssignedTargetingOptionDetails `json:"dayAndTimeDetails,omitempty"`
1734
1735
1736 DeviceMakeModelDetails *DeviceMakeModelAssignedTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"`
1737
1738
1739 DeviceTypeDetails *DeviceTypeAssignedTargetingOptionDetails `json:"deviceTypeDetails,omitempty"`
1740
1741
1742
1743
1744
1745
1746
1747
1748 DigitalContentLabelExclusionDetails *DigitalContentLabelAssignedTargetingOptionDetails `json:"digitalContentLabelExclusionDetails,omitempty"`
1749
1750
1751 EnvironmentDetails *EnvironmentAssignedTargetingOptionDetails `json:"environmentDetails,omitempty"`
1752
1753
1754 ExchangeDetails *ExchangeAssignedTargetingOptionDetails `json:"exchangeDetails,omitempty"`
1755
1756
1757 GenderDetails *GenderAssignedTargetingOptionDetails `json:"genderDetails,omitempty"`
1758
1759
1760 GeoRegionDetails *GeoRegionAssignedTargetingOptionDetails `json:"geoRegionDetails,omitempty"`
1761
1762
1763 HouseholdIncomeDetails *HouseholdIncomeAssignedTargetingOptionDetails `json:"householdIncomeDetails,omitempty"`
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775 Inheritance string `json:"inheritance,omitempty"`
1776
1777
1778 InventorySourceDetails *InventorySourceAssignedTargetingOptionDetails `json:"inventorySourceDetails,omitempty"`
1779
1780
1781
1782 InventorySourceGroupDetails *InventorySourceGroupAssignedTargetingOptionDetails `json:"inventorySourceGroupDetails,omitempty"`
1783
1784
1785
1786
1787 KeywordDetails *KeywordAssignedTargetingOptionDetails `json:"keywordDetails,omitempty"`
1788
1789
1790 LanguageDetails *LanguageAssignedTargetingOptionDetails `json:"languageDetails,omitempty"`
1791
1792 Name string `json:"name,omitempty"`
1793
1794
1795
1796 NativeContentPositionDetails *NativeContentPositionAssignedTargetingOptionDetails `json:"nativeContentPositionDetails,omitempty"`
1797
1798
1799
1800 NegativeKeywordListDetails *NegativeKeywordListAssignedTargetingOptionDetails `json:"negativeKeywordListDetails,omitempty"`
1801
1802
1803 OmidDetails *OmidAssignedTargetingOptionDetails `json:"omidDetails,omitempty"`
1804
1805
1806 OnScreenPositionDetails *OnScreenPositionAssignedTargetingOptionDetails `json:"onScreenPositionDetails,omitempty"`
1807
1808
1809 OperatingSystemDetails *OperatingSystemAssignedTargetingOptionDetails `json:"operatingSystemDetails,omitempty"`
1810
1811
1812 ParentalStatusDetails *ParentalStatusAssignedTargetingOptionDetails `json:"parentalStatusDetails,omitempty"`
1813
1814
1815 PoiDetails *PoiAssignedTargetingOptionDetails `json:"poiDetails,omitempty"`
1816
1817
1818
1819 ProximityLocationListDetails *ProximityLocationListAssignedTargetingOptionDetails `json:"proximityLocationListDetails,omitempty"`
1820
1821
1822
1823 RegionalLocationListDetails *RegionalLocationListAssignedTargetingOptionDetails `json:"regionalLocationListDetails,omitempty"`
1824
1825
1826
1827
1828
1829
1830
1831 SensitiveCategoryExclusionDetails *SensitiveCategoryAssignedTargetingOptionDetails `json:"sensitiveCategoryExclusionDetails,omitempty"`
1832
1833
1834 SessionPositionDetails *SessionPositionAssignedTargetingOptionDetails `json:"sessionPositionDetails,omitempty"`
1835
1836
1837 SubExchangeDetails *SubExchangeAssignedTargetingOptionDetails `json:"subExchangeDetails,omitempty"`
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948 TargetingType string `json:"targetingType,omitempty"`
1949
1950
1951
1952 ThirdPartyVerifierDetails *ThirdPartyVerifierAssignedTargetingOptionDetails `json:"thirdPartyVerifierDetails,omitempty"`
1953
1954
1955 UrlDetails *UrlAssignedTargetingOptionDetails `json:"urlDetails,omitempty"`
1956
1957
1958
1959 UserRewardedContentDetails *UserRewardedContentAssignedTargetingOptionDetails `json:"userRewardedContentDetails,omitempty"`
1960
1961
1962 VideoPlayerSizeDetails *VideoPlayerSizeAssignedTargetingOptionDetails `json:"videoPlayerSizeDetails,omitempty"`
1963
1964
1965
1966 ViewabilityDetails *ViewabilityAssignedTargetingOptionDetails `json:"viewabilityDetails,omitempty"`
1967
1968
1969 YoutubeChannelDetails *YoutubeChannelAssignedTargetingOptionDetails `json:"youtubeChannelDetails,omitempty"`
1970
1971
1972 YoutubeVideoDetails *YoutubeVideoAssignedTargetingOptionDetails `json:"youtubeVideoDetails,omitempty"`
1973
1974
1975 googleapi.ServerResponse `json:"-"`
1976
1977
1978
1979
1980
1981 ForceSendFields []string `json:"-"`
1982
1983
1984
1985
1986 NullFields []string `json:"-"`
1987 }
1988
1989 func (s *AssignedTargetingOption) MarshalJSON() ([]byte, error) {
1990 type NoMethod AssignedTargetingOption
1991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1992 }
1993
1994
1995
1996 type AssignedUserRole struct {
1997
1998
1999 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2000
2001 AssignedUserRoleId string `json:"assignedUserRoleId,omitempty"`
2002
2003 PartnerId int64 `json:"partnerId,omitempty,string"`
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045 UserRole string `json:"userRole,omitempty"`
2046
2047
2048
2049
2050
2051 ForceSendFields []string `json:"-"`
2052
2053
2054
2055
2056 NullFields []string `json:"-"`
2057 }
2058
2059 func (s *AssignedUserRole) MarshalJSON() ([]byte, error) {
2060 type NoMethod AssignedUserRole
2061 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2062 }
2063
2064
2065
2066
2067
2068
2069
2070
2071 type AudienceGroupAssignedTargetingOptionDetails struct {
2072
2073
2074
2075
2076
2077 ExcludedFirstAndThirdPartyAudienceGroup *FirstAndThirdPartyAudienceGroup `json:"excludedFirstAndThirdPartyAudienceGroup,omitempty"`
2078
2079
2080
2081
2082
2083
2084 ExcludedGoogleAudienceGroup *GoogleAudienceGroup `json:"excludedGoogleAudienceGroup,omitempty"`
2085
2086
2087 IncludedCombinedAudienceGroup *CombinedAudienceGroup `json:"includedCombinedAudienceGroup,omitempty"`
2088
2089
2090 IncludedCustomListGroup *CustomListGroup `json:"includedCustomListGroup,omitempty"`
2091
2092
2093
2094
2095
2096
2097 IncludedFirstAndThirdPartyAudienceGroups []*FirstAndThirdPartyAudienceGroup `json:"includedFirstAndThirdPartyAudienceGroups,omitempty"`
2098
2099
2100 IncludedGoogleAudienceGroup *GoogleAudienceGroup `json:"includedGoogleAudienceGroup,omitempty"`
2101
2102
2103
2104
2105
2106
2107 ForceSendFields []string `json:"-"`
2108
2109
2110
2111
2112
2113 NullFields []string `json:"-"`
2114 }
2115
2116 func (s *AudienceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2117 type NoMethod AudienceGroupAssignedTargetingOptionDetails
2118 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2119 }
2120
2121
2122 type AudioAd struct {
2123
2124 DisplayUrl string `json:"displayUrl,omitempty"`
2125
2126
2127 FinalUrl string `json:"finalUrl,omitempty"`
2128
2129 TrackingUrl string `json:"trackingUrl,omitempty"`
2130
2131 Video *YoutubeVideoDetails `json:"video,omitempty"`
2132
2133
2134
2135
2136
2137 ForceSendFields []string `json:"-"`
2138
2139
2140
2141
2142 NullFields []string `json:"-"`
2143 }
2144
2145 func (s *AudioAd) MarshalJSON() ([]byte, error) {
2146 type NoMethod AudioAd
2147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2148 }
2149
2150
2151
2152
2153
2154
2155
2156 type AudioContentTypeAssignedTargetingOptionDetails struct {
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167 AudioContentType string `json:"audioContentType,omitempty"`
2168
2169
2170
2171
2172
2173 ForceSendFields []string `json:"-"`
2174
2175
2176
2177
2178 NullFields []string `json:"-"`
2179 }
2180
2181 func (s *AudioContentTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2182 type NoMethod AudioContentTypeAssignedTargetingOptionDetails
2183 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2184 }
2185
2186
2187
2188
2189 type AudioContentTypeTargetingOptionDetails struct {
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200 AudioContentType string `json:"audioContentType,omitempty"`
2201
2202
2203
2204
2205
2206 ForceSendFields []string `json:"-"`
2207
2208
2209
2210
2211 NullFields []string `json:"-"`
2212 }
2213
2214 func (s *AudioContentTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2215 type NoMethod AudioContentTypeTargetingOptionDetails
2216 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2217 }
2218
2219
2220 type AudioVideoOffset struct {
2221
2222 Percentage int64 `json:"percentage,omitempty,string"`
2223
2224 Seconds int64 `json:"seconds,omitempty,string"`
2225
2226
2227
2228
2229
2230 ForceSendFields []string `json:"-"`
2231
2232
2233
2234
2235 NullFields []string `json:"-"`
2236 }
2237
2238 func (s *AudioVideoOffset) MarshalJSON() ([]byte, error) {
2239 type NoMethod AudioVideoOffset
2240 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2241 }
2242
2243
2244
2245 type AuditAdvertiserResponse struct {
2246
2247
2248
2249
2250
2251
2252
2253
2254 AdGroupCriteriaCount int64 `json:"adGroupCriteriaCount,omitempty,string"`
2255
2256
2257
2258
2259
2260
2261
2262
2263 CampaignCriteriaCount int64 `json:"campaignCriteriaCount,omitempty,string"`
2264
2265
2266 ChannelsCount int64 `json:"channelsCount,omitempty,string"`
2267
2268
2269
2270 NegativeKeywordListsCount int64 `json:"negativeKeywordListsCount,omitempty,string"`
2271
2272
2273
2274 NegativelyTargetedChannelsCount int64 `json:"negativelyTargetedChannelsCount,omitempty,string"`
2275
2276
2277
2278 UsedCampaignsCount int64 `json:"usedCampaignsCount,omitempty,string"`
2279
2280
2281
2282 UsedInsertionOrdersCount int64 `json:"usedInsertionOrdersCount,omitempty,string"`
2283
2284
2285
2286 UsedLineItemsCount int64 `json:"usedLineItemsCount,omitempty,string"`
2287
2288
2289 googleapi.ServerResponse `json:"-"`
2290
2291
2292
2293
2294
2295 ForceSendFields []string `json:"-"`
2296
2297
2298
2299
2300 NullFields []string `json:"-"`
2301 }
2302
2303 func (s *AuditAdvertiserResponse) MarshalJSON() ([]byte, error) {
2304 type NoMethod AuditAdvertiserResponse
2305 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2306 }
2307
2308
2309
2310
2311
2312
2313
2314 type AuthorizedSellerStatusAssignedTargetingOptionDetails struct {
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331 AuthorizedSellerStatus string `json:"authorizedSellerStatus,omitempty"`
2332
2333
2334 TargetingOptionId string `json:"targetingOptionId,omitempty"`
2335
2336
2337
2338
2339
2340 ForceSendFields []string `json:"-"`
2341
2342
2343
2344
2345 NullFields []string `json:"-"`
2346 }
2347
2348 func (s *AuthorizedSellerStatusAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2349 type NoMethod AuthorizedSellerStatusAssignedTargetingOptionDetails
2350 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2351 }
2352
2353
2354
2355
2356
2357 type AuthorizedSellerStatusTargetingOptionDetails struct {
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374 AuthorizedSellerStatus string `json:"authorizedSellerStatus,omitempty"`
2375
2376
2377
2378
2379
2380 ForceSendFields []string `json:"-"`
2381
2382
2383
2384
2385 NullFields []string `json:"-"`
2386 }
2387
2388 func (s *AuthorizedSellerStatusTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2389 type NoMethod AuthorizedSellerStatusTargetingOptionDetails
2390 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2391 }
2392
2393
2394
2395 type BiddingStrategy struct {
2396
2397 FixedBid *FixedBidStrategy `json:"fixedBid,omitempty"`
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412 MaximizeSpendAutoBid *MaximizeSpendBidStrategy `json:"maximizeSpendAutoBid,omitempty"`
2413
2414
2415
2416 PerformanceGoalAutoBid *PerformanceGoalBidStrategy `json:"performanceGoalAutoBid,omitempty"`
2417
2418
2419
2420
2421
2422 ForceSendFields []string `json:"-"`
2423
2424
2425
2426
2427 NullFields []string `json:"-"`
2428 }
2429
2430 func (s *BiddingStrategy) MarshalJSON() ([]byte, error) {
2431 type NoMethod BiddingStrategy
2432 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2433 }
2434
2435
2436
2437
2438 type BrowserAssignedTargetingOptionDetails struct {
2439
2440 DisplayName string `json:"displayName,omitempty"`
2441
2442
2443
2444 Negative bool `json:"negative,omitempty"`
2445
2446
2447 TargetingOptionId string `json:"targetingOptionId,omitempty"`
2448
2449
2450
2451
2452
2453 ForceSendFields []string `json:"-"`
2454
2455
2456
2457
2458 NullFields []string `json:"-"`
2459 }
2460
2461 func (s *BrowserAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2462 type NoMethod BrowserAssignedTargetingOptionDetails
2463 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2464 }
2465
2466
2467
2468
2469 type BrowserTargetingOptionDetails struct {
2470
2471 DisplayName string `json:"displayName,omitempty"`
2472
2473
2474
2475
2476
2477 ForceSendFields []string `json:"-"`
2478
2479
2480
2481
2482 NullFields []string `json:"-"`
2483 }
2484
2485 func (s *BrowserTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2486 type NoMethod BrowserTargetingOptionDetails
2487 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2488 }
2489
2490
2491 type BudgetSummary struct {
2492
2493
2494
2495 ExternalBudgetId string `json:"externalBudgetId,omitempty"`
2496
2497
2498
2499 PreTaxAmountMicros int64 `json:"preTaxAmountMicros,omitempty,string"`
2500
2501
2502
2503 PrismaCpeCode *PrismaCpeCode `json:"prismaCpeCode,omitempty"`
2504
2505
2506
2507 TaxAmountMicros int64 `json:"taxAmountMicros,omitempty,string"`
2508
2509
2510
2511 TotalAmountMicros int64 `json:"totalAmountMicros,omitempty,string"`
2512
2513
2514
2515
2516
2517 ForceSendFields []string `json:"-"`
2518
2519
2520
2521
2522 NullFields []string `json:"-"`
2523 }
2524
2525 func (s *BudgetSummary) MarshalJSON() ([]byte, error) {
2526 type NoMethod BudgetSummary
2527 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2528 }
2529
2530
2531
2532 type BulkEditAdvertiserAssignedTargetingOptionsRequest struct {
2533
2534
2535
2536
2537
2538 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"`
2539
2540
2541
2542
2543
2544 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"`
2545
2546
2547
2548
2549
2550 ForceSendFields []string `json:"-"`
2551
2552
2553
2554
2555 NullFields []string `json:"-"`
2556 }
2557
2558 func (s *BulkEditAdvertiserAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
2559 type NoMethod BulkEditAdvertiserAssignedTargetingOptionsRequest
2560 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2561 }
2562
2563 type BulkEditAdvertiserAssignedTargetingOptionsResponse struct {
2564
2565
2566 CreatedAssignedTargetingOptions []*AssignedTargetingOption `json:"createdAssignedTargetingOptions,omitempty"`
2567
2568
2569 googleapi.ServerResponse `json:"-"`
2570
2571
2572
2573
2574
2575
2576 ForceSendFields []string `json:"-"`
2577
2578
2579
2580
2581 NullFields []string `json:"-"`
2582 }
2583
2584 func (s *BulkEditAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
2585 type NoMethod BulkEditAdvertiserAssignedTargetingOptionsResponse
2586 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2587 }
2588
2589
2590
2591 type BulkEditAssignedInventorySourcesRequest struct {
2592
2593
2594
2595 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2596
2597
2598 CreatedAssignedInventorySources []*AssignedInventorySource `json:"createdAssignedInventorySources,omitempty"`
2599
2600
2601 DeletedAssignedInventorySources googleapi.Int64s `json:"deletedAssignedInventorySources,omitempty"`
2602
2603
2604 PartnerId int64 `json:"partnerId,omitempty,string"`
2605
2606
2607
2608
2609
2610 ForceSendFields []string `json:"-"`
2611
2612
2613
2614
2615 NullFields []string `json:"-"`
2616 }
2617
2618 func (s *BulkEditAssignedInventorySourcesRequest) MarshalJSON() ([]byte, error) {
2619 type NoMethod BulkEditAssignedInventorySourcesRequest
2620 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2621 }
2622
2623
2624
2625 type BulkEditAssignedInventorySourcesResponse struct {
2626
2627
2628 AssignedInventorySources []*AssignedInventorySource `json:"assignedInventorySources,omitempty"`
2629
2630
2631 googleapi.ServerResponse `json:"-"`
2632
2633
2634
2635
2636
2637 ForceSendFields []string `json:"-"`
2638
2639
2640
2641
2642 NullFields []string `json:"-"`
2643 }
2644
2645 func (s *BulkEditAssignedInventorySourcesResponse) MarshalJSON() ([]byte, error) {
2646 type NoMethod BulkEditAssignedInventorySourcesResponse
2647 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2648 }
2649
2650
2651
2652 type BulkEditAssignedLocationsRequest struct {
2653
2654
2655 CreatedAssignedLocations []*AssignedLocation `json:"createdAssignedLocations,omitempty"`
2656
2657
2658 DeletedAssignedLocations googleapi.Int64s `json:"deletedAssignedLocations,omitempty"`
2659
2660
2661
2662
2663
2664 ForceSendFields []string `json:"-"`
2665
2666
2667
2668
2669 NullFields []string `json:"-"`
2670 }
2671
2672 func (s *BulkEditAssignedLocationsRequest) MarshalJSON() ([]byte, error) {
2673 type NoMethod BulkEditAssignedLocationsRequest
2674 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2675 }
2676
2677 type BulkEditAssignedLocationsResponse struct {
2678
2679
2680 AssignedLocations []*AssignedLocation `json:"assignedLocations,omitempty"`
2681
2682
2683 googleapi.ServerResponse `json:"-"`
2684
2685
2686
2687
2688
2689 ForceSendFields []string `json:"-"`
2690
2691
2692
2693
2694 NullFields []string `json:"-"`
2695 }
2696
2697 func (s *BulkEditAssignedLocationsResponse) MarshalJSON() ([]byte, error) {
2698 type NoMethod BulkEditAssignedLocationsResponse
2699 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2700 }
2701
2702
2703
2704 type BulkEditAssignedTargetingOptionsRequest struct {
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"`
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"`
2763
2764
2765 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"`
2766
2767
2768
2769
2770
2771 ForceSendFields []string `json:"-"`
2772
2773
2774
2775
2776 NullFields []string `json:"-"`
2777 }
2778
2779 func (s *BulkEditAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
2780 type NoMethod BulkEditAssignedTargetingOptionsRequest
2781 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2782 }
2783
2784 type BulkEditAssignedTargetingOptionsResponse struct {
2785
2786 Errors []*Status `json:"errors,omitempty"`
2787
2788 FailedLineItemIds googleapi.Int64s `json:"failedLineItemIds,omitempty"`
2789
2790
2791 UpdatedLineItemIds googleapi.Int64s `json:"updatedLineItemIds,omitempty"`
2792
2793
2794 googleapi.ServerResponse `json:"-"`
2795
2796
2797
2798
2799
2800 ForceSendFields []string `json:"-"`
2801
2802
2803
2804
2805 NullFields []string `json:"-"`
2806 }
2807
2808 func (s *BulkEditAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
2809 type NoMethod BulkEditAssignedTargetingOptionsResponse
2810 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2811 }
2812
2813
2814
2815 type BulkEditAssignedUserRolesRequest struct {
2816
2817
2818 CreatedAssignedUserRoles []*AssignedUserRole `json:"createdAssignedUserRoles,omitempty"`
2819
2820
2821
2822 DeletedAssignedUserRoles []string `json:"deletedAssignedUserRoles,omitempty"`
2823
2824
2825
2826
2827
2828 ForceSendFields []string `json:"-"`
2829
2830
2831
2832
2833 NullFields []string `json:"-"`
2834 }
2835
2836 func (s *BulkEditAssignedUserRolesRequest) MarshalJSON() ([]byte, error) {
2837 type NoMethod BulkEditAssignedUserRolesRequest
2838 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2839 }
2840
2841 type BulkEditAssignedUserRolesResponse struct {
2842
2843
2844 CreatedAssignedUserRoles []*AssignedUserRole `json:"createdAssignedUserRoles,omitempty"`
2845
2846
2847 googleapi.ServerResponse `json:"-"`
2848
2849
2850
2851
2852
2853 ForceSendFields []string `json:"-"`
2854
2855
2856
2857
2858 NullFields []string `json:"-"`
2859 }
2860
2861 func (s *BulkEditAssignedUserRolesResponse) MarshalJSON() ([]byte, error) {
2862 type NoMethod BulkEditAssignedUserRolesResponse
2863 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2864 }
2865
2866
2867
2868 type BulkEditNegativeKeywordsRequest struct {
2869
2870
2871 CreatedNegativeKeywords []*NegativeKeyword `json:"createdNegativeKeywords,omitempty"`
2872
2873
2874 DeletedNegativeKeywords []string `json:"deletedNegativeKeywords,omitempty"`
2875
2876
2877
2878
2879
2880 ForceSendFields []string `json:"-"`
2881
2882
2883
2884
2885 NullFields []string `json:"-"`
2886 }
2887
2888 func (s *BulkEditNegativeKeywordsRequest) MarshalJSON() ([]byte, error) {
2889 type NoMethod BulkEditNegativeKeywordsRequest
2890 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2891 }
2892
2893
2894
2895 type BulkEditNegativeKeywordsResponse struct {
2896
2897
2898 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"`
2899
2900
2901 googleapi.ServerResponse `json:"-"`
2902
2903
2904
2905
2906
2907 ForceSendFields []string `json:"-"`
2908
2909
2910
2911
2912 NullFields []string `json:"-"`
2913 }
2914
2915 func (s *BulkEditNegativeKeywordsResponse) MarshalJSON() ([]byte, error) {
2916 type NoMethod BulkEditNegativeKeywordsResponse
2917 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2918 }
2919
2920
2921
2922 type BulkEditPartnerAssignedTargetingOptionsRequest struct {
2923
2924
2925
2926 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"`
2927
2928
2929
2930 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"`
2931
2932
2933
2934
2935
2936 ForceSendFields []string `json:"-"`
2937
2938
2939
2940
2941 NullFields []string `json:"-"`
2942 }
2943
2944 func (s *BulkEditPartnerAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
2945 type NoMethod BulkEditPartnerAssignedTargetingOptionsRequest
2946 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2947 }
2948
2949 type BulkEditPartnerAssignedTargetingOptionsResponse struct {
2950
2951
2952 CreatedAssignedTargetingOptions []*AssignedTargetingOption `json:"createdAssignedTargetingOptions,omitempty"`
2953
2954
2955 googleapi.ServerResponse `json:"-"`
2956
2957
2958
2959
2960
2961
2962 ForceSendFields []string `json:"-"`
2963
2964
2965
2966
2967 NullFields []string `json:"-"`
2968 }
2969
2970 func (s *BulkEditPartnerAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
2971 type NoMethod BulkEditPartnerAssignedTargetingOptionsResponse
2972 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2973 }
2974
2975
2976 type BulkEditSitesRequest struct {
2977
2978 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2979
2980 CreatedSites []*Site `json:"createdSites,omitempty"`
2981
2982
2983 DeletedSites []string `json:"deletedSites,omitempty"`
2984
2985 PartnerId int64 `json:"partnerId,omitempty,string"`
2986
2987
2988
2989
2990
2991 ForceSendFields []string `json:"-"`
2992
2993
2994
2995
2996 NullFields []string `json:"-"`
2997 }
2998
2999 func (s *BulkEditSitesRequest) MarshalJSON() ([]byte, error) {
3000 type NoMethod BulkEditSitesRequest
3001 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3002 }
3003
3004
3005 type BulkEditSitesResponse struct {
3006
3007
3008 Sites []*Site `json:"sites,omitempty"`
3009
3010
3011 googleapi.ServerResponse `json:"-"`
3012
3013
3014
3015
3016
3017 ForceSendFields []string `json:"-"`
3018
3019
3020
3021
3022 NullFields []string `json:"-"`
3023 }
3024
3025 func (s *BulkEditSitesResponse) MarshalJSON() ([]byte, error) {
3026 type NoMethod BulkEditSitesResponse
3027 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3028 }
3029
3030 type BulkListAdGroupAssignedTargetingOptionsResponse struct {
3031
3032
3033
3034
3035
3036 NextPageToken string `json:"nextPageToken,omitempty"`
3037
3038
3039
3040 YoutubeAdGroupAssignedTargetingOptions []*YoutubeAdGroupAssignedTargetingOption `json:"youtubeAdGroupAssignedTargetingOptions,omitempty"`
3041
3042
3043 googleapi.ServerResponse `json:"-"`
3044
3045
3046
3047
3048
3049 ForceSendFields []string `json:"-"`
3050
3051
3052
3053
3054 NullFields []string `json:"-"`
3055 }
3056
3057 func (s *BulkListAdGroupAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3058 type NoMethod BulkListAdGroupAssignedTargetingOptionsResponse
3059 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3060 }
3061
3062 type BulkListAdvertiserAssignedTargetingOptionsResponse struct {
3063
3064
3065 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
3066
3067
3068
3069
3070
3071 NextPageToken string `json:"nextPageToken,omitempty"`
3072
3073
3074 googleapi.ServerResponse `json:"-"`
3075
3076
3077
3078
3079
3080 ForceSendFields []string `json:"-"`
3081
3082
3083
3084
3085 NullFields []string `json:"-"`
3086 }
3087
3088 func (s *BulkListAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3089 type NoMethod BulkListAdvertiserAssignedTargetingOptionsResponse
3090 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3091 }
3092
3093 type BulkListAssignedTargetingOptionsResponse struct {
3094
3095
3096
3097 LineItemAssignedTargetingOptions []*LineItemAssignedTargetingOption `json:"lineItemAssignedTargetingOptions,omitempty"`
3098
3099
3100
3101
3102
3103 NextPageToken string `json:"nextPageToken,omitempty"`
3104
3105
3106 googleapi.ServerResponse `json:"-"`
3107
3108
3109
3110
3111
3112
3113 ForceSendFields []string `json:"-"`
3114
3115
3116
3117
3118
3119 NullFields []string `json:"-"`
3120 }
3121
3122 func (s *BulkListAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3123 type NoMethod BulkListAssignedTargetingOptionsResponse
3124 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3125 }
3126
3127 type BulkListCampaignAssignedTargetingOptionsResponse struct {
3128
3129
3130 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
3131
3132
3133
3134
3135
3136 NextPageToken string `json:"nextPageToken,omitempty"`
3137
3138
3139 googleapi.ServerResponse `json:"-"`
3140
3141
3142
3143
3144
3145 ForceSendFields []string `json:"-"`
3146
3147
3148
3149
3150 NullFields []string `json:"-"`
3151 }
3152
3153 func (s *BulkListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3154 type NoMethod BulkListCampaignAssignedTargetingOptionsResponse
3155 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3156 }
3157
3158 type BulkListInsertionOrderAssignedTargetingOptionsResponse struct {
3159
3160
3161 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
3162
3163
3164
3165
3166
3167 NextPageToken string `json:"nextPageToken,omitempty"`
3168
3169
3170 googleapi.ServerResponse `json:"-"`
3171
3172
3173
3174
3175
3176 ForceSendFields []string `json:"-"`
3177
3178
3179
3180
3181 NullFields []string `json:"-"`
3182 }
3183
3184 func (s *BulkListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3185 type NoMethod BulkListInsertionOrderAssignedTargetingOptionsResponse
3186 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3187 }
3188
3189
3190
3191 type BulkUpdateLineItemsRequest struct {
3192
3193 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"`
3194
3195
3196
3197 TargetLineItem *LineItem `json:"targetLineItem,omitempty"`
3198
3199
3200 UpdateMask string `json:"updateMask,omitempty"`
3201
3202
3203
3204
3205
3206 ForceSendFields []string `json:"-"`
3207
3208
3209
3210
3211 NullFields []string `json:"-"`
3212 }
3213
3214 func (s *BulkUpdateLineItemsRequest) MarshalJSON() ([]byte, error) {
3215 type NoMethod BulkUpdateLineItemsRequest
3216 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3217 }
3218
3219
3220
3221 type BulkUpdateLineItemsResponse struct {
3222
3223 Errors []*Status `json:"errors,omitempty"`
3224
3225 FailedLineItemIds googleapi.Int64s `json:"failedLineItemIds,omitempty"`
3226
3227
3228
3229
3230 SkippedLineItemIds googleapi.Int64s `json:"skippedLineItemIds,omitempty"`
3231
3232 UpdatedLineItemIds googleapi.Int64s `json:"updatedLineItemIds,omitempty"`
3233
3234
3235 googleapi.ServerResponse `json:"-"`
3236
3237
3238
3239
3240
3241 ForceSendFields []string `json:"-"`
3242
3243
3244
3245
3246 NullFields []string `json:"-"`
3247 }
3248
3249 func (s *BulkUpdateLineItemsResponse) MarshalJSON() ([]byte, error) {
3250 type NoMethod BulkUpdateLineItemsResponse
3251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3252 }
3253
3254
3255 type BumperAd struct {
3256
3257 CommonInStreamAttribute *CommonInStreamAttribute `json:"commonInStreamAttribute,omitempty"`
3258
3259
3260
3261
3262
3263 ForceSendFields []string `json:"-"`
3264
3265
3266
3267
3268 NullFields []string `json:"-"`
3269 }
3270
3271 func (s *BumperAd) MarshalJSON() ([]byte, error) {
3272 type NoMethod BumperAd
3273 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3274 }
3275
3276
3277
3278
3279
3280 type BusinessChainAssignedTargetingOptionDetails struct {
3281
3282
3283 DisplayName string `json:"displayName,omitempty"`
3284
3285
3286
3287
3288
3289
3290 ProximityRadiusAmount float64 `json:"proximityRadiusAmount,omitempty"`
3291
3292
3293
3294
3295
3296
3297
3298
3299 ProximityRadiusUnit string `json:"proximityRadiusUnit,omitempty"`
3300
3301
3302
3303 TargetingOptionId string `json:"targetingOptionId,omitempty"`
3304
3305
3306
3307
3308
3309 ForceSendFields []string `json:"-"`
3310
3311
3312
3313
3314 NullFields []string `json:"-"`
3315 }
3316
3317 func (s *BusinessChainAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3318 type NoMethod BusinessChainAssignedTargetingOptionDetails
3319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3320 }
3321
3322 func (s *BusinessChainAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error {
3323 type NoMethod BusinessChainAssignedTargetingOptionDetails
3324 var s1 struct {
3325 ProximityRadiusAmount gensupport.JSONFloat64 `json:"proximityRadiusAmount"`
3326 *NoMethod
3327 }
3328 s1.NoMethod = (*NoMethod)(s)
3329 if err := json.Unmarshal(data, &s1); err != nil {
3330 return err
3331 }
3332 s.ProximityRadiusAmount = float64(s1.ProximityRadiusAmount)
3333 return nil
3334 }
3335
3336
3337
3338 type BusinessChainSearchTerms struct {
3339
3340
3341 BusinessChainQuery string `json:"businessChainQuery,omitempty"`
3342
3343
3344 RegionQuery string `json:"regionQuery,omitempty"`
3345
3346
3347
3348
3349
3350 ForceSendFields []string `json:"-"`
3351
3352
3353
3354
3355 NullFields []string `json:"-"`
3356 }
3357
3358 func (s *BusinessChainSearchTerms) MarshalJSON() ([]byte, error) {
3359 type NoMethod BusinessChainSearchTerms
3360 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3361 }
3362
3363
3364
3365
3366 type BusinessChainTargetingOptionDetails struct {
3367
3368
3369 BusinessChain string `json:"businessChain,omitempty"`
3370
3371
3372 GeoRegion string `json:"geoRegion,omitempty"`
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412 GeoRegionType string `json:"geoRegionType,omitempty"`
3413
3414
3415
3416
3417
3418 ForceSendFields []string `json:"-"`
3419
3420
3421
3422
3423 NullFields []string `json:"-"`
3424 }
3425
3426 func (s *BusinessChainTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3427 type NoMethod BusinessChainTargetingOptionDetails
3428 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3429 }
3430
3431
3432 type Campaign struct {
3433
3434
3435 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3436
3437
3438 CampaignBudgets []*CampaignBudget `json:"campaignBudgets,omitempty"`
3439
3440 CampaignFlight *CampaignFlight `json:"campaignFlight,omitempty"`
3441
3442 CampaignGoal *CampaignGoal `json:"campaignGoal,omitempty"`
3443
3444
3445 CampaignId int64 `json:"campaignId,omitempty,string"`
3446
3447
3448 DisplayName string `json:"displayName,omitempty"`
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468 EntityStatus string `json:"entityStatus,omitempty"`
3469
3470 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
3471
3472 Name string `json:"name,omitempty"`
3473
3474
3475 UpdateTime string `json:"updateTime,omitempty"`
3476
3477
3478 googleapi.ServerResponse `json:"-"`
3479
3480
3481
3482
3483
3484 ForceSendFields []string `json:"-"`
3485
3486
3487
3488
3489 NullFields []string `json:"-"`
3490 }
3491
3492 func (s *Campaign) MarshalJSON() ([]byte, error) {
3493 type NoMethod Campaign
3494 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3495 }
3496
3497
3498 type CampaignBudget struct {
3499
3500
3501
3502 BudgetAmountMicros int64 `json:"budgetAmountMicros,omitempty,string"`
3503
3504
3505
3506 BudgetId int64 `json:"budgetId,omitempty,string"`
3507
3508
3509
3510
3511
3512
3513
3514
3515 BudgetUnit string `json:"budgetUnit,omitempty"`
3516
3517
3518
3519
3520 DateRange *DateRange `json:"dateRange,omitempty"`
3521
3522
3523 DisplayName string `json:"displayName,omitempty"`
3524
3525
3526
3527
3528
3529 ExternalBudgetId string `json:"externalBudgetId,omitempty"`
3530
3531
3532
3533
3534
3535
3536
3537 ExternalBudgetSource string `json:"externalBudgetSource,omitempty"`
3538
3539
3540
3541
3542
3543 InvoiceGroupingId string `json:"invoiceGroupingId,omitempty"`
3544
3545
3546
3547 PrismaConfig *PrismaConfig `json:"prismaConfig,omitempty"`
3548
3549
3550
3551
3552
3553 ForceSendFields []string `json:"-"`
3554
3555
3556
3557
3558 NullFields []string `json:"-"`
3559 }
3560
3561 func (s *CampaignBudget) MarshalJSON() ([]byte, error) {
3562 type NoMethod CampaignBudget
3563 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3564 }
3565
3566
3567
3568 type CampaignFlight struct {
3569
3570
3571
3572
3573
3574
3575
3576
3577 PlannedDates *DateRange `json:"plannedDates,omitempty"`
3578
3579
3580
3581
3582
3583 PlannedSpendAmountMicros int64 `json:"plannedSpendAmountMicros,omitempty,string"`
3584
3585
3586
3587
3588
3589 ForceSendFields []string `json:"-"`
3590
3591
3592
3593
3594 NullFields []string `json:"-"`
3595 }
3596
3597 func (s *CampaignFlight) MarshalJSON() ([]byte, error) {
3598 type NoMethod CampaignFlight
3599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3600 }
3601
3602
3603 type CampaignGoal struct {
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614 CampaignGoalType string `json:"campaignGoalType,omitempty"`
3615
3616
3617
3618
3619
3620 PerformanceGoal *PerformanceGoal `json:"performanceGoal,omitempty"`
3621
3622
3623
3624
3625
3626 ForceSendFields []string `json:"-"`
3627
3628
3629
3630
3631 NullFields []string `json:"-"`
3632 }
3633
3634 func (s *CampaignGoal) MarshalJSON() ([]byte, error) {
3635 type NoMethod CampaignGoal
3636 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3637 }
3638
3639
3640
3641
3642
3643 type CarrierAndIspAssignedTargetingOptionDetails struct {
3644
3645 DisplayName string `json:"displayName,omitempty"`
3646
3647
3648
3649 Negative bool `json:"negative,omitempty"`
3650
3651
3652 TargetingOptionId string `json:"targetingOptionId,omitempty"`
3653
3654
3655
3656
3657
3658 ForceSendFields []string `json:"-"`
3659
3660
3661
3662
3663 NullFields []string `json:"-"`
3664 }
3665
3666 func (s *CarrierAndIspAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3667 type NoMethod CarrierAndIspAssignedTargetingOptionDetails
3668 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3669 }
3670
3671
3672
3673
3674 type CarrierAndIspTargetingOptionDetails struct {
3675
3676 DisplayName string `json:"displayName,omitempty"`
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686 Type string `json:"type,omitempty"`
3687
3688
3689
3690
3691
3692 ForceSendFields []string `json:"-"`
3693
3694
3695
3696
3697 NullFields []string `json:"-"`
3698 }
3699
3700 func (s *CarrierAndIspTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3701 type NoMethod CarrierAndIspTargetingOptionDetails
3702 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3703 }
3704
3705
3706
3707
3708 type CategoryAssignedTargetingOptionDetails struct {
3709
3710 DisplayName string `json:"displayName,omitempty"`
3711
3712 Negative bool `json:"negative,omitempty"`
3713
3714
3715 TargetingOptionId string `json:"targetingOptionId,omitempty"`
3716
3717
3718
3719
3720
3721 ForceSendFields []string `json:"-"`
3722
3723
3724
3725
3726 NullFields []string `json:"-"`
3727 }
3728
3729 func (s *CategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3730 type NoMethod CategoryAssignedTargetingOptionDetails
3731 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3732 }
3733
3734
3735
3736
3737 type CategoryTargetingOptionDetails struct {
3738
3739 DisplayName string `json:"displayName,omitempty"`
3740
3741
3742
3743
3744
3745 ForceSendFields []string `json:"-"`
3746
3747
3748
3749
3750 NullFields []string `json:"-"`
3751 }
3752
3753 func (s *CategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3754 type NoMethod CategoryTargetingOptionDetails
3755 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3756 }
3757
3758
3759
3760 type Channel struct {
3761
3762 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3763
3764
3765 ChannelId int64 `json:"channelId,omitempty,string"`
3766
3767
3768 DisplayName string `json:"displayName,omitempty"`
3769
3770 Name string `json:"name,omitempty"`
3771
3772
3773 NegativelyTargetedLineItemCount int64 `json:"negativelyTargetedLineItemCount,omitempty,string"`
3774
3775 PartnerId int64 `json:"partnerId,omitempty,string"`
3776
3777
3778 PositivelyTargetedLineItemCount int64 `json:"positivelyTargetedLineItemCount,omitempty,string"`
3779
3780
3781 googleapi.ServerResponse `json:"-"`
3782
3783
3784
3785
3786
3787 ForceSendFields []string `json:"-"`
3788
3789
3790
3791
3792 NullFields []string `json:"-"`
3793 }
3794
3795 func (s *Channel) MarshalJSON() ([]byte, error) {
3796 type NoMethod Channel
3797 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3798 }
3799
3800
3801
3802
3803 type ChannelAssignedTargetingOptionDetails struct {
3804
3805
3806
3807
3808 ChannelId int64 `json:"channelId,omitempty,string"`
3809
3810
3811 Negative bool `json:"negative,omitempty"`
3812
3813
3814
3815
3816
3817 ForceSendFields []string `json:"-"`
3818
3819
3820
3821
3822 NullFields []string `json:"-"`
3823 }
3824
3825 func (s *ChannelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3826 type NoMethod ChannelAssignedTargetingOptionDetails
3827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3828 }
3829
3830
3831
3832 type CmHybridConfig struct {
3833
3834
3835 CmAccountId int64 `json:"cmAccountId,omitempty,string"`
3836
3837
3838 CmAdvertiserIds googleapi.Int64s `json:"cmAdvertiserIds,omitempty"`
3839
3840
3841 CmFloodlightConfigId int64 `json:"cmFloodlightConfigId,omitempty,string"`
3842
3843
3844
3845
3846 CmFloodlightLinkingAuthorized bool `json:"cmFloodlightLinkingAuthorized,omitempty"`
3847
3848
3849
3850
3851
3852 CmSyncableSiteIds googleapi.Int64s `json:"cmSyncableSiteIds,omitempty"`
3853
3854 Dv360ToCmCostReportingEnabled bool `json:"dv360ToCmCostReportingEnabled,omitempty"`
3855
3856
3857 Dv360ToCmDataSharingEnabled bool `json:"dv360ToCmDataSharingEnabled,omitempty"`
3858
3859
3860
3861
3862
3863 ForceSendFields []string `json:"-"`
3864
3865
3866
3867
3868 NullFields []string `json:"-"`
3869 }
3870
3871 func (s *CmHybridConfig) MarshalJSON() ([]byte, error) {
3872 type NoMethod CmHybridConfig
3873 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3874 }
3875
3876
3877 type CmTrackingAd struct {
3878
3879 CmAdId int64 `json:"cmAdId,omitempty,string"`
3880
3881 CmCreativeId int64 `json:"cmCreativeId,omitempty,string"`
3882
3883 CmPlacementId int64 `json:"cmPlacementId,omitempty,string"`
3884
3885
3886
3887
3888
3889 ForceSendFields []string `json:"-"`
3890
3891
3892
3893
3894 NullFields []string `json:"-"`
3895 }
3896
3897 func (s *CmTrackingAd) MarshalJSON() ([]byte, error) {
3898 type NoMethod CmTrackingAd
3899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3900 }
3901
3902
3903 type CombinedAudience struct {
3904
3905
3906 CombinedAudienceId int64 `json:"combinedAudienceId,omitempty,string"`
3907
3908 DisplayName string `json:"displayName,omitempty"`
3909
3910 Name string `json:"name,omitempty"`
3911
3912
3913 googleapi.ServerResponse `json:"-"`
3914
3915
3916
3917
3918
3919 ForceSendFields []string `json:"-"`
3920
3921
3922
3923
3924 NullFields []string `json:"-"`
3925 }
3926
3927 func (s *CombinedAudience) MarshalJSON() ([]byte, error) {
3928 type NoMethod CombinedAudience
3929 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3930 }
3931
3932
3933
3934 type CombinedAudienceGroup struct {
3935
3936
3937
3938
3939 Settings []*CombinedAudienceTargetingSetting `json:"settings,omitempty"`
3940
3941
3942
3943
3944
3945 ForceSendFields []string `json:"-"`
3946
3947
3948
3949
3950 NullFields []string `json:"-"`
3951 }
3952
3953 func (s *CombinedAudienceGroup) MarshalJSON() ([]byte, error) {
3954 type NoMethod CombinedAudienceGroup
3955 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3956 }
3957
3958
3959
3960 type CombinedAudienceTargetingSetting struct {
3961
3962
3963 CombinedAudienceId int64 `json:"combinedAudienceId,omitempty,string"`
3964
3965
3966
3967
3968
3969 ForceSendFields []string `json:"-"`
3970
3971
3972
3973
3974 NullFields []string `json:"-"`
3975 }
3976
3977 func (s *CombinedAudienceTargetingSetting) MarshalJSON() ([]byte, error) {
3978 type NoMethod CombinedAudienceTargetingSetting
3979 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3980 }
3981
3982
3983
3984 type CommonInStreamAttribute struct {
3985
3986 ActionButtonLabel string `json:"actionButtonLabel,omitempty"`
3987
3988 ActionHeadline string `json:"actionHeadline,omitempty"`
3989
3990 CompanionBanner *ImageAsset `json:"companionBanner,omitempty"`
3991
3992 DisplayUrl string `json:"displayUrl,omitempty"`
3993
3994
3995 FinalUrl string `json:"finalUrl,omitempty"`
3996
3997 TrackingUrl string `json:"trackingUrl,omitempty"`
3998
3999 Video *YoutubeVideoDetails `json:"video,omitempty"`
4000
4001
4002
4003
4004
4005 ForceSendFields []string `json:"-"`
4006
4007
4008
4009
4010 NullFields []string `json:"-"`
4011 }
4012
4013 func (s *CommonInStreamAttribute) MarshalJSON() ([]byte, error) {
4014 type NoMethod CommonInStreamAttribute
4015 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4016 }
4017
4018
4019 type Consent struct {
4020
4021
4022
4023
4024
4025
4026
4027 AdPersonalization string `json:"adPersonalization,omitempty"`
4028
4029
4030
4031
4032
4033
4034
4035 AdUserData string `json:"adUserData,omitempty"`
4036
4037
4038
4039
4040
4041 ForceSendFields []string `json:"-"`
4042
4043
4044
4045
4046 NullFields []string `json:"-"`
4047 }
4048
4049 func (s *Consent) MarshalJSON() ([]byte, error) {
4050 type NoMethod Consent
4051 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4052 }
4053
4054
4055 type ContactInfo struct {
4056
4057
4058 CountryCode string `json:"countryCode,omitempty"`
4059
4060
4061 HashedEmails []string `json:"hashedEmails,omitempty"`
4062
4063
4064
4065
4066 HashedFirstName string `json:"hashedFirstName,omitempty"`
4067
4068
4069
4070
4071 HashedLastName string `json:"hashedLastName,omitempty"`
4072
4073
4074
4075 HashedPhoneNumbers []string `json:"hashedPhoneNumbers,omitempty"`
4076
4077
4078 ZipCodes []string `json:"zipCodes,omitempty"`
4079
4080
4081
4082
4083
4084 ForceSendFields []string `json:"-"`
4085
4086
4087
4088
4089 NullFields []string `json:"-"`
4090 }
4091
4092 func (s *ContactInfo) MarshalJSON() ([]byte, error) {
4093 type NoMethod ContactInfo
4094 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4095 }
4096
4097
4098
4099 type ContactInfoList struct {
4100
4101
4102
4103
4104 Consent *Consent `json:"consent,omitempty"`
4105
4106
4107
4108 ContactInfos []*ContactInfo `json:"contactInfos,omitempty"`
4109
4110
4111
4112
4113
4114 ForceSendFields []string `json:"-"`
4115
4116
4117
4118
4119 NullFields []string `json:"-"`
4120 }
4121
4122 func (s *ContactInfoList) MarshalJSON() ([]byte, error) {
4123 type NoMethod ContactInfoList
4124 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4125 }
4126
4127
4128
4129
4130
4131
4132
4133 type ContentDurationAssignedTargetingOptionDetails struct {
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147 ContentDuration string `json:"contentDuration,omitempty"`
4148
4149
4150 TargetingOptionId string `json:"targetingOptionId,omitempty"`
4151
4152
4153
4154
4155
4156 ForceSendFields []string `json:"-"`
4157
4158
4159
4160
4161 NullFields []string `json:"-"`
4162 }
4163
4164 func (s *ContentDurationAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4165 type NoMethod ContentDurationAssignedTargetingOptionDetails
4166 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4167 }
4168
4169
4170
4171
4172 type ContentDurationTargetingOptionDetails struct {
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186 ContentDuration string `json:"contentDuration,omitempty"`
4187
4188
4189
4190
4191
4192 ForceSendFields []string `json:"-"`
4193
4194
4195
4196
4197 NullFields []string `json:"-"`
4198 }
4199
4200 func (s *ContentDurationTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4201 type NoMethod ContentDurationTargetingOptionDetails
4202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4203 }
4204
4205
4206
4207
4208
4209
4210
4211 type ContentGenreAssignedTargetingOptionDetails struct {
4212
4213 DisplayName string `json:"displayName,omitempty"`
4214
4215 Negative bool `json:"negative,omitempty"`
4216
4217
4218 TargetingOptionId string `json:"targetingOptionId,omitempty"`
4219
4220
4221
4222
4223
4224 ForceSendFields []string `json:"-"`
4225
4226
4227
4228
4229 NullFields []string `json:"-"`
4230 }
4231
4232 func (s *ContentGenreAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4233 type NoMethod ContentGenreAssignedTargetingOptionDetails
4234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4235 }
4236
4237
4238
4239
4240 type ContentGenreTargetingOptionDetails struct {
4241
4242 DisplayName string `json:"displayName,omitempty"`
4243
4244
4245
4246
4247
4248 ForceSendFields []string `json:"-"`
4249
4250
4251
4252
4253 NullFields []string `json:"-"`
4254 }
4255
4256 func (s *ContentGenreTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4257 type NoMethod ContentGenreTargetingOptionDetails
4258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4259 }
4260
4261
4262
4263
4264
4265 type ContentInstreamPositionAssignedTargetingOptionDetails struct {
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282 AdType string `json:"adType,omitempty"`
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297 ContentInstreamPosition string `json:"contentInstreamPosition,omitempty"`
4298
4299
4300
4301
4302
4303 ForceSendFields []string `json:"-"`
4304
4305
4306
4307
4308 NullFields []string `json:"-"`
4309 }
4310
4311 func (s *ContentInstreamPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4312 type NoMethod ContentInstreamPositionAssignedTargetingOptionDetails
4313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4314 }
4315
4316
4317
4318
4319
4320 type ContentInstreamPositionTargetingOptionDetails struct {
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334 ContentInstreamPosition string `json:"contentInstreamPosition,omitempty"`
4335
4336
4337
4338
4339
4340 ForceSendFields []string `json:"-"`
4341
4342
4343
4344
4345 NullFields []string `json:"-"`
4346 }
4347
4348 func (s *ContentInstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4349 type NoMethod ContentInstreamPositionTargetingOptionDetails
4350 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4351 }
4352
4353
4354
4355
4356
4357 type ContentOutstreamPositionAssignedTargetingOptionDetails struct {
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374 AdType string `json:"adType,omitempty"`
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392 ContentOutstreamPosition string `json:"contentOutstreamPosition,omitempty"`
4393
4394
4395
4396
4397
4398 ForceSendFields []string `json:"-"`
4399
4400
4401
4402
4403 NullFields []string `json:"-"`
4404 }
4405
4406 func (s *ContentOutstreamPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4407 type NoMethod ContentOutstreamPositionAssignedTargetingOptionDetails
4408 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4409 }
4410
4411
4412
4413
4414
4415 type ContentOutstreamPositionTargetingOptionDetails struct {
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433 ContentOutstreamPosition string `json:"contentOutstreamPosition,omitempty"`
4434
4435
4436
4437
4438
4439 ForceSendFields []string `json:"-"`
4440
4441
4442
4443
4444 NullFields []string `json:"-"`
4445 }
4446
4447 func (s *ContentOutstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4448 type NoMethod ContentOutstreamPositionTargetingOptionDetails
4449 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4450 }
4451
4452
4453
4454
4455
4456
4457
4458 type ContentStreamTypeAssignedTargetingOptionDetails struct {
4459
4460
4461
4462
4463
4464
4465
4466
4467 ContentStreamType string `json:"contentStreamType,omitempty"`
4468
4469
4470 TargetingOptionId string `json:"targetingOptionId,omitempty"`
4471
4472
4473
4474
4475
4476 ForceSendFields []string `json:"-"`
4477
4478
4479
4480
4481 NullFields []string `json:"-"`
4482 }
4483
4484 func (s *ContentStreamTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4485 type NoMethod ContentStreamTypeAssignedTargetingOptionDetails
4486 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4487 }
4488
4489
4490
4491
4492 type ContentStreamTypeTargetingOptionDetails struct {
4493
4494
4495
4496
4497
4498
4499
4500
4501 ContentStreamType string `json:"contentStreamType,omitempty"`
4502
4503
4504
4505
4506
4507 ForceSendFields []string `json:"-"`
4508
4509
4510
4511
4512 NullFields []string `json:"-"`
4513 }
4514
4515 func (s *ContentStreamTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4516 type NoMethod ContentStreamTypeTargetingOptionDetails
4517 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4518 }
4519
4520
4521
4522
4523 type ConversionCountingConfig struct {
4524
4525
4526
4527
4528 FloodlightActivityConfigs []*TrackingFloodlightActivityConfig `json:"floodlightActivityConfigs,omitempty"`
4529
4530
4531
4532
4533 PostViewCountPercentageMillis int64 `json:"postViewCountPercentageMillis,omitempty,string"`
4534
4535
4536
4537
4538
4539 ForceSendFields []string `json:"-"`
4540
4541
4542
4543
4544 NullFields []string `json:"-"`
4545 }
4546
4547 func (s *ConversionCountingConfig) MarshalJSON() ([]byte, error) {
4548 type NoMethod ConversionCountingConfig
4549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4550 }
4551
4552
4553 type CounterEvent struct {
4554
4555 Name string `json:"name,omitempty"`
4556
4557
4558 ReportingName string `json:"reportingName,omitempty"`
4559
4560
4561
4562
4563
4564 ForceSendFields []string `json:"-"`
4565
4566
4567
4568
4569 NullFields []string `json:"-"`
4570 }
4571
4572 func (s *CounterEvent) MarshalJSON() ([]byte, error) {
4573 type NoMethod CounterEvent
4574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4575 }
4576
4577
4578 type CreateAssetRequest struct {
4579
4580
4581 Filename string `json:"filename,omitempty"`
4582
4583
4584
4585
4586
4587 ForceSendFields []string `json:"-"`
4588
4589
4590
4591
4592 NullFields []string `json:"-"`
4593 }
4594
4595 func (s *CreateAssetRequest) MarshalJSON() ([]byte, error) {
4596 type NoMethod CreateAssetRequest
4597 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4598 }
4599
4600
4601 type CreateAssetResponse struct {
4602
4603 Asset *Asset `json:"asset,omitempty"`
4604
4605
4606 googleapi.ServerResponse `json:"-"`
4607
4608
4609
4610
4611
4612 ForceSendFields []string `json:"-"`
4613
4614
4615
4616
4617 NullFields []string `json:"-"`
4618 }
4619
4620 func (s *CreateAssetResponse) MarshalJSON() ([]byte, error) {
4621 type NoMethod CreateAssetResponse
4622 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4623 }
4624
4625
4626
4627 type CreateAssignedTargetingOptionsRequest struct {
4628
4629
4630 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741 TargetingType string `json:"targetingType,omitempty"`
4742
4743
4744
4745
4746
4747 ForceSendFields []string `json:"-"`
4748
4749
4750
4751
4752 NullFields []string `json:"-"`
4753 }
4754
4755 func (s *CreateAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
4756 type NoMethod CreateAssignedTargetingOptionsRequest
4757 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4758 }
4759
4760
4761
4762 type CreateSdfDownloadTaskRequest struct {
4763
4764 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
4765
4766 IdFilter *IdFilter `json:"idFilter,omitempty"`
4767
4768 InventorySourceFilter *InventorySourceFilter `json:"inventorySourceFilter,omitempty"`
4769
4770
4771
4772 ParentEntityFilter *ParentEntityFilter `json:"parentEntityFilter,omitempty"`
4773
4774 PartnerId int64 `json:"partnerId,omitempty,string"`
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797 Version string `json:"version,omitempty"`
4798
4799
4800
4801
4802
4803 ForceSendFields []string `json:"-"`
4804
4805
4806
4807
4808 NullFields []string `json:"-"`
4809 }
4810
4811 func (s *CreateSdfDownloadTaskRequest) MarshalJSON() ([]byte, error) {
4812 type NoMethod CreateSdfDownloadTaskRequest
4813 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4814 }
4815
4816
4817 type Creative struct {
4818
4819
4820
4821
4822
4823
4824 AdditionalDimensions []*Dimensions `json:"additionalDimensions,omitempty"`
4825
4826
4827 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
4828
4829
4830 AppendedTag string `json:"appendedTag,omitempty"`
4831
4832 Assets []*AssetAssociation `json:"assets,omitempty"`
4833
4834
4835
4836 CmPlacementId int64 `json:"cmPlacementId,omitempty,string"`
4837
4838
4839
4840
4841
4842 CmTrackingAd *CmTrackingAd `json:"cmTrackingAd,omitempty"`
4843
4844
4845
4846
4847
4848
4849
4850 CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4851
4852
4853
4854
4855
4856
4857 CounterEvents []*CounterEvent `json:"counterEvents,omitempty"`
4858
4859
4860 CreateTime string `json:"createTime,omitempty"`
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872 CreativeAttributes []string `json:"creativeAttributes,omitempty"`
4873
4874
4875 CreativeId int64 `json:"creativeId,omitempty,string"`
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920 CreativeType string `json:"creativeType,omitempty"`
4921
4922
4923
4924
4925 Dimensions *Dimensions `json:"dimensions,omitempty"`
4926
4927
4928 DisplayName string `json:"displayName,omitempty"`
4929
4930 Dynamic bool `json:"dynamic,omitempty"`
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948 EntityStatus string `json:"entityStatus,omitempty"`
4949
4950
4951
4952
4953
4954
4955
4956 ExitEvents []*ExitEvent `json:"exitEvents,omitempty"`
4957
4958
4959
4960
4961
4962 ExpandOnHover bool `json:"expandOnHover,omitempty"`
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985 ExpandingDirection string `json:"expandingDirection,omitempty"`
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007 HostingSource string `json:"hostingSource,omitempty"`
5008
5009
5010
5011
5012
5013 Html5Video bool `json:"html5Video,omitempty"`
5014
5015
5016
5017 IasCampaignMonitoring bool `json:"iasCampaignMonitoring,omitempty"`
5018
5019
5020
5021 IntegrationCode string `json:"integrationCode,omitempty"`
5022
5023
5024
5025
5026
5027 JsTrackerUrl string `json:"jsTrackerUrl,omitempty"`
5028
5029
5030
5031 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"`
5032
5033
5034
5035 MediaDuration string `json:"mediaDuration,omitempty"`
5036
5037
5038
5039
5040
5041 Mp3Audio bool `json:"mp3Audio,omitempty"`
5042
5043 Name string `json:"name,omitempty"`
5044
5045
5046 Notes string `json:"notes,omitempty"`
5047
5048
5049 ObaIcon *ObaIcon `json:"obaIcon,omitempty"`
5050
5051
5052
5053
5054
5055 OggAudio bool `json:"oggAudio,omitempty"`
5056
5057
5058
5059 ProgressOffset *AudioVideoOffset `json:"progressOffset,omitempty"`
5060
5061
5062
5063
5064
5065 RequireHtml5 bool `json:"requireHtml5,omitempty"`
5066
5067
5068
5069
5070
5071
5072
5073 RequireMraid bool `json:"requireMraid,omitempty"`
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084 RequirePingForAttribution bool `json:"requirePingForAttribution,omitempty"`
5085
5086
5087 ReviewStatus *ReviewStatusInfo `json:"reviewStatus,omitempty"`
5088
5089
5090
5091 SkipOffset *AudioVideoOffset `json:"skipOffset,omitempty"`
5092
5093
5094 Skippable bool `json:"skippable,omitempty"`
5095
5096
5097
5098
5099
5100 ThirdPartyTag string `json:"thirdPartyTag,omitempty"`
5101
5102
5103
5104
5105 ThirdPartyUrls []*ThirdPartyUrl `json:"thirdPartyUrls,omitempty"`
5106
5107
5108
5109
5110
5111 TimerEvents []*TimerEvent `json:"timerEvents,omitempty"`
5112
5113
5114
5115
5116
5117
5118
5119 TrackerUrls []string `json:"trackerUrls,omitempty"`
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129 Transcodes []*Transcode `json:"transcodes,omitempty"`
5130
5131
5132
5133
5134
5135 UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
5136
5137
5138 UpdateTime string `json:"updateTime,omitempty"`
5139
5140
5141
5142
5143
5144 VastTagUrl string `json:"vastTagUrl,omitempty"`
5145
5146
5147
5148
5149
5150 Vpaid bool `json:"vpaid,omitempty"`
5151
5152
5153 googleapi.ServerResponse `json:"-"`
5154
5155
5156
5157
5158
5159 ForceSendFields []string `json:"-"`
5160
5161
5162
5163
5164 NullFields []string `json:"-"`
5165 }
5166
5167 func (s *Creative) MarshalJSON() ([]byte, error) {
5168 type NoMethod Creative
5169 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5170 }
5171
5172
5173
5174 type CreativeConfig struct {
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221 CreativeType string `json:"creativeType,omitempty"`
5222
5223
5224 DisplayCreativeConfig *InventorySourceDisplayCreativeConfig `json:"displayCreativeConfig,omitempty"`
5225
5226
5227 VideoCreativeConfig *InventorySourceVideoCreativeConfig `json:"videoCreativeConfig,omitempty"`
5228
5229
5230
5231
5232
5233 ForceSendFields []string `json:"-"`
5234
5235
5236
5237
5238 NullFields []string `json:"-"`
5239 }
5240
5241 func (s *CreativeConfig) MarshalJSON() ([]byte, error) {
5242 type NoMethod CreativeConfig
5243 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5244 }
5245
5246
5247 type CustomBiddingAlgorithm struct {
5248
5249
5250 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5251
5252
5253 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264 CustomBiddingAlgorithmType string `json:"customBiddingAlgorithmType,omitempty"`
5265
5266
5267 DisplayName string `json:"displayName,omitempty"`
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285 EntityStatus string `json:"entityStatus,omitempty"`
5286
5287
5288
5289
5290
5291
5292
5293
5294 ModelDetails []*CustomBiddingModelDetails `json:"modelDetails,omitempty"`
5295
5296 Name string `json:"name,omitempty"`
5297
5298
5299 PartnerId int64 `json:"partnerId,omitempty,string"`
5300
5301
5302
5303
5304
5305
5306
5307
5308 SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
5309
5310
5311 googleapi.ServerResponse `json:"-"`
5312
5313
5314
5315
5316
5317 ForceSendFields []string `json:"-"`
5318
5319
5320
5321
5322 NullFields []string `json:"-"`
5323 }
5324
5325 func (s *CustomBiddingAlgorithm) MarshalJSON() ([]byte, error) {
5326 type NoMethod CustomBiddingAlgorithm
5327 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5328 }
5329
5330
5331
5332 type CustomBiddingModelDetails struct {
5333
5334 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348 ReadinessState string `json:"readinessState,omitempty"`
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364 SuspensionState string `json:"suspensionState,omitempty"`
5365
5366
5367
5368
5369
5370 ForceSendFields []string `json:"-"`
5371
5372
5373
5374
5375 NullFields []string `json:"-"`
5376 }
5377
5378 func (s *CustomBiddingModelDetails) MarshalJSON() ([]byte, error) {
5379 type NoMethod CustomBiddingModelDetails
5380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5381 }
5382
5383
5384 type CustomBiddingScript struct {
5385
5386
5387 Active bool `json:"active,omitempty"`
5388
5389 CreateTime string `json:"createTime,omitempty"`
5390
5391
5392 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
5393
5394
5395 CustomBiddingScriptId int64 `json:"customBiddingScriptId,omitempty,string"`
5396
5397
5398 Errors []*ScriptError `json:"errors,omitempty"`
5399
5400 Name string `json:"name,omitempty"`
5401
5402 Script *CustomBiddingScriptRef `json:"script,omitempty"`
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412 State string `json:"state,omitempty"`
5413
5414
5415 googleapi.ServerResponse `json:"-"`
5416
5417
5418
5419
5420
5421 ForceSendFields []string `json:"-"`
5422
5423
5424
5425
5426 NullFields []string `json:"-"`
5427 }
5428
5429 func (s *CustomBiddingScript) MarshalJSON() ([]byte, error) {
5430 type NoMethod CustomBiddingScript
5431 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5432 }
5433
5434
5435
5436 type CustomBiddingScriptRef struct {
5437
5438
5439
5440
5441 ResourceName string `json:"resourceName,omitempty"`
5442
5443
5444 googleapi.ServerResponse `json:"-"`
5445
5446
5447
5448
5449
5450 ForceSendFields []string `json:"-"`
5451
5452
5453
5454
5455 NullFields []string `json:"-"`
5456 }
5457
5458 func (s *CustomBiddingScriptRef) MarshalJSON() ([]byte, error) {
5459 type NoMethod CustomBiddingScriptRef
5460 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5461 }
5462
5463
5464 type CustomLabel struct {
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474 Key string `json:"key,omitempty"`
5475
5476 Value string `json:"value,omitempty"`
5477
5478
5479
5480
5481
5482 ForceSendFields []string `json:"-"`
5483
5484
5485
5486
5487 NullFields []string `json:"-"`
5488 }
5489
5490 func (s *CustomLabel) MarshalJSON() ([]byte, error) {
5491 type NoMethod CustomLabel
5492 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5493 }
5494
5495
5496
5497 type CustomList struct {
5498
5499
5500 CustomListId int64 `json:"customListId,omitempty,string"`
5501
5502 DisplayName string `json:"displayName,omitempty"`
5503
5504 Name string `json:"name,omitempty"`
5505
5506
5507 googleapi.ServerResponse `json:"-"`
5508
5509
5510
5511
5512
5513 ForceSendFields []string `json:"-"`
5514
5515
5516
5517
5518 NullFields []string `json:"-"`
5519 }
5520
5521 func (s *CustomList) MarshalJSON() ([]byte, error) {
5522 type NoMethod CustomList
5523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5524 }
5525
5526
5527
5528 type CustomListGroup struct {
5529
5530
5531 Settings []*CustomListTargetingSetting `json:"settings,omitempty"`
5532
5533
5534
5535
5536
5537 ForceSendFields []string `json:"-"`
5538
5539
5540
5541
5542 NullFields []string `json:"-"`
5543 }
5544
5545 func (s *CustomListGroup) MarshalJSON() ([]byte, error) {
5546 type NoMethod CustomListGroup
5547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5548 }
5549
5550
5551 type CustomListTargetingSetting struct {
5552
5553
5554 CustomListId int64 `json:"customListId,omitempty,string"`
5555
5556
5557
5558
5559
5560 ForceSendFields []string `json:"-"`
5561
5562
5563
5564
5565 NullFields []string `json:"-"`
5566 }
5567
5568 func (s *CustomListTargetingSetting) MarshalJSON() ([]byte, error) {
5569 type NoMethod CustomListTargetingSetting
5570 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5571 }
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582 type Date struct {
5583
5584
5585
5586 Day int64 `json:"day,omitempty"`
5587
5588
5589 Month int64 `json:"month,omitempty"`
5590
5591
5592 Year int64 `json:"year,omitempty"`
5593
5594
5595
5596
5597
5598 ForceSendFields []string `json:"-"`
5599
5600
5601
5602
5603 NullFields []string `json:"-"`
5604 }
5605
5606 func (s *Date) MarshalJSON() ([]byte, error) {
5607 type NoMethod Date
5608 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5609 }
5610
5611
5612 type DateRange struct {
5613
5614
5615 EndDate *Date `json:"endDate,omitempty"`
5616
5617
5618 StartDate *Date `json:"startDate,omitempty"`
5619
5620
5621
5622
5623
5624 ForceSendFields []string `json:"-"`
5625
5626
5627
5628
5629 NullFields []string `json:"-"`
5630 }
5631
5632 func (s *DateRange) MarshalJSON() ([]byte, error) {
5633 type NoMethod DateRange
5634 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5635 }
5636
5637
5638
5639
5640
5641 type DayAndTimeAssignedTargetingOptionDetails struct {
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654 DayOfWeek string `json:"dayOfWeek,omitempty"`
5655
5656
5657 EndHour int64 `json:"endHour,omitempty"`
5658
5659
5660 StartHour int64 `json:"startHour,omitempty"`
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671 TimeZoneResolution string `json:"timeZoneResolution,omitempty"`
5672
5673
5674
5675
5676
5677 ForceSendFields []string `json:"-"`
5678
5679
5680
5681
5682 NullFields []string `json:"-"`
5683 }
5684
5685 func (s *DayAndTimeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5686 type NoMethod DayAndTimeAssignedTargetingOptionDetails
5687 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5688 }
5689
5690
5691
5692 type DeactivateManualTriggerRequest struct {
5693 }
5694
5695
5696
5697 type DeleteAssignedTargetingOptionsRequest struct {
5698
5699
5700 AssignedTargetingOptionIds []string `json:"assignedTargetingOptionIds,omitempty"`
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811 TargetingType string `json:"targetingType,omitempty"`
5812
5813
5814
5815
5816
5817 ForceSendFields []string `json:"-"`
5818
5819
5820
5821
5822 NullFields []string `json:"-"`
5823 }
5824
5825 func (s *DeleteAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
5826 type NoMethod DeleteAssignedTargetingOptionsRequest
5827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5828 }
5829
5830
5831
5832
5833
5834 type DeviceMakeModelAssignedTargetingOptionDetails struct {
5835
5836 DisplayName string `json:"displayName,omitempty"`
5837
5838 Negative bool `json:"negative,omitempty"`
5839
5840
5841 TargetingOptionId string `json:"targetingOptionId,omitempty"`
5842
5843
5844
5845
5846
5847 ForceSendFields []string `json:"-"`
5848
5849
5850
5851
5852 NullFields []string `json:"-"`
5853 }
5854
5855 func (s *DeviceMakeModelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5856 type NoMethod DeviceMakeModelAssignedTargetingOptionDetails
5857 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5858 }
5859
5860
5861
5862
5863 type DeviceMakeModelTargetingOptionDetails struct {
5864
5865 DisplayName string `json:"displayName,omitempty"`
5866
5867
5868
5869
5870
5871 ForceSendFields []string `json:"-"`
5872
5873
5874
5875
5876 NullFields []string `json:"-"`
5877 }
5878
5879 func (s *DeviceMakeModelTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5880 type NoMethod DeviceMakeModelTargetingOptionDetails
5881 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5882 }
5883
5884
5885
5886
5887 type DeviceTypeAssignedTargetingOptionDetails struct {
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898 DeviceType string `json:"deviceType,omitempty"`
5899
5900
5901
5902
5903
5904
5905
5906 YoutubeAndPartnersBidMultiplier float64 `json:"youtubeAndPartnersBidMultiplier,omitempty"`
5907
5908
5909
5910
5911
5912 ForceSendFields []string `json:"-"`
5913
5914
5915
5916
5917 NullFields []string `json:"-"`
5918 }
5919
5920 func (s *DeviceTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5921 type NoMethod DeviceTypeAssignedTargetingOptionDetails
5922 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5923 }
5924
5925 func (s *DeviceTypeAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error {
5926 type NoMethod DeviceTypeAssignedTargetingOptionDetails
5927 var s1 struct {
5928 YoutubeAndPartnersBidMultiplier gensupport.JSONFloat64 `json:"youtubeAndPartnersBidMultiplier"`
5929 *NoMethod
5930 }
5931 s1.NoMethod = (*NoMethod)(s)
5932 if err := json.Unmarshal(data, &s1); err != nil {
5933 return err
5934 }
5935 s.YoutubeAndPartnersBidMultiplier = float64(s1.YoutubeAndPartnersBidMultiplier)
5936 return nil
5937 }
5938
5939
5940
5941
5942 type DeviceTypeTargetingOptionDetails struct {
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953 DeviceType string `json:"deviceType,omitempty"`
5954
5955
5956
5957
5958
5959 ForceSendFields []string `json:"-"`
5960
5961
5962
5963
5964 NullFields []string `json:"-"`
5965 }
5966
5967 func (s *DeviceTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5968 type NoMethod DeviceTypeTargetingOptionDetails
5969 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5970 }
5971
5972
5973
5974
5975
5976 type DigitalContentLabelAssignedTargetingOptionDetails struct {
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994 ExcludedContentRatingTier string `json:"excludedContentRatingTier,omitempty"`
5995
5996
5997
5998
5999
6000 ForceSendFields []string `json:"-"`
6001
6002
6003
6004
6005 NullFields []string `json:"-"`
6006 }
6007
6008 func (s *DigitalContentLabelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6009 type NoMethod DigitalContentLabelAssignedTargetingOptionDetails
6010 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6011 }
6012
6013
6014
6015
6016
6017 type DigitalContentLabelTargetingOptionDetails struct {
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035 ContentRatingTier string `json:"contentRatingTier,omitempty"`
6036
6037
6038
6039
6040
6041 ForceSendFields []string `json:"-"`
6042
6043
6044
6045
6046 NullFields []string `json:"-"`
6047 }
6048
6049 func (s *DigitalContentLabelTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6050 type NoMethod DigitalContentLabelTargetingOptionDetails
6051 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6052 }
6053
6054
6055 type Dimensions struct {
6056
6057 HeightPixels int64 `json:"heightPixels,omitempty"`
6058
6059 WidthPixels int64 `json:"widthPixels,omitempty"`
6060
6061
6062
6063
6064
6065 ForceSendFields []string `json:"-"`
6066
6067
6068
6069
6070 NullFields []string `json:"-"`
6071 }
6072
6073 func (s *Dimensions) MarshalJSON() ([]byte, error) {
6074 type NoMethod Dimensions
6075 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6076 }
6077
6078
6079 type DisplayVideoSourceAd struct {
6080
6081 CreativeId int64 `json:"creativeId,omitempty,string"`
6082
6083
6084
6085
6086
6087 ForceSendFields []string `json:"-"`
6088
6089
6090
6091
6092 NullFields []string `json:"-"`
6093 }
6094
6095 func (s *DisplayVideoSourceAd) MarshalJSON() ([]byte, error) {
6096 type NoMethod DisplayVideoSourceAd
6097 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6098 }
6099
6100
6101 type DoubleVerify struct {
6102
6103 AppStarRating *DoubleVerifyAppStarRating `json:"appStarRating,omitempty"`
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115 AvoidedAgeRatings []string `json:"avoidedAgeRatings,omitempty"`
6116
6117 BrandSafetyCategories *DoubleVerifyBrandSafetyCategories `json:"brandSafetyCategories,omitempty"`
6118
6119
6120
6121
6122 CustomSegmentId int64 `json:"customSegmentId,omitempty,string"`
6123
6124
6125 DisplayViewability *DoubleVerifyDisplayViewability `json:"displayViewability,omitempty"`
6126
6127 FraudInvalidTraffic *DoubleVerifyFraudInvalidTraffic `json:"fraudInvalidTraffic,omitempty"`
6128
6129
6130 VideoViewability *DoubleVerifyVideoViewability `json:"videoViewability,omitempty"`
6131
6132
6133
6134
6135
6136 ForceSendFields []string `json:"-"`
6137
6138
6139
6140
6141 NullFields []string `json:"-"`
6142 }
6143
6144 func (s *DoubleVerify) MarshalJSON() ([]byte, error) {
6145 type NoMethod DoubleVerify
6146 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6147 }
6148
6149
6150 type DoubleVerifyAppStarRating struct {
6151
6152
6153 AvoidInsufficientStarRating bool `json:"avoidInsufficientStarRating,omitempty"`
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166 AvoidedStarRating string `json:"avoidedStarRating,omitempty"`
6167
6168
6169
6170
6171
6172 ForceSendFields []string `json:"-"`
6173
6174
6175
6176
6177 NullFields []string `json:"-"`
6178 }
6179
6180 func (s *DoubleVerifyAppStarRating) MarshalJSON() ([]byte, error) {
6181 type NoMethod DoubleVerifyAppStarRating
6182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6183 }
6184
6185
6186 type DoubleVerifyBrandSafetyCategories struct {
6187
6188 AvoidUnknownBrandSafetyCategory bool `json:"avoidUnknownBrandSafetyCategory,omitempty"`
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203 AvoidedHighSeverityCategories []string `json:"avoidedHighSeverityCategories,omitempty"`
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231 AvoidedMediumSeverityCategories []string `json:"avoidedMediumSeverityCategories,omitempty"`
6232
6233
6234
6235
6236
6237
6238 ForceSendFields []string `json:"-"`
6239
6240
6241
6242
6243 NullFields []string `json:"-"`
6244 }
6245
6246 func (s *DoubleVerifyBrandSafetyCategories) MarshalJSON() ([]byte, error) {
6247 type NoMethod DoubleVerifyBrandSafetyCategories
6248 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6249 }
6250
6251
6252
6253 type DoubleVerifyDisplayViewability struct {
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277 Iab string `json:"iab,omitempty"`
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290 ViewableDuring string `json:"viewableDuring,omitempty"`
6291
6292
6293
6294
6295
6296 ForceSendFields []string `json:"-"`
6297
6298
6299
6300
6301 NullFields []string `json:"-"`
6302 }
6303
6304 func (s *DoubleVerifyDisplayViewability) MarshalJSON() ([]byte, error) {
6305 type NoMethod DoubleVerifyDisplayViewability
6306 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6307 }
6308
6309
6310
6311 type DoubleVerifyFraudInvalidTraffic struct {
6312
6313 AvoidInsufficientOption bool `json:"avoidInsufficientOption,omitempty"`
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327 AvoidedFraudOption string `json:"avoidedFraudOption,omitempty"`
6328
6329
6330
6331
6332
6333 ForceSendFields []string `json:"-"`
6334
6335
6336
6337
6338 NullFields []string `json:"-"`
6339 }
6340
6341 func (s *DoubleVerifyFraudInvalidTraffic) MarshalJSON() ([]byte, error) {
6342 type NoMethod DoubleVerifyFraudInvalidTraffic
6343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6344 }
6345
6346
6347
6348 type DoubleVerifyVideoViewability struct {
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359 PlayerImpressionRate string `json:"playerImpressionRate,omitempty"`
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383 VideoIab string `json:"videoIab,omitempty"`
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401 VideoViewableRate string `json:"videoViewableRate,omitempty"`
6402
6403
6404
6405
6406
6407 ForceSendFields []string `json:"-"`
6408
6409
6410
6411
6412 NullFields []string `json:"-"`
6413 }
6414
6415 func (s *DoubleVerifyVideoViewability) MarshalJSON() ([]byte, error) {
6416 type NoMethod DoubleVerifyVideoViewability
6417 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6418 }
6419
6420
6421
6422 type DuplicateLineItemRequest struct {
6423
6424
6425 TargetDisplayName string `json:"targetDisplayName,omitempty"`
6426
6427
6428
6429
6430
6431 ForceSendFields []string `json:"-"`
6432
6433
6434
6435
6436 NullFields []string `json:"-"`
6437 }
6438
6439 func (s *DuplicateLineItemRequest) MarshalJSON() ([]byte, error) {
6440 type NoMethod DuplicateLineItemRequest
6441 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6442 }
6443
6444 type DuplicateLineItemResponse struct {
6445
6446 DuplicateLineItemId int64 `json:"duplicateLineItemId,omitempty,string"`
6447
6448
6449 googleapi.ServerResponse `json:"-"`
6450
6451
6452
6453
6454
6455 ForceSendFields []string `json:"-"`
6456
6457
6458
6459
6460 NullFields []string `json:"-"`
6461 }
6462
6463 func (s *DuplicateLineItemResponse) MarshalJSON() ([]byte, error) {
6464 type NoMethod DuplicateLineItemResponse
6465 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6466 }
6467
6468
6469
6470 type EditCustomerMatchMembersRequest struct {
6471
6472
6473 AddedContactInfoList *ContactInfoList `json:"addedContactInfoList,omitempty"`
6474
6475
6476 AddedMobileDeviceIdList *MobileDeviceIdList `json:"addedMobileDeviceIdList,omitempty"`
6477
6478
6479 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6480
6481
6482 RemovedContactInfoList *ContactInfoList `json:"removedContactInfoList,omitempty"`
6483
6484
6485 RemovedMobileDeviceIdList *MobileDeviceIdList `json:"removedMobileDeviceIdList,omitempty"`
6486
6487
6488
6489
6490
6491 ForceSendFields []string `json:"-"`
6492
6493
6494
6495
6496 NullFields []string `json:"-"`
6497 }
6498
6499 func (s *EditCustomerMatchMembersRequest) MarshalJSON() ([]byte, error) {
6500 type NoMethod EditCustomerMatchMembersRequest
6501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6502 }
6503
6504
6505
6506 type EditCustomerMatchMembersResponse struct {
6507
6508
6509 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"`
6510
6511
6512 googleapi.ServerResponse `json:"-"`
6513
6514
6515
6516
6517
6518 ForceSendFields []string `json:"-"`
6519
6520
6521
6522
6523 NullFields []string `json:"-"`
6524 }
6525
6526 func (s *EditCustomerMatchMembersResponse) MarshalJSON() ([]byte, error) {
6527 type NoMethod EditCustomerMatchMembersResponse
6528 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6529 }
6530
6531
6532
6533 type EditGuaranteedOrderReadAccessorsRequest struct {
6534
6535
6536 AddedAdvertisers googleapi.Int64s `json:"addedAdvertisers,omitempty"`
6537
6538 PartnerId int64 `json:"partnerId,omitempty,string"`
6539
6540
6541
6542 ReadAccessInherited bool `json:"readAccessInherited,omitempty"`
6543
6544
6545 RemovedAdvertisers googleapi.Int64s `json:"removedAdvertisers,omitempty"`
6546
6547
6548
6549
6550
6551 ForceSendFields []string `json:"-"`
6552
6553
6554
6555
6556 NullFields []string `json:"-"`
6557 }
6558
6559 func (s *EditGuaranteedOrderReadAccessorsRequest) MarshalJSON() ([]byte, error) {
6560 type NoMethod EditGuaranteedOrderReadAccessorsRequest
6561 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6562 }
6563
6564 type EditGuaranteedOrderReadAccessorsResponse struct {
6565
6566
6567 ReadAccessInherited bool `json:"readAccessInherited,omitempty"`
6568
6569
6570 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"`
6571
6572
6573 googleapi.ServerResponse `json:"-"`
6574
6575
6576
6577
6578
6579 ForceSendFields []string `json:"-"`
6580
6581
6582
6583
6584 NullFields []string `json:"-"`
6585 }
6586
6587 func (s *EditGuaranteedOrderReadAccessorsResponse) MarshalJSON() ([]byte, error) {
6588 type NoMethod EditGuaranteedOrderReadAccessorsResponse
6589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6590 }
6591
6592
6593
6594 type EditInventorySourceReadWriteAccessorsRequest struct {
6595
6596
6597
6598 AdvertisersUpdate *EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate `json:"advertisersUpdate,omitempty"`
6599
6600
6601
6602 AssignPartner bool `json:"assignPartner,omitempty"`
6603
6604
6605 PartnerId int64 `json:"partnerId,omitempty,string"`
6606
6607
6608
6609
6610
6611 ForceSendFields []string `json:"-"`
6612
6613
6614
6615
6616 NullFields []string `json:"-"`
6617 }
6618
6619 func (s *EditInventorySourceReadWriteAccessorsRequest) MarshalJSON() ([]byte, error) {
6620 type NoMethod EditInventorySourceReadWriteAccessorsRequest
6621 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6622 }
6623
6624
6625
6626 type EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate struct {
6627
6628 AddedAdvertisers googleapi.Int64s `json:"addedAdvertisers,omitempty"`
6629
6630 RemovedAdvertisers googleapi.Int64s `json:"removedAdvertisers,omitempty"`
6631
6632
6633
6634
6635
6636 ForceSendFields []string `json:"-"`
6637
6638
6639
6640
6641 NullFields []string `json:"-"`
6642 }
6643
6644 func (s *EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate) MarshalJSON() ([]byte, error) {
6645 type NoMethod EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate
6646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6647 }
6648
6649
6650
6651
6652
6653 type Empty struct {
6654
6655 googleapi.ServerResponse `json:"-"`
6656 }
6657
6658
6659
6660
6661 type EnvironmentAssignedTargetingOptionDetails struct {
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679 Environment string `json:"environment,omitempty"`
6680
6681
6682
6683
6684
6685 ForceSendFields []string `json:"-"`
6686
6687
6688
6689
6690 NullFields []string `json:"-"`
6691 }
6692
6693 func (s *EnvironmentAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6694 type NoMethod EnvironmentAssignedTargetingOptionDetails
6695 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6696 }
6697
6698
6699
6700
6701 type EnvironmentTargetingOptionDetails struct {
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719 Environment string `json:"environment,omitempty"`
6720
6721
6722
6723
6724
6725 ForceSendFields []string `json:"-"`
6726
6727
6728
6729
6730 NullFields []string `json:"-"`
6731 }
6732
6733 func (s *EnvironmentTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6734 type NoMethod EnvironmentTargetingOptionDetails
6735 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6736 }
6737
6738
6739
6740
6741 type ExchangeAssignedTargetingOptionDetails struct {
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829 Exchange string `json:"exchange,omitempty"`
6830
6831
6832
6833
6834
6835 ForceSendFields []string `json:"-"`
6836
6837
6838
6839
6840 NullFields []string `json:"-"`
6841 }
6842
6843 func (s *ExchangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6844 type NoMethod ExchangeAssignedTargetingOptionDetails
6845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6846 }
6847
6848
6849
6850 type ExchangeConfig struct {
6851
6852
6853 EnabledExchanges []*ExchangeConfigEnabledExchange `json:"enabledExchanges,omitempty"`
6854
6855
6856
6857
6858
6859 ForceSendFields []string `json:"-"`
6860
6861
6862
6863
6864 NullFields []string `json:"-"`
6865 }
6866
6867 func (s *ExchangeConfig) MarshalJSON() ([]byte, error) {
6868 type NoMethod ExchangeConfig
6869 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6870 }
6871
6872
6873 type ExchangeConfigEnabledExchange struct {
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961 Exchange string `json:"exchange,omitempty"`
6962
6963
6964 GoogleAdManagerAgencyId string `json:"googleAdManagerAgencyId,omitempty"`
6965
6966
6967 GoogleAdManagerBuyerNetworkId string `json:"googleAdManagerBuyerNetworkId,omitempty"`
6968
6969 SeatId string `json:"seatId,omitempty"`
6970
6971
6972
6973
6974
6975 ForceSendFields []string `json:"-"`
6976
6977
6978
6979
6980 NullFields []string `json:"-"`
6981 }
6982
6983 func (s *ExchangeConfigEnabledExchange) MarshalJSON() ([]byte, error) {
6984 type NoMethod ExchangeConfigEnabledExchange
6985 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6986 }
6987
6988
6989 type ExchangeReviewStatus struct {
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077 Exchange string `json:"exchange,omitempty"`
7078
7079
7080
7081
7082
7083
7084
7085
7086 Status string `json:"status,omitempty"`
7087
7088
7089
7090
7091
7092 ForceSendFields []string `json:"-"`
7093
7094
7095
7096
7097 NullFields []string `json:"-"`
7098 }
7099
7100 func (s *ExchangeReviewStatus) MarshalJSON() ([]byte, error) {
7101 type NoMethod ExchangeReviewStatus
7102 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7103 }
7104
7105
7106
7107
7108 type ExchangeTargetingOptionDetails struct {
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196 Exchange string `json:"exchange,omitempty"`
7197
7198
7199
7200
7201
7202 ForceSendFields []string `json:"-"`
7203
7204
7205
7206
7207 NullFields []string `json:"-"`
7208 }
7209
7210 func (s *ExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
7211 type NoMethod ExchangeTargetingOptionDetails
7212 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7213 }
7214
7215
7216 type ExitEvent struct {
7217
7218
7219
7220 Name string `json:"name,omitempty"`
7221
7222
7223 ReportingName string `json:"reportingName,omitempty"`
7224
7225
7226
7227
7228
7229
7230
7231
7232 Type string `json:"type,omitempty"`
7233
7234
7235 Url string `json:"url,omitempty"`
7236
7237
7238
7239
7240
7241 ForceSendFields []string `json:"-"`
7242
7243
7244
7245
7246 NullFields []string `json:"-"`
7247 }
7248
7249 func (s *ExitEvent) MarshalJSON() ([]byte, error) {
7250 type NoMethod ExitEvent
7251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7252 }
7253
7254
7255
7256
7257
7258 type FirstAndThirdPartyAudience struct {
7259
7260
7261
7262
7263
7264 ActiveDisplayAudienceSize int64 `json:"activeDisplayAudienceSize,omitempty,string"`
7265
7266
7267 AppId string `json:"appId,omitempty"`
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279 AudienceSource string `json:"audienceSource,omitempty"`
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299 AudienceType string `json:"audienceType,omitempty"`
7300
7301
7302
7303 ContactInfoList *ContactInfoList `json:"contactInfoList,omitempty"`
7304
7305
7306 Description string `json:"description,omitempty"`
7307
7308
7309
7310
7311 DisplayAudienceSize int64 `json:"displayAudienceSize,omitempty,string"`
7312
7313
7314
7315
7316
7317 DisplayDesktopAudienceSize int64 `json:"displayDesktopAudienceSize,omitempty,string"`
7318
7319
7320
7321
7322
7323 DisplayMobileAppAudienceSize int64 `json:"displayMobileAppAudienceSize,omitempty,string"`
7324
7325
7326
7327
7328
7329 DisplayMobileWebAudienceSize int64 `json:"displayMobileWebAudienceSize,omitempty,string"`
7330
7331 DisplayName string `json:"displayName,omitempty"`
7332
7333
7334 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"`
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345 FirstAndThirdPartyAudienceType string `json:"firstAndThirdPartyAudienceType,omitempty"`
7346
7347
7348
7349
7350
7351 GmailAudienceSize int64 `json:"gmailAudienceSize,omitempty,string"`
7352
7353
7354
7355
7356
7357
7358 MembershipDurationDays int64 `json:"membershipDurationDays,omitempty,string"`
7359
7360
7361
7362 MobileDeviceIdList *MobileDeviceIdList `json:"mobileDeviceIdList,omitempty"`
7363
7364 Name string `json:"name,omitempty"`
7365
7366
7367
7368
7369
7370 YoutubeAudienceSize int64 `json:"youtubeAudienceSize,omitempty,string"`
7371
7372
7373 googleapi.ServerResponse `json:"-"`
7374
7375
7376
7377
7378
7379 ForceSendFields []string `json:"-"`
7380
7381
7382
7383
7384 NullFields []string `json:"-"`
7385 }
7386
7387 func (s *FirstAndThirdPartyAudience) MarshalJSON() ([]byte, error) {
7388 type NoMethod FirstAndThirdPartyAudience
7389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7390 }
7391
7392
7393
7394
7395 type FirstAndThirdPartyAudienceGroup struct {
7396
7397
7398
7399 Settings []*FirstAndThirdPartyAudienceTargetingSetting `json:"settings,omitempty"`
7400
7401
7402
7403
7404
7405 ForceSendFields []string `json:"-"`
7406
7407
7408
7409
7410 NullFields []string `json:"-"`
7411 }
7412
7413 func (s *FirstAndThirdPartyAudienceGroup) MarshalJSON() ([]byte, error) {
7414 type NoMethod FirstAndThirdPartyAudienceGroup
7415 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7416 }
7417
7418
7419
7420 type FirstAndThirdPartyAudienceTargetingSetting struct {
7421
7422
7423
7424 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"`
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462 Recency string `json:"recency,omitempty"`
7463
7464
7465
7466
7467
7468 ForceSendFields []string `json:"-"`
7469
7470
7471
7472
7473 NullFields []string `json:"-"`
7474 }
7475
7476 func (s *FirstAndThirdPartyAudienceTargetingSetting) MarshalJSON() ([]byte, error) {
7477 type NoMethod FirstAndThirdPartyAudienceTargetingSetting
7478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7479 }
7480
7481
7482 type FixedBidStrategy struct {
7483
7484
7485
7486
7487
7488
7489 BidAmountMicros int64 `json:"bidAmountMicros,omitempty,string"`
7490
7491
7492
7493
7494
7495 ForceSendFields []string `json:"-"`
7496
7497
7498
7499
7500 NullFields []string `json:"-"`
7501 }
7502
7503 func (s *FixedBidStrategy) MarshalJSON() ([]byte, error) {
7504 type NoMethod FixedBidStrategy
7505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7506 }
7507
7508
7509 type FloodlightActivity struct {
7510
7511
7512
7513 AdvertiserIds googleapi.Int64s `json:"advertiserIds,omitempty"`
7514
7515 DisplayName string `json:"displayName,omitempty"`
7516
7517
7518 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
7519
7520
7521 FloodlightGroupId int64 `json:"floodlightGroupId,omitempty,string"`
7522
7523 Name string `json:"name,omitempty"`
7524
7525
7526
7527
7528
7529 RemarketingConfigs []*RemarketingConfig `json:"remarketingConfigs,omitempty"`
7530
7531
7532
7533
7534
7535
7536
7537 ServingStatus string `json:"servingStatus,omitempty"`
7538
7539 SslRequired bool `json:"sslRequired,omitempty"`
7540
7541
7542 googleapi.ServerResponse `json:"-"`
7543
7544
7545
7546
7547
7548 ForceSendFields []string `json:"-"`
7549
7550
7551
7552
7553 NullFields []string `json:"-"`
7554 }
7555
7556 func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
7557 type NoMethod FloodlightActivity
7558 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7559 }
7560
7561
7562 type FloodlightGroup struct {
7563
7564
7565 ActiveViewConfig *ActiveViewVideoViewabilityMetricConfig `json:"activeViewConfig,omitempty"`
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580 CustomVariables googleapi.RawMessage `json:"customVariables,omitempty"`
7581
7582 DisplayName string `json:"displayName,omitempty"`
7583
7584
7585 FloodlightGroupId int64 `json:"floodlightGroupId,omitempty,string"`
7586
7587
7588
7589 LookbackWindow *LookbackWindow `json:"lookbackWindow,omitempty"`
7590
7591 Name string `json:"name,omitempty"`
7592
7593
7594
7595
7596
7597
7598
7599
7600 WebTagType string `json:"webTagType,omitempty"`
7601
7602
7603 googleapi.ServerResponse `json:"-"`
7604
7605
7606
7607
7608
7609 ForceSendFields []string `json:"-"`
7610
7611
7612
7613
7614 NullFields []string `json:"-"`
7615 }
7616
7617 func (s *FloodlightGroup) MarshalJSON() ([]byte, error) {
7618 type NoMethod FloodlightGroup
7619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7620 }
7621
7622
7623
7624 type FrequencyCap struct {
7625
7626
7627
7628 MaxImpressions int64 `json:"maxImpressions,omitempty"`
7629
7630
7631
7632
7633 MaxViews int64 `json:"maxViews,omitempty"`
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651 TimeUnit string `json:"timeUnit,omitempty"`
7652
7653
7654
7655
7656
7657
7658
7659 TimeUnitCount int64 `json:"timeUnitCount,omitempty"`
7660
7661
7662 Unlimited bool `json:"unlimited,omitempty"`
7663
7664
7665
7666
7667
7668 ForceSendFields []string `json:"-"`
7669
7670
7671
7672
7673 NullFields []string `json:"-"`
7674 }
7675
7676 func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
7677 type NoMethod FrequencyCap
7678 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7679 }
7680
7681
7682
7683
7684 type GenderAssignedTargetingOptionDetails struct {
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694 Gender string `json:"gender,omitempty"`
7695
7696
7697
7698
7699
7700 ForceSendFields []string `json:"-"`
7701
7702
7703
7704
7705 NullFields []string `json:"-"`
7706 }
7707
7708 func (s *GenderAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
7709 type NoMethod GenderAssignedTargetingOptionDetails
7710 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7711 }
7712
7713
7714
7715
7716 type GenderTargetingOptionDetails struct {
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726 Gender string `json:"gender,omitempty"`
7727
7728
7729
7730
7731
7732 ForceSendFields []string `json:"-"`
7733
7734
7735
7736
7737 NullFields []string `json:"-"`
7738 }
7739
7740 func (s *GenderTargetingOptionDetails) MarshalJSON() ([]byte, error) {
7741 type NoMethod GenderTargetingOptionDetails
7742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7743 }
7744
7745
7746
7747 type GenerateDefaultLineItemRequest struct {
7748
7749
7750 DisplayName string `json:"displayName,omitempty"`
7751
7752
7753 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"`
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824 LineItemType string `json:"lineItemType,omitempty"`
7825
7826
7827
7828 MobileApp *MobileApp `json:"mobileApp,omitempty"`
7829
7830
7831
7832
7833
7834 ForceSendFields []string `json:"-"`
7835
7836
7837
7838
7839 NullFields []string `json:"-"`
7840 }
7841
7842 func (s *GenerateDefaultLineItemRequest) MarshalJSON() ([]byte, error) {
7843 type NoMethod GenerateDefaultLineItemRequest
7844 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7845 }
7846
7847
7848
7849
7850 type GeoRegionAssignedTargetingOptionDetails struct {
7851
7852
7853 DisplayName string `json:"displayName,omitempty"`
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893 GeoRegionType string `json:"geoRegionType,omitempty"`
7894
7895 Negative bool `json:"negative,omitempty"`
7896
7897
7898 TargetingOptionId string `json:"targetingOptionId,omitempty"`
7899
7900
7901
7902
7903
7904 ForceSendFields []string `json:"-"`
7905
7906
7907
7908
7909 NullFields []string `json:"-"`
7910 }
7911
7912 func (s *GeoRegionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
7913 type NoMethod GeoRegionAssignedTargetingOptionDetails
7914 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7915 }
7916
7917
7918 type GeoRegionSearchTerms struct {
7919
7920
7921 GeoRegionQuery string `json:"geoRegionQuery,omitempty"`
7922
7923
7924
7925
7926
7927 ForceSendFields []string `json:"-"`
7928
7929
7930
7931
7932 NullFields []string `json:"-"`
7933 }
7934
7935 func (s *GeoRegionSearchTerms) MarshalJSON() ([]byte, error) {
7936 type NoMethod GeoRegionSearchTerms
7937 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7938 }
7939
7940
7941
7942
7943 type GeoRegionTargetingOptionDetails struct {
7944
7945
7946 DisplayName string `json:"displayName,omitempty"`
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986 GeoRegionType string `json:"geoRegionType,omitempty"`
7987
7988
7989
7990
7991
7992 ForceSendFields []string `json:"-"`
7993
7994
7995
7996
7997 NullFields []string `json:"-"`
7998 }
7999
8000 func (s *GeoRegionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
8001 type NoMethod GeoRegionTargetingOptionDetails
8002 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8003 }
8004
8005
8006
8007 type GoogleAudience struct {
8008
8009 DisplayName string `json:"displayName,omitempty"`
8010
8011
8012 GoogleAudienceId int64 `json:"googleAudienceId,omitempty,string"`
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027 GoogleAudienceType string `json:"googleAudienceType,omitempty"`
8028
8029 Name string `json:"name,omitempty"`
8030
8031
8032 googleapi.ServerResponse `json:"-"`
8033
8034
8035
8036
8037
8038 ForceSendFields []string `json:"-"`
8039
8040
8041
8042
8043 NullFields []string `json:"-"`
8044 }
8045
8046 func (s *GoogleAudience) MarshalJSON() ([]byte, error) {
8047 type NoMethod GoogleAudience
8048 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8049 }
8050
8051
8052
8053 type GoogleAudienceGroup struct {
8054
8055
8056 Settings []*GoogleAudienceTargetingSetting `json:"settings,omitempty"`
8057
8058
8059
8060
8061
8062 ForceSendFields []string `json:"-"`
8063
8064
8065
8066
8067 NullFields []string `json:"-"`
8068 }
8069
8070 func (s *GoogleAudienceGroup) MarshalJSON() ([]byte, error) {
8071 type NoMethod GoogleAudienceGroup
8072 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8073 }
8074
8075
8076
8077 type GoogleAudienceTargetingSetting struct {
8078
8079
8080 GoogleAudienceId int64 `json:"googleAudienceId,omitempty,string"`
8081
8082
8083
8084
8085
8086 ForceSendFields []string `json:"-"`
8087
8088
8089
8090
8091 NullFields []string `json:"-"`
8092 }
8093
8094 func (s *GoogleAudienceTargetingSetting) MarshalJSON() ([]byte, error) {
8095 type NoMethod GoogleAudienceTargetingSetting
8096 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8097 }
8098
8099
8100 type GoogleBytestreamMedia struct {
8101
8102 ResourceName string `json:"resourceName,omitempty"`
8103
8104
8105 googleapi.ServerResponse `json:"-"`
8106
8107
8108
8109
8110
8111 ForceSendFields []string `json:"-"`
8112
8113
8114
8115
8116 NullFields []string `json:"-"`
8117 }
8118
8119 func (s *GoogleBytestreamMedia) MarshalJSON() ([]byte, error) {
8120 type NoMethod GoogleBytestreamMedia
8121 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8122 }
8123
8124
8125
8126
8127 type GuaranteedOrder struct {
8128
8129
8130
8131
8132 DefaultAdvertiserId int64 `json:"defaultAdvertiserId,omitempty,string"`
8133
8134
8135
8136 DefaultCampaignId int64 `json:"defaultCampaignId,omitempty,string"`
8137
8138
8139 DisplayName string `json:"displayName,omitempty"`
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228 Exchange string `json:"exchange,omitempty"`
8229
8230
8231
8232 GuaranteedOrderId string `json:"guaranteedOrderId,omitempty"`
8233
8234
8235
8236
8237 LegacyGuaranteedOrderId string `json:"legacyGuaranteedOrderId,omitempty"`
8238
8239 Name string `json:"name,omitempty"`
8240
8241
8242 PublisherName string `json:"publisherName,omitempty"`
8243
8244
8245
8246 ReadAccessInherited bool `json:"readAccessInherited,omitempty"`
8247
8248
8249
8250
8251
8252 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"`
8253
8254
8255
8256 ReadWriteAdvertiserId int64 `json:"readWriteAdvertiserId,omitempty,string"`
8257
8258
8259 ReadWritePartnerId int64 `json:"readWritePartnerId,omitempty,string"`
8260
8261 Status *GuaranteedOrderStatus `json:"status,omitempty"`
8262
8263
8264 UpdateTime string `json:"updateTime,omitempty"`
8265
8266
8267 googleapi.ServerResponse `json:"-"`
8268
8269
8270
8271
8272
8273 ForceSendFields []string `json:"-"`
8274
8275
8276
8277
8278 NullFields []string `json:"-"`
8279 }
8280
8281 func (s *GuaranteedOrder) MarshalJSON() ([]byte, error) {
8282 type NoMethod GuaranteedOrder
8283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8284 }
8285
8286
8287 type GuaranteedOrderStatus struct {
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300 ConfigStatus string `json:"configStatus,omitempty"`
8301
8302
8303
8304 EntityPauseReason string `json:"entityPauseReason,omitempty"`
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322 EntityStatus string `json:"entityStatus,omitempty"`
8323
8324
8325
8326
8327
8328 ForceSendFields []string `json:"-"`
8329
8330
8331
8332
8333 NullFields []string `json:"-"`
8334 }
8335
8336 func (s *GuaranteedOrderStatus) MarshalJSON() ([]byte, error) {
8337 type NoMethod GuaranteedOrderStatus
8338 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8339 }
8340
8341
8342
8343
8344
8345 type HouseholdIncomeAssignedTargetingOptionDetails struct {
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366 HouseholdIncome string `json:"householdIncome,omitempty"`
8367
8368
8369
8370
8371
8372 ForceSendFields []string `json:"-"`
8373
8374
8375
8376
8377 NullFields []string `json:"-"`
8378 }
8379
8380 func (s *HouseholdIncomeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
8381 type NoMethod HouseholdIncomeAssignedTargetingOptionDetails
8382 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8383 }
8384
8385
8386
8387
8388 type HouseholdIncomeTargetingOptionDetails struct {
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409 HouseholdIncome string `json:"householdIncome,omitempty"`
8410
8411
8412
8413
8414
8415 ForceSendFields []string `json:"-"`
8416
8417
8418
8419
8420 NullFields []string `json:"-"`
8421 }
8422
8423 func (s *HouseholdIncomeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
8424 type NoMethod HouseholdIncomeTargetingOptionDetails
8425 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8426 }
8427
8428
8429 type IdFilter struct {
8430
8431
8432 AdGroupAdIds googleapi.Int64s `json:"adGroupAdIds,omitempty"`
8433
8434
8435 AdGroupIds googleapi.Int64s `json:"adGroupIds,omitempty"`
8436
8437
8438 CampaignIds googleapi.Int64s `json:"campaignIds,omitempty"`
8439
8440
8441 InsertionOrderIds googleapi.Int64s `json:"insertionOrderIds,omitempty"`
8442
8443
8444 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"`
8445
8446
8447 MediaProductIds googleapi.Int64s `json:"mediaProductIds,omitempty"`
8448
8449
8450
8451
8452
8453 ForceSendFields []string `json:"-"`
8454
8455
8456
8457
8458 NullFields []string `json:"-"`
8459 }
8460
8461 func (s *IdFilter) MarshalJSON() ([]byte, error) {
8462 type NoMethod IdFilter
8463 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8464 }
8465
8466
8467 type ImageAsset struct {
8468
8469 FileSize int64 `json:"fileSize,omitempty,string"`
8470
8471 FullSize *Dimensions `json:"fullSize,omitempty"`
8472
8473 MimeType string `json:"mimeType,omitempty"`
8474
8475
8476
8477
8478
8479 ForceSendFields []string `json:"-"`
8480
8481
8482
8483
8484 NullFields []string `json:"-"`
8485 }
8486
8487 func (s *ImageAsset) MarshalJSON() ([]byte, error) {
8488 type NoMethod ImageAsset
8489 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8490 }
8491
8492
8493 type InStreamAd struct {
8494
8495 CommonInStreamAttribute *CommonInStreamAttribute `json:"commonInStreamAttribute,omitempty"`
8496
8497
8498 CustomParameters map[string]string `json:"customParameters,omitempty"`
8499
8500
8501
8502
8503
8504 ForceSendFields []string `json:"-"`
8505
8506
8507
8508
8509 NullFields []string `json:"-"`
8510 }
8511
8512 func (s *InStreamAd) MarshalJSON() ([]byte, error) {
8513 type NoMethod InStreamAd
8514 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8515 }
8516
8517
8518 type InsertionOrder struct {
8519
8520
8521 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8522
8523
8524 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"`
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534 BillableOutcome string `json:"billableOutcome,omitempty"`
8535
8536 Budget *InsertionOrderBudget `json:"budget,omitempty"`
8537
8538
8539 CampaignId int64 `json:"campaignId,omitempty,string"`
8540
8541
8542 DisplayName string `json:"displayName,omitempty"`
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565 EntityStatus string `json:"entityStatus,omitempty"`
8566
8567
8568 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
8569
8570
8571 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"`
8572
8573
8574
8575
8576
8577
8578
8579
8580 InsertionOrderType string `json:"insertionOrderType,omitempty"`
8581
8582 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"`
8583
8584 Name string `json:"name,omitempty"`
8585
8586 Pacing *Pacing `json:"pacing,omitempty"`
8587
8588
8589
8590 PartnerCosts []*PartnerCost `json:"partnerCosts,omitempty"`
8591
8592 PerformanceGoal *PerformanceGoal `json:"performanceGoal,omitempty"`
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608 ReservationType string `json:"reservationType,omitempty"`
8609
8610
8611 UpdateTime string `json:"updateTime,omitempty"`
8612
8613
8614 googleapi.ServerResponse `json:"-"`
8615
8616
8617
8618
8619
8620 ForceSendFields []string `json:"-"`
8621
8622
8623
8624
8625 NullFields []string `json:"-"`
8626 }
8627
8628 func (s *InsertionOrder) MarshalJSON() ([]byte, error) {
8629 type NoMethod InsertionOrder
8630 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8631 }
8632
8633
8634
8635 type InsertionOrderBudget struct {
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652 AutomationType string `json:"automationType,omitempty"`
8653
8654
8655
8656 BudgetSegments []*InsertionOrderBudgetSegment `json:"budgetSegments,omitempty"`
8657
8658
8659
8660
8661
8662
8663
8664
8665 BudgetUnit string `json:"budgetUnit,omitempty"`
8666
8667
8668
8669
8670
8671 ForceSendFields []string `json:"-"`
8672
8673
8674
8675
8676 NullFields []string `json:"-"`
8677 }
8678
8679 func (s *InsertionOrderBudget) MarshalJSON() ([]byte, error) {
8680 type NoMethod InsertionOrderBudget
8681 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8682 }
8683
8684
8685
8686 type InsertionOrderBudgetSegment struct {
8687
8688
8689
8690
8691 BudgetAmountMicros int64 `json:"budgetAmountMicros,omitempty,string"`
8692
8693
8694 CampaignBudgetId int64 `json:"campaignBudgetId,omitempty,string"`
8695
8696
8697
8698
8699
8700
8701 DateRange *DateRange `json:"dateRange,omitempty"`
8702
8703
8704
8705 Description string `json:"description,omitempty"`
8706
8707
8708
8709
8710
8711 ForceSendFields []string `json:"-"`
8712
8713
8714
8715
8716 NullFields []string `json:"-"`
8717 }
8718
8719 func (s *InsertionOrderBudgetSegment) MarshalJSON() ([]byte, error) {
8720 type NoMethod InsertionOrderBudgetSegment
8721 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8722 }
8723
8724
8725 type IntegralAdScience struct {
8726
8727
8728 CustomSegmentId googleapi.Int64s `json:"customSegmentId,omitempty"`
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739 DisplayViewability string `json:"displayViewability,omitempty"`
8740
8741 ExcludeUnrateable bool `json:"excludeUnrateable,omitempty"`
8742
8743
8744
8745
8746
8747
8748
8749 ExcludedAdFraudRisk string `json:"excludedAdFraudRisk,omitempty"`
8750
8751
8752
8753
8754
8755
8756
8757 ExcludedAdultRisk string `json:"excludedAdultRisk,omitempty"`
8758
8759
8760
8761
8762
8763
8764
8765 ExcludedAlcoholRisk string `json:"excludedAlcoholRisk,omitempty"`
8766
8767
8768
8769
8770
8771
8772
8773 ExcludedDrugsRisk string `json:"excludedDrugsRisk,omitempty"`
8774
8775
8776
8777
8778
8779
8780
8781 ExcludedGamblingRisk string `json:"excludedGamblingRisk,omitempty"`
8782
8783
8784
8785
8786
8787
8788
8789 ExcludedHateSpeechRisk string `json:"excludedHateSpeechRisk,omitempty"`
8790
8791
8792
8793
8794
8795
8796
8797
8798 ExcludedIllegalDownloadsRisk string `json:"excludedIllegalDownloadsRisk,omitempty"`
8799
8800
8801
8802
8803
8804
8805
8806
8807 ExcludedOffensiveLanguageRisk string `json:"excludedOffensiveLanguageRisk,omitempty"`
8808
8809
8810
8811
8812
8813
8814
8815 ExcludedViolenceRisk string `json:"excludedViolenceRisk,omitempty"`
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829 TraqScoreOption string `json:"traqScoreOption,omitempty"`
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840 VideoViewability string `json:"videoViewability,omitempty"`
8841
8842
8843
8844
8845
8846 ForceSendFields []string `json:"-"`
8847
8848
8849
8850
8851 NullFields []string `json:"-"`
8852 }
8853
8854 func (s *IntegralAdScience) MarshalJSON() ([]byte, error) {
8855 type NoMethod IntegralAdScience
8856 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8857 }
8858
8859
8860 type IntegrationDetails struct {
8861
8862
8863 Details string `json:"details,omitempty"`
8864
8865
8866
8867
8868 IntegrationCode string `json:"integrationCode,omitempty"`
8869
8870
8871
8872
8873
8874 ForceSendFields []string `json:"-"`
8875
8876
8877
8878
8879 NullFields []string `json:"-"`
8880 }
8881
8882 func (s *IntegrationDetails) MarshalJSON() ([]byte, error) {
8883 type NoMethod IntegrationDetails
8884 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8885 }
8886
8887
8888 type InventorySource struct {
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899 Commitment string `json:"commitment,omitempty"`
8900
8901
8902 CreativeConfigs []*CreativeConfig `json:"creativeConfigs,omitempty"`
8903
8904
8905
8906 DealId string `json:"dealId,omitempty"`
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919 DeliveryMethod string `json:"deliveryMethod,omitempty"`
8920
8921
8922 DisplayName string `json:"displayName,omitempty"`
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010 Exchange string `json:"exchange,omitempty"`
9011
9012
9013
9014 GuaranteedOrderId string `json:"guaranteedOrderId,omitempty"`
9015
9016
9017 InventorySourceId int64 `json:"inventorySourceId,omitempty,string"`
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047 InventorySourceProductType string `json:"inventorySourceProductType,omitempty"`
9048
9049
9050
9051
9052
9053
9054
9055 InventorySourceType string `json:"inventorySourceType,omitempty"`
9056
9057 Name string `json:"name,omitempty"`
9058
9059 PublisherName string `json:"publisherName,omitempty"`
9060
9061 RateDetails *RateDetails `json:"rateDetails,omitempty"`
9062
9063
9064 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"`
9065
9066
9067
9068 ReadPartnerIds googleapi.Int64s `json:"readPartnerIds,omitempty"`
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078 ReadWriteAccessors *InventorySourceAccessors `json:"readWriteAccessors,omitempty"`
9079
9080 Status *InventorySourceStatus `json:"status,omitempty"`
9081
9082
9083 TimeRange *TimeRange `json:"timeRange,omitempty"`
9084
9085
9086 UpdateTime string `json:"updateTime,omitempty"`
9087
9088
9089 googleapi.ServerResponse `json:"-"`
9090
9091
9092
9093
9094
9095 ForceSendFields []string `json:"-"`
9096
9097
9098
9099
9100 NullFields []string `json:"-"`
9101 }
9102
9103 func (s *InventorySource) MarshalJSON() ([]byte, error) {
9104 type NoMethod InventorySource
9105 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9106 }
9107
9108
9109
9110 type InventorySourceAccessors struct {
9111
9112
9113 Advertisers *InventorySourceAccessorsAdvertiserAccessors `json:"advertisers,omitempty"`
9114
9115 Partner *InventorySourceAccessorsPartnerAccessor `json:"partner,omitempty"`
9116
9117
9118 googleapi.ServerResponse `json:"-"`
9119
9120
9121
9122
9123
9124 ForceSendFields []string `json:"-"`
9125
9126
9127
9128
9129 NullFields []string `json:"-"`
9130 }
9131
9132 func (s *InventorySourceAccessors) MarshalJSON() ([]byte, error) {
9133 type NoMethod InventorySourceAccessors
9134 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9135 }
9136
9137
9138
9139 type InventorySourceAccessorsAdvertiserAccessors struct {
9140
9141 AdvertiserIds googleapi.Int64s `json:"advertiserIds,omitempty"`
9142
9143
9144
9145
9146
9147 ForceSendFields []string `json:"-"`
9148
9149
9150
9151
9152 NullFields []string `json:"-"`
9153 }
9154
9155 func (s *InventorySourceAccessorsAdvertiserAccessors) MarshalJSON() ([]byte, error) {
9156 type NoMethod InventorySourceAccessorsAdvertiserAccessors
9157 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9158 }
9159
9160
9161
9162 type InventorySourceAccessorsPartnerAccessor struct {
9163
9164 PartnerId int64 `json:"partnerId,omitempty,string"`
9165
9166
9167
9168
9169
9170 ForceSendFields []string `json:"-"`
9171
9172
9173
9174
9175 NullFields []string `json:"-"`
9176 }
9177
9178 func (s *InventorySourceAccessorsPartnerAccessor) MarshalJSON() ([]byte, error) {
9179 type NoMethod InventorySourceAccessorsPartnerAccessor
9180 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9181 }
9182
9183
9184
9185
9186
9187 type InventorySourceAssignedTargetingOptionDetails struct {
9188
9189
9190 InventorySourceId int64 `json:"inventorySourceId,omitempty,string"`
9191
9192
9193
9194
9195
9196 ForceSendFields []string `json:"-"`
9197
9198
9199
9200
9201 NullFields []string `json:"-"`
9202 }
9203
9204 func (s *InventorySourceAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
9205 type NoMethod InventorySourceAssignedTargetingOptionDetails
9206 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9207 }
9208
9209
9210
9211 type InventorySourceDisplayCreativeConfig struct {
9212
9213
9214 CreativeSize *Dimensions `json:"creativeSize,omitempty"`
9215
9216
9217
9218
9219
9220 ForceSendFields []string `json:"-"`
9221
9222
9223
9224
9225 NullFields []string `json:"-"`
9226 }
9227
9228 func (s *InventorySourceDisplayCreativeConfig) MarshalJSON() ([]byte, error) {
9229 type NoMethod InventorySourceDisplayCreativeConfig
9230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9231 }
9232
9233
9234
9235 type InventorySourceFilter struct {
9236
9237
9238
9239
9240 InventorySourceIds googleapi.Int64s `json:"inventorySourceIds,omitempty"`
9241
9242
9243
9244
9245
9246 ForceSendFields []string `json:"-"`
9247
9248
9249
9250
9251 NullFields []string `json:"-"`
9252 }
9253
9254 func (s *InventorySourceFilter) MarshalJSON() ([]byte, error) {
9255 type NoMethod InventorySourceFilter
9256 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9257 }
9258
9259
9260 type InventorySourceGroup struct {
9261
9262
9263 DisplayName string `json:"displayName,omitempty"`
9264
9265
9266 InventorySourceGroupId int64 `json:"inventorySourceGroupId,omitempty,string"`
9267
9268 Name string `json:"name,omitempty"`
9269
9270
9271 googleapi.ServerResponse `json:"-"`
9272
9273
9274
9275
9276
9277 ForceSendFields []string `json:"-"`
9278
9279
9280
9281
9282 NullFields []string `json:"-"`
9283 }
9284
9285 func (s *InventorySourceGroup) MarshalJSON() ([]byte, error) {
9286 type NoMethod InventorySourceGroup
9287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9288 }
9289
9290
9291
9292
9293
9294 type InventorySourceGroupAssignedTargetingOptionDetails struct {
9295
9296
9297
9298 InventorySourceGroupId int64 `json:"inventorySourceGroupId,omitempty,string"`
9299
9300
9301
9302
9303
9304 ForceSendFields []string `json:"-"`
9305
9306
9307
9308
9309 NullFields []string `json:"-"`
9310 }
9311
9312 func (s *InventorySourceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
9313 type NoMethod InventorySourceGroupAssignedTargetingOptionDetails
9314 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9315 }
9316
9317
9318 type InventorySourceStatus struct {
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334 ConfigStatus string `json:"configStatus,omitempty"`
9335
9336
9337
9338 EntityPauseReason string `json:"entityPauseReason,omitempty"`
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356 EntityStatus string `json:"entityStatus,omitempty"`
9357
9358
9359
9360 SellerPauseReason string `json:"sellerPauseReason,omitempty"`
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379 SellerStatus string `json:"sellerStatus,omitempty"`
9380
9381
9382
9383
9384
9385 ForceSendFields []string `json:"-"`
9386
9387
9388
9389
9390 NullFields []string `json:"-"`
9391 }
9392
9393 func (s *InventorySourceStatus) MarshalJSON() ([]byte, error) {
9394 type NoMethod InventorySourceStatus
9395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9396 }
9397
9398
9399 type InventorySourceVideoCreativeConfig struct {
9400
9401
9402 Duration string `json:"duration,omitempty"`
9403
9404
9405
9406
9407
9408 ForceSendFields []string `json:"-"`
9409
9410
9411
9412
9413 NullFields []string `json:"-"`
9414 }
9415
9416 func (s *InventorySourceVideoCreativeConfig) MarshalJSON() ([]byte, error) {
9417 type NoMethod InventorySourceVideoCreativeConfig
9418 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9419 }
9420
9421
9422 type Invoice struct {
9423
9424
9425
9426 BudgetInvoiceGroupingId string `json:"budgetInvoiceGroupingId,omitempty"`
9427
9428
9429
9430
9431 BudgetSummaries []*BudgetSummary `json:"budgetSummaries,omitempty"`
9432
9433
9434
9435 CorrectedInvoiceId string `json:"correctedInvoiceId,omitempty"`
9436
9437 CurrencyCode string `json:"currencyCode,omitempty"`
9438
9439 DisplayName string `json:"displayName,omitempty"`
9440
9441 DueDate *Date `json:"dueDate,omitempty"`
9442
9443 InvoiceId string `json:"invoiceId,omitempty"`
9444
9445
9446
9447
9448
9449
9450 InvoiceType string `json:"invoiceType,omitempty"`
9451
9452 IssueDate *Date `json:"issueDate,omitempty"`
9453
9454 Name string `json:"name,omitempty"`
9455
9456
9457
9458 NonBudgetMicros int64 `json:"nonBudgetMicros,omitempty,string"`
9459
9460
9461 PaymentsAccountId string `json:"paymentsAccountId,omitempty"`
9462
9463
9464 PaymentsProfileId string `json:"paymentsProfileId,omitempty"`
9465
9466
9467
9468
9469
9470
9471
9472
9473 PdfUrl string `json:"pdfUrl,omitempty"`
9474
9475 PurchaseOrderNumber string `json:"purchaseOrderNumber,omitempty"`
9476
9477
9478
9479
9480
9481 ReplacedInvoiceIds []string `json:"replacedInvoiceIds,omitempty"`
9482
9483
9484 ServiceDateRange *DateRange `json:"serviceDateRange,omitempty"`
9485
9486
9487
9488 SubtotalAmountMicros int64 `json:"subtotalAmountMicros,omitempty,string"`
9489
9490
9491
9492 TotalAmountMicros int64 `json:"totalAmountMicros,omitempty,string"`
9493
9494
9495
9496 TotalTaxAmountMicros int64 `json:"totalTaxAmountMicros,omitempty,string"`
9497
9498
9499
9500
9501
9502 ForceSendFields []string `json:"-"`
9503
9504
9505
9506
9507 NullFields []string `json:"-"`
9508 }
9509
9510 func (s *Invoice) MarshalJSON() ([]byte, error) {
9511 type NoMethod Invoice
9512 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9513 }
9514
9515
9516
9517
9518 type KeywordAssignedTargetingOptionDetails struct {
9519
9520
9521
9522
9523 Keyword string `json:"keyword,omitempty"`
9524
9525 Negative bool `json:"negative,omitempty"`
9526
9527
9528
9529
9530
9531 ForceSendFields []string `json:"-"`
9532
9533
9534
9535
9536 NullFields []string `json:"-"`
9537 }
9538
9539 func (s *KeywordAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
9540 type NoMethod KeywordAssignedTargetingOptionDetails
9541 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9542 }
9543
9544
9545
9546
9547 type LanguageAssignedTargetingOptionDetails struct {
9548
9549 DisplayName string `json:"displayName,omitempty"`
9550
9551
9552
9553 Negative bool `json:"negative,omitempty"`
9554
9555
9556 TargetingOptionId string `json:"targetingOptionId,omitempty"`
9557
9558
9559
9560
9561
9562 ForceSendFields []string `json:"-"`
9563
9564
9565
9566
9567 NullFields []string `json:"-"`
9568 }
9569
9570 func (s *LanguageAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
9571 type NoMethod LanguageAssignedTargetingOptionDetails
9572 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9573 }
9574
9575
9576
9577
9578 type LanguageTargetingOptionDetails struct {
9579
9580 DisplayName string `json:"displayName,omitempty"`
9581
9582
9583
9584
9585
9586 ForceSendFields []string `json:"-"`
9587
9588
9589
9590
9591 NullFields []string `json:"-"`
9592 }
9593
9594 func (s *LanguageTargetingOptionDetails) MarshalJSON() ([]byte, error) {
9595 type NoMethod LanguageTargetingOptionDetails
9596 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9597 }
9598
9599
9600 type LineItem struct {
9601
9602
9603 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9604
9605 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"`
9606
9607 Budget *LineItemBudget `json:"budget,omitempty"`
9608
9609
9610 CampaignId int64 `json:"campaignId,omitempty,string"`
9611
9612 ConversionCounting *ConversionCountingConfig `json:"conversionCounting,omitempty"`
9613
9614 CreativeIds googleapi.Int64s `json:"creativeIds,omitempty"`
9615
9616
9617 DisplayName string `json:"displayName,omitempty"`
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640 EntityStatus string `json:"entityStatus,omitempty"`
9641
9642
9643 ExcludeNewExchanges bool `json:"excludeNewExchanges,omitempty"`
9644
9645 Flight *LineItemFlight `json:"flight,omitempty"`
9646
9647
9648
9649 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
9650
9651
9652 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"`
9653
9654 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"`
9655
9656
9657 LineItemId int64 `json:"lineItemId,omitempty,string"`
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728 LineItemType string `json:"lineItemType,omitempty"`
9729
9730
9731
9732 MobileApp *MobileApp `json:"mobileApp,omitempty"`
9733
9734 Name string `json:"name,omitempty"`
9735
9736 Pacing *Pacing `json:"pacing,omitempty"`
9737
9738
9739
9740 PartnerCosts []*PartnerCost `json:"partnerCosts,omitempty"`
9741
9742
9743 PartnerRevenueModel *PartnerRevenueModel `json:"partnerRevenueModel,omitempty"`
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759 ReservationType string `json:"reservationType,omitempty"`
9760
9761
9762
9763
9764 TargetingExpansion *TargetingExpansionConfig `json:"targetingExpansion,omitempty"`
9765
9766
9767 UpdateTime string `json:"updateTime,omitempty"`
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801 WarningMessages []string `json:"warningMessages,omitempty"`
9802
9803
9804 YoutubeAndPartnersSettings *YoutubeAndPartnersSettings `json:"youtubeAndPartnersSettings,omitempty"`
9805
9806
9807 googleapi.ServerResponse `json:"-"`
9808
9809
9810
9811
9812
9813 ForceSendFields []string `json:"-"`
9814
9815
9816
9817
9818 NullFields []string `json:"-"`
9819 }
9820
9821 func (s *LineItem) MarshalJSON() ([]byte, error) {
9822 type NoMethod LineItem
9823 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9824 }
9825
9826
9827
9828 type LineItemAssignedTargetingOption struct {
9829
9830 AssignedTargetingOption *AssignedTargetingOption `json:"assignedTargetingOption,omitempty"`
9831
9832
9833 LineItemId int64 `json:"lineItemId,omitempty,string"`
9834
9835
9836
9837
9838
9839 ForceSendFields []string `json:"-"`
9840
9841
9842
9843
9844 NullFields []string `json:"-"`
9845 }
9846
9847 func (s *LineItemAssignedTargetingOption) MarshalJSON() ([]byte, error) {
9848 type NoMethod LineItemAssignedTargetingOption
9849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9850 }
9851
9852
9853 type LineItemBudget struct {
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867 BudgetAllocationType string `json:"budgetAllocationType,omitempty"`
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877 BudgetUnit string `json:"budgetUnit,omitempty"`
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888 MaxAmount int64 `json:"maxAmount,omitempty,string"`
9889
9890
9891
9892
9893
9894 ForceSendFields []string `json:"-"`
9895
9896
9897
9898
9899 NullFields []string `json:"-"`
9900 }
9901
9902 func (s *LineItemBudget) MarshalJSON() ([]byte, error) {
9903 type NoMethod LineItemBudget
9904 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9905 }
9906
9907
9908 type LineItemFlight struct {
9909
9910
9911
9912
9913
9914
9915
9916 DateRange *DateRange `json:"dateRange,omitempty"`
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926 FlightDateType string `json:"flightDateType,omitempty"`
9927
9928
9929
9930
9931
9932 ForceSendFields []string `json:"-"`
9933
9934
9935
9936
9937 NullFields []string `json:"-"`
9938 }
9939
9940 func (s *LineItemFlight) MarshalJSON() ([]byte, error) {
9941 type NoMethod LineItemFlight
9942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9943 }
9944
9945
9946
9947 type ListAdvertiserAssignedTargetingOptionsResponse struct {
9948
9949
9950 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
9951
9952
9953
9954
9955
9956 NextPageToken string `json:"nextPageToken,omitempty"`
9957
9958
9959 googleapi.ServerResponse `json:"-"`
9960
9961
9962
9963
9964
9965 ForceSendFields []string `json:"-"`
9966
9967
9968
9969
9970 NullFields []string `json:"-"`
9971 }
9972
9973 func (s *ListAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
9974 type NoMethod ListAdvertiserAssignedTargetingOptionsResponse
9975 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9976 }
9977
9978 type ListAdvertisersResponse struct {
9979
9980 Advertisers []*Advertiser `json:"advertisers,omitempty"`
9981
9982
9983
9984 NextPageToken string `json:"nextPageToken,omitempty"`
9985
9986
9987 googleapi.ServerResponse `json:"-"`
9988
9989
9990
9991
9992
9993 ForceSendFields []string `json:"-"`
9994
9995
9996
9997
9998 NullFields []string `json:"-"`
9999 }
10000
10001 func (s *ListAdvertisersResponse) MarshalJSON() ([]byte, error) {
10002 type NoMethod ListAdvertisersResponse
10003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10004 }
10005
10006
10007
10008 type ListAssignedInventorySourcesResponse struct {
10009
10010
10011 AssignedInventorySources []*AssignedInventorySource `json:"assignedInventorySources,omitempty"`
10012
10013
10014
10015 NextPageToken string `json:"nextPageToken,omitempty"`
10016
10017
10018 googleapi.ServerResponse `json:"-"`
10019
10020
10021
10022
10023
10024 ForceSendFields []string `json:"-"`
10025
10026
10027
10028
10029 NullFields []string `json:"-"`
10030 }
10031
10032 func (s *ListAssignedInventorySourcesResponse) MarshalJSON() ([]byte, error) {
10033 type NoMethod ListAssignedInventorySourcesResponse
10034 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10035 }
10036
10037
10038
10039 type ListAssignedLocationsResponse struct {
10040
10041
10042 AssignedLocations []*AssignedLocation `json:"assignedLocations,omitempty"`
10043
10044
10045
10046 NextPageToken string `json:"nextPageToken,omitempty"`
10047
10048
10049 googleapi.ServerResponse `json:"-"`
10050
10051
10052
10053
10054
10055 ForceSendFields []string `json:"-"`
10056
10057
10058
10059
10060 NullFields []string `json:"-"`
10061 }
10062
10063 func (s *ListAssignedLocationsResponse) MarshalJSON() ([]byte, error) {
10064 type NoMethod ListAssignedLocationsResponse
10065 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10066 }
10067
10068
10069
10070 type ListCampaignAssignedTargetingOptionsResponse struct {
10071
10072
10073 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
10074
10075
10076
10077
10078
10079 NextPageToken string `json:"nextPageToken,omitempty"`
10080
10081
10082 googleapi.ServerResponse `json:"-"`
10083
10084
10085
10086
10087
10088 ForceSendFields []string `json:"-"`
10089
10090
10091
10092
10093 NullFields []string `json:"-"`
10094 }
10095
10096 func (s *ListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
10097 type NoMethod ListCampaignAssignedTargetingOptionsResponse
10098 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10099 }
10100
10101 type ListCampaignsResponse struct {
10102
10103 Campaigns []*Campaign `json:"campaigns,omitempty"`
10104
10105
10106
10107 NextPageToken string `json:"nextPageToken,omitempty"`
10108
10109
10110 googleapi.ServerResponse `json:"-"`
10111
10112
10113
10114
10115
10116 ForceSendFields []string `json:"-"`
10117
10118
10119
10120
10121 NullFields []string `json:"-"`
10122 }
10123
10124 func (s *ListCampaignsResponse) MarshalJSON() ([]byte, error) {
10125 type NoMethod ListCampaignsResponse
10126 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10127 }
10128
10129 type ListChannelsResponse struct {
10130
10131 Channels []*Channel `json:"channels,omitempty"`
10132
10133
10134
10135 NextPageToken string `json:"nextPageToken,omitempty"`
10136
10137
10138 googleapi.ServerResponse `json:"-"`
10139
10140
10141
10142
10143
10144 ForceSendFields []string `json:"-"`
10145
10146
10147
10148
10149 NullFields []string `json:"-"`
10150 }
10151
10152 func (s *ListChannelsResponse) MarshalJSON() ([]byte, error) {
10153 type NoMethod ListChannelsResponse
10154 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10155 }
10156
10157 type ListCombinedAudiencesResponse struct {
10158
10159
10160 CombinedAudiences []*CombinedAudience `json:"combinedAudiences,omitempty"`
10161
10162
10163
10164 NextPageToken string `json:"nextPageToken,omitempty"`
10165
10166
10167 googleapi.ServerResponse `json:"-"`
10168
10169
10170
10171
10172
10173 ForceSendFields []string `json:"-"`
10174
10175
10176
10177
10178 NullFields []string `json:"-"`
10179 }
10180
10181 func (s *ListCombinedAudiencesResponse) MarshalJSON() ([]byte, error) {
10182 type NoMethod ListCombinedAudiencesResponse
10183 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10184 }
10185
10186 type ListCreativesResponse struct {
10187
10188 Creatives []*Creative `json:"creatives,omitempty"`
10189
10190
10191
10192
10193 NextPageToken string `json:"nextPageToken,omitempty"`
10194
10195
10196 googleapi.ServerResponse `json:"-"`
10197
10198
10199
10200
10201
10202 ForceSendFields []string `json:"-"`
10203
10204
10205
10206
10207 NullFields []string `json:"-"`
10208 }
10209
10210 func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) {
10211 type NoMethod ListCreativesResponse
10212 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10213 }
10214
10215 type ListCustomBiddingAlgorithmsResponse struct {
10216
10217
10218 CustomBiddingAlgorithms []*CustomBiddingAlgorithm `json:"customBiddingAlgorithms,omitempty"`
10219
10220
10221
10222
10223 NextPageToken string `json:"nextPageToken,omitempty"`
10224
10225
10226 googleapi.ServerResponse `json:"-"`
10227
10228
10229
10230
10231
10232 ForceSendFields []string `json:"-"`
10233
10234
10235
10236
10237 NullFields []string `json:"-"`
10238 }
10239
10240 func (s *ListCustomBiddingAlgorithmsResponse) MarshalJSON() ([]byte, error) {
10241 type NoMethod ListCustomBiddingAlgorithmsResponse
10242 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10243 }
10244
10245 type ListCustomBiddingScriptsResponse struct {
10246
10247
10248 CustomBiddingScripts []*CustomBiddingScript `json:"customBiddingScripts,omitempty"`
10249
10250
10251
10252
10253 NextPageToken string `json:"nextPageToken,omitempty"`
10254
10255
10256 googleapi.ServerResponse `json:"-"`
10257
10258
10259
10260
10261
10262 ForceSendFields []string `json:"-"`
10263
10264
10265
10266
10267 NullFields []string `json:"-"`
10268 }
10269
10270 func (s *ListCustomBiddingScriptsResponse) MarshalJSON() ([]byte, error) {
10271 type NoMethod ListCustomBiddingScriptsResponse
10272 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10273 }
10274
10275 type ListCustomListsResponse struct {
10276
10277 CustomLists []*CustomList `json:"customLists,omitempty"`
10278
10279
10280
10281 NextPageToken string `json:"nextPageToken,omitempty"`
10282
10283
10284 googleapi.ServerResponse `json:"-"`
10285
10286
10287
10288
10289
10290 ForceSendFields []string `json:"-"`
10291
10292
10293
10294
10295 NullFields []string `json:"-"`
10296 }
10297
10298 func (s *ListCustomListsResponse) MarshalJSON() ([]byte, error) {
10299 type NoMethod ListCustomListsResponse
10300 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10301 }
10302
10303 type ListFirstAndThirdPartyAudiencesResponse struct {
10304
10305
10306
10307 FirstAndThirdPartyAudiences []*FirstAndThirdPartyAudience `json:"firstAndThirdPartyAudiences,omitempty"`
10308
10309
10310
10311
10312 NextPageToken string `json:"nextPageToken,omitempty"`
10313
10314
10315 googleapi.ServerResponse `json:"-"`
10316
10317
10318
10319
10320
10321 ForceSendFields []string `json:"-"`
10322
10323
10324
10325
10326 NullFields []string `json:"-"`
10327 }
10328
10329 func (s *ListFirstAndThirdPartyAudiencesResponse) MarshalJSON() ([]byte, error) {
10330 type NoMethod ListFirstAndThirdPartyAudiencesResponse
10331 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10332 }
10333
10334 type ListFloodlightActivitiesResponse struct {
10335
10336
10337 FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
10338
10339
10340
10341 NextPageToken string `json:"nextPageToken,omitempty"`
10342
10343
10344 googleapi.ServerResponse `json:"-"`
10345
10346
10347
10348
10349
10350 ForceSendFields []string `json:"-"`
10351
10352
10353
10354
10355 NullFields []string `json:"-"`
10356 }
10357
10358 func (s *ListFloodlightActivitiesResponse) MarshalJSON() ([]byte, error) {
10359 type NoMethod ListFloodlightActivitiesResponse
10360 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10361 }
10362
10363 type ListGoogleAudiencesResponse struct {
10364
10365
10366 GoogleAudiences []*GoogleAudience `json:"googleAudiences,omitempty"`
10367
10368
10369
10370 NextPageToken string `json:"nextPageToken,omitempty"`
10371
10372
10373 googleapi.ServerResponse `json:"-"`
10374
10375
10376
10377
10378
10379 ForceSendFields []string `json:"-"`
10380
10381
10382
10383
10384 NullFields []string `json:"-"`
10385 }
10386
10387 func (s *ListGoogleAudiencesResponse) MarshalJSON() ([]byte, error) {
10388 type NoMethod ListGoogleAudiencesResponse
10389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10390 }
10391
10392 type ListGuaranteedOrdersResponse struct {
10393
10394
10395 GuaranteedOrders []*GuaranteedOrder `json:"guaranteedOrders,omitempty"`
10396
10397
10398
10399 NextPageToken string `json:"nextPageToken,omitempty"`
10400
10401
10402 googleapi.ServerResponse `json:"-"`
10403
10404
10405
10406
10407
10408 ForceSendFields []string `json:"-"`
10409
10410
10411
10412
10413 NullFields []string `json:"-"`
10414 }
10415
10416 func (s *ListGuaranteedOrdersResponse) MarshalJSON() ([]byte, error) {
10417 type NoMethod ListGuaranteedOrdersResponse
10418 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10419 }
10420
10421 type ListInsertionOrderAssignedTargetingOptionsResponse struct {
10422
10423
10424 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
10425
10426
10427
10428
10429
10430 NextPageToken string `json:"nextPageToken,omitempty"`
10431
10432
10433 googleapi.ServerResponse `json:"-"`
10434
10435
10436
10437
10438
10439 ForceSendFields []string `json:"-"`
10440
10441
10442
10443
10444 NullFields []string `json:"-"`
10445 }
10446
10447 func (s *ListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
10448 type NoMethod ListInsertionOrderAssignedTargetingOptionsResponse
10449 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10450 }
10451
10452 type ListInsertionOrdersResponse struct {
10453
10454
10455 InsertionOrders []*InsertionOrder `json:"insertionOrders,omitempty"`
10456
10457
10458
10459 NextPageToken string `json:"nextPageToken,omitempty"`
10460
10461
10462 googleapi.ServerResponse `json:"-"`
10463
10464
10465
10466
10467
10468 ForceSendFields []string `json:"-"`
10469
10470
10471
10472
10473 NullFields []string `json:"-"`
10474 }
10475
10476 func (s *ListInsertionOrdersResponse) MarshalJSON() ([]byte, error) {
10477 type NoMethod ListInsertionOrdersResponse
10478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10479 }
10480
10481
10482
10483 type ListInventorySourceGroupsResponse struct {
10484
10485
10486 InventorySourceGroups []*InventorySourceGroup `json:"inventorySourceGroups,omitempty"`
10487
10488
10489
10490 NextPageToken string `json:"nextPageToken,omitempty"`
10491
10492
10493 googleapi.ServerResponse `json:"-"`
10494
10495
10496
10497
10498
10499 ForceSendFields []string `json:"-"`
10500
10501
10502
10503
10504 NullFields []string `json:"-"`
10505 }
10506
10507 func (s *ListInventorySourceGroupsResponse) MarshalJSON() ([]byte, error) {
10508 type NoMethod ListInventorySourceGroupsResponse
10509 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10510 }
10511
10512 type ListInventorySourcesResponse struct {
10513
10514
10515 InventorySources []*InventorySource `json:"inventorySources,omitempty"`
10516
10517
10518
10519 NextPageToken string `json:"nextPageToken,omitempty"`
10520
10521
10522 googleapi.ServerResponse `json:"-"`
10523
10524
10525
10526
10527
10528 ForceSendFields []string `json:"-"`
10529
10530
10531
10532
10533 NullFields []string `json:"-"`
10534 }
10535
10536 func (s *ListInventorySourcesResponse) MarshalJSON() ([]byte, error) {
10537 type NoMethod ListInventorySourcesResponse
10538 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10539 }
10540
10541 type ListInvoicesResponse struct {
10542
10543 Invoices []*Invoice `json:"invoices,omitempty"`
10544
10545
10546
10547
10548 NextPageToken string `json:"nextPageToken,omitempty"`
10549
10550
10551 googleapi.ServerResponse `json:"-"`
10552
10553
10554
10555
10556
10557 ForceSendFields []string `json:"-"`
10558
10559
10560
10561
10562 NullFields []string `json:"-"`
10563 }
10564
10565 func (s *ListInvoicesResponse) MarshalJSON() ([]byte, error) {
10566 type NoMethod ListInvoicesResponse
10567 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10568 }
10569
10570
10571
10572 type ListLineItemAssignedTargetingOptionsResponse struct {
10573
10574
10575 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
10576
10577
10578
10579
10580
10581 NextPageToken string `json:"nextPageToken,omitempty"`
10582
10583
10584 googleapi.ServerResponse `json:"-"`
10585
10586
10587
10588
10589
10590 ForceSendFields []string `json:"-"`
10591
10592
10593
10594
10595 NullFields []string `json:"-"`
10596 }
10597
10598 func (s *ListLineItemAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
10599 type NoMethod ListLineItemAssignedTargetingOptionsResponse
10600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10601 }
10602
10603 type ListLineItemsResponse struct {
10604
10605 LineItems []*LineItem `json:"lineItems,omitempty"`
10606
10607
10608
10609 NextPageToken string `json:"nextPageToken,omitempty"`
10610
10611
10612 googleapi.ServerResponse `json:"-"`
10613
10614
10615
10616
10617
10618 ForceSendFields []string `json:"-"`
10619
10620
10621
10622
10623 NullFields []string `json:"-"`
10624 }
10625
10626 func (s *ListLineItemsResponse) MarshalJSON() ([]byte, error) {
10627 type NoMethod ListLineItemsResponse
10628 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10629 }
10630
10631 type ListLocationListsResponse struct {
10632
10633
10634 LocationLists []*LocationList `json:"locationLists,omitempty"`
10635
10636
10637
10638 NextPageToken string `json:"nextPageToken,omitempty"`
10639
10640
10641 googleapi.ServerResponse `json:"-"`
10642
10643
10644
10645
10646
10647 ForceSendFields []string `json:"-"`
10648
10649
10650
10651
10652 NullFields []string `json:"-"`
10653 }
10654
10655 func (s *ListLocationListsResponse) MarshalJSON() ([]byte, error) {
10656 type NoMethod ListLocationListsResponse
10657 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10658 }
10659
10660 type ListManualTriggersResponse struct {
10661
10662
10663 ManualTriggers []*ManualTrigger `json:"manualTriggers,omitempty"`
10664
10665
10666
10667 NextPageToken string `json:"nextPageToken,omitempty"`
10668
10669
10670 googleapi.ServerResponse `json:"-"`
10671
10672
10673
10674
10675
10676 ForceSendFields []string `json:"-"`
10677
10678
10679
10680
10681 NullFields []string `json:"-"`
10682 }
10683
10684 func (s *ListManualTriggersResponse) MarshalJSON() ([]byte, error) {
10685 type NoMethod ListManualTriggersResponse
10686 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10687 }
10688
10689
10690
10691 type ListNegativeKeywordListsResponse struct {
10692
10693
10694 NegativeKeywordLists []*NegativeKeywordList `json:"negativeKeywordLists,omitempty"`
10695
10696
10697
10698 NextPageToken string `json:"nextPageToken,omitempty"`
10699
10700
10701 googleapi.ServerResponse `json:"-"`
10702
10703
10704
10705
10706
10707 ForceSendFields []string `json:"-"`
10708
10709
10710
10711
10712 NullFields []string `json:"-"`
10713 }
10714
10715 func (s *ListNegativeKeywordListsResponse) MarshalJSON() ([]byte, error) {
10716 type NoMethod ListNegativeKeywordListsResponse
10717 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10718 }
10719
10720
10721
10722 type ListNegativeKeywordsResponse struct {
10723
10724
10725 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"`
10726
10727
10728
10729 NextPageToken string `json:"nextPageToken,omitempty"`
10730
10731
10732 googleapi.ServerResponse `json:"-"`
10733
10734
10735
10736
10737
10738 ForceSendFields []string `json:"-"`
10739
10740
10741
10742
10743 NullFields []string `json:"-"`
10744 }
10745
10746 func (s *ListNegativeKeywordsResponse) MarshalJSON() ([]byte, error) {
10747 type NoMethod ListNegativeKeywordsResponse
10748 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10749 }
10750
10751 type ListPartnerAssignedTargetingOptionsResponse struct {
10752
10753
10754 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
10755
10756
10757
10758
10759
10760 NextPageToken string `json:"nextPageToken,omitempty"`
10761
10762
10763 googleapi.ServerResponse `json:"-"`
10764
10765
10766
10767
10768
10769 ForceSendFields []string `json:"-"`
10770
10771
10772
10773
10774 NullFields []string `json:"-"`
10775 }
10776
10777 func (s *ListPartnerAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
10778 type NoMethod ListPartnerAssignedTargetingOptionsResponse
10779 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10780 }
10781
10782 type ListPartnersResponse struct {
10783
10784
10785
10786 NextPageToken string `json:"nextPageToken,omitempty"`
10787
10788 Partners []*Partner `json:"partners,omitempty"`
10789
10790
10791 googleapi.ServerResponse `json:"-"`
10792
10793
10794
10795
10796
10797 ForceSendFields []string `json:"-"`
10798
10799
10800
10801
10802 NullFields []string `json:"-"`
10803 }
10804
10805 func (s *ListPartnersResponse) MarshalJSON() ([]byte, error) {
10806 type NoMethod ListPartnersResponse
10807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10808 }
10809
10810
10811 type ListSitesResponse struct {
10812
10813
10814
10815 NextPageToken string `json:"nextPageToken,omitempty"`
10816
10817 Sites []*Site `json:"sites,omitempty"`
10818
10819
10820 googleapi.ServerResponse `json:"-"`
10821
10822
10823
10824
10825
10826 ForceSendFields []string `json:"-"`
10827
10828
10829
10830
10831 NullFields []string `json:"-"`
10832 }
10833
10834 func (s *ListSitesResponse) MarshalJSON() ([]byte, error) {
10835 type NoMethod ListSitesResponse
10836 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10837 }
10838
10839
10840 type ListTargetingOptionsResponse struct {
10841
10842
10843
10844 NextPageToken string `json:"nextPageToken,omitempty"`
10845
10846
10847 TargetingOptions []*TargetingOption `json:"targetingOptions,omitempty"`
10848
10849
10850 googleapi.ServerResponse `json:"-"`
10851
10852
10853
10854
10855
10856 ForceSendFields []string `json:"-"`
10857
10858
10859
10860
10861 NullFields []string `json:"-"`
10862 }
10863
10864 func (s *ListTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
10865 type NoMethod ListTargetingOptionsResponse
10866 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10867 }
10868
10869 type ListUsersResponse struct {
10870
10871
10872
10873
10874 NextPageToken string `json:"nextPageToken,omitempty"`
10875
10876 Users []*User `json:"users,omitempty"`
10877
10878
10879 googleapi.ServerResponse `json:"-"`
10880
10881
10882
10883
10884
10885 ForceSendFields []string `json:"-"`
10886
10887
10888
10889
10890 NullFields []string `json:"-"`
10891 }
10892
10893 func (s *ListUsersResponse) MarshalJSON() ([]byte, error) {
10894 type NoMethod ListUsersResponse
10895 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10896 }
10897
10898 type ListYoutubeAdGroupAdsResponse struct {
10899
10900
10901
10902 NextPageToken string `json:"nextPageToken,omitempty"`
10903
10904
10905 YoutubeAdGroupAds []*YoutubeAdGroupAd `json:"youtubeAdGroupAds,omitempty"`
10906
10907
10908 googleapi.ServerResponse `json:"-"`
10909
10910
10911
10912
10913
10914 ForceSendFields []string `json:"-"`
10915
10916
10917
10918
10919 NullFields []string `json:"-"`
10920 }
10921
10922 func (s *ListYoutubeAdGroupAdsResponse) MarshalJSON() ([]byte, error) {
10923 type NoMethod ListYoutubeAdGroupAdsResponse
10924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10925 }
10926
10927
10928
10929 type ListYoutubeAdGroupAssignedTargetingOptionsResponse struct {
10930
10931
10932 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
10933
10934
10935
10936
10937
10938 NextPageToken string `json:"nextPageToken,omitempty"`
10939
10940
10941 googleapi.ServerResponse `json:"-"`
10942
10943
10944
10945
10946
10947 ForceSendFields []string `json:"-"`
10948
10949
10950
10951
10952 NullFields []string `json:"-"`
10953 }
10954
10955 func (s *ListYoutubeAdGroupAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
10956 type NoMethod ListYoutubeAdGroupAssignedTargetingOptionsResponse
10957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10958 }
10959
10960 type ListYoutubeAdGroupsResponse struct {
10961
10962
10963
10964 NextPageToken string `json:"nextPageToken,omitempty"`
10965
10966 YoutubeAdGroups []*YoutubeAdGroup `json:"youtubeAdGroups,omitempty"`
10967
10968
10969 googleapi.ServerResponse `json:"-"`
10970
10971
10972
10973
10974
10975 ForceSendFields []string `json:"-"`
10976
10977
10978
10979
10980 NullFields []string `json:"-"`
10981 }
10982
10983 func (s *ListYoutubeAdGroupsResponse) MarshalJSON() ([]byte, error) {
10984 type NoMethod ListYoutubeAdGroupsResponse
10985 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10986 }
10987
10988
10989 type LocationList struct {
10990
10991
10992 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10993
10994
10995 DisplayName string `json:"displayName,omitempty"`
10996
10997
10998 LocationListId int64 `json:"locationListId,omitempty,string"`
10999
11000
11001
11002
11003
11004
11005
11006
11007 LocationType string `json:"locationType,omitempty"`
11008
11009 Name string `json:"name,omitempty"`
11010
11011
11012 googleapi.ServerResponse `json:"-"`
11013
11014
11015
11016
11017
11018 ForceSendFields []string `json:"-"`
11019
11020
11021
11022
11023 NullFields []string `json:"-"`
11024 }
11025
11026 func (s *LocationList) MarshalJSON() ([]byte, error) {
11027 type NoMethod LocationList
11028 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11029 }
11030
11031
11032
11033 type LookbackWindow struct {
11034
11035
11036 ClickDays int64 `json:"clickDays,omitempty"`
11037
11038
11039 ImpressionDays int64 `json:"impressionDays,omitempty"`
11040
11041
11042
11043
11044
11045 ForceSendFields []string `json:"-"`
11046
11047
11048
11049
11050 NullFields []string `json:"-"`
11051 }
11052
11053 func (s *LookbackWindow) MarshalJSON() ([]byte, error) {
11054 type NoMethod LookbackWindow
11055 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11056 }
11057
11058 type LookupInvoiceCurrencyResponse struct {
11059
11060 CurrencyCode string `json:"currencyCode,omitempty"`
11061
11062
11063 googleapi.ServerResponse `json:"-"`
11064
11065
11066
11067
11068
11069 ForceSendFields []string `json:"-"`
11070
11071
11072
11073
11074 NullFields []string `json:"-"`
11075 }
11076
11077 func (s *LookupInvoiceCurrencyResponse) MarshalJSON() ([]byte, error) {
11078 type NoMethod LookupInvoiceCurrencyResponse
11079 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11080 }
11081
11082
11083
11084
11085
11086
11087 type ManualTrigger struct {
11088
11089
11090
11091 ActivationDurationMinutes int64 `json:"activationDurationMinutes,omitempty,string"`
11092
11093
11094 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11095
11096
11097 DisplayName string `json:"displayName,omitempty"`
11098
11099
11100 LatestActivationTime string `json:"latestActivationTime,omitempty"`
11101
11102 Name string `json:"name,omitempty"`
11103
11104
11105
11106
11107
11108
11109
11110
11111 State string `json:"state,omitempty"`
11112
11113 TriggerId int64 `json:"triggerId,omitempty,string"`
11114
11115
11116 googleapi.ServerResponse `json:"-"`
11117
11118
11119
11120
11121
11122 ForceSendFields []string `json:"-"`
11123
11124
11125
11126
11127 NullFields []string `json:"-"`
11128 }
11129
11130 func (s *ManualTrigger) MarshalJSON() ([]byte, error) {
11131 type NoMethod ManualTrigger
11132 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11133 }
11134
11135
11136 type MastheadAd struct {
11137
11138 AutoplayVideoDuration string `json:"autoplayVideoDuration,omitempty"`
11139
11140
11141 AutoplayVideoStartMillisecond int64 `json:"autoplayVideoStartMillisecond,omitempty,string"`
11142
11143 CallToActionButtonLabel string `json:"callToActionButtonLabel,omitempty"`
11144
11145 CallToActionFinalUrl string `json:"callToActionFinalUrl,omitempty"`
11146
11147 CallToActionTrackingUrl string `json:"callToActionTrackingUrl,omitempty"`
11148
11149
11150 CompanionYoutubeVideos []*YoutubeVideoDetails `json:"companionYoutubeVideos,omitempty"`
11151
11152 Description string `json:"description,omitempty"`
11153
11154 Headline string `json:"headline,omitempty"`
11155
11156
11157 ShowChannelArt bool `json:"showChannelArt,omitempty"`
11158
11159 Video *YoutubeVideoDetails `json:"video,omitempty"`
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169 VideoAspectRatio string `json:"videoAspectRatio,omitempty"`
11170
11171
11172
11173
11174
11175 ForceSendFields []string `json:"-"`
11176
11177
11178
11179
11180 NullFields []string `json:"-"`
11181 }
11182
11183 func (s *MastheadAd) MarshalJSON() ([]byte, error) {
11184 type NoMethod MastheadAd
11185 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11186 }
11187
11188
11189
11190 type MaximizeSpendBidStrategy struct {
11191
11192
11193
11194 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
11195
11196
11197
11198
11199 MaxAverageCpmBidAmountMicros int64 `json:"maxAverageCpmBidAmountMicros,omitempty,string"`
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218 PerformanceGoalType string `json:"performanceGoalType,omitempty"`
11219
11220 RaiseBidForDeals bool `json:"raiseBidForDeals,omitempty"`
11221
11222
11223
11224
11225
11226 ForceSendFields []string `json:"-"`
11227
11228
11229
11230
11231 NullFields []string `json:"-"`
11232 }
11233
11234 func (s *MaximizeSpendBidStrategy) MarshalJSON() ([]byte, error) {
11235 type NoMethod MaximizeSpendBidStrategy
11236 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11237 }
11238
11239
11240 type MeasurementConfig struct {
11241
11242 Dv360ToCmCostReportingEnabled bool `json:"dv360ToCmCostReportingEnabled,omitempty"`
11243
11244
11245 Dv360ToCmDataSharingEnabled bool `json:"dv360ToCmDataSharingEnabled,omitempty"`
11246
11247
11248
11249
11250
11251 ForceSendFields []string `json:"-"`
11252
11253
11254
11255
11256 NullFields []string `json:"-"`
11257 }
11258
11259 func (s *MeasurementConfig) MarshalJSON() ([]byte, error) {
11260 type NoMethod MeasurementConfig
11261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11262 }
11263
11264
11265 type MobileApp struct {
11266
11267
11268
11269
11270 AppId string `json:"appId,omitempty"`
11271
11272 DisplayName string `json:"displayName,omitempty"`
11273
11274
11275
11276
11277
11278
11279 Platform string `json:"platform,omitempty"`
11280
11281 Publisher string `json:"publisher,omitempty"`
11282
11283
11284
11285
11286
11287 ForceSendFields []string `json:"-"`
11288
11289
11290
11291
11292 NullFields []string `json:"-"`
11293 }
11294
11295 func (s *MobileApp) MarshalJSON() ([]byte, error) {
11296 type NoMethod MobileApp
11297 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11298 }
11299
11300
11301
11302 type MobileDeviceIdList struct {
11303
11304
11305
11306
11307 Consent *Consent `json:"consent,omitempty"`
11308
11309
11310
11311 MobileDeviceIds []string `json:"mobileDeviceIds,omitempty"`
11312
11313
11314
11315
11316
11317 ForceSendFields []string `json:"-"`
11318
11319
11320
11321
11322 NullFields []string `json:"-"`
11323 }
11324
11325 func (s *MobileDeviceIdList) MarshalJSON() ([]byte, error) {
11326 type NoMethod MobileDeviceIdList
11327 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11328 }
11329
11330
11331 type Money struct {
11332
11333 CurrencyCode string `json:"currencyCode,omitempty"`
11334
11335
11336
11337
11338
11339 Nanos int64 `json:"nanos,omitempty"`
11340
11341
11342 Units int64 `json:"units,omitempty,string"`
11343
11344
11345
11346
11347
11348 ForceSendFields []string `json:"-"`
11349
11350
11351
11352
11353 NullFields []string `json:"-"`
11354 }
11355
11356 func (s *Money) MarshalJSON() ([]byte, error) {
11357 type NoMethod Money
11358 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11359 }
11360
11361
11362
11363
11364
11365
11366
11367 type NativeContentPositionAssignedTargetingOptionDetails struct {
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387 ContentPosition string `json:"contentPosition,omitempty"`
11388
11389
11390
11391
11392
11393 ForceSendFields []string `json:"-"`
11394
11395
11396
11397
11398 NullFields []string `json:"-"`
11399 }
11400
11401 func (s *NativeContentPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11402 type NoMethod NativeContentPositionAssignedTargetingOptionDetails
11403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11404 }
11405
11406
11407
11408
11409
11410 type NativeContentPositionTargetingOptionDetails struct {
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430 ContentPosition string `json:"contentPosition,omitempty"`
11431
11432
11433
11434
11435
11436 ForceSendFields []string `json:"-"`
11437
11438
11439
11440
11441 NullFields []string `json:"-"`
11442 }
11443
11444 func (s *NativeContentPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11445 type NoMethod NativeContentPositionTargetingOptionDetails
11446 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11447 }
11448
11449
11450
11451 type NegativeKeyword struct {
11452
11453
11454
11455
11456
11457
11458 KeywordValue string `json:"keywordValue,omitempty"`
11459
11460 Name string `json:"name,omitempty"`
11461
11462
11463 googleapi.ServerResponse `json:"-"`
11464
11465
11466
11467
11468
11469 ForceSendFields []string `json:"-"`
11470
11471
11472
11473
11474 NullFields []string `json:"-"`
11475 }
11476
11477 func (s *NegativeKeyword) MarshalJSON() ([]byte, error) {
11478 type NoMethod NegativeKeyword
11479 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11480 }
11481
11482
11483 type NegativeKeywordList struct {
11484
11485
11486 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11487
11488
11489 DisplayName string `json:"displayName,omitempty"`
11490
11491 Name string `json:"name,omitempty"`
11492
11493
11494 NegativeKeywordListId int64 `json:"negativeKeywordListId,omitempty,string"`
11495
11496
11497 TargetedLineItemCount int64 `json:"targetedLineItemCount,omitempty,string"`
11498
11499
11500 googleapi.ServerResponse `json:"-"`
11501
11502
11503
11504
11505
11506 ForceSendFields []string `json:"-"`
11507
11508
11509
11510
11511 NullFields []string `json:"-"`
11512 }
11513
11514 func (s *NegativeKeywordList) MarshalJSON() ([]byte, error) {
11515 type NoMethod NegativeKeywordList
11516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11517 }
11518
11519
11520
11521
11522
11523 type NegativeKeywordListAssignedTargetingOptionDetails struct {
11524
11525
11526
11527 NegativeKeywordListId int64 `json:"negativeKeywordListId,omitempty,string"`
11528
11529
11530
11531
11532
11533 ForceSendFields []string `json:"-"`
11534
11535
11536
11537
11538 NullFields []string `json:"-"`
11539 }
11540
11541 func (s *NegativeKeywordListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11542 type NoMethod NegativeKeywordListAssignedTargetingOptionDetails
11543 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11544 }
11545
11546
11547 type NonSkippableAd struct {
11548
11549 CommonInStreamAttribute *CommonInStreamAttribute `json:"commonInStreamAttribute,omitempty"`
11550
11551
11552 CustomParameters map[string]string `json:"customParameters,omitempty"`
11553
11554
11555
11556
11557
11558 ForceSendFields []string `json:"-"`
11559
11560
11561
11562
11563 NullFields []string `json:"-"`
11564 }
11565
11566 func (s *NonSkippableAd) MarshalJSON() ([]byte, error) {
11567 type NoMethod NonSkippableAd
11568 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11569 }
11570
11571
11572 type ObaIcon struct {
11573
11574
11575
11576 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
11577
11578 Dimensions *Dimensions `json:"dimensions,omitempty"`
11579
11580
11581
11582 LandingPageUrl string `json:"landingPageUrl,omitempty"`
11583
11584
11585
11586
11587
11588
11589
11590
11591 Position string `json:"position,omitempty"`
11592
11593 Program string `json:"program,omitempty"`
11594
11595 ResourceMimeType string `json:"resourceMimeType,omitempty"`
11596
11597 ResourceUrl string `json:"resourceUrl,omitempty"`
11598
11599
11600
11601 ViewTrackingUrl string `json:"viewTrackingUrl,omitempty"`
11602
11603
11604
11605
11606
11607 ForceSendFields []string `json:"-"`
11608
11609
11610
11611
11612 NullFields []string `json:"-"`
11613 }
11614
11615 func (s *ObaIcon) MarshalJSON() ([]byte, error) {
11616 type NoMethod ObaIcon
11617 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11618 }
11619
11620
11621
11622
11623 type OmidAssignedTargetingOptionDetails struct {
11624
11625
11626
11627
11628
11629
11630
11631 Omid string `json:"omid,omitempty"`
11632
11633
11634
11635
11636
11637 ForceSendFields []string `json:"-"`
11638
11639
11640
11641
11642 NullFields []string `json:"-"`
11643 }
11644
11645 func (s *OmidAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11646 type NoMethod OmidAssignedTargetingOptionDetails
11647 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11648 }
11649
11650
11651
11652
11653 type OmidTargetingOptionDetails struct {
11654
11655
11656
11657
11658
11659
11660
11661 Omid string `json:"omid,omitempty"`
11662
11663
11664
11665
11666
11667 ForceSendFields []string `json:"-"`
11668
11669
11670
11671
11672 NullFields []string `json:"-"`
11673 }
11674
11675 func (s *OmidTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11676 type NoMethod OmidTargetingOptionDetails
11677 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11678 }
11679
11680
11681
11682
11683 type OnScreenPositionAssignedTargetingOptionDetails struct {
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700 AdType string `json:"adType,omitempty"`
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710 OnScreenPosition string `json:"onScreenPosition,omitempty"`
11711
11712
11713 TargetingOptionId string `json:"targetingOptionId,omitempty"`
11714
11715
11716
11717
11718
11719 ForceSendFields []string `json:"-"`
11720
11721
11722
11723
11724 NullFields []string `json:"-"`
11725 }
11726
11727 func (s *OnScreenPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11728 type NoMethod OnScreenPositionAssignedTargetingOptionDetails
11729 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11730 }
11731
11732
11733
11734
11735
11736 type OnScreenPositionTargetingOptionDetails struct {
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746 OnScreenPosition string `json:"onScreenPosition,omitempty"`
11747
11748
11749
11750
11751
11752 ForceSendFields []string `json:"-"`
11753
11754
11755
11756
11757 NullFields []string `json:"-"`
11758 }
11759
11760 func (s *OnScreenPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11761 type NoMethod OnScreenPositionTargetingOptionDetails
11762 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11763 }
11764
11765
11766
11767
11768
11769 type OperatingSystemAssignedTargetingOptionDetails struct {
11770
11771 DisplayName string `json:"displayName,omitempty"`
11772
11773 Negative bool `json:"negative,omitempty"`
11774
11775
11776
11777 TargetingOptionId string `json:"targetingOptionId,omitempty"`
11778
11779
11780
11781
11782
11783 ForceSendFields []string `json:"-"`
11784
11785
11786
11787
11788 NullFields []string `json:"-"`
11789 }
11790
11791 func (s *OperatingSystemAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11792 type NoMethod OperatingSystemAssignedTargetingOptionDetails
11793 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11794 }
11795
11796
11797
11798
11799 type OperatingSystemTargetingOptionDetails struct {
11800
11801 DisplayName string `json:"displayName,omitempty"`
11802
11803
11804
11805
11806
11807 ForceSendFields []string `json:"-"`
11808
11809
11810
11811
11812 NullFields []string `json:"-"`
11813 }
11814
11815 func (s *OperatingSystemTargetingOptionDetails) MarshalJSON() ([]byte, error) {
11816 type NoMethod OperatingSystemTargetingOptionDetails
11817 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11818 }
11819
11820
11821
11822 type Operation struct {
11823
11824
11825
11826 Done bool `json:"done,omitempty"`
11827
11828 Error *Status `json:"error,omitempty"`
11829
11830
11831
11832
11833 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
11834
11835
11836
11837 Name string `json:"name,omitempty"`
11838
11839
11840
11841
11842
11843
11844
11845 Response googleapi.RawMessage `json:"response,omitempty"`
11846
11847
11848 googleapi.ServerResponse `json:"-"`
11849
11850
11851
11852
11853
11854 ForceSendFields []string `json:"-"`
11855
11856
11857
11858
11859 NullFields []string `json:"-"`
11860 }
11861
11862 func (s *Operation) MarshalJSON() ([]byte, error) {
11863 type NoMethod Operation
11864 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11865 }
11866
11867
11868 type Pacing struct {
11869
11870
11871 DailyMaxImpressions int64 `json:"dailyMaxImpressions,omitempty,string"`
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882 DailyMaxMicros int64 `json:"dailyMaxMicros,omitempty,string"`
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894 PacingPeriod string `json:"pacingPeriod,omitempty"`
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908 PacingType string `json:"pacingType,omitempty"`
11909
11910
11911
11912
11913
11914 ForceSendFields []string `json:"-"`
11915
11916
11917
11918
11919 NullFields []string `json:"-"`
11920 }
11921
11922 func (s *Pacing) MarshalJSON() ([]byte, error) {
11923 type NoMethod Pacing
11924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11925 }
11926
11927
11928
11929 type ParentEntityFilter struct {
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941 FileType []string `json:"fileType,omitempty"`
11942
11943
11944
11945 FilterIds googleapi.Int64s `json:"filterIds,omitempty"`
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973 FilterType string `json:"filterType,omitempty"`
11974
11975
11976
11977
11978
11979 ForceSendFields []string `json:"-"`
11980
11981
11982
11983
11984 NullFields []string `json:"-"`
11985 }
11986
11987 func (s *ParentEntityFilter) MarshalJSON() ([]byte, error) {
11988 type NoMethod ParentEntityFilter
11989 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11990 }
11991
11992
11993
11994
11995
11996 type ParentalStatusAssignedTargetingOptionDetails struct {
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007 ParentalStatus string `json:"parentalStatus,omitempty"`
12008
12009
12010
12011
12012
12013 ForceSendFields []string `json:"-"`
12014
12015
12016
12017
12018 NullFields []string `json:"-"`
12019 }
12020
12021 func (s *ParentalStatusAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12022 type NoMethod ParentalStatusAssignedTargetingOptionDetails
12023 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12024 }
12025
12026
12027
12028
12029 type ParentalStatusTargetingOptionDetails struct {
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040 ParentalStatus string `json:"parentalStatus,omitempty"`
12041
12042
12043
12044
12045
12046 ForceSendFields []string `json:"-"`
12047
12048
12049
12050
12051 NullFields []string `json:"-"`
12052 }
12053
12054 func (s *ParentalStatusTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12055 type NoMethod ParentalStatusTargetingOptionDetails
12056 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12057 }
12058
12059
12060 type Partner struct {
12061
12062 AdServerConfig *PartnerAdServerConfig `json:"adServerConfig,omitempty"`
12063
12064 DataAccessConfig *PartnerDataAccessConfig `json:"dataAccessConfig,omitempty"`
12065
12066
12067 DisplayName string `json:"displayName,omitempty"`
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083 EntityStatus string `json:"entityStatus,omitempty"`
12084
12085
12086 ExchangeConfig *ExchangeConfig `json:"exchangeConfig,omitempty"`
12087
12088 GeneralConfig *PartnerGeneralConfig `json:"generalConfig,omitempty"`
12089
12090 Name string `json:"name,omitempty"`
12091
12092
12093 PartnerId int64 `json:"partnerId,omitempty,string"`
12094
12095
12096 UpdateTime string `json:"updateTime,omitempty"`
12097
12098
12099 googleapi.ServerResponse `json:"-"`
12100
12101
12102
12103
12104
12105 ForceSendFields []string `json:"-"`
12106
12107
12108
12109
12110 NullFields []string `json:"-"`
12111 }
12112
12113 func (s *Partner) MarshalJSON() ([]byte, error) {
12114 type NoMethod Partner
12115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12116 }
12117
12118
12119 type PartnerAdServerConfig struct {
12120
12121 MeasurementConfig *MeasurementConfig `json:"measurementConfig,omitempty"`
12122
12123
12124
12125
12126
12127 ForceSendFields []string `json:"-"`
12128
12129
12130
12131
12132 NullFields []string `json:"-"`
12133 }
12134
12135 func (s *PartnerAdServerConfig) MarshalJSON() ([]byte, error) {
12136 type NoMethod PartnerAdServerConfig
12137 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12138 }
12139
12140
12141
12142
12143
12144
12145
12146 type PartnerCost struct {
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214 CostType string `json:"costType,omitempty"`
12215
12216
12217
12218
12219 FeeAmount int64 `json:"feeAmount,omitempty,string"`
12220
12221
12222
12223 FeePercentageMillis int64 `json:"feePercentageMillis,omitempty,string"`
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238 FeeType string `json:"feeType,omitempty"`
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250 InvoiceType string `json:"invoiceType,omitempty"`
12251
12252
12253
12254
12255
12256 ForceSendFields []string `json:"-"`
12257
12258
12259
12260
12261 NullFields []string `json:"-"`
12262 }
12263
12264 func (s *PartnerCost) MarshalJSON() ([]byte, error) {
12265 type NoMethod PartnerCost
12266 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12267 }
12268
12269
12270
12271 type PartnerDataAccessConfig struct {
12272
12273
12274 SdfConfig *SdfConfig `json:"sdfConfig,omitempty"`
12275
12276
12277
12278
12279
12280 ForceSendFields []string `json:"-"`
12281
12282
12283
12284
12285 NullFields []string `json:"-"`
12286 }
12287
12288 func (s *PartnerDataAccessConfig) MarshalJSON() ([]byte, error) {
12289 type NoMethod PartnerDataAccessConfig
12290 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12291 }
12292
12293
12294 type PartnerGeneralConfig struct {
12295
12296 CurrencyCode string `json:"currencyCode,omitempty"`
12297
12298
12299
12300 TimeZone string `json:"timeZone,omitempty"`
12301
12302
12303
12304
12305
12306 ForceSendFields []string `json:"-"`
12307
12308
12309
12310
12311 NullFields []string `json:"-"`
12312 }
12313
12314 func (s *PartnerGeneralConfig) MarshalJSON() ([]byte, error) {
12315 type NoMethod PartnerGeneralConfig
12316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12317 }
12318
12319
12320
12321 type PartnerRevenueModel struct {
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333 MarkupAmount int64 `json:"markupAmount,omitempty,string"`
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346 MarkupType string `json:"markupType,omitempty"`
12347
12348
12349
12350
12351
12352 ForceSendFields []string `json:"-"`
12353
12354
12355
12356
12357 NullFields []string `json:"-"`
12358 }
12359
12360 func (s *PartnerRevenueModel) MarshalJSON() ([]byte, error) {
12361 type NoMethod PartnerRevenueModel
12362 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12363 }
12364
12365
12366 type PerformanceGoal struct {
12367
12368
12369
12370
12371
12372
12373 PerformanceGoalAmountMicros int64 `json:"performanceGoalAmountMicros,omitempty,string"`
12374
12375
12376
12377
12378
12379
12380
12381 PerformanceGoalPercentageMicros int64 `json:"performanceGoalPercentageMicros,omitempty,string"`
12382
12383
12384
12385
12386 PerformanceGoalString string `json:"performanceGoalString,omitempty"`
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421 PerformanceGoalType string `json:"performanceGoalType,omitempty"`
12422
12423
12424
12425
12426
12427 ForceSendFields []string `json:"-"`
12428
12429
12430
12431
12432 NullFields []string `json:"-"`
12433 }
12434
12435 func (s *PerformanceGoal) MarshalJSON() ([]byte, error) {
12436 type NoMethod PerformanceGoal
12437 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12438 }
12439
12440
12441
12442 type PerformanceGoalBidStrategy struct {
12443
12444
12445
12446 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
12447
12448
12449
12450
12451
12452
12453 MaxAverageCpmBidAmountMicros int64 `json:"maxAverageCpmBidAmountMicros,omitempty,string"`
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473 PerformanceGoalAmountMicros int64 `json:"performanceGoalAmountMicros,omitempty,string"`
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494 PerformanceGoalType string `json:"performanceGoalType,omitempty"`
12495
12496
12497
12498
12499
12500 ForceSendFields []string `json:"-"`
12501
12502
12503
12504
12505 NullFields []string `json:"-"`
12506 }
12507
12508 func (s *PerformanceGoalBidStrategy) MarshalJSON() ([]byte, error) {
12509 type NoMethod PerformanceGoalBidStrategy
12510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12511 }
12512
12513
12514
12515
12516 type PoiAssignedTargetingOptionDetails struct {
12517
12518
12519 DisplayName string `json:"displayName,omitempty"`
12520
12521 Latitude float64 `json:"latitude,omitempty"`
12522
12523 Longitude float64 `json:"longitude,omitempty"`
12524
12525
12526
12527
12528 ProximityRadiusAmount float64 `json:"proximityRadiusAmount,omitempty"`
12529
12530
12531
12532
12533
12534
12535
12536
12537 ProximityRadiusUnit string `json:"proximityRadiusUnit,omitempty"`
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549 TargetingOptionId string `json:"targetingOptionId,omitempty"`
12550
12551
12552
12553
12554
12555 ForceSendFields []string `json:"-"`
12556
12557
12558
12559
12560 NullFields []string `json:"-"`
12561 }
12562
12563 func (s *PoiAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12564 type NoMethod PoiAssignedTargetingOptionDetails
12565 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12566 }
12567
12568 func (s *PoiAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error {
12569 type NoMethod PoiAssignedTargetingOptionDetails
12570 var s1 struct {
12571 Latitude gensupport.JSONFloat64 `json:"latitude"`
12572 Longitude gensupport.JSONFloat64 `json:"longitude"`
12573 ProximityRadiusAmount gensupport.JSONFloat64 `json:"proximityRadiusAmount"`
12574 *NoMethod
12575 }
12576 s1.NoMethod = (*NoMethod)(s)
12577 if err := json.Unmarshal(data, &s1); err != nil {
12578 return err
12579 }
12580 s.Latitude = float64(s1.Latitude)
12581 s.Longitude = float64(s1.Longitude)
12582 s.ProximityRadiusAmount = float64(s1.ProximityRadiusAmount)
12583 return nil
12584 }
12585
12586
12587 type PoiSearchTerms struct {
12588
12589
12590
12591 PoiQuery string `json:"poiQuery,omitempty"`
12592
12593
12594
12595
12596
12597 ForceSendFields []string `json:"-"`
12598
12599
12600
12601
12602 NullFields []string `json:"-"`
12603 }
12604
12605 func (s *PoiSearchTerms) MarshalJSON() ([]byte, error) {
12606 type NoMethod PoiSearchTerms
12607 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12608 }
12609
12610
12611
12612
12613 type PoiTargetingOptionDetails struct {
12614
12615
12616 DisplayName string `json:"displayName,omitempty"`
12617
12618 Latitude float64 `json:"latitude,omitempty"`
12619
12620 Longitude float64 `json:"longitude,omitempty"`
12621
12622
12623
12624
12625
12626 ForceSendFields []string `json:"-"`
12627
12628
12629
12630
12631 NullFields []string `json:"-"`
12632 }
12633
12634 func (s *PoiTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12635 type NoMethod PoiTargetingOptionDetails
12636 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12637 }
12638
12639 func (s *PoiTargetingOptionDetails) UnmarshalJSON(data []byte) error {
12640 type NoMethod PoiTargetingOptionDetails
12641 var s1 struct {
12642 Latitude gensupport.JSONFloat64 `json:"latitude"`
12643 Longitude gensupport.JSONFloat64 `json:"longitude"`
12644 *NoMethod
12645 }
12646 s1.NoMethod = (*NoMethod)(s)
12647 if err := json.Unmarshal(data, &s1); err != nil {
12648 return err
12649 }
12650 s.Latitude = float64(s1.Latitude)
12651 s.Longitude = float64(s1.Longitude)
12652 return nil
12653 }
12654
12655
12656 type PrismaConfig struct {
12657
12658
12659 PrismaCpeCode *PrismaCpeCode `json:"prismaCpeCode,omitempty"`
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671 PrismaType string `json:"prismaType,omitempty"`
12672
12673 Supplier string `json:"supplier,omitempty"`
12674
12675
12676
12677
12678
12679 ForceSendFields []string `json:"-"`
12680
12681
12682
12683
12684 NullFields []string `json:"-"`
12685 }
12686
12687 func (s *PrismaConfig) MarshalJSON() ([]byte, error) {
12688 type NoMethod PrismaConfig
12689 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12690 }
12691
12692
12693
12694 type PrismaCpeCode struct {
12695
12696 PrismaClientCode string `json:"prismaClientCode,omitempty"`
12697
12698 PrismaEstimateCode string `json:"prismaEstimateCode,omitempty"`
12699
12700 PrismaProductCode string `json:"prismaProductCode,omitempty"`
12701
12702
12703
12704
12705
12706 ForceSendFields []string `json:"-"`
12707
12708
12709
12710
12711 NullFields []string `json:"-"`
12712 }
12713
12714 func (s *PrismaCpeCode) MarshalJSON() ([]byte, error) {
12715 type NoMethod PrismaCpeCode
12716 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12717 }
12718
12719
12720 type ProductFeedData struct {
12721
12722 IsFeedDisabled bool `json:"isFeedDisabled,omitempty"`
12723
12724 ProductMatchDimensions []*ProductMatchDimension `json:"productMatchDimensions,omitempty"`
12725
12726
12727
12728
12729
12730
12731
12732 ProductMatchType string `json:"productMatchType,omitempty"`
12733
12734
12735
12736
12737
12738 ForceSendFields []string `json:"-"`
12739
12740
12741
12742
12743 NullFields []string `json:"-"`
12744 }
12745
12746 func (s *ProductFeedData) MarshalJSON() ([]byte, error) {
12747 type NoMethod ProductFeedData
12748 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12749 }
12750
12751
12752 type ProductMatchDimension struct {
12753
12754 CustomLabel *CustomLabel `json:"customLabel,omitempty"`
12755
12756
12757 ProductOfferId string `json:"productOfferId,omitempty"`
12758
12759
12760
12761
12762
12763 ForceSendFields []string `json:"-"`
12764
12765
12766
12767
12768 NullFields []string `json:"-"`
12769 }
12770
12771 func (s *ProductMatchDimension) MarshalJSON() ([]byte, error) {
12772 type NoMethod ProductMatchDimension
12773 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12774 }
12775
12776
12777
12778
12779
12780 type ProximityLocationListAssignedTargetingOptionDetails struct {
12781
12782
12783
12784 ProximityLocationListId int64 `json:"proximityLocationListId,omitempty,string"`
12785
12786
12787
12788
12789 ProximityRadius float64 `json:"proximityRadius,omitempty"`
12790
12791
12792
12793
12794
12795
12796
12797
12798 ProximityRadiusUnit string `json:"proximityRadiusUnit,omitempty"`
12799
12800
12801
12802
12803
12804 ForceSendFields []string `json:"-"`
12805
12806
12807
12808
12809 NullFields []string `json:"-"`
12810 }
12811
12812 func (s *ProximityLocationListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12813 type NoMethod ProximityLocationListAssignedTargetingOptionDetails
12814 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12815 }
12816
12817 func (s *ProximityLocationListAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error {
12818 type NoMethod ProximityLocationListAssignedTargetingOptionDetails
12819 var s1 struct {
12820 ProximityRadius gensupport.JSONFloat64 `json:"proximityRadius"`
12821 *NoMethod
12822 }
12823 s1.NoMethod = (*NoMethod)(s)
12824 if err := json.Unmarshal(data, &s1); err != nil {
12825 return err
12826 }
12827 s.ProximityRadius = float64(s1.ProximityRadius)
12828 return nil
12829 }
12830
12831
12832 type PublisherReviewStatus struct {
12833
12834 PublisherName string `json:"publisherName,omitempty"`
12835
12836
12837
12838
12839
12840
12841
12842
12843 Status string `json:"status,omitempty"`
12844
12845
12846
12847
12848
12849 ForceSendFields []string `json:"-"`
12850
12851
12852
12853
12854 NullFields []string `json:"-"`
12855 }
12856
12857 func (s *PublisherReviewStatus) MarshalJSON() ([]byte, error) {
12858 type NoMethod PublisherReviewStatus
12859 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12860 }
12861
12862
12863 type RateDetails struct {
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876 InventorySourceRateType string `json:"inventorySourceRateType,omitempty"`
12877
12878
12879
12880 MinimumSpend *Money `json:"minimumSpend,omitempty"`
12881
12882 Rate *Money `json:"rate,omitempty"`
12883
12884
12885 UnitsPurchased int64 `json:"unitsPurchased,omitempty,string"`
12886
12887
12888
12889
12890
12891 ForceSendFields []string `json:"-"`
12892
12893
12894
12895
12896 NullFields []string `json:"-"`
12897 }
12898
12899 func (s *RateDetails) MarshalJSON() ([]byte, error) {
12900 type NoMethod RateDetails
12901 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12902 }
12903
12904
12905
12906
12907
12908 type RegionalLocationListAssignedTargetingOptionDetails struct {
12909
12910 Negative bool `json:"negative,omitempty"`
12911
12912
12913
12914 RegionalLocationListId int64 `json:"regionalLocationListId,omitempty,string"`
12915
12916
12917
12918
12919
12920 ForceSendFields []string `json:"-"`
12921
12922
12923
12924
12925 NullFields []string `json:"-"`
12926 }
12927
12928 func (s *RegionalLocationListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12929 type NoMethod RegionalLocationListAssignedTargetingOptionDetails
12930 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12931 }
12932
12933
12934
12935 type RemarketingConfig struct {
12936
12937 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12938
12939
12940 RemarketingEnabled bool `json:"remarketingEnabled,omitempty"`
12941
12942
12943
12944
12945
12946 ForceSendFields []string `json:"-"`
12947
12948
12949
12950
12951 NullFields []string `json:"-"`
12952 }
12953
12954 func (s *RemarketingConfig) MarshalJSON() ([]byte, error) {
12955 type NoMethod RemarketingConfig
12956 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12957 }
12958
12959
12960
12961 type ReplaceNegativeKeywordsRequest struct {
12962
12963
12964
12965 NewNegativeKeywords []*NegativeKeyword `json:"newNegativeKeywords,omitempty"`
12966
12967
12968
12969
12970
12971 ForceSendFields []string `json:"-"`
12972
12973
12974
12975
12976 NullFields []string `json:"-"`
12977 }
12978
12979 func (s *ReplaceNegativeKeywordsRequest) MarshalJSON() ([]byte, error) {
12980 type NoMethod ReplaceNegativeKeywordsRequest
12981 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12982 }
12983
12984
12985
12986 type ReplaceNegativeKeywordsResponse struct {
12987
12988
12989 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"`
12990
12991
12992 googleapi.ServerResponse `json:"-"`
12993
12994
12995
12996
12997
12998 ForceSendFields []string `json:"-"`
12999
13000
13001
13002
13003 NullFields []string `json:"-"`
13004 }
13005
13006 func (s *ReplaceNegativeKeywordsResponse) MarshalJSON() ([]byte, error) {
13007 type NoMethod ReplaceNegativeKeywordsResponse
13008 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13009 }
13010
13011
13012 type ReplaceSitesRequest struct {
13013
13014 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13015
13016
13017 NewSites []*Site `json:"newSites,omitempty"`
13018
13019 PartnerId int64 `json:"partnerId,omitempty,string"`
13020
13021
13022
13023
13024
13025 ForceSendFields []string `json:"-"`
13026
13027
13028
13029
13030 NullFields []string `json:"-"`
13031 }
13032
13033 func (s *ReplaceSitesRequest) MarshalJSON() ([]byte, error) {
13034 type NoMethod ReplaceSitesRequest
13035 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13036 }
13037
13038
13039 type ReplaceSitesResponse struct {
13040
13041 Sites []*Site `json:"sites,omitempty"`
13042
13043
13044 googleapi.ServerResponse `json:"-"`
13045
13046
13047
13048
13049
13050 ForceSendFields []string `json:"-"`
13051
13052
13053
13054
13055 NullFields []string `json:"-"`
13056 }
13057
13058 func (s *ReplaceSitesResponse) MarshalJSON() ([]byte, error) {
13059 type NoMethod ReplaceSitesResponse
13060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13061 }
13062
13063
13064 type ReviewStatusInfo struct {
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081 ApprovalStatus string `json:"approvalStatus,omitempty"`
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091 ContentAndPolicyReviewStatus string `json:"contentAndPolicyReviewStatus,omitempty"`
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101 CreativeAndLandingPageReviewStatus string `json:"creativeAndLandingPageReviewStatus,omitempty"`
13102
13103 ExchangeReviewStatuses []*ExchangeReviewStatus `json:"exchangeReviewStatuses,omitempty"`
13104
13105 PublisherReviewStatuses []*PublisherReviewStatus `json:"publisherReviewStatuses,omitempty"`
13106
13107
13108
13109
13110
13111 ForceSendFields []string `json:"-"`
13112
13113
13114
13115
13116 NullFields []string `json:"-"`
13117 }
13118
13119 func (s *ReviewStatusInfo) MarshalJSON() ([]byte, error) {
13120 type NoMethod ReviewStatusInfo
13121 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13122 }
13123
13124
13125 type ScriptError struct {
13126
13127 Column int64 `json:"column,omitempty,string"`
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137 ErrorCode string `json:"errorCode,omitempty"`
13138
13139 ErrorMessage string `json:"errorMessage,omitempty"`
13140
13141 Line int64 `json:"line,omitempty,string"`
13142
13143
13144
13145
13146
13147 ForceSendFields []string `json:"-"`
13148
13149
13150
13151
13152 NullFields []string `json:"-"`
13153 }
13154
13155 func (s *ScriptError) MarshalJSON() ([]byte, error) {
13156 type NoMethod ScriptError
13157 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13158 }
13159
13160
13161 type SdfConfig struct {
13162
13163
13164 AdminEmail string `json:"adminEmail,omitempty"`
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184 Version string `json:"version,omitempty"`
13185
13186
13187
13188
13189
13190 ForceSendFields []string `json:"-"`
13191
13192
13193
13194
13195 NullFields []string `json:"-"`
13196 }
13197
13198 func (s *SdfConfig) MarshalJSON() ([]byte, error) {
13199 type NoMethod SdfConfig
13200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13201 }
13202
13203
13204
13205 type SdfDownloadTask struct {
13206
13207
13208
13209
13210
13211 ResourceName string `json:"resourceName,omitempty"`
13212
13213
13214
13215
13216
13217 ForceSendFields []string `json:"-"`
13218
13219
13220
13221
13222 NullFields []string `json:"-"`
13223 }
13224
13225 func (s *SdfDownloadTask) MarshalJSON() ([]byte, error) {
13226 type NoMethod SdfDownloadTask
13227 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13228 }
13229
13230
13231
13232 type SdfDownloadTaskMetadata struct {
13233
13234 CreateTime string `json:"createTime,omitempty"`
13235
13236 EndTime string `json:"endTime,omitempty"`
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256 Version string `json:"version,omitempty"`
13257
13258
13259
13260
13261
13262 ForceSendFields []string `json:"-"`
13263
13264
13265
13266
13267 NullFields []string `json:"-"`
13268 }
13269
13270 func (s *SdfDownloadTaskMetadata) MarshalJSON() ([]byte, error) {
13271 type NoMethod SdfDownloadTaskMetadata
13272 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13273 }
13274
13275
13276 type SearchTargetingOptionsRequest struct {
13277
13278
13279 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13280
13281
13282 BusinessChainSearchTerms *BusinessChainSearchTerms `json:"businessChainSearchTerms,omitempty"`
13283
13284
13285 GeoRegionSearchTerms *GeoRegionSearchTerms `json:"geoRegionSearchTerms,omitempty"`
13286
13287
13288
13289 PageSize int64 `json:"pageSize,omitempty"`
13290
13291
13292
13293
13294 PageToken string `json:"pageToken,omitempty"`
13295
13296
13297 PoiSearchTerms *PoiSearchTerms `json:"poiSearchTerms,omitempty"`
13298
13299
13300
13301
13302
13303 ForceSendFields []string `json:"-"`
13304
13305
13306
13307
13308 NullFields []string `json:"-"`
13309 }
13310
13311 func (s *SearchTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
13312 type NoMethod SearchTargetingOptionsRequest
13313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13314 }
13315
13316
13317 type SearchTargetingOptionsResponse struct {
13318
13319
13320
13321 NextPageToken string `json:"nextPageToken,omitempty"`
13322
13323
13324 TargetingOptions []*TargetingOption `json:"targetingOptions,omitempty"`
13325
13326
13327 googleapi.ServerResponse `json:"-"`
13328
13329
13330
13331
13332
13333 ForceSendFields []string `json:"-"`
13334
13335
13336
13337
13338 NullFields []string `json:"-"`
13339 }
13340
13341 func (s *SearchTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
13342 type NoMethod SearchTargetingOptionsResponse
13343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13344 }
13345
13346
13347
13348
13349
13350 type SensitiveCategoryAssignedTargetingOptionDetails struct {
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407 ExcludedSensitiveCategory string `json:"excludedSensitiveCategory,omitempty"`
13408
13409
13410
13411
13412
13413 ForceSendFields []string `json:"-"`
13414
13415
13416
13417
13418 NullFields []string `json:"-"`
13419 }
13420
13421 func (s *SensitiveCategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13422 type NoMethod SensitiveCategoryAssignedTargetingOptionDetails
13423 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13424 }
13425
13426
13427
13428
13429
13430 type SensitiveCategoryTargetingOptionDetails struct {
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487 SensitiveCategory string `json:"sensitiveCategory,omitempty"`
13488
13489
13490
13491
13492
13493 ForceSendFields []string `json:"-"`
13494
13495
13496
13497
13498 NullFields []string `json:"-"`
13499 }
13500
13501 func (s *SensitiveCategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13502 type NoMethod SensitiveCategoryTargetingOptionDetails
13503 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13504 }
13505
13506
13507
13508
13509
13510 type SessionPositionAssignedTargetingOptionDetails struct {
13511
13512
13513
13514
13515
13516
13517 SessionPosition string `json:"sessionPosition,omitempty"`
13518
13519
13520
13521
13522
13523 ForceSendFields []string `json:"-"`
13524
13525
13526
13527
13528 NullFields []string `json:"-"`
13529 }
13530
13531 func (s *SessionPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13532 type NoMethod SessionPositionAssignedTargetingOptionDetails
13533 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13534 }
13535
13536
13537 type Site struct {
13538
13539 Name string `json:"name,omitempty"`
13540
13541
13542 UrlOrAppId string `json:"urlOrAppId,omitempty"`
13543
13544
13545 googleapi.ServerResponse `json:"-"`
13546
13547
13548
13549
13550
13551 ForceSendFields []string `json:"-"`
13552
13553
13554
13555
13556 NullFields []string `json:"-"`
13557 }
13558
13559 func (s *Site) MarshalJSON() ([]byte, error) {
13560 type NoMethod Site
13561 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13562 }
13563
13564
13565
13566
13567
13568
13569
13570 type Status struct {
13571
13572 Code int64 `json:"code,omitempty"`
13573
13574
13575 Details []googleapi.RawMessage `json:"details,omitempty"`
13576
13577
13578
13579 Message string `json:"message,omitempty"`
13580
13581
13582
13583
13584
13585 ForceSendFields []string `json:"-"`
13586
13587
13588
13589
13590 NullFields []string `json:"-"`
13591 }
13592
13593 func (s *Status) MarshalJSON() ([]byte, error) {
13594 type NoMethod Status
13595 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13596 }
13597
13598
13599
13600
13601
13602 type SubExchangeAssignedTargetingOptionDetails struct {
13603
13604
13605 TargetingOptionId string `json:"targetingOptionId,omitempty"`
13606
13607
13608
13609
13610
13611 ForceSendFields []string `json:"-"`
13612
13613
13614
13615
13616 NullFields []string `json:"-"`
13617 }
13618
13619 func (s *SubExchangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13620 type NoMethod SubExchangeAssignedTargetingOptionDetails
13621 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13622 }
13623
13624
13625
13626
13627 type SubExchangeTargetingOptionDetails struct {
13628
13629 DisplayName string `json:"displayName,omitempty"`
13630
13631
13632
13633
13634
13635 ForceSendFields []string `json:"-"`
13636
13637
13638
13639
13640 NullFields []string `json:"-"`
13641 }
13642
13643 func (s *SubExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13644 type NoMethod SubExchangeTargetingOptionDetails
13645 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13646 }
13647
13648
13649
13650 type TargetFrequency struct {
13651
13652
13653
13654 TargetCount int64 `json:"targetCount,omitempty,string"`
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672 TimeUnit string `json:"timeUnit,omitempty"`
13673
13674
13675
13676 TimeUnitCount int64 `json:"timeUnitCount,omitempty"`
13677
13678
13679
13680
13681
13682 ForceSendFields []string `json:"-"`
13683
13684
13685
13686
13687 NullFields []string `json:"-"`
13688 }
13689
13690 func (s *TargetFrequency) MarshalJSON() ([]byte, error) {
13691 type NoMethod TargetFrequency
13692 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13693 }
13694
13695
13696
13697
13698 type TargetingExpansionConfig struct {
13699
13700
13701
13702
13703
13704
13705
13706 ExcludeFirstPartyAudience bool `json:"excludeFirstPartyAudience,omitempty"`
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727 TargetingExpansionLevel string `json:"targetingExpansionLevel,omitempty"`
13728
13729
13730
13731
13732
13733 ForceSendFields []string `json:"-"`
13734
13735
13736
13737
13738 NullFields []string `json:"-"`
13739 }
13740
13741 func (s *TargetingExpansionConfig) MarshalJSON() ([]byte, error) {
13742 type NoMethod TargetingExpansionConfig
13743 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13744 }
13745
13746
13747
13748 type TargetingOption struct {
13749
13750 AgeRangeDetails *AgeRangeTargetingOptionDetails `json:"ageRangeDetails,omitempty"`
13751
13752 AppCategoryDetails *AppCategoryTargetingOptionDetails `json:"appCategoryDetails,omitempty"`
13753
13754 AudioContentTypeDetails *AudioContentTypeTargetingOptionDetails `json:"audioContentTypeDetails,omitempty"`
13755
13756 AuthorizedSellerStatusDetails *AuthorizedSellerStatusTargetingOptionDetails `json:"authorizedSellerStatusDetails,omitempty"`
13757
13758 BrowserDetails *BrowserTargetingOptionDetails `json:"browserDetails,omitempty"`
13759
13760 BusinessChainDetails *BusinessChainTargetingOptionDetails `json:"businessChainDetails,omitempty"`
13761
13762 CarrierAndIspDetails *CarrierAndIspTargetingOptionDetails `json:"carrierAndIspDetails,omitempty"`
13763
13764 CategoryDetails *CategoryTargetingOptionDetails `json:"categoryDetails,omitempty"`
13765
13766 ContentDurationDetails *ContentDurationTargetingOptionDetails `json:"contentDurationDetails,omitempty"`
13767
13768 ContentGenreDetails *ContentGenreTargetingOptionDetails `json:"contentGenreDetails,omitempty"`
13769
13770 ContentInstreamPositionDetails *ContentInstreamPositionTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"`
13771
13772 ContentOutstreamPositionDetails *ContentOutstreamPositionTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"`
13773
13774 ContentStreamTypeDetails *ContentStreamTypeTargetingOptionDetails `json:"contentStreamTypeDetails,omitempty"`
13775
13776 DeviceMakeModelDetails *DeviceMakeModelTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"`
13777
13778 DeviceTypeDetails *DeviceTypeTargetingOptionDetails `json:"deviceTypeDetails,omitempty"`
13779
13780 DigitalContentLabelDetails *DigitalContentLabelTargetingOptionDetails `json:"digitalContentLabelDetails,omitempty"`
13781
13782 EnvironmentDetails *EnvironmentTargetingOptionDetails `json:"environmentDetails,omitempty"`
13783
13784 ExchangeDetails *ExchangeTargetingOptionDetails `json:"exchangeDetails,omitempty"`
13785
13786 GenderDetails *GenderTargetingOptionDetails `json:"genderDetails,omitempty"`
13787
13788 GeoRegionDetails *GeoRegionTargetingOptionDetails `json:"geoRegionDetails,omitempty"`
13789
13790 HouseholdIncomeDetails *HouseholdIncomeTargetingOptionDetails `json:"householdIncomeDetails,omitempty"`
13791
13792 LanguageDetails *LanguageTargetingOptionDetails `json:"languageDetails,omitempty"`
13793
13794 Name string `json:"name,omitempty"`
13795
13796 NativeContentPositionDetails *NativeContentPositionTargetingOptionDetails `json:"nativeContentPositionDetails,omitempty"`
13797
13798 OmidDetails *OmidTargetingOptionDetails `json:"omidDetails,omitempty"`
13799
13800 OnScreenPositionDetails *OnScreenPositionTargetingOptionDetails `json:"onScreenPositionDetails,omitempty"`
13801
13802 OperatingSystemDetails *OperatingSystemTargetingOptionDetails `json:"operatingSystemDetails,omitempty"`
13803
13804 ParentalStatusDetails *ParentalStatusTargetingOptionDetails `json:"parentalStatusDetails,omitempty"`
13805
13806 PoiDetails *PoiTargetingOptionDetails `json:"poiDetails,omitempty"`
13807
13808 SensitiveCategoryDetails *SensitiveCategoryTargetingOptionDetails `json:"sensitiveCategoryDetails,omitempty"`
13809
13810 SubExchangeDetails *SubExchangeTargetingOptionDetails `json:"subExchangeDetails,omitempty"`
13811
13812
13813 TargetingOptionId string `json:"targetingOptionId,omitempty"`
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923 TargetingType string `json:"targetingType,omitempty"`
13924
13925 UserRewardedContentDetails *UserRewardedContentTargetingOptionDetails `json:"userRewardedContentDetails,omitempty"`
13926
13927 VideoPlayerSizeDetails *VideoPlayerSizeTargetingOptionDetails `json:"videoPlayerSizeDetails,omitempty"`
13928
13929 ViewabilityDetails *ViewabilityTargetingOptionDetails `json:"viewabilityDetails,omitempty"`
13930
13931
13932 googleapi.ServerResponse `json:"-"`
13933
13934
13935
13936
13937
13938 ForceSendFields []string `json:"-"`
13939
13940
13941
13942
13943 NullFields []string `json:"-"`
13944 }
13945
13946 func (s *TargetingOption) MarshalJSON() ([]byte, error) {
13947 type NoMethod TargetingOption
13948 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13949 }
13950
13951
13952
13953 type ThirdPartyOnlyConfig struct {
13954
13955
13956 PixelOrderIdReportingEnabled bool `json:"pixelOrderIdReportingEnabled,omitempty"`
13957
13958
13959
13960
13961
13962 ForceSendFields []string `json:"-"`
13963
13964
13965
13966
13967 NullFields []string `json:"-"`
13968 }
13969
13970 func (s *ThirdPartyOnlyConfig) MarshalJSON() ([]byte, error) {
13971 type NoMethod ThirdPartyOnlyConfig
13972 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13973 }
13974
13975
13976
13977 type ThirdPartyUrl struct {
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014 Type string `json:"type,omitempty"`
14015
14016
14017
14018 Url string `json:"url,omitempty"`
14019
14020
14021
14022
14023
14024 ForceSendFields []string `json:"-"`
14025
14026
14027
14028
14029 NullFields []string `json:"-"`
14030 }
14031
14032 func (s *ThirdPartyUrl) MarshalJSON() ([]byte, error) {
14033 type NoMethod ThirdPartyUrl
14034 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14035 }
14036
14037
14038
14039 type ThirdPartyVendorConfig struct {
14040
14041
14042 PlacementId string `json:"placementId,omitempty"`
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057 Vendor string `json:"vendor,omitempty"`
14058
14059
14060
14061
14062
14063 ForceSendFields []string `json:"-"`
14064
14065
14066
14067
14068 NullFields []string `json:"-"`
14069 }
14070
14071 func (s *ThirdPartyVendorConfig) MarshalJSON() ([]byte, error) {
14072 type NoMethod ThirdPartyVendorConfig
14073 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14074 }
14075
14076
14077
14078
14079
14080 type ThirdPartyVerifierAssignedTargetingOptionDetails struct {
14081
14082 Adloox *Adloox `json:"adloox,omitempty"`
14083
14084 DoubleVerify *DoubleVerify `json:"doubleVerify,omitempty"`
14085
14086 IntegralAdScience *IntegralAdScience `json:"integralAdScience,omitempty"`
14087
14088
14089
14090
14091
14092 ForceSendFields []string `json:"-"`
14093
14094
14095
14096
14097 NullFields []string `json:"-"`
14098 }
14099
14100 func (s *ThirdPartyVerifierAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14101 type NoMethod ThirdPartyVerifierAssignedTargetingOptionDetails
14102 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14103 }
14104
14105
14106 type TimeRange struct {
14107
14108 EndTime string `json:"endTime,omitempty"`
14109
14110 StartTime string `json:"startTime,omitempty"`
14111
14112
14113
14114
14115
14116 ForceSendFields []string `json:"-"`
14117
14118
14119
14120
14121 NullFields []string `json:"-"`
14122 }
14123
14124 func (s *TimeRange) MarshalJSON() ([]byte, error) {
14125 type NoMethod TimeRange
14126 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14127 }
14128
14129
14130 type TimerEvent struct {
14131
14132 Name string `json:"name,omitempty"`
14133
14134
14135 ReportingName string `json:"reportingName,omitempty"`
14136
14137
14138
14139
14140
14141 ForceSendFields []string `json:"-"`
14142
14143
14144
14145
14146 NullFields []string `json:"-"`
14147 }
14148
14149 func (s *TimerEvent) MarshalJSON() ([]byte, error) {
14150 type NoMethod TimerEvent
14151 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14152 }
14153
14154
14155
14156 type TrackingFloodlightActivityConfig struct {
14157
14158 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
14159
14160
14161
14162 PostClickLookbackWindowDays int64 `json:"postClickLookbackWindowDays,omitempty"`
14163
14164
14165
14166 PostViewLookbackWindowDays int64 `json:"postViewLookbackWindowDays,omitempty"`
14167
14168
14169
14170
14171
14172 ForceSendFields []string `json:"-"`
14173
14174
14175
14176
14177 NullFields []string `json:"-"`
14178 }
14179
14180 func (s *TrackingFloodlightActivityConfig) MarshalJSON() ([]byte, error) {
14181 type NoMethod TrackingFloodlightActivityConfig
14182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14183 }
14184
14185
14186 type Transcode struct {
14187
14188
14189 AudioBitRateKbps int64 `json:"audioBitRateKbps,omitempty,string"`
14190
14191
14192 AudioSampleRateHz int64 `json:"audioSampleRateHz,omitempty,string"`
14193
14194
14195 BitRateKbps int64 `json:"bitRateKbps,omitempty,string"`
14196
14197 Dimensions *Dimensions `json:"dimensions,omitempty"`
14198
14199 FileSizeBytes int64 `json:"fileSizeBytes,omitempty,string"`
14200
14201 FrameRate float64 `json:"frameRate,omitempty"`
14202
14203 MimeType string `json:"mimeType,omitempty"`
14204
14205 Name string `json:"name,omitempty"`
14206
14207 Transcoded bool `json:"transcoded,omitempty"`
14208
14209
14210
14211
14212
14213 ForceSendFields []string `json:"-"`
14214
14215
14216
14217
14218 NullFields []string `json:"-"`
14219 }
14220
14221 func (s *Transcode) MarshalJSON() ([]byte, error) {
14222 type NoMethod Transcode
14223 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14224 }
14225
14226 func (s *Transcode) UnmarshalJSON(data []byte) error {
14227 type NoMethod Transcode
14228 var s1 struct {
14229 FrameRate gensupport.JSONFloat64 `json:"frameRate"`
14230 *NoMethod
14231 }
14232 s1.NoMethod = (*NoMethod)(s)
14233 if err := json.Unmarshal(data, &s1); err != nil {
14234 return err
14235 }
14236 s.FrameRate = float64(s1.FrameRate)
14237 return nil
14238 }
14239
14240
14241
14242 type UniversalAdId struct {
14243
14244 Id string `json:"id,omitempty"`
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259 Registry string `json:"registry,omitempty"`
14260
14261
14262
14263
14264
14265 ForceSendFields []string `json:"-"`
14266
14267
14268
14269
14270 NullFields []string `json:"-"`
14271 }
14272
14273 func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
14274 type NoMethod UniversalAdId
14275 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14276 }
14277
14278
14279
14280
14281 type UrlAssignedTargetingOptionDetails struct {
14282
14283 Negative bool `json:"negative,omitempty"`
14284
14285
14286
14287
14288 Url string `json:"url,omitempty"`
14289
14290
14291
14292
14293
14294 ForceSendFields []string `json:"-"`
14295
14296
14297
14298
14299 NullFields []string `json:"-"`
14300 }
14301
14302 func (s *UrlAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14303 type NoMethod UrlAssignedTargetingOptionDetails
14304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14305 }
14306
14307
14308 type User struct {
14309
14310
14311 AssignedUserRoles []*AssignedUserRole `json:"assignedUserRoles,omitempty"`
14312
14313
14314 DisplayName string `json:"displayName,omitempty"`
14315
14316 Email string `json:"email,omitempty"`
14317
14318
14319 LastLoginTime string `json:"lastLoginTime,omitempty"`
14320
14321 Name string `json:"name,omitempty"`
14322
14323 UserId int64 `json:"userId,omitempty,string"`
14324
14325
14326 googleapi.ServerResponse `json:"-"`
14327
14328
14329
14330
14331
14332 ForceSendFields []string `json:"-"`
14333
14334
14335
14336
14337 NullFields []string `json:"-"`
14338 }
14339
14340 func (s *User) MarshalJSON() ([]byte, error) {
14341 type NoMethod User
14342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14343 }
14344
14345
14346
14347
14348
14349 type UserRewardedContentAssignedTargetingOptionDetails struct {
14350
14351
14352 TargetingOptionId string `json:"targetingOptionId,omitempty"`
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363 UserRewardedContent string `json:"userRewardedContent,omitempty"`
14364
14365
14366
14367
14368
14369 ForceSendFields []string `json:"-"`
14370
14371
14372
14373
14374 NullFields []string `json:"-"`
14375 }
14376
14377 func (s *UserRewardedContentAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14378 type NoMethod UserRewardedContentAssignedTargetingOptionDetails
14379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14380 }
14381
14382
14383
14384
14385
14386 type UserRewardedContentTargetingOptionDetails struct {
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397 UserRewardedContent string `json:"userRewardedContent,omitempty"`
14398
14399
14400
14401
14402
14403 ForceSendFields []string `json:"-"`
14404
14405
14406
14407
14408 NullFields []string `json:"-"`
14409 }
14410
14411 func (s *UserRewardedContentTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14412 type NoMethod UserRewardedContentTargetingOptionDetails
14413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14414 }
14415
14416
14417 type VideoAdSequenceSettings struct {
14418
14419
14420
14421
14422
14423
14424
14425 MinimumDuration string `json:"minimumDuration,omitempty"`
14426
14427 Steps []*VideoAdSequenceStep `json:"steps,omitempty"`
14428
14429
14430
14431
14432
14433 ForceSendFields []string `json:"-"`
14434
14435
14436
14437
14438 NullFields []string `json:"-"`
14439 }
14440
14441 func (s *VideoAdSequenceSettings) MarshalJSON() ([]byte, error) {
14442 type NoMethod VideoAdSequenceSettings
14443 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14444 }
14445
14446
14447 type VideoAdSequenceStep struct {
14448
14449 AdGroupId int64 `json:"adGroupId,omitempty,string"`
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461 InteractionType string `json:"interactionType,omitempty"`
14462
14463
14464 PreviousStepId int64 `json:"previousStepId,omitempty,string"`
14465
14466 StepId int64 `json:"stepId,omitempty,string"`
14467
14468
14469
14470
14471
14472 ForceSendFields []string `json:"-"`
14473
14474
14475
14476
14477 NullFields []string `json:"-"`
14478 }
14479
14480 func (s *VideoAdSequenceStep) MarshalJSON() ([]byte, error) {
14481 type NoMethod VideoAdSequenceStep
14482 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14483 }
14484
14485
14486 type VideoDiscoveryAd struct {
14487
14488 Description1 string `json:"description1,omitempty"`
14489
14490 Description2 string `json:"description2,omitempty"`
14491
14492 Headline string `json:"headline,omitempty"`
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502 Thumbnail string `json:"thumbnail,omitempty"`
14503
14504 Video *YoutubeVideoDetails `json:"video,omitempty"`
14505
14506
14507
14508
14509
14510 ForceSendFields []string `json:"-"`
14511
14512
14513
14514
14515 NullFields []string `json:"-"`
14516 }
14517
14518 func (s *VideoDiscoveryAd) MarshalJSON() ([]byte, error) {
14519 type NoMethod VideoDiscoveryAd
14520 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14521 }
14522
14523
14524 type VideoPerformanceAd struct {
14525
14526
14527 ActionButtonLabels []string `json:"actionButtonLabels,omitempty"`
14528
14529 CompanionBanners []*ImageAsset `json:"companionBanners,omitempty"`
14530
14531
14532 CustomParameters map[string]string `json:"customParameters,omitempty"`
14533
14534 Descriptions []string `json:"descriptions,omitempty"`
14535
14536 DisplayUrlBreadcrumb1 string `json:"displayUrlBreadcrumb1,omitempty"`
14537
14538 DisplayUrlBreadcrumb2 string `json:"displayUrlBreadcrumb2,omitempty"`
14539
14540 Domain string `json:"domain,omitempty"`
14541
14542
14543 FinalUrl string `json:"finalUrl,omitempty"`
14544
14545 Headlines []string `json:"headlines,omitempty"`
14546
14547
14548 LongHeadlines []string `json:"longHeadlines,omitempty"`
14549
14550 TrackingUrl string `json:"trackingUrl,omitempty"`
14551
14552 Videos []*YoutubeVideoDetails `json:"videos,omitempty"`
14553
14554
14555
14556
14557
14558 ForceSendFields []string `json:"-"`
14559
14560
14561
14562
14563 NullFields []string `json:"-"`
14564 }
14565
14566 func (s *VideoPerformanceAd) MarshalJSON() ([]byte, error) {
14567 type NoMethod VideoPerformanceAd
14568 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14569 }
14570
14571
14572
14573
14574
14575
14576 type VideoPlayerSizeAssignedTargetingOptionDetails struct {
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592 VideoPlayerSize string `json:"videoPlayerSize,omitempty"`
14593
14594
14595
14596
14597
14598 ForceSendFields []string `json:"-"`
14599
14600
14601
14602
14603 NullFields []string `json:"-"`
14604 }
14605
14606 func (s *VideoPlayerSizeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14607 type NoMethod VideoPlayerSizeAssignedTargetingOptionDetails
14608 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14609 }
14610
14611
14612
14613
14614 type VideoPlayerSizeTargetingOptionDetails struct {
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630 VideoPlayerSize string `json:"videoPlayerSize,omitempty"`
14631
14632
14633
14634
14635
14636 ForceSendFields []string `json:"-"`
14637
14638
14639
14640
14641 NullFields []string `json:"-"`
14642 }
14643
14644 func (s *VideoPlayerSizeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14645 type NoMethod VideoPlayerSizeTargetingOptionDetails
14646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14647 }
14648
14649
14650
14651
14652
14653 type ViewabilityAssignedTargetingOptionDetails struct {
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678 Viewability string `json:"viewability,omitempty"`
14679
14680
14681
14682
14683
14684 ForceSendFields []string `json:"-"`
14685
14686
14687
14688
14689 NullFields []string `json:"-"`
14690 }
14691
14692 func (s *ViewabilityAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14693 type NoMethod ViewabilityAssignedTargetingOptionDetails
14694 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14695 }
14696
14697
14698
14699
14700 type ViewabilityTargetingOptionDetails struct {
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725 Viewability string `json:"viewability,omitempty"`
14726
14727
14728
14729
14730
14731 ForceSendFields []string `json:"-"`
14732
14733
14734
14735
14736 NullFields []string `json:"-"`
14737 }
14738
14739 func (s *ViewabilityTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14740 type NoMethod ViewabilityTargetingOptionDetails
14741 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14742 }
14743
14744
14745
14746 type YoutubeAdGroup struct {
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766 AdGroupFormat string `json:"adGroupFormat,omitempty"`
14767
14768 AdGroupId int64 `json:"adGroupId,omitempty,string"`
14769
14770 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
14771
14772 BiddingStrategy *YoutubeAndPartnersBiddingStrategy `json:"biddingStrategy,omitempty"`
14773
14774
14775 DisplayName string `json:"displayName,omitempty"`
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794 EntityStatus string `json:"entityStatus,omitempty"`
14795
14796 LineItemId int64 `json:"lineItemId,omitempty,string"`
14797
14798 Name string `json:"name,omitempty"`
14799
14800 ProductFeedData *ProductFeedData `json:"productFeedData,omitempty"`
14801
14802
14803
14804
14805 TargetingExpansion *TargetingExpansionConfig `json:"targetingExpansion,omitempty"`
14806
14807
14808 YoutubeAdIds googleapi.Int64s `json:"youtubeAdIds,omitempty"`
14809
14810
14811 googleapi.ServerResponse `json:"-"`
14812
14813
14814
14815
14816
14817 ForceSendFields []string `json:"-"`
14818
14819
14820
14821
14822 NullFields []string `json:"-"`
14823 }
14824
14825 func (s *YoutubeAdGroup) MarshalJSON() ([]byte, error) {
14826 type NoMethod YoutubeAdGroup
14827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14828 }
14829
14830
14831 type YoutubeAdGroupAd struct {
14832
14833 AdGroupAdId int64 `json:"adGroupAdId,omitempty,string"`
14834
14835 AdGroupId int64 `json:"adGroupId,omitempty,string"`
14836
14837 AdUrls []*AdUrl `json:"adUrls,omitempty"`
14838
14839 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
14840
14841
14842
14843 AudioAd *AudioAd `json:"audioAd,omitempty"`
14844
14845
14846
14847 BumperAd *BumperAd `json:"bumperAd,omitempty"`
14848
14849
14850 DisplayName string `json:"displayName,omitempty"`
14851
14852
14853 DisplayVideoSourceAd *DisplayVideoSourceAd `json:"displayVideoSourceAd,omitempty"`
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869 EntityStatus string `json:"entityStatus,omitempty"`
14870
14871
14872
14873 InStreamAd *InStreamAd `json:"inStreamAd,omitempty"`
14874
14875
14876 MastheadAd *MastheadAd `json:"mastheadAd,omitempty"`
14877
14878 Name string `json:"name,omitempty"`
14879
14880
14881
14882 NonSkippableAd *NonSkippableAd `json:"nonSkippableAd,omitempty"`
14883
14884
14885
14886 VideoDiscoverAd *VideoDiscoveryAd `json:"videoDiscoverAd,omitempty"`
14887
14888
14889
14890 VideoPerformanceAd *VideoPerformanceAd `json:"videoPerformanceAd,omitempty"`
14891
14892
14893 googleapi.ServerResponse `json:"-"`
14894
14895
14896
14897
14898
14899 ForceSendFields []string `json:"-"`
14900
14901
14902
14903
14904 NullFields []string `json:"-"`
14905 }
14906
14907 func (s *YoutubeAdGroupAd) MarshalJSON() ([]byte, error) {
14908 type NoMethod YoutubeAdGroupAd
14909 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14910 }
14911
14912
14913
14914 type YoutubeAdGroupAssignedTargetingOption struct {
14915
14916 AssignedTargetingOption *AssignedTargetingOption `json:"assignedTargetingOption,omitempty"`
14917
14918
14919 YoutubeAdGroupId int64 `json:"youtubeAdGroupId,omitempty,string"`
14920
14921
14922
14923
14924
14925 ForceSendFields []string `json:"-"`
14926
14927
14928
14929
14930 NullFields []string `json:"-"`
14931 }
14932
14933 func (s *YoutubeAdGroupAssignedTargetingOption) MarshalJSON() ([]byte, error) {
14934 type NoMethod YoutubeAdGroupAssignedTargetingOption
14935 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14936 }
14937
14938
14939
14940 type YoutubeAndPartnersBiddingStrategy struct {
14941
14942
14943
14944
14945
14946
14947
14948
14949 AdGroupEffectiveTargetCpaSource string `json:"adGroupEffectiveTargetCpaSource,omitempty"`
14950
14951
14952 AdGroupEffectiveTargetCpaValue int64 `json:"adGroupEffectiveTargetCpaValue,omitempty,string"`
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982 Type string `json:"type,omitempty"`
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997 Value int64 `json:"value,omitempty,string"`
14998
14999
15000
15001
15002
15003
15004 ForceSendFields []string `json:"-"`
15005
15006
15007
15008
15009 NullFields []string `json:"-"`
15010 }
15011
15012 func (s *YoutubeAndPartnersBiddingStrategy) MarshalJSON() ([]byte, error) {
15013 type NoMethod YoutubeAndPartnersBiddingStrategy
15014 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15015 }
15016
15017
15018
15019 type YoutubeAndPartnersInventorySourceConfig struct {
15020
15021
15022 IncludeGoogleTv bool `json:"includeGoogleTv,omitempty"`
15023
15024
15025 IncludeYoutubeSearch bool `json:"includeYoutubeSearch,omitempty"`
15026
15027
15028
15029 IncludeYoutubeVideoPartners bool `json:"includeYoutubeVideoPartners,omitempty"`
15030
15031
15032 IncludeYoutubeVideos bool `json:"includeYoutubeVideos,omitempty"`
15033
15034
15035
15036
15037
15038 ForceSendFields []string `json:"-"`
15039
15040
15041
15042
15043 NullFields []string `json:"-"`
15044 }
15045
15046 func (s *YoutubeAndPartnersInventorySourceConfig) MarshalJSON() ([]byte, error) {
15047 type NoMethod YoutubeAndPartnersInventorySourceConfig
15048 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15049 }
15050
15051
15052 type YoutubeAndPartnersSettings struct {
15053
15054
15055 BiddingStrategy *YoutubeAndPartnersBiddingStrategy `json:"biddingStrategy,omitempty"`
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072 ContentCategory string `json:"contentCategory,omitempty"`
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091 EffectiveContentCategory string `json:"effectiveContentCategory,omitempty"`
15092
15093
15094 InventorySourceSettings *YoutubeAndPartnersInventorySourceConfig `json:"inventorySourceSettings,omitempty"`
15095
15096 LeadFormId int64 `json:"leadFormId,omitempty,string"`
15097
15098
15099 LinkedMerchantId int64 `json:"linkedMerchantId,omitempty,string"`
15100
15101
15102 RelatedVideoIds []string `json:"relatedVideoIds,omitempty"`
15103
15104
15105 TargetFrequency *TargetFrequency `json:"targetFrequency,omitempty"`
15106
15107
15108 ThirdPartyMeasurementSettings *YoutubeAndPartnersThirdPartyMeasurementSettings `json:"thirdPartyMeasurementSettings,omitempty"`
15109
15110 VideoAdSequenceSettings *VideoAdSequenceSettings `json:"videoAdSequenceSettings,omitempty"`
15111
15112
15113
15114 ViewFrequencyCap *FrequencyCap `json:"viewFrequencyCap,omitempty"`
15115
15116
15117
15118
15119
15120 ForceSendFields []string `json:"-"`
15121
15122
15123
15124
15125 NullFields []string `json:"-"`
15126 }
15127
15128 func (s *YoutubeAndPartnersSettings) MarshalJSON() ([]byte, error) {
15129 type NoMethod YoutubeAndPartnersSettings
15130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15131 }
15132
15133
15134
15135 type YoutubeAndPartnersThirdPartyMeasurementSettings struct {
15136
15137
15138
15139 BrandLiftVendorConfigs []*ThirdPartyVendorConfig `json:"brandLiftVendorConfigs,omitempty"`
15140
15141
15142
15143
15144 BrandSafetyVendorConfigs []*ThirdPartyVendorConfig `json:"brandSafetyVendorConfigs,omitempty"`
15145
15146
15147
15148 ReachVendorConfigs []*ThirdPartyVendorConfig `json:"reachVendorConfigs,omitempty"`
15149
15150
15151
15152
15153
15154 ViewabilityVendorConfigs []*ThirdPartyVendorConfig `json:"viewabilityVendorConfigs,omitempty"`
15155
15156
15157
15158
15159
15160 ForceSendFields []string `json:"-"`
15161
15162
15163
15164
15165 NullFields []string `json:"-"`
15166 }
15167
15168 func (s *YoutubeAndPartnersThirdPartyMeasurementSettings) MarshalJSON() ([]byte, error) {
15169 type NoMethod YoutubeAndPartnersThirdPartyMeasurementSettings
15170 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15171 }
15172
15173
15174
15175
15176
15177 type YoutubeChannelAssignedTargetingOptionDetails struct {
15178
15179
15180 ChannelId string `json:"channelId,omitempty"`
15181
15182 Negative bool `json:"negative,omitempty"`
15183
15184
15185
15186
15187
15188 ForceSendFields []string `json:"-"`
15189
15190
15191
15192
15193 NullFields []string `json:"-"`
15194 }
15195
15196 func (s *YoutubeChannelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15197 type NoMethod YoutubeChannelAssignedTargetingOptionDetails
15198 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15199 }
15200
15201
15202
15203
15204
15205 type YoutubeVideoAssignedTargetingOptionDetails struct {
15206
15207 Negative bool `json:"negative,omitempty"`
15208
15209 VideoId string `json:"videoId,omitempty"`
15210
15211
15212
15213
15214
15215 ForceSendFields []string `json:"-"`
15216
15217
15218
15219
15220 NullFields []string `json:"-"`
15221 }
15222
15223 func (s *YoutubeVideoAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15224 type NoMethod YoutubeVideoAssignedTargetingOptionDetails
15225 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15226 }
15227
15228
15229 type YoutubeVideoDetails struct {
15230
15231 Id string `json:"id,omitempty"`
15232
15233
15234
15235
15236
15237
15238 UnavailableReason string `json:"unavailableReason,omitempty"`
15239
15240
15241
15242
15243
15244 ForceSendFields []string `json:"-"`
15245
15246
15247
15248
15249 NullFields []string `json:"-"`
15250 }
15251
15252 func (s *YoutubeVideoDetails) MarshalJSON() ([]byte, error) {
15253 type NoMethod YoutubeVideoDetails
15254 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15255 }
15256
15257 type AdvertisersAuditCall struct {
15258 s *Service
15259 advertiserId int64
15260 urlParams_ gensupport.URLParams
15261 ifNoneMatch_ string
15262 ctx_ context.Context
15263 header_ http.Header
15264 }
15265
15266
15267
15268
15269
15270
15271
15272 func (r *AdvertisersService) Audit(advertiserId int64) *AdvertisersAuditCall {
15273 c := &AdvertisersAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15274 c.advertiserId = advertiserId
15275 return c
15276 }
15277
15278
15279
15280
15281
15282
15283 func (c *AdvertisersAuditCall) ReadMask(readMask string) *AdvertisersAuditCall {
15284 c.urlParams_.Set("readMask", readMask)
15285 return c
15286 }
15287
15288
15289
15290
15291 func (c *AdvertisersAuditCall) Fields(s ...googleapi.Field) *AdvertisersAuditCall {
15292 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15293 return c
15294 }
15295
15296
15297
15298
15299 func (c *AdvertisersAuditCall) IfNoneMatch(entityTag string) *AdvertisersAuditCall {
15300 c.ifNoneMatch_ = entityTag
15301 return c
15302 }
15303
15304
15305 func (c *AdvertisersAuditCall) Context(ctx context.Context) *AdvertisersAuditCall {
15306 c.ctx_ = ctx
15307 return c
15308 }
15309
15310
15311
15312 func (c *AdvertisersAuditCall) Header() http.Header {
15313 if c.header_ == nil {
15314 c.header_ = make(http.Header)
15315 }
15316 return c.header_
15317 }
15318
15319 func (c *AdvertisersAuditCall) doRequest(alt string) (*http.Response, error) {
15320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15321 if c.ifNoneMatch_ != "" {
15322 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15323 }
15324 var body io.Reader = nil
15325 c.urlParams_.Set("alt", alt)
15326 c.urlParams_.Set("prettyPrint", "false")
15327 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}:audit")
15328 urls += "?" + c.urlParams_.Encode()
15329 req, err := http.NewRequest("GET", urls, body)
15330 if err != nil {
15331 return nil, err
15332 }
15333 req.Header = reqHeaders
15334 googleapi.Expand(req.URL, map[string]string{
15335 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
15336 })
15337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15338 }
15339
15340
15341
15342
15343
15344
15345
15346 func (c *AdvertisersAuditCall) Do(opts ...googleapi.CallOption) (*AuditAdvertiserResponse, error) {
15347 gensupport.SetOptions(c.urlParams_, opts...)
15348 res, err := c.doRequest("json")
15349 if res != nil && res.StatusCode == http.StatusNotModified {
15350 if res.Body != nil {
15351 res.Body.Close()
15352 }
15353 return nil, gensupport.WrapError(&googleapi.Error{
15354 Code: res.StatusCode,
15355 Header: res.Header,
15356 })
15357 }
15358 if err != nil {
15359 return nil, err
15360 }
15361 defer googleapi.CloseBody(res)
15362 if err := googleapi.CheckResponse(res); err != nil {
15363 return nil, gensupport.WrapError(err)
15364 }
15365 ret := &AuditAdvertiserResponse{
15366 ServerResponse: googleapi.ServerResponse{
15367 Header: res.Header,
15368 HTTPStatusCode: res.StatusCode,
15369 },
15370 }
15371 target := &ret
15372 if err := gensupport.DecodeResponse(target, res); err != nil {
15373 return nil, err
15374 }
15375 return ret, nil
15376 }
15377
15378 type AdvertisersCreateCall struct {
15379 s *Service
15380 advertiser *Advertiser
15381 urlParams_ gensupport.URLParams
15382 ctx_ context.Context
15383 header_ http.Header
15384 }
15385
15386
15387
15388
15389
15390
15391 func (r *AdvertisersService) Create(advertiser *Advertiser) *AdvertisersCreateCall {
15392 c := &AdvertisersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15393 c.advertiser = advertiser
15394 return c
15395 }
15396
15397
15398
15399
15400 func (c *AdvertisersCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreateCall {
15401 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15402 return c
15403 }
15404
15405
15406 func (c *AdvertisersCreateCall) Context(ctx context.Context) *AdvertisersCreateCall {
15407 c.ctx_ = ctx
15408 return c
15409 }
15410
15411
15412
15413 func (c *AdvertisersCreateCall) Header() http.Header {
15414 if c.header_ == nil {
15415 c.header_ = make(http.Header)
15416 }
15417 return c.header_
15418 }
15419
15420 func (c *AdvertisersCreateCall) doRequest(alt string) (*http.Response, error) {
15421 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15422 var body io.Reader = nil
15423 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
15424 if err != nil {
15425 return nil, err
15426 }
15427 c.urlParams_.Set("alt", alt)
15428 c.urlParams_.Set("prettyPrint", "false")
15429 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers")
15430 urls += "?" + c.urlParams_.Encode()
15431 req, err := http.NewRequest("POST", urls, body)
15432 if err != nil {
15433 return nil, err
15434 }
15435 req.Header = reqHeaders
15436 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15437 }
15438
15439
15440
15441
15442
15443
15444 func (c *AdvertisersCreateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
15445 gensupport.SetOptions(c.urlParams_, opts...)
15446 res, err := c.doRequest("json")
15447 if res != nil && res.StatusCode == http.StatusNotModified {
15448 if res.Body != nil {
15449 res.Body.Close()
15450 }
15451 return nil, gensupport.WrapError(&googleapi.Error{
15452 Code: res.StatusCode,
15453 Header: res.Header,
15454 })
15455 }
15456 if err != nil {
15457 return nil, err
15458 }
15459 defer googleapi.CloseBody(res)
15460 if err := googleapi.CheckResponse(res); err != nil {
15461 return nil, gensupport.WrapError(err)
15462 }
15463 ret := &Advertiser{
15464 ServerResponse: googleapi.ServerResponse{
15465 Header: res.Header,
15466 HTTPStatusCode: res.StatusCode,
15467 },
15468 }
15469 target := &ret
15470 if err := gensupport.DecodeResponse(target, res); err != nil {
15471 return nil, err
15472 }
15473 return ret, nil
15474 }
15475
15476 type AdvertisersDeleteCall struct {
15477 s *Service
15478 advertiserId int64
15479 urlParams_ gensupport.URLParams
15480 ctx_ context.Context
15481 header_ http.Header
15482 }
15483
15484
15485
15486
15487
15488
15489 func (r *AdvertisersService) Delete(advertiserId int64) *AdvertisersDeleteCall {
15490 c := &AdvertisersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15491 c.advertiserId = advertiserId
15492 return c
15493 }
15494
15495
15496
15497
15498 func (c *AdvertisersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersDeleteCall {
15499 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15500 return c
15501 }
15502
15503
15504 func (c *AdvertisersDeleteCall) Context(ctx context.Context) *AdvertisersDeleteCall {
15505 c.ctx_ = ctx
15506 return c
15507 }
15508
15509
15510
15511 func (c *AdvertisersDeleteCall) Header() http.Header {
15512 if c.header_ == nil {
15513 c.header_ = make(http.Header)
15514 }
15515 return c.header_
15516 }
15517
15518 func (c *AdvertisersDeleteCall) doRequest(alt string) (*http.Response, error) {
15519 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15520 var body io.Reader = nil
15521 c.urlParams_.Set("alt", alt)
15522 c.urlParams_.Set("prettyPrint", "false")
15523 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}")
15524 urls += "?" + c.urlParams_.Encode()
15525 req, err := http.NewRequest("DELETE", urls, body)
15526 if err != nil {
15527 return nil, err
15528 }
15529 req.Header = reqHeaders
15530 googleapi.Expand(req.URL, map[string]string{
15531 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
15532 })
15533 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15534 }
15535
15536
15537
15538
15539
15540
15541 func (c *AdvertisersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15542 gensupport.SetOptions(c.urlParams_, opts...)
15543 res, err := c.doRequest("json")
15544 if res != nil && res.StatusCode == http.StatusNotModified {
15545 if res.Body != nil {
15546 res.Body.Close()
15547 }
15548 return nil, gensupport.WrapError(&googleapi.Error{
15549 Code: res.StatusCode,
15550 Header: res.Header,
15551 })
15552 }
15553 if err != nil {
15554 return nil, err
15555 }
15556 defer googleapi.CloseBody(res)
15557 if err := googleapi.CheckResponse(res); err != nil {
15558 return nil, gensupport.WrapError(err)
15559 }
15560 ret := &Empty{
15561 ServerResponse: googleapi.ServerResponse{
15562 Header: res.Header,
15563 HTTPStatusCode: res.StatusCode,
15564 },
15565 }
15566 target := &ret
15567 if err := gensupport.DecodeResponse(target, res); err != nil {
15568 return nil, err
15569 }
15570 return ret, nil
15571 }
15572
15573 type AdvertisersEditAssignedTargetingOptionsCall struct {
15574 s *Service
15575 advertiserId int64
15576 bulkeditadvertiserassignedtargetingoptionsrequest *BulkEditAdvertiserAssignedTargetingOptionsRequest
15577 urlParams_ gensupport.URLParams
15578 ctx_ context.Context
15579 header_ http.Header
15580 }
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590 func (r *AdvertisersService) EditAssignedTargetingOptions(advertiserId int64, bulkeditadvertiserassignedtargetingoptionsrequest *BulkEditAdvertiserAssignedTargetingOptionsRequest) *AdvertisersEditAssignedTargetingOptionsCall {
15591 c := &AdvertisersEditAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15592 c.advertiserId = advertiserId
15593 c.bulkeditadvertiserassignedtargetingoptionsrequest = bulkeditadvertiserassignedtargetingoptionsrequest
15594 return c
15595 }
15596
15597
15598
15599
15600 func (c *AdvertisersEditAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersEditAssignedTargetingOptionsCall {
15601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15602 return c
15603 }
15604
15605
15606 func (c *AdvertisersEditAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersEditAssignedTargetingOptionsCall {
15607 c.ctx_ = ctx
15608 return c
15609 }
15610
15611
15612
15613 func (c *AdvertisersEditAssignedTargetingOptionsCall) Header() http.Header {
15614 if c.header_ == nil {
15615 c.header_ = make(http.Header)
15616 }
15617 return c.header_
15618 }
15619
15620 func (c *AdvertisersEditAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
15621 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15622 var body io.Reader = nil
15623 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditadvertiserassignedtargetingoptionsrequest)
15624 if err != nil {
15625 return nil, err
15626 }
15627 c.urlParams_.Set("alt", alt)
15628 c.urlParams_.Set("prettyPrint", "false")
15629 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}:editAssignedTargetingOptions")
15630 urls += "?" + c.urlParams_.Encode()
15631 req, err := http.NewRequest("POST", urls, body)
15632 if err != nil {
15633 return nil, err
15634 }
15635 req.Header = reqHeaders
15636 googleapi.Expand(req.URL, map[string]string{
15637 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
15638 })
15639 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15640 }
15641
15642
15643
15644
15645
15646
15647
15648 func (c *AdvertisersEditAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditAdvertiserAssignedTargetingOptionsResponse, error) {
15649 gensupport.SetOptions(c.urlParams_, opts...)
15650 res, err := c.doRequest("json")
15651 if res != nil && res.StatusCode == http.StatusNotModified {
15652 if res.Body != nil {
15653 res.Body.Close()
15654 }
15655 return nil, gensupport.WrapError(&googleapi.Error{
15656 Code: res.StatusCode,
15657 Header: res.Header,
15658 })
15659 }
15660 if err != nil {
15661 return nil, err
15662 }
15663 defer googleapi.CloseBody(res)
15664 if err := googleapi.CheckResponse(res); err != nil {
15665 return nil, gensupport.WrapError(err)
15666 }
15667 ret := &BulkEditAdvertiserAssignedTargetingOptionsResponse{
15668 ServerResponse: googleapi.ServerResponse{
15669 Header: res.Header,
15670 HTTPStatusCode: res.StatusCode,
15671 },
15672 }
15673 target := &ret
15674 if err := gensupport.DecodeResponse(target, res); err != nil {
15675 return nil, err
15676 }
15677 return ret, nil
15678 }
15679
15680 type AdvertisersGetCall struct {
15681 s *Service
15682 advertiserId int64
15683 urlParams_ gensupport.URLParams
15684 ifNoneMatch_ string
15685 ctx_ context.Context
15686 header_ http.Header
15687 }
15688
15689
15690
15691
15692 func (r *AdvertisersService) Get(advertiserId int64) *AdvertisersGetCall {
15693 c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15694 c.advertiserId = advertiserId
15695 return c
15696 }
15697
15698
15699
15700
15701 func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
15702 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15703 return c
15704 }
15705
15706
15707
15708
15709 func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
15710 c.ifNoneMatch_ = entityTag
15711 return c
15712 }
15713
15714
15715 func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
15716 c.ctx_ = ctx
15717 return c
15718 }
15719
15720
15721
15722 func (c *AdvertisersGetCall) Header() http.Header {
15723 if c.header_ == nil {
15724 c.header_ = make(http.Header)
15725 }
15726 return c.header_
15727 }
15728
15729 func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
15730 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15731 if c.ifNoneMatch_ != "" {
15732 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15733 }
15734 var body io.Reader = nil
15735 c.urlParams_.Set("alt", alt)
15736 c.urlParams_.Set("prettyPrint", "false")
15737 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}")
15738 urls += "?" + c.urlParams_.Encode()
15739 req, err := http.NewRequest("GET", urls, body)
15740 if err != nil {
15741 return nil, err
15742 }
15743 req.Header = reqHeaders
15744 googleapi.Expand(req.URL, map[string]string{
15745 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
15746 })
15747 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15748 }
15749
15750
15751
15752
15753
15754
15755 func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
15756 gensupport.SetOptions(c.urlParams_, opts...)
15757 res, err := c.doRequest("json")
15758 if res != nil && res.StatusCode == http.StatusNotModified {
15759 if res.Body != nil {
15760 res.Body.Close()
15761 }
15762 return nil, gensupport.WrapError(&googleapi.Error{
15763 Code: res.StatusCode,
15764 Header: res.Header,
15765 })
15766 }
15767 if err != nil {
15768 return nil, err
15769 }
15770 defer googleapi.CloseBody(res)
15771 if err := googleapi.CheckResponse(res); err != nil {
15772 return nil, gensupport.WrapError(err)
15773 }
15774 ret := &Advertiser{
15775 ServerResponse: googleapi.ServerResponse{
15776 Header: res.Header,
15777 HTTPStatusCode: res.StatusCode,
15778 },
15779 }
15780 target := &ret
15781 if err := gensupport.DecodeResponse(target, res); err != nil {
15782 return nil, err
15783 }
15784 return ret, nil
15785 }
15786
15787 type AdvertisersListCall struct {
15788 s *Service
15789 urlParams_ gensupport.URLParams
15790 ifNoneMatch_ string
15791 ctx_ context.Context
15792 header_ http.Header
15793 }
15794
15795
15796
15797
15798 func (r *AdvertisersService) List() *AdvertisersListCall {
15799 c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15800 return c
15801 }
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819 func (c *AdvertisersListCall) Filter(filter string) *AdvertisersListCall {
15820 c.urlParams_.Set("filter", filter)
15821 return c
15822 }
15823
15824
15825
15826
15827
15828
15829 func (c *AdvertisersListCall) OrderBy(orderBy string) *AdvertisersListCall {
15830 c.urlParams_.Set("orderBy", orderBy)
15831 return c
15832 }
15833
15834
15835
15836 func (c *AdvertisersListCall) PageSize(pageSize int64) *AdvertisersListCall {
15837 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15838 return c
15839 }
15840
15841
15842
15843
15844
15845 func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
15846 c.urlParams_.Set("pageToken", pageToken)
15847 return c
15848 }
15849
15850
15851
15852
15853 func (c *AdvertisersListCall) PartnerId(partnerId int64) *AdvertisersListCall {
15854 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
15855 return c
15856 }
15857
15858
15859
15860
15861 func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
15862 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15863 return c
15864 }
15865
15866
15867
15868
15869 func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
15870 c.ifNoneMatch_ = entityTag
15871 return c
15872 }
15873
15874
15875 func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
15876 c.ctx_ = ctx
15877 return c
15878 }
15879
15880
15881
15882 func (c *AdvertisersListCall) Header() http.Header {
15883 if c.header_ == nil {
15884 c.header_ = make(http.Header)
15885 }
15886 return c.header_
15887 }
15888
15889 func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
15890 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15891 if c.ifNoneMatch_ != "" {
15892 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15893 }
15894 var body io.Reader = nil
15895 c.urlParams_.Set("alt", alt)
15896 c.urlParams_.Set("prettyPrint", "false")
15897 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers")
15898 urls += "?" + c.urlParams_.Encode()
15899 req, err := http.NewRequest("GET", urls, body)
15900 if err != nil {
15901 return nil, err
15902 }
15903 req.Header = reqHeaders
15904 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15905 }
15906
15907
15908
15909
15910
15911
15912
15913 func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*ListAdvertisersResponse, error) {
15914 gensupport.SetOptions(c.urlParams_, opts...)
15915 res, err := c.doRequest("json")
15916 if res != nil && res.StatusCode == http.StatusNotModified {
15917 if res.Body != nil {
15918 res.Body.Close()
15919 }
15920 return nil, gensupport.WrapError(&googleapi.Error{
15921 Code: res.StatusCode,
15922 Header: res.Header,
15923 })
15924 }
15925 if err != nil {
15926 return nil, err
15927 }
15928 defer googleapi.CloseBody(res)
15929 if err := googleapi.CheckResponse(res); err != nil {
15930 return nil, gensupport.WrapError(err)
15931 }
15932 ret := &ListAdvertisersResponse{
15933 ServerResponse: googleapi.ServerResponse{
15934 Header: res.Header,
15935 HTTPStatusCode: res.StatusCode,
15936 },
15937 }
15938 target := &ret
15939 if err := gensupport.DecodeResponse(target, res); err != nil {
15940 return nil, err
15941 }
15942 return ret, nil
15943 }
15944
15945
15946
15947
15948 func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*ListAdvertisersResponse) error) error {
15949 c.ctx_ = ctx
15950 defer c.PageToken(c.urlParams_.Get("pageToken"))
15951 for {
15952 x, err := c.Do()
15953 if err != nil {
15954 return err
15955 }
15956 if err := f(x); err != nil {
15957 return err
15958 }
15959 if x.NextPageToken == "" {
15960 return nil
15961 }
15962 c.PageToken(x.NextPageToken)
15963 }
15964 }
15965
15966 type AdvertisersListAssignedTargetingOptionsCall struct {
15967 s *Service
15968 advertiserId int64
15969 urlParams_ gensupport.URLParams
15970 ifNoneMatch_ string
15971 ctx_ context.Context
15972 header_ http.Header
15973 }
15974
15975
15976
15977
15978
15979 func (r *AdvertisersService) ListAssignedTargetingOptions(advertiserId int64) *AdvertisersListAssignedTargetingOptionsCall {
15980 c := &AdvertisersListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15981 c.advertiserId = advertiserId
15982 return c
15983 }
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995 func (c *AdvertisersListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersListAssignedTargetingOptionsCall {
15996 c.urlParams_.Set("filter", filter)
15997 return c
15998 }
15999
16000
16001
16002
16003
16004 func (c *AdvertisersListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersListAssignedTargetingOptionsCall {
16005 c.urlParams_.Set("orderBy", orderBy)
16006 return c
16007 }
16008
16009
16010
16011
16012
16013 func (c *AdvertisersListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersListAssignedTargetingOptionsCall {
16014 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16015 return c
16016 }
16017
16018
16019
16020
16021
16022
16023 func (c *AdvertisersListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersListAssignedTargetingOptionsCall {
16024 c.urlParams_.Set("pageToken", pageToken)
16025 return c
16026 }
16027
16028
16029
16030
16031 func (c *AdvertisersListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersListAssignedTargetingOptionsCall {
16032 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16033 return c
16034 }
16035
16036
16037
16038
16039 func (c *AdvertisersListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersListAssignedTargetingOptionsCall {
16040 c.ifNoneMatch_ = entityTag
16041 return c
16042 }
16043
16044
16045 func (c *AdvertisersListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersListAssignedTargetingOptionsCall {
16046 c.ctx_ = ctx
16047 return c
16048 }
16049
16050
16051
16052 func (c *AdvertisersListAssignedTargetingOptionsCall) Header() http.Header {
16053 if c.header_ == nil {
16054 c.header_ = make(http.Header)
16055 }
16056 return c.header_
16057 }
16058
16059 func (c *AdvertisersListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
16060 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16061 if c.ifNoneMatch_ != "" {
16062 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16063 }
16064 var body io.Reader = nil
16065 c.urlParams_.Set("alt", alt)
16066 c.urlParams_.Set("prettyPrint", "false")
16067 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}:listAssignedTargetingOptions")
16068 urls += "?" + c.urlParams_.Encode()
16069 req, err := http.NewRequest("GET", urls, body)
16070 if err != nil {
16071 return nil, err
16072 }
16073 req.Header = reqHeaders
16074 googleapi.Expand(req.URL, map[string]string{
16075 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16076 })
16077 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16078 }
16079
16080
16081
16082
16083
16084
16085
16086 func (c *AdvertisersListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListAdvertiserAssignedTargetingOptionsResponse, error) {
16087 gensupport.SetOptions(c.urlParams_, opts...)
16088 res, err := c.doRequest("json")
16089 if res != nil && res.StatusCode == http.StatusNotModified {
16090 if res.Body != nil {
16091 res.Body.Close()
16092 }
16093 return nil, gensupport.WrapError(&googleapi.Error{
16094 Code: res.StatusCode,
16095 Header: res.Header,
16096 })
16097 }
16098 if err != nil {
16099 return nil, err
16100 }
16101 defer googleapi.CloseBody(res)
16102 if err := googleapi.CheckResponse(res); err != nil {
16103 return nil, gensupport.WrapError(err)
16104 }
16105 ret := &BulkListAdvertiserAssignedTargetingOptionsResponse{
16106 ServerResponse: googleapi.ServerResponse{
16107 Header: res.Header,
16108 HTTPStatusCode: res.StatusCode,
16109 },
16110 }
16111 target := &ret
16112 if err := gensupport.DecodeResponse(target, res); err != nil {
16113 return nil, err
16114 }
16115 return ret, nil
16116 }
16117
16118
16119
16120
16121 func (c *AdvertisersListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListAdvertiserAssignedTargetingOptionsResponse) error) error {
16122 c.ctx_ = ctx
16123 defer c.PageToken(c.urlParams_.Get("pageToken"))
16124 for {
16125 x, err := c.Do()
16126 if err != nil {
16127 return err
16128 }
16129 if err := f(x); err != nil {
16130 return err
16131 }
16132 if x.NextPageToken == "" {
16133 return nil
16134 }
16135 c.PageToken(x.NextPageToken)
16136 }
16137 }
16138
16139 type AdvertisersPatchCall struct {
16140 s *Service
16141 advertiserId int64
16142 advertiser *Advertiser
16143 urlParams_ gensupport.URLParams
16144 ctx_ context.Context
16145 header_ http.Header
16146 }
16147
16148
16149
16150
16151
16152
16153 func (r *AdvertisersService) Patch(advertiserId int64, advertiser *Advertiser) *AdvertisersPatchCall {
16154 c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16155 c.advertiserId = advertiserId
16156 c.advertiser = advertiser
16157 return c
16158 }
16159
16160
16161
16162 func (c *AdvertisersPatchCall) UpdateMask(updateMask string) *AdvertisersPatchCall {
16163 c.urlParams_.Set("updateMask", updateMask)
16164 return c
16165 }
16166
16167
16168
16169
16170 func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
16171 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16172 return c
16173 }
16174
16175
16176 func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
16177 c.ctx_ = ctx
16178 return c
16179 }
16180
16181
16182
16183 func (c *AdvertisersPatchCall) Header() http.Header {
16184 if c.header_ == nil {
16185 c.header_ = make(http.Header)
16186 }
16187 return c.header_
16188 }
16189
16190 func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
16191 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16192 var body io.Reader = nil
16193 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
16194 if err != nil {
16195 return nil, err
16196 }
16197 c.urlParams_.Set("alt", alt)
16198 c.urlParams_.Set("prettyPrint", "false")
16199 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}")
16200 urls += "?" + c.urlParams_.Encode()
16201 req, err := http.NewRequest("PATCH", urls, body)
16202 if err != nil {
16203 return nil, err
16204 }
16205 req.Header = reqHeaders
16206 googleapi.Expand(req.URL, map[string]string{
16207 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16208 })
16209 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16210 }
16211
16212
16213
16214
16215
16216
16217 func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
16218 gensupport.SetOptions(c.urlParams_, opts...)
16219 res, err := c.doRequest("json")
16220 if res != nil && res.StatusCode == http.StatusNotModified {
16221 if res.Body != nil {
16222 res.Body.Close()
16223 }
16224 return nil, gensupport.WrapError(&googleapi.Error{
16225 Code: res.StatusCode,
16226 Header: res.Header,
16227 })
16228 }
16229 if err != nil {
16230 return nil, err
16231 }
16232 defer googleapi.CloseBody(res)
16233 if err := googleapi.CheckResponse(res); err != nil {
16234 return nil, gensupport.WrapError(err)
16235 }
16236 ret := &Advertiser{
16237 ServerResponse: googleapi.ServerResponse{
16238 Header: res.Header,
16239 HTTPStatusCode: res.StatusCode,
16240 },
16241 }
16242 target := &ret
16243 if err := gensupport.DecodeResponse(target, res); err != nil {
16244 return nil, err
16245 }
16246 return ret, nil
16247 }
16248
16249 type AdvertisersAssetsUploadCall struct {
16250 s *Service
16251 advertiserId int64
16252 createassetrequest *CreateAssetRequest
16253 urlParams_ gensupport.URLParams
16254 mediaInfo_ *gensupport.MediaInfo
16255 ctx_ context.Context
16256 header_ http.Header
16257 }
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268 func (r *AdvertisersAssetsService) Upload(advertiserId int64, createassetrequest *CreateAssetRequest) *AdvertisersAssetsUploadCall {
16269 c := &AdvertisersAssetsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16270 c.advertiserId = advertiserId
16271 c.createassetrequest = createassetrequest
16272 return c
16273 }
16274
16275
16276
16277
16278
16279
16280
16281
16282 func (c *AdvertisersAssetsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *AdvertisersAssetsUploadCall {
16283 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
16284 return c
16285 }
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296 func (c *AdvertisersAssetsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *AdvertisersAssetsUploadCall {
16297 c.ctx_ = ctx
16298 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
16299 return c
16300 }
16301
16302
16303
16304
16305
16306 func (c *AdvertisersAssetsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *AdvertisersAssetsUploadCall {
16307 c.mediaInfo_.SetProgressUpdater(pu)
16308 return c
16309 }
16310
16311
16312
16313
16314 func (c *AdvertisersAssetsUploadCall) Fields(s ...googleapi.Field) *AdvertisersAssetsUploadCall {
16315 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16316 return c
16317 }
16318
16319
16320
16321
16322 func (c *AdvertisersAssetsUploadCall) Context(ctx context.Context) *AdvertisersAssetsUploadCall {
16323 c.ctx_ = ctx
16324 return c
16325 }
16326
16327
16328
16329 func (c *AdvertisersAssetsUploadCall) Header() http.Header {
16330 if c.header_ == nil {
16331 c.header_ = make(http.Header)
16332 }
16333 return c.header_
16334 }
16335
16336 func (c *AdvertisersAssetsUploadCall) doRequest(alt string) (*http.Response, error) {
16337 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16338 var body io.Reader = nil
16339 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createassetrequest)
16340 if err != nil {
16341 return nil, err
16342 }
16343 c.urlParams_.Set("alt", alt)
16344 c.urlParams_.Set("prettyPrint", "false")
16345 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/assets")
16346 if c.mediaInfo_ != nil {
16347 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v2/advertisers/{+advertiserId}/assets")
16348 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
16349 }
16350 if body == nil {
16351 body = new(bytes.Buffer)
16352 reqHeaders.Set("Content-Type", "application/json")
16353 }
16354 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
16355 defer cleanup()
16356 urls += "?" + c.urlParams_.Encode()
16357 req, err := http.NewRequest("POST", urls, body)
16358 if err != nil {
16359 return nil, err
16360 }
16361 req.Header = reqHeaders
16362 req.GetBody = getBody
16363 googleapi.Expand(req.URL, map[string]string{
16364 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16365 })
16366 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16367 }
16368
16369
16370
16371
16372
16373
16374
16375 func (c *AdvertisersAssetsUploadCall) Do(opts ...googleapi.CallOption) (*CreateAssetResponse, error) {
16376 gensupport.SetOptions(c.urlParams_, opts...)
16377 res, err := c.doRequest("json")
16378 if res != nil && res.StatusCode == http.StatusNotModified {
16379 if res.Body != nil {
16380 res.Body.Close()
16381 }
16382 return nil, gensupport.WrapError(&googleapi.Error{
16383 Code: res.StatusCode,
16384 Header: res.Header,
16385 })
16386 }
16387 if err != nil {
16388 return nil, err
16389 }
16390 defer googleapi.CloseBody(res)
16391 if err := googleapi.CheckResponse(res); err != nil {
16392 return nil, gensupport.WrapError(err)
16393 }
16394 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
16395 if rx != nil {
16396 rx.Client = c.s.client
16397 rx.UserAgent = c.s.userAgent()
16398 ctx := c.ctx_
16399 if ctx == nil {
16400 ctx = context.TODO()
16401 }
16402 res, err = rx.Upload(ctx)
16403 if err != nil {
16404 return nil, err
16405 }
16406 defer res.Body.Close()
16407 if err := googleapi.CheckResponse(res); err != nil {
16408 return nil, gensupport.WrapError(err)
16409 }
16410 }
16411 ret := &CreateAssetResponse{
16412 ServerResponse: googleapi.ServerResponse{
16413 Header: res.Header,
16414 HTTPStatusCode: res.StatusCode,
16415 },
16416 }
16417 target := &ret
16418 if err := gensupport.DecodeResponse(target, res); err != nil {
16419 return nil, err
16420 }
16421 return ret, nil
16422 }
16423
16424 type AdvertisersCampaignsCreateCall struct {
16425 s *Service
16426 advertiserId int64
16427 campaign *Campaign
16428 urlParams_ gensupport.URLParams
16429 ctx_ context.Context
16430 header_ http.Header
16431 }
16432
16433
16434
16435
16436
16437
16438 func (r *AdvertisersCampaignsService) Create(advertiserId int64, campaign *Campaign) *AdvertisersCampaignsCreateCall {
16439 c := &AdvertisersCampaignsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16440 c.advertiserId = advertiserId
16441 c.campaign = campaign
16442 return c
16443 }
16444
16445
16446
16447
16448 func (c *AdvertisersCampaignsCreateCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsCreateCall {
16449 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16450 return c
16451 }
16452
16453
16454 func (c *AdvertisersCampaignsCreateCall) Context(ctx context.Context) *AdvertisersCampaignsCreateCall {
16455 c.ctx_ = ctx
16456 return c
16457 }
16458
16459
16460
16461 func (c *AdvertisersCampaignsCreateCall) Header() http.Header {
16462 if c.header_ == nil {
16463 c.header_ = make(http.Header)
16464 }
16465 return c.header_
16466 }
16467
16468 func (c *AdvertisersCampaignsCreateCall) doRequest(alt string) (*http.Response, error) {
16469 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16470 var body io.Reader = nil
16471 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
16472 if err != nil {
16473 return nil, err
16474 }
16475 c.urlParams_.Set("alt", alt)
16476 c.urlParams_.Set("prettyPrint", "false")
16477 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns")
16478 urls += "?" + c.urlParams_.Encode()
16479 req, err := http.NewRequest("POST", urls, body)
16480 if err != nil {
16481 return nil, err
16482 }
16483 req.Header = reqHeaders
16484 googleapi.Expand(req.URL, map[string]string{
16485 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16486 })
16487 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16488 }
16489
16490
16491
16492
16493
16494
16495 func (c *AdvertisersCampaignsCreateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
16496 gensupport.SetOptions(c.urlParams_, opts...)
16497 res, err := c.doRequest("json")
16498 if res != nil && res.StatusCode == http.StatusNotModified {
16499 if res.Body != nil {
16500 res.Body.Close()
16501 }
16502 return nil, gensupport.WrapError(&googleapi.Error{
16503 Code: res.StatusCode,
16504 Header: res.Header,
16505 })
16506 }
16507 if err != nil {
16508 return nil, err
16509 }
16510 defer googleapi.CloseBody(res)
16511 if err := googleapi.CheckResponse(res); err != nil {
16512 return nil, gensupport.WrapError(err)
16513 }
16514 ret := &Campaign{
16515 ServerResponse: googleapi.ServerResponse{
16516 Header: res.Header,
16517 HTTPStatusCode: res.StatusCode,
16518 },
16519 }
16520 target := &ret
16521 if err := gensupport.DecodeResponse(target, res); err != nil {
16522 return nil, err
16523 }
16524 return ret, nil
16525 }
16526
16527 type AdvertisersCampaignsDeleteCall struct {
16528 s *Service
16529 advertiserId int64
16530 campaignId int64
16531 urlParams_ gensupport.URLParams
16532 ctx_ context.Context
16533 header_ http.Header
16534 }
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545 func (r *AdvertisersCampaignsService) Delete(advertiserId int64, campaignId int64) *AdvertisersCampaignsDeleteCall {
16546 c := &AdvertisersCampaignsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16547 c.advertiserId = advertiserId
16548 c.campaignId = campaignId
16549 return c
16550 }
16551
16552
16553
16554
16555 func (c *AdvertisersCampaignsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsDeleteCall {
16556 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16557 return c
16558 }
16559
16560
16561 func (c *AdvertisersCampaignsDeleteCall) Context(ctx context.Context) *AdvertisersCampaignsDeleteCall {
16562 c.ctx_ = ctx
16563 return c
16564 }
16565
16566
16567
16568 func (c *AdvertisersCampaignsDeleteCall) Header() http.Header {
16569 if c.header_ == nil {
16570 c.header_ = make(http.Header)
16571 }
16572 return c.header_
16573 }
16574
16575 func (c *AdvertisersCampaignsDeleteCall) doRequest(alt string) (*http.Response, error) {
16576 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16577 var body io.Reader = nil
16578 c.urlParams_.Set("alt", alt)
16579 c.urlParams_.Set("prettyPrint", "false")
16580 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}")
16581 urls += "?" + c.urlParams_.Encode()
16582 req, err := http.NewRequest("DELETE", urls, body)
16583 if err != nil {
16584 return nil, err
16585 }
16586 req.Header = reqHeaders
16587 googleapi.Expand(req.URL, map[string]string{
16588 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16589 "campaignId": strconv.FormatInt(c.campaignId, 10),
16590 })
16591 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16592 }
16593
16594
16595
16596
16597
16598
16599 func (c *AdvertisersCampaignsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
16600 gensupport.SetOptions(c.urlParams_, opts...)
16601 res, err := c.doRequest("json")
16602 if res != nil && res.StatusCode == http.StatusNotModified {
16603 if res.Body != nil {
16604 res.Body.Close()
16605 }
16606 return nil, gensupport.WrapError(&googleapi.Error{
16607 Code: res.StatusCode,
16608 Header: res.Header,
16609 })
16610 }
16611 if err != nil {
16612 return nil, err
16613 }
16614 defer googleapi.CloseBody(res)
16615 if err := googleapi.CheckResponse(res); err != nil {
16616 return nil, gensupport.WrapError(err)
16617 }
16618 ret := &Empty{
16619 ServerResponse: googleapi.ServerResponse{
16620 Header: res.Header,
16621 HTTPStatusCode: res.StatusCode,
16622 },
16623 }
16624 target := &ret
16625 if err := gensupport.DecodeResponse(target, res); err != nil {
16626 return nil, err
16627 }
16628 return ret, nil
16629 }
16630
16631 type AdvertisersCampaignsGetCall struct {
16632 s *Service
16633 advertiserId int64
16634 campaignId int64
16635 urlParams_ gensupport.URLParams
16636 ifNoneMatch_ string
16637 ctx_ context.Context
16638 header_ http.Header
16639 }
16640
16641
16642
16643
16644
16645 func (r *AdvertisersCampaignsService) Get(advertiserId int64, campaignId int64) *AdvertisersCampaignsGetCall {
16646 c := &AdvertisersCampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16647 c.advertiserId = advertiserId
16648 c.campaignId = campaignId
16649 return c
16650 }
16651
16652
16653
16654
16655 func (c *AdvertisersCampaignsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsGetCall {
16656 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16657 return c
16658 }
16659
16660
16661
16662
16663 func (c *AdvertisersCampaignsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsGetCall {
16664 c.ifNoneMatch_ = entityTag
16665 return c
16666 }
16667
16668
16669 func (c *AdvertisersCampaignsGetCall) Context(ctx context.Context) *AdvertisersCampaignsGetCall {
16670 c.ctx_ = ctx
16671 return c
16672 }
16673
16674
16675
16676 func (c *AdvertisersCampaignsGetCall) Header() http.Header {
16677 if c.header_ == nil {
16678 c.header_ = make(http.Header)
16679 }
16680 return c.header_
16681 }
16682
16683 func (c *AdvertisersCampaignsGetCall) doRequest(alt string) (*http.Response, error) {
16684 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16685 if c.ifNoneMatch_ != "" {
16686 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16687 }
16688 var body io.Reader = nil
16689 c.urlParams_.Set("alt", alt)
16690 c.urlParams_.Set("prettyPrint", "false")
16691 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}")
16692 urls += "?" + c.urlParams_.Encode()
16693 req, err := http.NewRequest("GET", urls, body)
16694 if err != nil {
16695 return nil, err
16696 }
16697 req.Header = reqHeaders
16698 googleapi.Expand(req.URL, map[string]string{
16699 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16700 "campaignId": strconv.FormatInt(c.campaignId, 10),
16701 })
16702 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16703 }
16704
16705
16706
16707
16708
16709
16710 func (c *AdvertisersCampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
16711 gensupport.SetOptions(c.urlParams_, opts...)
16712 res, err := c.doRequest("json")
16713 if res != nil && res.StatusCode == http.StatusNotModified {
16714 if res.Body != nil {
16715 res.Body.Close()
16716 }
16717 return nil, gensupport.WrapError(&googleapi.Error{
16718 Code: res.StatusCode,
16719 Header: res.Header,
16720 })
16721 }
16722 if err != nil {
16723 return nil, err
16724 }
16725 defer googleapi.CloseBody(res)
16726 if err := googleapi.CheckResponse(res); err != nil {
16727 return nil, gensupport.WrapError(err)
16728 }
16729 ret := &Campaign{
16730 ServerResponse: googleapi.ServerResponse{
16731 Header: res.Header,
16732 HTTPStatusCode: res.StatusCode,
16733 },
16734 }
16735 target := &ret
16736 if err := gensupport.DecodeResponse(target, res); err != nil {
16737 return nil, err
16738 }
16739 return ret, nil
16740 }
16741
16742 type AdvertisersCampaignsListCall struct {
16743 s *Service
16744 advertiserId int64
16745 urlParams_ gensupport.URLParams
16746 ifNoneMatch_ string
16747 ctx_ context.Context
16748 header_ http.Header
16749 }
16750
16751
16752
16753
16754
16755
16756 func (r *AdvertisersCampaignsService) List(advertiserId int64) *AdvertisersCampaignsListCall {
16757 c := &AdvertisersCampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16758 c.advertiserId = advertiserId
16759 return c
16760 }
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780 func (c *AdvertisersCampaignsListCall) Filter(filter string) *AdvertisersCampaignsListCall {
16781 c.urlParams_.Set("filter", filter)
16782 return c
16783 }
16784
16785
16786
16787
16788
16789
16790 func (c *AdvertisersCampaignsListCall) OrderBy(orderBy string) *AdvertisersCampaignsListCall {
16791 c.urlParams_.Set("orderBy", orderBy)
16792 return c
16793 }
16794
16795
16796
16797 func (c *AdvertisersCampaignsListCall) PageSize(pageSize int64) *AdvertisersCampaignsListCall {
16798 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16799 return c
16800 }
16801
16802
16803
16804
16805
16806 func (c *AdvertisersCampaignsListCall) PageToken(pageToken string) *AdvertisersCampaignsListCall {
16807 c.urlParams_.Set("pageToken", pageToken)
16808 return c
16809 }
16810
16811
16812
16813
16814 func (c *AdvertisersCampaignsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsListCall {
16815 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16816 return c
16817 }
16818
16819
16820
16821
16822 func (c *AdvertisersCampaignsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsListCall {
16823 c.ifNoneMatch_ = entityTag
16824 return c
16825 }
16826
16827
16828 func (c *AdvertisersCampaignsListCall) Context(ctx context.Context) *AdvertisersCampaignsListCall {
16829 c.ctx_ = ctx
16830 return c
16831 }
16832
16833
16834
16835 func (c *AdvertisersCampaignsListCall) Header() http.Header {
16836 if c.header_ == nil {
16837 c.header_ = make(http.Header)
16838 }
16839 return c.header_
16840 }
16841
16842 func (c *AdvertisersCampaignsListCall) doRequest(alt string) (*http.Response, error) {
16843 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16844 if c.ifNoneMatch_ != "" {
16845 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16846 }
16847 var body io.Reader = nil
16848 c.urlParams_.Set("alt", alt)
16849 c.urlParams_.Set("prettyPrint", "false")
16850 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns")
16851 urls += "?" + c.urlParams_.Encode()
16852 req, err := http.NewRequest("GET", urls, body)
16853 if err != nil {
16854 return nil, err
16855 }
16856 req.Header = reqHeaders
16857 googleapi.Expand(req.URL, map[string]string{
16858 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16859 })
16860 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16861 }
16862
16863
16864
16865
16866
16867
16868
16869 func (c *AdvertisersCampaignsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignsResponse, error) {
16870 gensupport.SetOptions(c.urlParams_, opts...)
16871 res, err := c.doRequest("json")
16872 if res != nil && res.StatusCode == http.StatusNotModified {
16873 if res.Body != nil {
16874 res.Body.Close()
16875 }
16876 return nil, gensupport.WrapError(&googleapi.Error{
16877 Code: res.StatusCode,
16878 Header: res.Header,
16879 })
16880 }
16881 if err != nil {
16882 return nil, err
16883 }
16884 defer googleapi.CloseBody(res)
16885 if err := googleapi.CheckResponse(res); err != nil {
16886 return nil, gensupport.WrapError(err)
16887 }
16888 ret := &ListCampaignsResponse{
16889 ServerResponse: googleapi.ServerResponse{
16890 Header: res.Header,
16891 HTTPStatusCode: res.StatusCode,
16892 },
16893 }
16894 target := &ret
16895 if err := gensupport.DecodeResponse(target, res); err != nil {
16896 return nil, err
16897 }
16898 return ret, nil
16899 }
16900
16901
16902
16903
16904 func (c *AdvertisersCampaignsListCall) Pages(ctx context.Context, f func(*ListCampaignsResponse) error) error {
16905 c.ctx_ = ctx
16906 defer c.PageToken(c.urlParams_.Get("pageToken"))
16907 for {
16908 x, err := c.Do()
16909 if err != nil {
16910 return err
16911 }
16912 if err := f(x); err != nil {
16913 return err
16914 }
16915 if x.NextPageToken == "" {
16916 return nil
16917 }
16918 c.PageToken(x.NextPageToken)
16919 }
16920 }
16921
16922 type AdvertisersCampaignsListAssignedTargetingOptionsCall struct {
16923 s *Service
16924 advertiserId int64
16925 campaignId int64
16926 urlParams_ gensupport.URLParams
16927 ifNoneMatch_ string
16928 ctx_ context.Context
16929 header_ http.Header
16930 }
16931
16932
16933
16934
16935
16936
16937 func (r *AdvertisersCampaignsService) ListAssignedTargetingOptions(advertiserId int64, campaignId int64) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
16938 c := &AdvertisersCampaignsListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16939 c.advertiserId = advertiserId
16940 c.campaignId = campaignId
16941 return c
16942 }
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
16959 c.urlParams_.Set("filter", filter)
16960 return c
16961 }
16962
16963
16964
16965
16966
16967 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
16968 c.urlParams_.Set("orderBy", orderBy)
16969 return c
16970 }
16971
16972
16973
16974
16975
16976 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
16977 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16978 return c
16979 }
16980
16981
16982
16983
16984
16985
16986 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
16987 c.urlParams_.Set("pageToken", pageToken)
16988 return c
16989 }
16990
16991
16992
16993
16994 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
16995 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16996 return c
16997 }
16998
16999
17000
17001
17002 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
17003 c.ifNoneMatch_ = entityTag
17004 return c
17005 }
17006
17007
17008 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
17009 c.ctx_ = ctx
17010 return c
17011 }
17012
17013
17014
17015 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Header() http.Header {
17016 if c.header_ == nil {
17017 c.header_ = make(http.Header)
17018 }
17019 return c.header_
17020 }
17021
17022 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
17023 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17024 if c.ifNoneMatch_ != "" {
17025 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17026 }
17027 var body io.Reader = nil
17028 c.urlParams_.Set("alt", alt)
17029 c.urlParams_.Set("prettyPrint", "false")
17030 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}:listAssignedTargetingOptions")
17031 urls += "?" + c.urlParams_.Encode()
17032 req, err := http.NewRequest("GET", urls, body)
17033 if err != nil {
17034 return nil, err
17035 }
17036 req.Header = reqHeaders
17037 googleapi.Expand(req.URL, map[string]string{
17038 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17039 "campaignId": strconv.FormatInt(c.campaignId, 10),
17040 })
17041 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17042 }
17043
17044
17045
17046
17047
17048
17049
17050 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListCampaignAssignedTargetingOptionsResponse, error) {
17051 gensupport.SetOptions(c.urlParams_, opts...)
17052 res, err := c.doRequest("json")
17053 if res != nil && res.StatusCode == http.StatusNotModified {
17054 if res.Body != nil {
17055 res.Body.Close()
17056 }
17057 return nil, gensupport.WrapError(&googleapi.Error{
17058 Code: res.StatusCode,
17059 Header: res.Header,
17060 })
17061 }
17062 if err != nil {
17063 return nil, err
17064 }
17065 defer googleapi.CloseBody(res)
17066 if err := googleapi.CheckResponse(res); err != nil {
17067 return nil, gensupport.WrapError(err)
17068 }
17069 ret := &BulkListCampaignAssignedTargetingOptionsResponse{
17070 ServerResponse: googleapi.ServerResponse{
17071 Header: res.Header,
17072 HTTPStatusCode: res.StatusCode,
17073 },
17074 }
17075 target := &ret
17076 if err := gensupport.DecodeResponse(target, res); err != nil {
17077 return nil, err
17078 }
17079 return ret, nil
17080 }
17081
17082
17083
17084
17085 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListCampaignAssignedTargetingOptionsResponse) error) error {
17086 c.ctx_ = ctx
17087 defer c.PageToken(c.urlParams_.Get("pageToken"))
17088 for {
17089 x, err := c.Do()
17090 if err != nil {
17091 return err
17092 }
17093 if err := f(x); err != nil {
17094 return err
17095 }
17096 if x.NextPageToken == "" {
17097 return nil
17098 }
17099 c.PageToken(x.NextPageToken)
17100 }
17101 }
17102
17103 type AdvertisersCampaignsPatchCall struct {
17104 s *Service
17105 advertiserId int64
17106 campaignId int64
17107 campaign *Campaign
17108 urlParams_ gensupport.URLParams
17109 ctx_ context.Context
17110 header_ http.Header
17111 }
17112
17113
17114
17115
17116
17117
17118
17119
17120 func (r *AdvertisersCampaignsService) Patch(advertiserId int64, campaignId int64, campaign *Campaign) *AdvertisersCampaignsPatchCall {
17121 c := &AdvertisersCampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17122 c.advertiserId = advertiserId
17123 c.campaignId = campaignId
17124 c.campaign = campaign
17125 return c
17126 }
17127
17128
17129
17130 func (c *AdvertisersCampaignsPatchCall) UpdateMask(updateMask string) *AdvertisersCampaignsPatchCall {
17131 c.urlParams_.Set("updateMask", updateMask)
17132 return c
17133 }
17134
17135
17136
17137
17138 func (c *AdvertisersCampaignsPatchCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsPatchCall {
17139 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17140 return c
17141 }
17142
17143
17144 func (c *AdvertisersCampaignsPatchCall) Context(ctx context.Context) *AdvertisersCampaignsPatchCall {
17145 c.ctx_ = ctx
17146 return c
17147 }
17148
17149
17150
17151 func (c *AdvertisersCampaignsPatchCall) Header() http.Header {
17152 if c.header_ == nil {
17153 c.header_ = make(http.Header)
17154 }
17155 return c.header_
17156 }
17157
17158 func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
17159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17160 var body io.Reader = nil
17161 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
17162 if err != nil {
17163 return nil, err
17164 }
17165 c.urlParams_.Set("alt", alt)
17166 c.urlParams_.Set("prettyPrint", "false")
17167 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}")
17168 urls += "?" + c.urlParams_.Encode()
17169 req, err := http.NewRequest("PATCH", urls, body)
17170 if err != nil {
17171 return nil, err
17172 }
17173 req.Header = reqHeaders
17174 googleapi.Expand(req.URL, map[string]string{
17175 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17176 "campaignId": strconv.FormatInt(c.campaignId, 10),
17177 })
17178 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17179 }
17180
17181
17182
17183
17184
17185
17186 func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
17187 gensupport.SetOptions(c.urlParams_, opts...)
17188 res, err := c.doRequest("json")
17189 if res != nil && res.StatusCode == http.StatusNotModified {
17190 if res.Body != nil {
17191 res.Body.Close()
17192 }
17193 return nil, gensupport.WrapError(&googleapi.Error{
17194 Code: res.StatusCode,
17195 Header: res.Header,
17196 })
17197 }
17198 if err != nil {
17199 return nil, err
17200 }
17201 defer googleapi.CloseBody(res)
17202 if err := googleapi.CheckResponse(res); err != nil {
17203 return nil, gensupport.WrapError(err)
17204 }
17205 ret := &Campaign{
17206 ServerResponse: googleapi.ServerResponse{
17207 Header: res.Header,
17208 HTTPStatusCode: res.StatusCode,
17209 },
17210 }
17211 target := &ret
17212 if err := gensupport.DecodeResponse(target, res); err != nil {
17213 return nil, err
17214 }
17215 return ret, nil
17216 }
17217
17218 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall struct {
17219 s *Service
17220 advertiserId int64
17221 campaignId int64
17222 targetingType string
17223 assignedTargetingOptionId string
17224 urlParams_ gensupport.URLParams
17225 ifNoneMatch_ string
17226 ctx_ context.Context
17227 header_ http.Header
17228 }
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252 func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, campaignId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall {
17253 c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17254 c.advertiserId = advertiserId
17255 c.campaignId = campaignId
17256 c.targetingType = targetingType
17257 c.assignedTargetingOptionId = assignedTargetingOptionId
17258 return c
17259 }
17260
17261
17262
17263
17264 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall {
17265 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17266 return c
17267 }
17268
17269
17270
17271
17272 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall {
17273 c.ifNoneMatch_ = entityTag
17274 return c
17275 }
17276
17277
17278 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall {
17279 c.ctx_ = ctx
17280 return c
17281 }
17282
17283
17284
17285 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
17286 if c.header_ == nil {
17287 c.header_ = make(http.Header)
17288 }
17289 return c.header_
17290 }
17291
17292 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
17293 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17294 if c.ifNoneMatch_ != "" {
17295 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17296 }
17297 var body io.Reader = nil
17298 c.urlParams_.Set("alt", alt)
17299 c.urlParams_.Set("prettyPrint", "false")
17300 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
17301 urls += "?" + c.urlParams_.Encode()
17302 req, err := http.NewRequest("GET", urls, body)
17303 if err != nil {
17304 return nil, err
17305 }
17306 req.Header = reqHeaders
17307 googleapi.Expand(req.URL, map[string]string{
17308 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17309 "campaignId": strconv.FormatInt(c.campaignId, 10),
17310 "targetingType": c.targetingType,
17311 "assignedTargetingOptionId": c.assignedTargetingOptionId,
17312 })
17313 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17314 }
17315
17316
17317
17318
17319
17320
17321
17322 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
17323 gensupport.SetOptions(c.urlParams_, opts...)
17324 res, err := c.doRequest("json")
17325 if res != nil && res.StatusCode == http.StatusNotModified {
17326 if res.Body != nil {
17327 res.Body.Close()
17328 }
17329 return nil, gensupport.WrapError(&googleapi.Error{
17330 Code: res.StatusCode,
17331 Header: res.Header,
17332 })
17333 }
17334 if err != nil {
17335 return nil, err
17336 }
17337 defer googleapi.CloseBody(res)
17338 if err := googleapi.CheckResponse(res); err != nil {
17339 return nil, gensupport.WrapError(err)
17340 }
17341 ret := &AssignedTargetingOption{
17342 ServerResponse: googleapi.ServerResponse{
17343 Header: res.Header,
17344 HTTPStatusCode: res.StatusCode,
17345 },
17346 }
17347 target := &ret
17348 if err := gensupport.DecodeResponse(target, res); err != nil {
17349 return nil, err
17350 }
17351 return ret, nil
17352 }
17353
17354 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall struct {
17355 s *Service
17356 advertiserId int64
17357 campaignId int64
17358 targetingType string
17359 urlParams_ gensupport.URLParams
17360 ifNoneMatch_ string
17361 ctx_ context.Context
17362 header_ http.Header
17363 }
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384 func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, campaignId int64, targetingType string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
17385 c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17386 c.advertiserId = advertiserId
17387 c.campaignId = campaignId
17388 c.targetingType = targetingType
17389 return c
17390 }
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
17406 c.urlParams_.Set("filter", filter)
17407 return c
17408 }
17409
17410
17411
17412
17413
17414
17415 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
17416 c.urlParams_.Set("orderBy", orderBy)
17417 return c
17418 }
17419
17420
17421
17422
17423 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
17424 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17425 return c
17426 }
17427
17428
17429
17430
17431
17432
17433 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
17434 c.urlParams_.Set("pageToken", pageToken)
17435 return c
17436 }
17437
17438
17439
17440
17441 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
17442 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17443 return c
17444 }
17445
17446
17447
17448
17449 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
17450 c.ifNoneMatch_ = entityTag
17451 return c
17452 }
17453
17454
17455 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
17456 c.ctx_ = ctx
17457 return c
17458 }
17459
17460
17461
17462 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
17463 if c.header_ == nil {
17464 c.header_ = make(http.Header)
17465 }
17466 return c.header_
17467 }
17468
17469 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
17470 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17471 if c.ifNoneMatch_ != "" {
17472 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17473 }
17474 var body io.Reader = nil
17475 c.urlParams_.Set("alt", alt)
17476 c.urlParams_.Set("prettyPrint", "false")
17477 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
17478 urls += "?" + c.urlParams_.Encode()
17479 req, err := http.NewRequest("GET", urls, body)
17480 if err != nil {
17481 return nil, err
17482 }
17483 req.Header = reqHeaders
17484 googleapi.Expand(req.URL, map[string]string{
17485 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17486 "campaignId": strconv.FormatInt(c.campaignId, 10),
17487 "targetingType": c.targetingType,
17488 })
17489 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17490 }
17491
17492
17493
17494
17495
17496
17497
17498 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignAssignedTargetingOptionsResponse, error) {
17499 gensupport.SetOptions(c.urlParams_, opts...)
17500 res, err := c.doRequest("json")
17501 if res != nil && res.StatusCode == http.StatusNotModified {
17502 if res.Body != nil {
17503 res.Body.Close()
17504 }
17505 return nil, gensupport.WrapError(&googleapi.Error{
17506 Code: res.StatusCode,
17507 Header: res.Header,
17508 })
17509 }
17510 if err != nil {
17511 return nil, err
17512 }
17513 defer googleapi.CloseBody(res)
17514 if err := googleapi.CheckResponse(res); err != nil {
17515 return nil, gensupport.WrapError(err)
17516 }
17517 ret := &ListCampaignAssignedTargetingOptionsResponse{
17518 ServerResponse: googleapi.ServerResponse{
17519 Header: res.Header,
17520 HTTPStatusCode: res.StatusCode,
17521 },
17522 }
17523 target := &ret
17524 if err := gensupport.DecodeResponse(target, res); err != nil {
17525 return nil, err
17526 }
17527 return ret, nil
17528 }
17529
17530
17531
17532
17533 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListCampaignAssignedTargetingOptionsResponse) error) error {
17534 c.ctx_ = ctx
17535 defer c.PageToken(c.urlParams_.Get("pageToken"))
17536 for {
17537 x, err := c.Do()
17538 if err != nil {
17539 return err
17540 }
17541 if err := f(x); err != nil {
17542 return err
17543 }
17544 if x.NextPageToken == "" {
17545 return nil
17546 }
17547 c.PageToken(x.NextPageToken)
17548 }
17549 }
17550
17551 type AdvertisersChannelsCreateCall struct {
17552 s *Service
17553 advertiserId int64
17554 channel *Channel
17555 urlParams_ gensupport.URLParams
17556 ctx_ context.Context
17557 header_ http.Header
17558 }
17559
17560
17561
17562
17563
17564 func (r *AdvertisersChannelsService) Create(advertiserId int64, channel *Channel) *AdvertisersChannelsCreateCall {
17565 c := &AdvertisersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17566 c.advertiserId = advertiserId
17567 c.channel = channel
17568 return c
17569 }
17570
17571
17572
17573 func (c *AdvertisersChannelsCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsCreateCall {
17574 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
17575 return c
17576 }
17577
17578
17579
17580
17581 func (c *AdvertisersChannelsCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsCreateCall {
17582 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17583 return c
17584 }
17585
17586
17587 func (c *AdvertisersChannelsCreateCall) Context(ctx context.Context) *AdvertisersChannelsCreateCall {
17588 c.ctx_ = ctx
17589 return c
17590 }
17591
17592
17593
17594 func (c *AdvertisersChannelsCreateCall) Header() http.Header {
17595 if c.header_ == nil {
17596 c.header_ = make(http.Header)
17597 }
17598 return c.header_
17599 }
17600
17601 func (c *AdvertisersChannelsCreateCall) doRequest(alt string) (*http.Response, error) {
17602 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17603 var body io.Reader = nil
17604 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
17605 if err != nil {
17606 return nil, err
17607 }
17608 c.urlParams_.Set("alt", alt)
17609 c.urlParams_.Set("prettyPrint", "false")
17610 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels")
17611 urls += "?" + c.urlParams_.Encode()
17612 req, err := http.NewRequest("POST", urls, body)
17613 if err != nil {
17614 return nil, err
17615 }
17616 req.Header = reqHeaders
17617 googleapi.Expand(req.URL, map[string]string{
17618 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17619 })
17620 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17621 }
17622
17623
17624
17625
17626
17627
17628 func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
17629 gensupport.SetOptions(c.urlParams_, opts...)
17630 res, err := c.doRequest("json")
17631 if res != nil && res.StatusCode == http.StatusNotModified {
17632 if res.Body != nil {
17633 res.Body.Close()
17634 }
17635 return nil, gensupport.WrapError(&googleapi.Error{
17636 Code: res.StatusCode,
17637 Header: res.Header,
17638 })
17639 }
17640 if err != nil {
17641 return nil, err
17642 }
17643 defer googleapi.CloseBody(res)
17644 if err := googleapi.CheckResponse(res); err != nil {
17645 return nil, gensupport.WrapError(err)
17646 }
17647 ret := &Channel{
17648 ServerResponse: googleapi.ServerResponse{
17649 Header: res.Header,
17650 HTTPStatusCode: res.StatusCode,
17651 },
17652 }
17653 target := &ret
17654 if err := gensupport.DecodeResponse(target, res); err != nil {
17655 return nil, err
17656 }
17657 return ret, nil
17658 }
17659
17660 type AdvertisersChannelsGetCall struct {
17661 s *Service
17662 advertiserId int64
17663 channelId int64
17664 urlParams_ gensupport.URLParams
17665 ifNoneMatch_ string
17666 ctx_ context.Context
17667 header_ http.Header
17668 }
17669
17670
17671
17672
17673
17674 func (r *AdvertisersChannelsService) Get(advertiserId int64, channelId int64) *AdvertisersChannelsGetCall {
17675 c := &AdvertisersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17676 c.advertiserId = advertiserId
17677 c.channelId = channelId
17678 return c
17679 }
17680
17681
17682
17683 func (c *AdvertisersChannelsGetCall) PartnerId(partnerId int64) *AdvertisersChannelsGetCall {
17684 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
17685 return c
17686 }
17687
17688
17689
17690
17691 func (c *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersChannelsGetCall {
17692 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17693 return c
17694 }
17695
17696
17697
17698
17699 func (c *AdvertisersChannelsGetCall) IfNoneMatch(entityTag string) *AdvertisersChannelsGetCall {
17700 c.ifNoneMatch_ = entityTag
17701 return c
17702 }
17703
17704
17705 func (c *AdvertisersChannelsGetCall) Context(ctx context.Context) *AdvertisersChannelsGetCall {
17706 c.ctx_ = ctx
17707 return c
17708 }
17709
17710
17711
17712 func (c *AdvertisersChannelsGetCall) Header() http.Header {
17713 if c.header_ == nil {
17714 c.header_ = make(http.Header)
17715 }
17716 return c.header_
17717 }
17718
17719 func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, error) {
17720 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17721 if c.ifNoneMatch_ != "" {
17722 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17723 }
17724 var body io.Reader = nil
17725 c.urlParams_.Set("alt", alt)
17726 c.urlParams_.Set("prettyPrint", "false")
17727 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{+channelId}")
17728 urls += "?" + c.urlParams_.Encode()
17729 req, err := http.NewRequest("GET", urls, body)
17730 if err != nil {
17731 return nil, err
17732 }
17733 req.Header = reqHeaders
17734 googleapi.Expand(req.URL, map[string]string{
17735 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17736 "channelId": strconv.FormatInt(c.channelId, 10),
17737 })
17738 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17739 }
17740
17741
17742
17743
17744
17745
17746 func (c *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
17747 gensupport.SetOptions(c.urlParams_, opts...)
17748 res, err := c.doRequest("json")
17749 if res != nil && res.StatusCode == http.StatusNotModified {
17750 if res.Body != nil {
17751 res.Body.Close()
17752 }
17753 return nil, gensupport.WrapError(&googleapi.Error{
17754 Code: res.StatusCode,
17755 Header: res.Header,
17756 })
17757 }
17758 if err != nil {
17759 return nil, err
17760 }
17761 defer googleapi.CloseBody(res)
17762 if err := googleapi.CheckResponse(res); err != nil {
17763 return nil, gensupport.WrapError(err)
17764 }
17765 ret := &Channel{
17766 ServerResponse: googleapi.ServerResponse{
17767 Header: res.Header,
17768 HTTPStatusCode: res.StatusCode,
17769 },
17770 }
17771 target := &ret
17772 if err := gensupport.DecodeResponse(target, res); err != nil {
17773 return nil, err
17774 }
17775 return ret, nil
17776 }
17777
17778 type AdvertisersChannelsListCall struct {
17779 s *Service
17780 advertiserId int64
17781 urlParams_ gensupport.URLParams
17782 ifNoneMatch_ string
17783 ctx_ context.Context
17784 header_ http.Header
17785 }
17786
17787
17788
17789
17790 func (r *AdvertisersChannelsService) List(advertiserId int64) *AdvertisersChannelsListCall {
17791 c := &AdvertisersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17792 c.advertiserId = advertiserId
17793 return c
17794 }
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804 func (c *AdvertisersChannelsListCall) Filter(filter string) *AdvertisersChannelsListCall {
17805 c.urlParams_.Set("filter", filter)
17806 return c
17807 }
17808
17809
17810
17811
17812
17813
17814 func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChannelsListCall {
17815 c.urlParams_.Set("orderBy", orderBy)
17816 return c
17817 }
17818
17819
17820
17821
17822 func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall {
17823 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17824 return c
17825 }
17826
17827
17828
17829
17830
17831 func (c *AdvertisersChannelsListCall) PageToken(pageToken string) *AdvertisersChannelsListCall {
17832 c.urlParams_.Set("pageToken", pageToken)
17833 return c
17834 }
17835
17836
17837
17838 func (c *AdvertisersChannelsListCall) PartnerId(partnerId int64) *AdvertisersChannelsListCall {
17839 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
17840 return c
17841 }
17842
17843
17844
17845
17846 func (c *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsListCall {
17847 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17848 return c
17849 }
17850
17851
17852
17853
17854 func (c *AdvertisersChannelsListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsListCall {
17855 c.ifNoneMatch_ = entityTag
17856 return c
17857 }
17858
17859
17860 func (c *AdvertisersChannelsListCall) Context(ctx context.Context) *AdvertisersChannelsListCall {
17861 c.ctx_ = ctx
17862 return c
17863 }
17864
17865
17866
17867 func (c *AdvertisersChannelsListCall) Header() http.Header {
17868 if c.header_ == nil {
17869 c.header_ = make(http.Header)
17870 }
17871 return c.header_
17872 }
17873
17874 func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, error) {
17875 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17876 if c.ifNoneMatch_ != "" {
17877 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17878 }
17879 var body io.Reader = nil
17880 c.urlParams_.Set("alt", alt)
17881 c.urlParams_.Set("prettyPrint", "false")
17882 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels")
17883 urls += "?" + c.urlParams_.Encode()
17884 req, err := http.NewRequest("GET", urls, body)
17885 if err != nil {
17886 return nil, err
17887 }
17888 req.Header = reqHeaders
17889 googleapi.Expand(req.URL, map[string]string{
17890 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17891 })
17892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17893 }
17894
17895
17896
17897
17898
17899
17900
17901 func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) {
17902 gensupport.SetOptions(c.urlParams_, opts...)
17903 res, err := c.doRequest("json")
17904 if res != nil && res.StatusCode == http.StatusNotModified {
17905 if res.Body != nil {
17906 res.Body.Close()
17907 }
17908 return nil, gensupport.WrapError(&googleapi.Error{
17909 Code: res.StatusCode,
17910 Header: res.Header,
17911 })
17912 }
17913 if err != nil {
17914 return nil, err
17915 }
17916 defer googleapi.CloseBody(res)
17917 if err := googleapi.CheckResponse(res); err != nil {
17918 return nil, gensupport.WrapError(err)
17919 }
17920 ret := &ListChannelsResponse{
17921 ServerResponse: googleapi.ServerResponse{
17922 Header: res.Header,
17923 HTTPStatusCode: res.StatusCode,
17924 },
17925 }
17926 target := &ret
17927 if err := gensupport.DecodeResponse(target, res); err != nil {
17928 return nil, err
17929 }
17930 return ret, nil
17931 }
17932
17933
17934
17935
17936 func (c *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error {
17937 c.ctx_ = ctx
17938 defer c.PageToken(c.urlParams_.Get("pageToken"))
17939 for {
17940 x, err := c.Do()
17941 if err != nil {
17942 return err
17943 }
17944 if err := f(x); err != nil {
17945 return err
17946 }
17947 if x.NextPageToken == "" {
17948 return nil
17949 }
17950 c.PageToken(x.NextPageToken)
17951 }
17952 }
17953
17954 type AdvertisersChannelsPatchCall struct {
17955 s *Service
17956 advertiserId int64
17957 channelId int64
17958 channel *Channel
17959 urlParams_ gensupport.URLParams
17960 ctx_ context.Context
17961 header_ http.Header
17962 }
17963
17964
17965
17966
17967
17968
17969 func (r *AdvertisersChannelsService) Patch(advertiserId int64, channelId int64, channel *Channel) *AdvertisersChannelsPatchCall {
17970 c := &AdvertisersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17971 c.advertiserId = advertiserId
17972 c.channelId = channelId
17973 c.channel = channel
17974 return c
17975 }
17976
17977
17978
17979 func (c *AdvertisersChannelsPatchCall) PartnerId(partnerId int64) *AdvertisersChannelsPatchCall {
17980 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
17981 return c
17982 }
17983
17984
17985
17986 func (c *AdvertisersChannelsPatchCall) UpdateMask(updateMask string) *AdvertisersChannelsPatchCall {
17987 c.urlParams_.Set("updateMask", updateMask)
17988 return c
17989 }
17990
17991
17992
17993
17994 func (c *AdvertisersChannelsPatchCall) Fields(s ...googleapi.Field) *AdvertisersChannelsPatchCall {
17995 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17996 return c
17997 }
17998
17999
18000 func (c *AdvertisersChannelsPatchCall) Context(ctx context.Context) *AdvertisersChannelsPatchCall {
18001 c.ctx_ = ctx
18002 return c
18003 }
18004
18005
18006
18007 func (c *AdvertisersChannelsPatchCall) Header() http.Header {
18008 if c.header_ == nil {
18009 c.header_ = make(http.Header)
18010 }
18011 return c.header_
18012 }
18013
18014 func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, error) {
18015 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18016 var body io.Reader = nil
18017 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
18018 if err != nil {
18019 return nil, err
18020 }
18021 c.urlParams_.Set("alt", alt)
18022 c.urlParams_.Set("prettyPrint", "false")
18023 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{channelId}")
18024 urls += "?" + c.urlParams_.Encode()
18025 req, err := http.NewRequest("PATCH", urls, body)
18026 if err != nil {
18027 return nil, err
18028 }
18029 req.Header = reqHeaders
18030 googleapi.Expand(req.URL, map[string]string{
18031 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18032 "channelId": strconv.FormatInt(c.channelId, 10),
18033 })
18034 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18035 }
18036
18037
18038
18039
18040
18041
18042 func (c *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
18043 gensupport.SetOptions(c.urlParams_, opts...)
18044 res, err := c.doRequest("json")
18045 if res != nil && res.StatusCode == http.StatusNotModified {
18046 if res.Body != nil {
18047 res.Body.Close()
18048 }
18049 return nil, gensupport.WrapError(&googleapi.Error{
18050 Code: res.StatusCode,
18051 Header: res.Header,
18052 })
18053 }
18054 if err != nil {
18055 return nil, err
18056 }
18057 defer googleapi.CloseBody(res)
18058 if err := googleapi.CheckResponse(res); err != nil {
18059 return nil, gensupport.WrapError(err)
18060 }
18061 ret := &Channel{
18062 ServerResponse: googleapi.ServerResponse{
18063 Header: res.Header,
18064 HTTPStatusCode: res.StatusCode,
18065 },
18066 }
18067 target := &ret
18068 if err := gensupport.DecodeResponse(target, res); err != nil {
18069 return nil, err
18070 }
18071 return ret, nil
18072 }
18073
18074 type AdvertisersChannelsSitesBulkEditCall struct {
18075 s *Service
18076 advertiserId int64
18077 channelId int64
18078 bulkeditsitesrequest *BulkEditSitesRequest
18079 urlParams_ gensupport.URLParams
18080 ctx_ context.Context
18081 header_ http.Header
18082 }
18083
18084
18085
18086
18087
18088
18089
18090 func (r *AdvertisersChannelsSitesService) BulkEdit(advertiserId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *AdvertisersChannelsSitesBulkEditCall {
18091 c := &AdvertisersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18092 c.advertiserId = advertiserId
18093 c.channelId = channelId
18094 c.bulkeditsitesrequest = bulkeditsitesrequest
18095 return c
18096 }
18097
18098
18099
18100
18101 func (c *AdvertisersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesBulkEditCall {
18102 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18103 return c
18104 }
18105
18106
18107 func (c *AdvertisersChannelsSitesBulkEditCall) Context(ctx context.Context) *AdvertisersChannelsSitesBulkEditCall {
18108 c.ctx_ = ctx
18109 return c
18110 }
18111
18112
18113
18114 func (c *AdvertisersChannelsSitesBulkEditCall) Header() http.Header {
18115 if c.header_ == nil {
18116 c.header_ = make(http.Header)
18117 }
18118 return c.header_
18119 }
18120
18121 func (c *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) {
18122 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18123 var body io.Reader = nil
18124 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditsitesrequest)
18125 if err != nil {
18126 return nil, err
18127 }
18128 c.urlParams_.Set("alt", alt)
18129 c.urlParams_.Set("prettyPrint", "false")
18130 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit")
18131 urls += "?" + c.urlParams_.Encode()
18132 req, err := http.NewRequest("POST", urls, body)
18133 if err != nil {
18134 return nil, err
18135 }
18136 req.Header = reqHeaders
18137 googleapi.Expand(req.URL, map[string]string{
18138 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18139 "channelId": strconv.FormatInt(c.channelId, 10),
18140 })
18141 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18142 }
18143
18144
18145
18146
18147
18148
18149
18150 func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) {
18151 gensupport.SetOptions(c.urlParams_, opts...)
18152 res, err := c.doRequest("json")
18153 if res != nil && res.StatusCode == http.StatusNotModified {
18154 if res.Body != nil {
18155 res.Body.Close()
18156 }
18157 return nil, gensupport.WrapError(&googleapi.Error{
18158 Code: res.StatusCode,
18159 Header: res.Header,
18160 })
18161 }
18162 if err != nil {
18163 return nil, err
18164 }
18165 defer googleapi.CloseBody(res)
18166 if err := googleapi.CheckResponse(res); err != nil {
18167 return nil, gensupport.WrapError(err)
18168 }
18169 ret := &BulkEditSitesResponse{
18170 ServerResponse: googleapi.ServerResponse{
18171 Header: res.Header,
18172 HTTPStatusCode: res.StatusCode,
18173 },
18174 }
18175 target := &ret
18176 if err := gensupport.DecodeResponse(target, res); err != nil {
18177 return nil, err
18178 }
18179 return ret, nil
18180 }
18181
18182 type AdvertisersChannelsSitesCreateCall struct {
18183 s *Service
18184 advertiserId int64
18185 channelId int64
18186 site *Site
18187 urlParams_ gensupport.URLParams
18188 ctx_ context.Context
18189 header_ http.Header
18190 }
18191
18192
18193
18194
18195
18196 func (r *AdvertisersChannelsSitesService) Create(advertiserId int64, channelId int64, site *Site) *AdvertisersChannelsSitesCreateCall {
18197 c := &AdvertisersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18198 c.advertiserId = advertiserId
18199 c.channelId = channelId
18200 c.site = site
18201 return c
18202 }
18203
18204
18205
18206 func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesCreateCall {
18207 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
18208 return c
18209 }
18210
18211
18212
18213
18214 func (c *AdvertisersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesCreateCall {
18215 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18216 return c
18217 }
18218
18219
18220 func (c *AdvertisersChannelsSitesCreateCall) Context(ctx context.Context) *AdvertisersChannelsSitesCreateCall {
18221 c.ctx_ = ctx
18222 return c
18223 }
18224
18225
18226
18227 func (c *AdvertisersChannelsSitesCreateCall) Header() http.Header {
18228 if c.header_ == nil {
18229 c.header_ = make(http.Header)
18230 }
18231 return c.header_
18232 }
18233
18234 func (c *AdvertisersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) {
18235 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18236 var body io.Reader = nil
18237 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
18238 if err != nil {
18239 return nil, err
18240 }
18241 c.urlParams_.Set("alt", alt)
18242 c.urlParams_.Set("prettyPrint", "false")
18243 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites")
18244 urls += "?" + c.urlParams_.Encode()
18245 req, err := http.NewRequest("POST", urls, body)
18246 if err != nil {
18247 return nil, err
18248 }
18249 req.Header = reqHeaders
18250 googleapi.Expand(req.URL, map[string]string{
18251 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18252 "channelId": strconv.FormatInt(c.channelId, 10),
18253 })
18254 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18255 }
18256
18257
18258
18259
18260
18261
18262 func (c *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
18263 gensupport.SetOptions(c.urlParams_, opts...)
18264 res, err := c.doRequest("json")
18265 if res != nil && res.StatusCode == http.StatusNotModified {
18266 if res.Body != nil {
18267 res.Body.Close()
18268 }
18269 return nil, gensupport.WrapError(&googleapi.Error{
18270 Code: res.StatusCode,
18271 Header: res.Header,
18272 })
18273 }
18274 if err != nil {
18275 return nil, err
18276 }
18277 defer googleapi.CloseBody(res)
18278 if err := googleapi.CheckResponse(res); err != nil {
18279 return nil, gensupport.WrapError(err)
18280 }
18281 ret := &Site{
18282 ServerResponse: googleapi.ServerResponse{
18283 Header: res.Header,
18284 HTTPStatusCode: res.StatusCode,
18285 },
18286 }
18287 target := &ret
18288 if err := gensupport.DecodeResponse(target, res); err != nil {
18289 return nil, err
18290 }
18291 return ret, nil
18292 }
18293
18294 type AdvertisersChannelsSitesDeleteCall struct {
18295 s *Service
18296 advertiserId int64
18297 channelId int64
18298 urlOrAppId string
18299 urlParams_ gensupport.URLParams
18300 ctx_ context.Context
18301 header_ http.Header
18302 }
18303
18304
18305
18306
18307
18308
18309 func (r *AdvertisersChannelsSitesService) Delete(advertiserId int64, channelId int64, urlOrAppId string) *AdvertisersChannelsSitesDeleteCall {
18310 c := &AdvertisersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18311 c.advertiserId = advertiserId
18312 c.channelId = channelId
18313 c.urlOrAppId = urlOrAppId
18314 return c
18315 }
18316
18317
18318
18319 func (c *AdvertisersChannelsSitesDeleteCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesDeleteCall {
18320 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
18321 return c
18322 }
18323
18324
18325
18326
18327 func (c *AdvertisersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesDeleteCall {
18328 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18329 return c
18330 }
18331
18332
18333 func (c *AdvertisersChannelsSitesDeleteCall) Context(ctx context.Context) *AdvertisersChannelsSitesDeleteCall {
18334 c.ctx_ = ctx
18335 return c
18336 }
18337
18338
18339
18340 func (c *AdvertisersChannelsSitesDeleteCall) Header() http.Header {
18341 if c.header_ == nil {
18342 c.header_ = make(http.Header)
18343 }
18344 return c.header_
18345 }
18346
18347 func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) {
18348 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18349 var body io.Reader = nil
18350 c.urlParams_.Set("alt", alt)
18351 c.urlParams_.Set("prettyPrint", "false")
18352 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}")
18353 urls += "?" + c.urlParams_.Encode()
18354 req, err := http.NewRequest("DELETE", urls, body)
18355 if err != nil {
18356 return nil, err
18357 }
18358 req.Header = reqHeaders
18359 googleapi.Expand(req.URL, map[string]string{
18360 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18361 "channelId": strconv.FormatInt(c.channelId, 10),
18362 "urlOrAppId": c.urlOrAppId,
18363 })
18364 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18365 }
18366
18367
18368
18369
18370
18371
18372 func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
18373 gensupport.SetOptions(c.urlParams_, opts...)
18374 res, err := c.doRequest("json")
18375 if res != nil && res.StatusCode == http.StatusNotModified {
18376 if res.Body != nil {
18377 res.Body.Close()
18378 }
18379 return nil, gensupport.WrapError(&googleapi.Error{
18380 Code: res.StatusCode,
18381 Header: res.Header,
18382 })
18383 }
18384 if err != nil {
18385 return nil, err
18386 }
18387 defer googleapi.CloseBody(res)
18388 if err := googleapi.CheckResponse(res); err != nil {
18389 return nil, gensupport.WrapError(err)
18390 }
18391 ret := &Empty{
18392 ServerResponse: googleapi.ServerResponse{
18393 Header: res.Header,
18394 HTTPStatusCode: res.StatusCode,
18395 },
18396 }
18397 target := &ret
18398 if err := gensupport.DecodeResponse(target, res); err != nil {
18399 return nil, err
18400 }
18401 return ret, nil
18402 }
18403
18404 type AdvertisersChannelsSitesListCall struct {
18405 s *Service
18406 advertiserId int64
18407 channelId int64
18408 urlParams_ gensupport.URLParams
18409 ifNoneMatch_ string
18410 ctx_ context.Context
18411 header_ http.Header
18412 }
18413
18414
18415
18416
18417
18418
18419 func (r *AdvertisersChannelsSitesService) List(advertiserId int64, channelId int64) *AdvertisersChannelsSitesListCall {
18420 c := &AdvertisersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18421 c.advertiserId = advertiserId
18422 c.channelId = channelId
18423 return c
18424 }
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434 func (c *AdvertisersChannelsSitesListCall) Filter(filter string) *AdvertisersChannelsSitesListCall {
18435 c.urlParams_.Set("filter", filter)
18436 return c
18437 }
18438
18439
18440
18441
18442
18443 func (c *AdvertisersChannelsSitesListCall) OrderBy(orderBy string) *AdvertisersChannelsSitesListCall {
18444 c.urlParams_.Set("orderBy", orderBy)
18445 return c
18446 }
18447
18448
18449
18450
18451 func (c *AdvertisersChannelsSitesListCall) PageSize(pageSize int64) *AdvertisersChannelsSitesListCall {
18452 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18453 return c
18454 }
18455
18456
18457
18458
18459
18460 func (c *AdvertisersChannelsSitesListCall) PageToken(pageToken string) *AdvertisersChannelsSitesListCall {
18461 c.urlParams_.Set("pageToken", pageToken)
18462 return c
18463 }
18464
18465
18466
18467 func (c *AdvertisersChannelsSitesListCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesListCall {
18468 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
18469 return c
18470 }
18471
18472
18473
18474
18475 func (c *AdvertisersChannelsSitesListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesListCall {
18476 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18477 return c
18478 }
18479
18480
18481
18482
18483 func (c *AdvertisersChannelsSitesListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsSitesListCall {
18484 c.ifNoneMatch_ = entityTag
18485 return c
18486 }
18487
18488
18489 func (c *AdvertisersChannelsSitesListCall) Context(ctx context.Context) *AdvertisersChannelsSitesListCall {
18490 c.ctx_ = ctx
18491 return c
18492 }
18493
18494
18495
18496 func (c *AdvertisersChannelsSitesListCall) Header() http.Header {
18497 if c.header_ == nil {
18498 c.header_ = make(http.Header)
18499 }
18500 return c.header_
18501 }
18502
18503 func (c *AdvertisersChannelsSitesListCall) doRequest(alt string) (*http.Response, error) {
18504 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18505 if c.ifNoneMatch_ != "" {
18506 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18507 }
18508 var body io.Reader = nil
18509 c.urlParams_.Set("alt", alt)
18510 c.urlParams_.Set("prettyPrint", "false")
18511 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/channels/{+channelId}/sites")
18512 urls += "?" + c.urlParams_.Encode()
18513 req, err := http.NewRequest("GET", urls, body)
18514 if err != nil {
18515 return nil, err
18516 }
18517 req.Header = reqHeaders
18518 googleapi.Expand(req.URL, map[string]string{
18519 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18520 "channelId": strconv.FormatInt(c.channelId, 10),
18521 })
18522 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18523 }
18524
18525
18526
18527
18528
18529
18530
18531 func (c *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) {
18532 gensupport.SetOptions(c.urlParams_, opts...)
18533 res, err := c.doRequest("json")
18534 if res != nil && res.StatusCode == http.StatusNotModified {
18535 if res.Body != nil {
18536 res.Body.Close()
18537 }
18538 return nil, gensupport.WrapError(&googleapi.Error{
18539 Code: res.StatusCode,
18540 Header: res.Header,
18541 })
18542 }
18543 if err != nil {
18544 return nil, err
18545 }
18546 defer googleapi.CloseBody(res)
18547 if err := googleapi.CheckResponse(res); err != nil {
18548 return nil, gensupport.WrapError(err)
18549 }
18550 ret := &ListSitesResponse{
18551 ServerResponse: googleapi.ServerResponse{
18552 Header: res.Header,
18553 HTTPStatusCode: res.StatusCode,
18554 },
18555 }
18556 target := &ret
18557 if err := gensupport.DecodeResponse(target, res); err != nil {
18558 return nil, err
18559 }
18560 return ret, nil
18561 }
18562
18563
18564
18565
18566 func (c *AdvertisersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) error) error {
18567 c.ctx_ = ctx
18568 defer c.PageToken(c.urlParams_.Get("pageToken"))
18569 for {
18570 x, err := c.Do()
18571 if err != nil {
18572 return err
18573 }
18574 if err := f(x); err != nil {
18575 return err
18576 }
18577 if x.NextPageToken == "" {
18578 return nil
18579 }
18580 c.PageToken(x.NextPageToken)
18581 }
18582 }
18583
18584 type AdvertisersChannelsSitesReplaceCall struct {
18585 s *Service
18586 advertiserId int64
18587 channelId int64
18588 replacesitesrequest *ReplaceSitesRequest
18589 urlParams_ gensupport.URLParams
18590 ctx_ context.Context
18591 header_ http.Header
18592 }
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603 func (r *AdvertisersChannelsSitesService) Replace(advertiserId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *AdvertisersChannelsSitesReplaceCall {
18604 c := &AdvertisersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18605 c.advertiserId = advertiserId
18606 c.channelId = channelId
18607 c.replacesitesrequest = replacesitesrequest
18608 return c
18609 }
18610
18611
18612
18613
18614 func (c *AdvertisersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesReplaceCall {
18615 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18616 return c
18617 }
18618
18619
18620 func (c *AdvertisersChannelsSitesReplaceCall) Context(ctx context.Context) *AdvertisersChannelsSitesReplaceCall {
18621 c.ctx_ = ctx
18622 return c
18623 }
18624
18625
18626
18627 func (c *AdvertisersChannelsSitesReplaceCall) Header() http.Header {
18628 if c.header_ == nil {
18629 c.header_ = make(http.Header)
18630 }
18631 return c.header_
18632 }
18633
18634 func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) {
18635 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18636 var body io.Reader = nil
18637 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacesitesrequest)
18638 if err != nil {
18639 return nil, err
18640 }
18641 c.urlParams_.Set("alt", alt)
18642 c.urlParams_.Set("prettyPrint", "false")
18643 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/channels/{+channelId}/sites:replace")
18644 urls += "?" + c.urlParams_.Encode()
18645 req, err := http.NewRequest("POST", urls, body)
18646 if err != nil {
18647 return nil, err
18648 }
18649 req.Header = reqHeaders
18650 googleapi.Expand(req.URL, map[string]string{
18651 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18652 "channelId": strconv.FormatInt(c.channelId, 10),
18653 })
18654 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18655 }
18656
18657
18658
18659
18660
18661
18662
18663 func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, error) {
18664 gensupport.SetOptions(c.urlParams_, opts...)
18665 res, err := c.doRequest("json")
18666 if res != nil && res.StatusCode == http.StatusNotModified {
18667 if res.Body != nil {
18668 res.Body.Close()
18669 }
18670 return nil, gensupport.WrapError(&googleapi.Error{
18671 Code: res.StatusCode,
18672 Header: res.Header,
18673 })
18674 }
18675 if err != nil {
18676 return nil, err
18677 }
18678 defer googleapi.CloseBody(res)
18679 if err := googleapi.CheckResponse(res); err != nil {
18680 return nil, gensupport.WrapError(err)
18681 }
18682 ret := &ReplaceSitesResponse{
18683 ServerResponse: googleapi.ServerResponse{
18684 Header: res.Header,
18685 HTTPStatusCode: res.StatusCode,
18686 },
18687 }
18688 target := &ret
18689 if err := gensupport.DecodeResponse(target, res); err != nil {
18690 return nil, err
18691 }
18692 return ret, nil
18693 }
18694
18695 type AdvertisersCreativesCreateCall struct {
18696 s *Service
18697 advertiserId int64
18698 creative *Creative
18699 urlParams_ gensupport.URLParams
18700 ctx_ context.Context
18701 header_ http.Header
18702 }
18703
18704
18705
18706
18707
18708
18709
18710
18711 func (r *AdvertisersCreativesService) Create(advertiserId int64, creative *Creative) *AdvertisersCreativesCreateCall {
18712 c := &AdvertisersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18713 c.advertiserId = advertiserId
18714 c.creative = creative
18715 return c
18716 }
18717
18718
18719
18720
18721 func (c *AdvertisersCreativesCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreativesCreateCall {
18722 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18723 return c
18724 }
18725
18726
18727 func (c *AdvertisersCreativesCreateCall) Context(ctx context.Context) *AdvertisersCreativesCreateCall {
18728 c.ctx_ = ctx
18729 return c
18730 }
18731
18732
18733
18734 func (c *AdvertisersCreativesCreateCall) Header() http.Header {
18735 if c.header_ == nil {
18736 c.header_ = make(http.Header)
18737 }
18738 return c.header_
18739 }
18740
18741 func (c *AdvertisersCreativesCreateCall) doRequest(alt string) (*http.Response, error) {
18742 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18743 var body io.Reader = nil
18744 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
18745 if err != nil {
18746 return nil, err
18747 }
18748 c.urlParams_.Set("alt", alt)
18749 c.urlParams_.Set("prettyPrint", "false")
18750 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives")
18751 urls += "?" + c.urlParams_.Encode()
18752 req, err := http.NewRequest("POST", urls, body)
18753 if err != nil {
18754 return nil, err
18755 }
18756 req.Header = reqHeaders
18757 googleapi.Expand(req.URL, map[string]string{
18758 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18759 })
18760 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18761 }
18762
18763
18764
18765
18766
18767
18768 func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
18769 gensupport.SetOptions(c.urlParams_, opts...)
18770 res, err := c.doRequest("json")
18771 if res != nil && res.StatusCode == http.StatusNotModified {
18772 if res.Body != nil {
18773 res.Body.Close()
18774 }
18775 return nil, gensupport.WrapError(&googleapi.Error{
18776 Code: res.StatusCode,
18777 Header: res.Header,
18778 })
18779 }
18780 if err != nil {
18781 return nil, err
18782 }
18783 defer googleapi.CloseBody(res)
18784 if err := googleapi.CheckResponse(res); err != nil {
18785 return nil, gensupport.WrapError(err)
18786 }
18787 ret := &Creative{
18788 ServerResponse: googleapi.ServerResponse{
18789 Header: res.Header,
18790 HTTPStatusCode: res.StatusCode,
18791 },
18792 }
18793 target := &ret
18794 if err := gensupport.DecodeResponse(target, res); err != nil {
18795 return nil, err
18796 }
18797 return ret, nil
18798 }
18799
18800 type AdvertisersCreativesDeleteCall struct {
18801 s *Service
18802 advertiserId int64
18803 creativeId int64
18804 urlParams_ gensupport.URLParams
18805 ctx_ context.Context
18806 header_ http.Header
18807 }
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818 func (r *AdvertisersCreativesService) Delete(advertiserId int64, creativeId int64) *AdvertisersCreativesDeleteCall {
18819 c := &AdvertisersCreativesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18820 c.advertiserId = advertiserId
18821 c.creativeId = creativeId
18822 return c
18823 }
18824
18825
18826
18827
18828 func (c *AdvertisersCreativesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCreativesDeleteCall {
18829 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18830 return c
18831 }
18832
18833
18834 func (c *AdvertisersCreativesDeleteCall) Context(ctx context.Context) *AdvertisersCreativesDeleteCall {
18835 c.ctx_ = ctx
18836 return c
18837 }
18838
18839
18840
18841 func (c *AdvertisersCreativesDeleteCall) Header() http.Header {
18842 if c.header_ == nil {
18843 c.header_ = make(http.Header)
18844 }
18845 return c.header_
18846 }
18847
18848 func (c *AdvertisersCreativesDeleteCall) doRequest(alt string) (*http.Response, error) {
18849 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18850 var body io.Reader = nil
18851 c.urlParams_.Set("alt", alt)
18852 c.urlParams_.Set("prettyPrint", "false")
18853 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}")
18854 urls += "?" + c.urlParams_.Encode()
18855 req, err := http.NewRequest("DELETE", urls, body)
18856 if err != nil {
18857 return nil, err
18858 }
18859 req.Header = reqHeaders
18860 googleapi.Expand(req.URL, map[string]string{
18861 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18862 "creativeId": strconv.FormatInt(c.creativeId, 10),
18863 })
18864 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18865 }
18866
18867
18868
18869
18870
18871
18872 func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
18873 gensupport.SetOptions(c.urlParams_, opts...)
18874 res, err := c.doRequest("json")
18875 if res != nil && res.StatusCode == http.StatusNotModified {
18876 if res.Body != nil {
18877 res.Body.Close()
18878 }
18879 return nil, gensupport.WrapError(&googleapi.Error{
18880 Code: res.StatusCode,
18881 Header: res.Header,
18882 })
18883 }
18884 if err != nil {
18885 return nil, err
18886 }
18887 defer googleapi.CloseBody(res)
18888 if err := googleapi.CheckResponse(res); err != nil {
18889 return nil, gensupport.WrapError(err)
18890 }
18891 ret := &Empty{
18892 ServerResponse: googleapi.ServerResponse{
18893 Header: res.Header,
18894 HTTPStatusCode: res.StatusCode,
18895 },
18896 }
18897 target := &ret
18898 if err := gensupport.DecodeResponse(target, res); err != nil {
18899 return nil, err
18900 }
18901 return ret, nil
18902 }
18903
18904 type AdvertisersCreativesGetCall struct {
18905 s *Service
18906 advertiserId int64
18907 creativeId int64
18908 urlParams_ gensupport.URLParams
18909 ifNoneMatch_ string
18910 ctx_ context.Context
18911 header_ http.Header
18912 }
18913
18914
18915
18916
18917
18918 func (r *AdvertisersCreativesService) Get(advertiserId int64, creativeId int64) *AdvertisersCreativesGetCall {
18919 c := &AdvertisersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18920 c.advertiserId = advertiserId
18921 c.creativeId = creativeId
18922 return c
18923 }
18924
18925
18926
18927
18928 func (c *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersCreativesGetCall {
18929 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18930 return c
18931 }
18932
18933
18934
18935
18936 func (c *AdvertisersCreativesGetCall) IfNoneMatch(entityTag string) *AdvertisersCreativesGetCall {
18937 c.ifNoneMatch_ = entityTag
18938 return c
18939 }
18940
18941
18942 func (c *AdvertisersCreativesGetCall) Context(ctx context.Context) *AdvertisersCreativesGetCall {
18943 c.ctx_ = ctx
18944 return c
18945 }
18946
18947
18948
18949 func (c *AdvertisersCreativesGetCall) Header() http.Header {
18950 if c.header_ == nil {
18951 c.header_ = make(http.Header)
18952 }
18953 return c.header_
18954 }
18955
18956 func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, error) {
18957 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18958 if c.ifNoneMatch_ != "" {
18959 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18960 }
18961 var body io.Reader = nil
18962 c.urlParams_.Set("alt", alt)
18963 c.urlParams_.Set("prettyPrint", "false")
18964 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}")
18965 urls += "?" + c.urlParams_.Encode()
18966 req, err := http.NewRequest("GET", urls, body)
18967 if err != nil {
18968 return nil, err
18969 }
18970 req.Header = reqHeaders
18971 googleapi.Expand(req.URL, map[string]string{
18972 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18973 "creativeId": strconv.FormatInt(c.creativeId, 10),
18974 })
18975 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18976 }
18977
18978
18979
18980
18981
18982
18983 func (c *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
18984 gensupport.SetOptions(c.urlParams_, opts...)
18985 res, err := c.doRequest("json")
18986 if res != nil && res.StatusCode == http.StatusNotModified {
18987 if res.Body != nil {
18988 res.Body.Close()
18989 }
18990 return nil, gensupport.WrapError(&googleapi.Error{
18991 Code: res.StatusCode,
18992 Header: res.Header,
18993 })
18994 }
18995 if err != nil {
18996 return nil, err
18997 }
18998 defer googleapi.CloseBody(res)
18999 if err := googleapi.CheckResponse(res); err != nil {
19000 return nil, gensupport.WrapError(err)
19001 }
19002 ret := &Creative{
19003 ServerResponse: googleapi.ServerResponse{
19004 Header: res.Header,
19005 HTTPStatusCode: res.StatusCode,
19006 },
19007 }
19008 target := &ret
19009 if err := gensupport.DecodeResponse(target, res); err != nil {
19010 return nil, err
19011 }
19012 return ret, nil
19013 }
19014
19015 type AdvertisersCreativesListCall struct {
19016 s *Service
19017 advertiserId int64
19018 urlParams_ gensupport.URLParams
19019 ifNoneMatch_ string
19020 ctx_ context.Context
19021 header_ http.Header
19022 }
19023
19024
19025
19026
19027
19028
19029 func (r *AdvertisersCreativesService) List(advertiserId int64) *AdvertisersCreativesListCall {
19030 c := &AdvertisersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19031 c.advertiserId = advertiserId
19032 return c
19033 }
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070 func (c *AdvertisersCreativesListCall) Filter(filter string) *AdvertisersCreativesListCall {
19071 c.urlParams_.Set("filter", filter)
19072 return c
19073 }
19074
19075
19076
19077
19078
19079
19080
19081 func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreativesListCall {
19082 c.urlParams_.Set("orderBy", orderBy)
19083 return c
19084 }
19085
19086
19087
19088
19089 func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall {
19090 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19091 return c
19092 }
19093
19094
19095
19096
19097
19098 func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersCreativesListCall {
19099 c.urlParams_.Set("pageToken", pageToken)
19100 return c
19101 }
19102
19103
19104
19105
19106 func (c *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *AdvertisersCreativesListCall {
19107 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19108 return c
19109 }
19110
19111
19112
19113
19114 func (c *AdvertisersCreativesListCall) IfNoneMatch(entityTag string) *AdvertisersCreativesListCall {
19115 c.ifNoneMatch_ = entityTag
19116 return c
19117 }
19118
19119
19120 func (c *AdvertisersCreativesListCall) Context(ctx context.Context) *AdvertisersCreativesListCall {
19121 c.ctx_ = ctx
19122 return c
19123 }
19124
19125
19126
19127 func (c *AdvertisersCreativesListCall) Header() http.Header {
19128 if c.header_ == nil {
19129 c.header_ = make(http.Header)
19130 }
19131 return c.header_
19132 }
19133
19134 func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, error) {
19135 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19136 if c.ifNoneMatch_ != "" {
19137 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19138 }
19139 var body io.Reader = nil
19140 c.urlParams_.Set("alt", alt)
19141 c.urlParams_.Set("prettyPrint", "false")
19142 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives")
19143 urls += "?" + c.urlParams_.Encode()
19144 req, err := http.NewRequest("GET", urls, body)
19145 if err != nil {
19146 return nil, err
19147 }
19148 req.Header = reqHeaders
19149 googleapi.Expand(req.URL, map[string]string{
19150 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19151 })
19152 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19153 }
19154
19155
19156
19157
19158
19159
19160
19161 func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) {
19162 gensupport.SetOptions(c.urlParams_, opts...)
19163 res, err := c.doRequest("json")
19164 if res != nil && res.StatusCode == http.StatusNotModified {
19165 if res.Body != nil {
19166 res.Body.Close()
19167 }
19168 return nil, gensupport.WrapError(&googleapi.Error{
19169 Code: res.StatusCode,
19170 Header: res.Header,
19171 })
19172 }
19173 if err != nil {
19174 return nil, err
19175 }
19176 defer googleapi.CloseBody(res)
19177 if err := googleapi.CheckResponse(res); err != nil {
19178 return nil, gensupport.WrapError(err)
19179 }
19180 ret := &ListCreativesResponse{
19181 ServerResponse: googleapi.ServerResponse{
19182 Header: res.Header,
19183 HTTPStatusCode: res.StatusCode,
19184 },
19185 }
19186 target := &ret
19187 if err := gensupport.DecodeResponse(target, res); err != nil {
19188 return nil, err
19189 }
19190 return ret, nil
19191 }
19192
19193
19194
19195
19196 func (c *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error {
19197 c.ctx_ = ctx
19198 defer c.PageToken(c.urlParams_.Get("pageToken"))
19199 for {
19200 x, err := c.Do()
19201 if err != nil {
19202 return err
19203 }
19204 if err := f(x); err != nil {
19205 return err
19206 }
19207 if x.NextPageToken == "" {
19208 return nil
19209 }
19210 c.PageToken(x.NextPageToken)
19211 }
19212 }
19213
19214 type AdvertisersCreativesPatchCall struct {
19215 s *Service
19216 advertiserId int64
19217 creativeId int64
19218 creative *Creative
19219 urlParams_ gensupport.URLParams
19220 ctx_ context.Context
19221 header_ http.Header
19222 }
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233 func (r *AdvertisersCreativesService) Patch(advertiserId int64, creativeId int64, creative *Creative) *AdvertisersCreativesPatchCall {
19234 c := &AdvertisersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19235 c.advertiserId = advertiserId
19236 c.creativeId = creativeId
19237 c.creative = creative
19238 return c
19239 }
19240
19241
19242
19243 func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *AdvertisersCreativesPatchCall {
19244 c.urlParams_.Set("updateMask", updateMask)
19245 return c
19246 }
19247
19248
19249
19250
19251 func (c *AdvertisersCreativesPatchCall) Fields(s ...googleapi.Field) *AdvertisersCreativesPatchCall {
19252 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19253 return c
19254 }
19255
19256
19257 func (c *AdvertisersCreativesPatchCall) Context(ctx context.Context) *AdvertisersCreativesPatchCall {
19258 c.ctx_ = ctx
19259 return c
19260 }
19261
19262
19263
19264 func (c *AdvertisersCreativesPatchCall) Header() http.Header {
19265 if c.header_ == nil {
19266 c.header_ = make(http.Header)
19267 }
19268 return c.header_
19269 }
19270
19271 func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, error) {
19272 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19273 var body io.Reader = nil
19274 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
19275 if err != nil {
19276 return nil, err
19277 }
19278 c.urlParams_.Set("alt", alt)
19279 c.urlParams_.Set("prettyPrint", "false")
19280 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/creatives/{+creativeId}")
19281 urls += "?" + c.urlParams_.Encode()
19282 req, err := http.NewRequest("PATCH", urls, body)
19283 if err != nil {
19284 return nil, err
19285 }
19286 req.Header = reqHeaders
19287 googleapi.Expand(req.URL, map[string]string{
19288 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19289 "creativeId": strconv.FormatInt(c.creativeId, 10),
19290 })
19291 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19292 }
19293
19294
19295
19296
19297
19298
19299 func (c *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
19300 gensupport.SetOptions(c.urlParams_, opts...)
19301 res, err := c.doRequest("json")
19302 if res != nil && res.StatusCode == http.StatusNotModified {
19303 if res.Body != nil {
19304 res.Body.Close()
19305 }
19306 return nil, gensupport.WrapError(&googleapi.Error{
19307 Code: res.StatusCode,
19308 Header: res.Header,
19309 })
19310 }
19311 if err != nil {
19312 return nil, err
19313 }
19314 defer googleapi.CloseBody(res)
19315 if err := googleapi.CheckResponse(res); err != nil {
19316 return nil, gensupport.WrapError(err)
19317 }
19318 ret := &Creative{
19319 ServerResponse: googleapi.ServerResponse{
19320 Header: res.Header,
19321 HTTPStatusCode: res.StatusCode,
19322 },
19323 }
19324 target := &ret
19325 if err := gensupport.DecodeResponse(target, res); err != nil {
19326 return nil, err
19327 }
19328 return ret, nil
19329 }
19330
19331 type AdvertisersInsertionOrdersCreateCall struct {
19332 s *Service
19333 advertiserId int64
19334 insertionorder *InsertionOrder
19335 urlParams_ gensupport.URLParams
19336 ctx_ context.Context
19337 header_ http.Header
19338 }
19339
19340
19341
19342
19343
19344
19345 func (r *AdvertisersInsertionOrdersService) Create(advertiserId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersCreateCall {
19346 c := &AdvertisersInsertionOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19347 c.advertiserId = advertiserId
19348 c.insertionorder = insertionorder
19349 return c
19350 }
19351
19352
19353
19354
19355 func (c *AdvertisersInsertionOrdersCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersCreateCall {
19356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19357 return c
19358 }
19359
19360
19361 func (c *AdvertisersInsertionOrdersCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersCreateCall {
19362 c.ctx_ = ctx
19363 return c
19364 }
19365
19366
19367
19368 func (c *AdvertisersInsertionOrdersCreateCall) Header() http.Header {
19369 if c.header_ == nil {
19370 c.header_ = make(http.Header)
19371 }
19372 return c.header_
19373 }
19374
19375 func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Response, error) {
19376 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19377 var body io.Reader = nil
19378 body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertionorder)
19379 if err != nil {
19380 return nil, err
19381 }
19382 c.urlParams_.Set("alt", alt)
19383 c.urlParams_.Set("prettyPrint", "false")
19384 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders")
19385 urls += "?" + c.urlParams_.Encode()
19386 req, err := http.NewRequest("POST", urls, body)
19387 if err != nil {
19388 return nil, err
19389 }
19390 req.Header = reqHeaders
19391 googleapi.Expand(req.URL, map[string]string{
19392 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19393 })
19394 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19395 }
19396
19397
19398
19399
19400
19401
19402 func (c *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) {
19403 gensupport.SetOptions(c.urlParams_, opts...)
19404 res, err := c.doRequest("json")
19405 if res != nil && res.StatusCode == http.StatusNotModified {
19406 if res.Body != nil {
19407 res.Body.Close()
19408 }
19409 return nil, gensupport.WrapError(&googleapi.Error{
19410 Code: res.StatusCode,
19411 Header: res.Header,
19412 })
19413 }
19414 if err != nil {
19415 return nil, err
19416 }
19417 defer googleapi.CloseBody(res)
19418 if err := googleapi.CheckResponse(res); err != nil {
19419 return nil, gensupport.WrapError(err)
19420 }
19421 ret := &InsertionOrder{
19422 ServerResponse: googleapi.ServerResponse{
19423 Header: res.Header,
19424 HTTPStatusCode: res.StatusCode,
19425 },
19426 }
19427 target := &ret
19428 if err := gensupport.DecodeResponse(target, res); err != nil {
19429 return nil, err
19430 }
19431 return ret, nil
19432 }
19433
19434 type AdvertisersInsertionOrdersDeleteCall struct {
19435 s *Service
19436 advertiserId int64
19437 insertionOrderId int64
19438 urlParams_ gensupport.URLParams
19439 ctx_ context.Context
19440 header_ http.Header
19441 }
19442
19443
19444
19445
19446
19447
19448
19449
19450 func (r *AdvertisersInsertionOrdersService) Delete(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersDeleteCall {
19451 c := &AdvertisersInsertionOrdersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19452 c.advertiserId = advertiserId
19453 c.insertionOrderId = insertionOrderId
19454 return c
19455 }
19456
19457
19458
19459
19460 func (c *AdvertisersInsertionOrdersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersDeleteCall {
19461 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19462 return c
19463 }
19464
19465
19466 func (c *AdvertisersInsertionOrdersDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersDeleteCall {
19467 c.ctx_ = ctx
19468 return c
19469 }
19470
19471
19472
19473 func (c *AdvertisersInsertionOrdersDeleteCall) Header() http.Header {
19474 if c.header_ == nil {
19475 c.header_ = make(http.Header)
19476 }
19477 return c.header_
19478 }
19479
19480 func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Response, error) {
19481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19482 var body io.Reader = nil
19483 c.urlParams_.Set("alt", alt)
19484 c.urlParams_.Set("prettyPrint", "false")
19485 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}")
19486 urls += "?" + c.urlParams_.Encode()
19487 req, err := http.NewRequest("DELETE", urls, body)
19488 if err != nil {
19489 return nil, err
19490 }
19491 req.Header = reqHeaders
19492 googleapi.Expand(req.URL, map[string]string{
19493 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19494 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
19495 })
19496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19497 }
19498
19499
19500
19501
19502
19503
19504 func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
19505 gensupport.SetOptions(c.urlParams_, opts...)
19506 res, err := c.doRequest("json")
19507 if res != nil && res.StatusCode == http.StatusNotModified {
19508 if res.Body != nil {
19509 res.Body.Close()
19510 }
19511 return nil, gensupport.WrapError(&googleapi.Error{
19512 Code: res.StatusCode,
19513 Header: res.Header,
19514 })
19515 }
19516 if err != nil {
19517 return nil, err
19518 }
19519 defer googleapi.CloseBody(res)
19520 if err := googleapi.CheckResponse(res); err != nil {
19521 return nil, gensupport.WrapError(err)
19522 }
19523 ret := &Empty{
19524 ServerResponse: googleapi.ServerResponse{
19525 Header: res.Header,
19526 HTTPStatusCode: res.StatusCode,
19527 },
19528 }
19529 target := &ret
19530 if err := gensupport.DecodeResponse(target, res); err != nil {
19531 return nil, err
19532 }
19533 return ret, nil
19534 }
19535
19536 type AdvertisersInsertionOrdersGetCall struct {
19537 s *Service
19538 advertiserId int64
19539 insertionOrderId int64
19540 urlParams_ gensupport.URLParams
19541 ifNoneMatch_ string
19542 ctx_ context.Context
19543 header_ http.Header
19544 }
19545
19546
19547
19548
19549
19550
19551 func (r *AdvertisersInsertionOrdersService) Get(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersGetCall {
19552 c := &AdvertisersInsertionOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19553 c.advertiserId = advertiserId
19554 c.insertionOrderId = insertionOrderId
19555 return c
19556 }
19557
19558
19559
19560
19561 func (c *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersGetCall {
19562 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19563 return c
19564 }
19565
19566
19567
19568
19569 func (c *AdvertisersInsertionOrdersGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersGetCall {
19570 c.ifNoneMatch_ = entityTag
19571 return c
19572 }
19573
19574
19575 func (c *AdvertisersInsertionOrdersGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersGetCall {
19576 c.ctx_ = ctx
19577 return c
19578 }
19579
19580
19581
19582 func (c *AdvertisersInsertionOrdersGetCall) Header() http.Header {
19583 if c.header_ == nil {
19584 c.header_ = make(http.Header)
19585 }
19586 return c.header_
19587 }
19588
19589 func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Response, error) {
19590 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19591 if c.ifNoneMatch_ != "" {
19592 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19593 }
19594 var body io.Reader = nil
19595 c.urlParams_.Set("alt", alt)
19596 c.urlParams_.Set("prettyPrint", "false")
19597 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}")
19598 urls += "?" + c.urlParams_.Encode()
19599 req, err := http.NewRequest("GET", urls, body)
19600 if err != nil {
19601 return nil, err
19602 }
19603 req.Header = reqHeaders
19604 googleapi.Expand(req.URL, map[string]string{
19605 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19606 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
19607 })
19608 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19609 }
19610
19611
19612
19613
19614
19615
19616 func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) {
19617 gensupport.SetOptions(c.urlParams_, opts...)
19618 res, err := c.doRequest("json")
19619 if res != nil && res.StatusCode == http.StatusNotModified {
19620 if res.Body != nil {
19621 res.Body.Close()
19622 }
19623 return nil, gensupport.WrapError(&googleapi.Error{
19624 Code: res.StatusCode,
19625 Header: res.Header,
19626 })
19627 }
19628 if err != nil {
19629 return nil, err
19630 }
19631 defer googleapi.CloseBody(res)
19632 if err := googleapi.CheckResponse(res); err != nil {
19633 return nil, gensupport.WrapError(err)
19634 }
19635 ret := &InsertionOrder{
19636 ServerResponse: googleapi.ServerResponse{
19637 Header: res.Header,
19638 HTTPStatusCode: res.StatusCode,
19639 },
19640 }
19641 target := &ret
19642 if err := gensupport.DecodeResponse(target, res); err != nil {
19643 return nil, err
19644 }
19645 return ret, nil
19646 }
19647
19648 type AdvertisersInsertionOrdersListCall struct {
19649 s *Service
19650 advertiserId int64
19651 urlParams_ gensupport.URLParams
19652 ifNoneMatch_ string
19653 ctx_ context.Context
19654 header_ http.Header
19655 }
19656
19657
19658
19659
19660
19661
19662 func (r *AdvertisersInsertionOrdersService) List(advertiserId int64) *AdvertisersInsertionOrdersListCall {
19663 c := &AdvertisersInsertionOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19664 c.advertiserId = advertiserId
19665 return c
19666 }
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687 func (c *AdvertisersInsertionOrdersListCall) Filter(filter string) *AdvertisersInsertionOrdersListCall {
19688 c.urlParams_.Set("filter", filter)
19689 return c
19690 }
19691
19692
19693
19694
19695
19696
19697 func (c *AdvertisersInsertionOrdersListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListCall {
19698 c.urlParams_.Set("orderBy", orderBy)
19699 return c
19700 }
19701
19702
19703
19704
19705 func (c *AdvertisersInsertionOrdersListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListCall {
19706 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19707 return c
19708 }
19709
19710
19711
19712
19713
19714 func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListCall {
19715 c.urlParams_.Set("pageToken", pageToken)
19716 return c
19717 }
19718
19719
19720
19721
19722 func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListCall {
19723 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19724 return c
19725 }
19726
19727
19728
19729
19730 func (c *AdvertisersInsertionOrdersListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListCall {
19731 c.ifNoneMatch_ = entityTag
19732 return c
19733 }
19734
19735
19736 func (c *AdvertisersInsertionOrdersListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListCall {
19737 c.ctx_ = ctx
19738 return c
19739 }
19740
19741
19742
19743 func (c *AdvertisersInsertionOrdersListCall) Header() http.Header {
19744 if c.header_ == nil {
19745 c.header_ = make(http.Header)
19746 }
19747 return c.header_
19748 }
19749
19750 func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Response, error) {
19751 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19752 if c.ifNoneMatch_ != "" {
19753 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19754 }
19755 var body io.Reader = nil
19756 c.urlParams_.Set("alt", alt)
19757 c.urlParams_.Set("prettyPrint", "false")
19758 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders")
19759 urls += "?" + c.urlParams_.Encode()
19760 req, err := http.NewRequest("GET", urls, body)
19761 if err != nil {
19762 return nil, err
19763 }
19764 req.Header = reqHeaders
19765 googleapi.Expand(req.URL, map[string]string{
19766 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19767 })
19768 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19769 }
19770
19771
19772
19773
19774
19775
19776
19777 func (c *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrdersResponse, error) {
19778 gensupport.SetOptions(c.urlParams_, opts...)
19779 res, err := c.doRequest("json")
19780 if res != nil && res.StatusCode == http.StatusNotModified {
19781 if res.Body != nil {
19782 res.Body.Close()
19783 }
19784 return nil, gensupport.WrapError(&googleapi.Error{
19785 Code: res.StatusCode,
19786 Header: res.Header,
19787 })
19788 }
19789 if err != nil {
19790 return nil, err
19791 }
19792 defer googleapi.CloseBody(res)
19793 if err := googleapi.CheckResponse(res); err != nil {
19794 return nil, gensupport.WrapError(err)
19795 }
19796 ret := &ListInsertionOrdersResponse{
19797 ServerResponse: googleapi.ServerResponse{
19798 Header: res.Header,
19799 HTTPStatusCode: res.StatusCode,
19800 },
19801 }
19802 target := &ret
19803 if err := gensupport.DecodeResponse(target, res); err != nil {
19804 return nil, err
19805 }
19806 return ret, nil
19807 }
19808
19809
19810
19811
19812 func (c *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(*ListInsertionOrdersResponse) error) error {
19813 c.ctx_ = ctx
19814 defer c.PageToken(c.urlParams_.Get("pageToken"))
19815 for {
19816 x, err := c.Do()
19817 if err != nil {
19818 return err
19819 }
19820 if err := f(x); err != nil {
19821 return err
19822 }
19823 if x.NextPageToken == "" {
19824 return nil
19825 }
19826 c.PageToken(x.NextPageToken)
19827 }
19828 }
19829
19830 type AdvertisersInsertionOrdersListAssignedTargetingOptionsCall struct {
19831 s *Service
19832 advertiserId int64
19833 insertionOrderId int64
19834 urlParams_ gensupport.URLParams
19835 ifNoneMatch_ string
19836 ctx_ context.Context
19837 header_ http.Header
19838 }
19839
19840
19841
19842
19843
19844
19845
19846 func (r *AdvertisersInsertionOrdersService) ListAssignedTargetingOptions(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
19847 c := &AdvertisersInsertionOrdersListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19848 c.advertiserId = advertiserId
19849 c.insertionOrderId = insertionOrderId
19850 return c
19851 }
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
19869 c.urlParams_.Set("filter", filter)
19870 return c
19871 }
19872
19873
19874
19875
19876
19877 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
19878 c.urlParams_.Set("orderBy", orderBy)
19879 return c
19880 }
19881
19882
19883
19884
19885
19886 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
19887 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19888 return c
19889 }
19890
19891
19892
19893
19894
19895
19896 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
19897 c.urlParams_.Set("pageToken", pageToken)
19898 return c
19899 }
19900
19901
19902
19903
19904 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
19905 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19906 return c
19907 }
19908
19909
19910
19911
19912 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
19913 c.ifNoneMatch_ = entityTag
19914 return c
19915 }
19916
19917
19918 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
19919 c.ctx_ = ctx
19920 return c
19921 }
19922
19923
19924
19925 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Header() http.Header {
19926 if c.header_ == nil {
19927 c.header_ = make(http.Header)
19928 }
19929 return c.header_
19930 }
19931
19932 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
19933 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19934 if c.ifNoneMatch_ != "" {
19935 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19936 }
19937 var body io.Reader = nil
19938 c.urlParams_.Set("alt", alt)
19939 c.urlParams_.Set("prettyPrint", "false")
19940 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}:listAssignedTargetingOptions")
19941 urls += "?" + c.urlParams_.Encode()
19942 req, err := http.NewRequest("GET", urls, body)
19943 if err != nil {
19944 return nil, err
19945 }
19946 req.Header = reqHeaders
19947 googleapi.Expand(req.URL, map[string]string{
19948 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19949 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
19950 })
19951 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19952 }
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListInsertionOrderAssignedTargetingOptionsResponse, error) {
19963 gensupport.SetOptions(c.urlParams_, opts...)
19964 res, err := c.doRequest("json")
19965 if res != nil && res.StatusCode == http.StatusNotModified {
19966 if res.Body != nil {
19967 res.Body.Close()
19968 }
19969 return nil, gensupport.WrapError(&googleapi.Error{
19970 Code: res.StatusCode,
19971 Header: res.Header,
19972 })
19973 }
19974 if err != nil {
19975 return nil, err
19976 }
19977 defer googleapi.CloseBody(res)
19978 if err := googleapi.CheckResponse(res); err != nil {
19979 return nil, gensupport.WrapError(err)
19980 }
19981 ret := &BulkListInsertionOrderAssignedTargetingOptionsResponse{
19982 ServerResponse: googleapi.ServerResponse{
19983 Header: res.Header,
19984 HTTPStatusCode: res.StatusCode,
19985 },
19986 }
19987 target := &ret
19988 if err := gensupport.DecodeResponse(target, res); err != nil {
19989 return nil, err
19990 }
19991 return ret, nil
19992 }
19993
19994
19995
19996
19997 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListInsertionOrderAssignedTargetingOptionsResponse) error) error {
19998 c.ctx_ = ctx
19999 defer c.PageToken(c.urlParams_.Get("pageToken"))
20000 for {
20001 x, err := c.Do()
20002 if err != nil {
20003 return err
20004 }
20005 if err := f(x); err != nil {
20006 return err
20007 }
20008 if x.NextPageToken == "" {
20009 return nil
20010 }
20011 c.PageToken(x.NextPageToken)
20012 }
20013 }
20014
20015 type AdvertisersInsertionOrdersPatchCall struct {
20016 s *Service
20017 advertiserId int64
20018 insertionOrderId int64
20019 insertionorder *InsertionOrder
20020 urlParams_ gensupport.URLParams
20021 ctx_ context.Context
20022 header_ http.Header
20023 }
20024
20025
20026
20027
20028
20029
20030
20031
20032 func (r *AdvertisersInsertionOrdersService) Patch(advertiserId int64, insertionOrderId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersPatchCall {
20033 c := &AdvertisersInsertionOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20034 c.advertiserId = advertiserId
20035 c.insertionOrderId = insertionOrderId
20036 c.insertionorder = insertionorder
20037 return c
20038 }
20039
20040
20041
20042 func (c *AdvertisersInsertionOrdersPatchCall) UpdateMask(updateMask string) *AdvertisersInsertionOrdersPatchCall {
20043 c.urlParams_.Set("updateMask", updateMask)
20044 return c
20045 }
20046
20047
20048
20049
20050 func (c *AdvertisersInsertionOrdersPatchCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersPatchCall {
20051 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20052 return c
20053 }
20054
20055
20056 func (c *AdvertisersInsertionOrdersPatchCall) Context(ctx context.Context) *AdvertisersInsertionOrdersPatchCall {
20057 c.ctx_ = ctx
20058 return c
20059 }
20060
20061
20062
20063 func (c *AdvertisersInsertionOrdersPatchCall) Header() http.Header {
20064 if c.header_ == nil {
20065 c.header_ = make(http.Header)
20066 }
20067 return c.header_
20068 }
20069
20070 func (c *AdvertisersInsertionOrdersPatchCall) doRequest(alt string) (*http.Response, error) {
20071 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20072 var body io.Reader = nil
20073 body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertionorder)
20074 if err != nil {
20075 return nil, err
20076 }
20077 c.urlParams_.Set("alt", alt)
20078 c.urlParams_.Set("prettyPrint", "false")
20079 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}")
20080 urls += "?" + c.urlParams_.Encode()
20081 req, err := http.NewRequest("PATCH", urls, body)
20082 if err != nil {
20083 return nil, err
20084 }
20085 req.Header = reqHeaders
20086 googleapi.Expand(req.URL, map[string]string{
20087 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20088 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
20089 })
20090 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20091 }
20092
20093
20094
20095
20096
20097
20098 func (c *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) {
20099 gensupport.SetOptions(c.urlParams_, opts...)
20100 res, err := c.doRequest("json")
20101 if res != nil && res.StatusCode == http.StatusNotModified {
20102 if res.Body != nil {
20103 res.Body.Close()
20104 }
20105 return nil, gensupport.WrapError(&googleapi.Error{
20106 Code: res.StatusCode,
20107 Header: res.Header,
20108 })
20109 }
20110 if err != nil {
20111 return nil, err
20112 }
20113 defer googleapi.CloseBody(res)
20114 if err := googleapi.CheckResponse(res); err != nil {
20115 return nil, gensupport.WrapError(err)
20116 }
20117 ret := &InsertionOrder{
20118 ServerResponse: googleapi.ServerResponse{
20119 Header: res.Header,
20120 HTTPStatusCode: res.StatusCode,
20121 },
20122 }
20123 target := &ret
20124 if err := gensupport.DecodeResponse(target, res); err != nil {
20125 return nil, err
20126 }
20127 return ret, nil
20128 }
20129
20130 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall struct {
20131 s *Service
20132 advertiserId int64
20133 insertionOrderId int64
20134 targetingType string
20135 assignedtargetingoption *AssignedTargetingOption
20136 urlParams_ gensupport.URLParams
20137 ctx_ context.Context
20138 header_ http.Header
20139 }
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, insertionOrderId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall {
20168 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20169 c.advertiserId = advertiserId
20170 c.insertionOrderId = insertionOrderId
20171 c.targetingType = targetingType
20172 c.assignedtargetingoption = assignedtargetingoption
20173 return c
20174 }
20175
20176
20177
20178
20179 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall {
20180 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20181 return c
20182 }
20183
20184
20185 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall {
20186 c.ctx_ = ctx
20187 return c
20188 }
20189
20190
20191
20192 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header {
20193 if c.header_ == nil {
20194 c.header_ = make(http.Header)
20195 }
20196 return c.header_
20197 }
20198
20199 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) {
20200 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20201 var body io.Reader = nil
20202 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption)
20203 if err != nil {
20204 return nil, err
20205 }
20206 c.urlParams_.Set("alt", alt)
20207 c.urlParams_.Set("prettyPrint", "false")
20208 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
20209 urls += "?" + c.urlParams_.Encode()
20210 req, err := http.NewRequest("POST", urls, body)
20211 if err != nil {
20212 return nil, err
20213 }
20214 req.Header = reqHeaders
20215 googleapi.Expand(req.URL, map[string]string{
20216 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20217 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
20218 "targetingType": c.targetingType,
20219 })
20220 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20221 }
20222
20223
20224
20225
20226
20227
20228
20229 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
20230 gensupport.SetOptions(c.urlParams_, opts...)
20231 res, err := c.doRequest("json")
20232 if res != nil && res.StatusCode == http.StatusNotModified {
20233 if res.Body != nil {
20234 res.Body.Close()
20235 }
20236 return nil, gensupport.WrapError(&googleapi.Error{
20237 Code: res.StatusCode,
20238 Header: res.Header,
20239 })
20240 }
20241 if err != nil {
20242 return nil, err
20243 }
20244 defer googleapi.CloseBody(res)
20245 if err := googleapi.CheckResponse(res); err != nil {
20246 return nil, gensupport.WrapError(err)
20247 }
20248 ret := &AssignedTargetingOption{
20249 ServerResponse: googleapi.ServerResponse{
20250 Header: res.Header,
20251 HTTPStatusCode: res.StatusCode,
20252 },
20253 }
20254 target := &ret
20255 if err := gensupport.DecodeResponse(target, res); err != nil {
20256 return nil, err
20257 }
20258 return ret, nil
20259 }
20260
20261 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall struct {
20262 s *Service
20263 advertiserId int64
20264 insertionOrderId int64
20265 targetingType string
20266 assignedTargetingOptionId string
20267 urlParams_ gensupport.URLParams
20268 ctx_ context.Context
20269 header_ http.Header
20270 }
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall {
20300 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20301 c.advertiserId = advertiserId
20302 c.insertionOrderId = insertionOrderId
20303 c.targetingType = targetingType
20304 c.assignedTargetingOptionId = assignedTargetingOptionId
20305 return c
20306 }
20307
20308
20309
20310
20311 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall {
20312 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20313 return c
20314 }
20315
20316
20317 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall {
20318 c.ctx_ = ctx
20319 return c
20320 }
20321
20322
20323
20324 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header {
20325 if c.header_ == nil {
20326 c.header_ = make(http.Header)
20327 }
20328 return c.header_
20329 }
20330
20331 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
20332 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20333 var body io.Reader = nil
20334 c.urlParams_.Set("alt", alt)
20335 c.urlParams_.Set("prettyPrint", "false")
20336 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
20337 urls += "?" + c.urlParams_.Encode()
20338 req, err := http.NewRequest("DELETE", urls, body)
20339 if err != nil {
20340 return nil, err
20341 }
20342 req.Header = reqHeaders
20343 googleapi.Expand(req.URL, map[string]string{
20344 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20345 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
20346 "targetingType": c.targetingType,
20347 "assignedTargetingOptionId": c.assignedTargetingOptionId,
20348 })
20349 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20350 }
20351
20352
20353
20354
20355
20356
20357 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
20358 gensupport.SetOptions(c.urlParams_, opts...)
20359 res, err := c.doRequest("json")
20360 if res != nil && res.StatusCode == http.StatusNotModified {
20361 if res.Body != nil {
20362 res.Body.Close()
20363 }
20364 return nil, gensupport.WrapError(&googleapi.Error{
20365 Code: res.StatusCode,
20366 Header: res.Header,
20367 })
20368 }
20369 if err != nil {
20370 return nil, err
20371 }
20372 defer googleapi.CloseBody(res)
20373 if err := googleapi.CheckResponse(res); err != nil {
20374 return nil, gensupport.WrapError(err)
20375 }
20376 ret := &Empty{
20377 ServerResponse: googleapi.ServerResponse{
20378 Header: res.Header,
20379 HTTPStatusCode: res.StatusCode,
20380 },
20381 }
20382 target := &ret
20383 if err := gensupport.DecodeResponse(target, res); err != nil {
20384 return nil, err
20385 }
20386 return ret, nil
20387 }
20388
20389 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall struct {
20390 s *Service
20391 advertiserId int64
20392 insertionOrderId int64
20393 targetingType string
20394 assignedTargetingOptionId string
20395 urlParams_ gensupport.URLParams
20396 ifNoneMatch_ string
20397 ctx_ context.Context
20398 header_ http.Header
20399 }
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall {
20437 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20438 c.advertiserId = advertiserId
20439 c.insertionOrderId = insertionOrderId
20440 c.targetingType = targetingType
20441 c.assignedTargetingOptionId = assignedTargetingOptionId
20442 return c
20443 }
20444
20445
20446
20447
20448 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall {
20449 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20450 return c
20451 }
20452
20453
20454
20455
20456 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall {
20457 c.ifNoneMatch_ = entityTag
20458 return c
20459 }
20460
20461
20462 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall {
20463 c.ctx_ = ctx
20464 return c
20465 }
20466
20467
20468
20469 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
20470 if c.header_ == nil {
20471 c.header_ = make(http.Header)
20472 }
20473 return c.header_
20474 }
20475
20476 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
20477 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20478 if c.ifNoneMatch_ != "" {
20479 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20480 }
20481 var body io.Reader = nil
20482 c.urlParams_.Set("alt", alt)
20483 c.urlParams_.Set("prettyPrint", "false")
20484 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
20485 urls += "?" + c.urlParams_.Encode()
20486 req, err := http.NewRequest("GET", urls, body)
20487 if err != nil {
20488 return nil, err
20489 }
20490 req.Header = reqHeaders
20491 googleapi.Expand(req.URL, map[string]string{
20492 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20493 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
20494 "targetingType": c.targetingType,
20495 "assignedTargetingOptionId": c.assignedTargetingOptionId,
20496 })
20497 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20498 }
20499
20500
20501
20502
20503
20504
20505
20506 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
20507 gensupport.SetOptions(c.urlParams_, opts...)
20508 res, err := c.doRequest("json")
20509 if res != nil && res.StatusCode == http.StatusNotModified {
20510 if res.Body != nil {
20511 res.Body.Close()
20512 }
20513 return nil, gensupport.WrapError(&googleapi.Error{
20514 Code: res.StatusCode,
20515 Header: res.Header,
20516 })
20517 }
20518 if err != nil {
20519 return nil, err
20520 }
20521 defer googleapi.CloseBody(res)
20522 if err := googleapi.CheckResponse(res); err != nil {
20523 return nil, gensupport.WrapError(err)
20524 }
20525 ret := &AssignedTargetingOption{
20526 ServerResponse: googleapi.ServerResponse{
20527 Header: res.Header,
20528 HTTPStatusCode: res.StatusCode,
20529 },
20530 }
20531 target := &ret
20532 if err := gensupport.DecodeResponse(target, res); err != nil {
20533 return nil, err
20534 }
20535 return ret, nil
20536 }
20537
20538 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall struct {
20539 s *Service
20540 advertiserId int64
20541 insertionOrderId int64
20542 targetingType string
20543 urlParams_ gensupport.URLParams
20544 ifNoneMatch_ string
20545 ctx_ context.Context
20546 header_ http.Header
20547 }
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, insertionOrderId int64, targetingType string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
20582 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20583 c.advertiserId = advertiserId
20584 c.insertionOrderId = insertionOrderId
20585 c.targetingType = targetingType
20586 return c
20587 }
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
20603 c.urlParams_.Set("filter", filter)
20604 return c
20605 }
20606
20607
20608
20609
20610
20611
20612 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
20613 c.urlParams_.Set("orderBy", orderBy)
20614 return c
20615 }
20616
20617
20618
20619
20620 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
20621 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
20622 return c
20623 }
20624
20625
20626
20627
20628
20629
20630 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
20631 c.urlParams_.Set("pageToken", pageToken)
20632 return c
20633 }
20634
20635
20636
20637
20638 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
20639 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20640 return c
20641 }
20642
20643
20644
20645
20646 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
20647 c.ifNoneMatch_ = entityTag
20648 return c
20649 }
20650
20651
20652 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
20653 c.ctx_ = ctx
20654 return c
20655 }
20656
20657
20658
20659 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
20660 if c.header_ == nil {
20661 c.header_ = make(http.Header)
20662 }
20663 return c.header_
20664 }
20665
20666 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
20667 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20668 if c.ifNoneMatch_ != "" {
20669 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20670 }
20671 var body io.Reader = nil
20672 c.urlParams_.Set("alt", alt)
20673 c.urlParams_.Set("prettyPrint", "false")
20674 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
20675 urls += "?" + c.urlParams_.Encode()
20676 req, err := http.NewRequest("GET", urls, body)
20677 if err != nil {
20678 return nil, err
20679 }
20680 req.Header = reqHeaders
20681 googleapi.Expand(req.URL, map[string]string{
20682 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20683 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
20684 "targetingType": c.targetingType,
20685 })
20686 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20687 }
20688
20689
20690
20691
20692
20693
20694
20695 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrderAssignedTargetingOptionsResponse, error) {
20696 gensupport.SetOptions(c.urlParams_, opts...)
20697 res, err := c.doRequest("json")
20698 if res != nil && res.StatusCode == http.StatusNotModified {
20699 if res.Body != nil {
20700 res.Body.Close()
20701 }
20702 return nil, gensupport.WrapError(&googleapi.Error{
20703 Code: res.StatusCode,
20704 Header: res.Header,
20705 })
20706 }
20707 if err != nil {
20708 return nil, err
20709 }
20710 defer googleapi.CloseBody(res)
20711 if err := googleapi.CheckResponse(res); err != nil {
20712 return nil, gensupport.WrapError(err)
20713 }
20714 ret := &ListInsertionOrderAssignedTargetingOptionsResponse{
20715 ServerResponse: googleapi.ServerResponse{
20716 Header: res.Header,
20717 HTTPStatusCode: res.StatusCode,
20718 },
20719 }
20720 target := &ret
20721 if err := gensupport.DecodeResponse(target, res); err != nil {
20722 return nil, err
20723 }
20724 return ret, nil
20725 }
20726
20727
20728
20729
20730 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListInsertionOrderAssignedTargetingOptionsResponse) error) error {
20731 c.ctx_ = ctx
20732 defer c.PageToken(c.urlParams_.Get("pageToken"))
20733 for {
20734 x, err := c.Do()
20735 if err != nil {
20736 return err
20737 }
20738 if err := f(x); err != nil {
20739 return err
20740 }
20741 if x.NextPageToken == "" {
20742 return nil
20743 }
20744 c.PageToken(x.NextPageToken)
20745 }
20746 }
20747
20748 type AdvertisersInvoicesListCall struct {
20749 s *Service
20750 advertiserId int64
20751 urlParams_ gensupport.URLParams
20752 ifNoneMatch_ string
20753 ctx_ context.Context
20754 header_ http.Header
20755 }
20756
20757
20758
20759
20760
20761
20762 func (r *AdvertisersInvoicesService) List(advertiserId int64) *AdvertisersInvoicesListCall {
20763 c := &AdvertisersInvoicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20764 c.advertiserId = advertiserId
20765 return c
20766 }
20767
20768
20769
20770
20771 func (c *AdvertisersInvoicesListCall) IssueMonth(issueMonth string) *AdvertisersInvoicesListCall {
20772 c.urlParams_.Set("issueMonth", issueMonth)
20773 return c
20774 }
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785 func (c *AdvertisersInvoicesListCall) LoiSapinInvoiceType(loiSapinInvoiceType string) *AdvertisersInvoicesListCall {
20786 c.urlParams_.Set("loiSapinInvoiceType", loiSapinInvoiceType)
20787 return c
20788 }
20789
20790
20791
20792
20793 func (c *AdvertisersInvoicesListCall) PageSize(pageSize int64) *AdvertisersInvoicesListCall {
20794 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
20795 return c
20796 }
20797
20798
20799
20800
20801
20802 func (c *AdvertisersInvoicesListCall) PageToken(pageToken string) *AdvertisersInvoicesListCall {
20803 c.urlParams_.Set("pageToken", pageToken)
20804 return c
20805 }
20806
20807
20808
20809
20810 func (c *AdvertisersInvoicesListCall) Fields(s ...googleapi.Field) *AdvertisersInvoicesListCall {
20811 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20812 return c
20813 }
20814
20815
20816
20817
20818 func (c *AdvertisersInvoicesListCall) IfNoneMatch(entityTag string) *AdvertisersInvoicesListCall {
20819 c.ifNoneMatch_ = entityTag
20820 return c
20821 }
20822
20823
20824 func (c *AdvertisersInvoicesListCall) Context(ctx context.Context) *AdvertisersInvoicesListCall {
20825 c.ctx_ = ctx
20826 return c
20827 }
20828
20829
20830
20831 func (c *AdvertisersInvoicesListCall) Header() http.Header {
20832 if c.header_ == nil {
20833 c.header_ = make(http.Header)
20834 }
20835 return c.header_
20836 }
20837
20838 func (c *AdvertisersInvoicesListCall) doRequest(alt string) (*http.Response, error) {
20839 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20840 if c.ifNoneMatch_ != "" {
20841 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20842 }
20843 var body io.Reader = nil
20844 c.urlParams_.Set("alt", alt)
20845 c.urlParams_.Set("prettyPrint", "false")
20846 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/invoices")
20847 urls += "?" + c.urlParams_.Encode()
20848 req, err := http.NewRequest("GET", urls, body)
20849 if err != nil {
20850 return nil, err
20851 }
20852 req.Header = reqHeaders
20853 googleapi.Expand(req.URL, map[string]string{
20854 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20855 })
20856 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20857 }
20858
20859
20860
20861
20862
20863
20864
20865 func (c *AdvertisersInvoicesListCall) Do(opts ...googleapi.CallOption) (*ListInvoicesResponse, error) {
20866 gensupport.SetOptions(c.urlParams_, opts...)
20867 res, err := c.doRequest("json")
20868 if res != nil && res.StatusCode == http.StatusNotModified {
20869 if res.Body != nil {
20870 res.Body.Close()
20871 }
20872 return nil, gensupport.WrapError(&googleapi.Error{
20873 Code: res.StatusCode,
20874 Header: res.Header,
20875 })
20876 }
20877 if err != nil {
20878 return nil, err
20879 }
20880 defer googleapi.CloseBody(res)
20881 if err := googleapi.CheckResponse(res); err != nil {
20882 return nil, gensupport.WrapError(err)
20883 }
20884 ret := &ListInvoicesResponse{
20885 ServerResponse: googleapi.ServerResponse{
20886 Header: res.Header,
20887 HTTPStatusCode: res.StatusCode,
20888 },
20889 }
20890 target := &ret
20891 if err := gensupport.DecodeResponse(target, res); err != nil {
20892 return nil, err
20893 }
20894 return ret, nil
20895 }
20896
20897
20898
20899
20900 func (c *AdvertisersInvoicesListCall) Pages(ctx context.Context, f func(*ListInvoicesResponse) error) error {
20901 c.ctx_ = ctx
20902 defer c.PageToken(c.urlParams_.Get("pageToken"))
20903 for {
20904 x, err := c.Do()
20905 if err != nil {
20906 return err
20907 }
20908 if err := f(x); err != nil {
20909 return err
20910 }
20911 if x.NextPageToken == "" {
20912 return nil
20913 }
20914 c.PageToken(x.NextPageToken)
20915 }
20916 }
20917
20918 type AdvertisersInvoicesLookupInvoiceCurrencyCall struct {
20919 s *Service
20920 advertiserId int64
20921 urlParams_ gensupport.URLParams
20922 ifNoneMatch_ string
20923 ctx_ context.Context
20924 header_ http.Header
20925 }
20926
20927
20928
20929
20930
20931 func (r *AdvertisersInvoicesService) LookupInvoiceCurrency(advertiserId int64) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
20932 c := &AdvertisersInvoicesLookupInvoiceCurrencyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20933 c.advertiserId = advertiserId
20934 return c
20935 }
20936
20937
20938
20939
20940 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) InvoiceMonth(invoiceMonth string) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
20941 c.urlParams_.Set("invoiceMonth", invoiceMonth)
20942 return c
20943 }
20944
20945
20946
20947
20948 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Fields(s ...googleapi.Field) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
20949 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20950 return c
20951 }
20952
20953
20954
20955
20956 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) IfNoneMatch(entityTag string) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
20957 c.ifNoneMatch_ = entityTag
20958 return c
20959 }
20960
20961
20962 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Context(ctx context.Context) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
20963 c.ctx_ = ctx
20964 return c
20965 }
20966
20967
20968
20969 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Header() http.Header {
20970 if c.header_ == nil {
20971 c.header_ = make(http.Header)
20972 }
20973 return c.header_
20974 }
20975
20976 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) doRequest(alt string) (*http.Response, error) {
20977 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20978 if c.ifNoneMatch_ != "" {
20979 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20980 }
20981 var body io.Reader = nil
20982 c.urlParams_.Set("alt", alt)
20983 c.urlParams_.Set("prettyPrint", "false")
20984 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/invoices:lookupInvoiceCurrency")
20985 urls += "?" + c.urlParams_.Encode()
20986 req, err := http.NewRequest("GET", urls, body)
20987 if err != nil {
20988 return nil, err
20989 }
20990 req.Header = reqHeaders
20991 googleapi.Expand(req.URL, map[string]string{
20992 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20993 })
20994 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20995 }
20996
20997
20998
20999
21000
21001
21002
21003 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Do(opts ...googleapi.CallOption) (*LookupInvoiceCurrencyResponse, error) {
21004 gensupport.SetOptions(c.urlParams_, opts...)
21005 res, err := c.doRequest("json")
21006 if res != nil && res.StatusCode == http.StatusNotModified {
21007 if res.Body != nil {
21008 res.Body.Close()
21009 }
21010 return nil, gensupport.WrapError(&googleapi.Error{
21011 Code: res.StatusCode,
21012 Header: res.Header,
21013 })
21014 }
21015 if err != nil {
21016 return nil, err
21017 }
21018 defer googleapi.CloseBody(res)
21019 if err := googleapi.CheckResponse(res); err != nil {
21020 return nil, gensupport.WrapError(err)
21021 }
21022 ret := &LookupInvoiceCurrencyResponse{
21023 ServerResponse: googleapi.ServerResponse{
21024 Header: res.Header,
21025 HTTPStatusCode: res.StatusCode,
21026 },
21027 }
21028 target := &ret
21029 if err := gensupport.DecodeResponse(target, res); err != nil {
21030 return nil, err
21031 }
21032 return ret, nil
21033 }
21034
21035 type AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall struct {
21036 s *Service
21037 advertiserId int64
21038 bulkeditassignedtargetingoptionsrequest *BulkEditAssignedTargetingOptionsRequest
21039 urlParams_ gensupport.URLParams
21040 ctx_ context.Context
21041 header_ http.Header
21042 }
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055 func (r *AdvertisersLineItemsService) BulkEditAssignedTargetingOptions(advertiserId int64, bulkeditassignedtargetingoptionsrequest *BulkEditAssignedTargetingOptionsRequest) *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall {
21056 c := &AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21057 c.advertiserId = advertiserId
21058 c.bulkeditassignedtargetingoptionsrequest = bulkeditassignedtargetingoptionsrequest
21059 return c
21060 }
21061
21062
21063
21064
21065 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall {
21066 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21067 return c
21068 }
21069
21070
21071 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall {
21072 c.ctx_ = ctx
21073 return c
21074 }
21075
21076
21077
21078 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Header() http.Header {
21079 if c.header_ == nil {
21080 c.header_ = make(http.Header)
21081 }
21082 return c.header_
21083 }
21084
21085 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
21086 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21087 var body io.Reader = nil
21088 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassignedtargetingoptionsrequest)
21089 if err != nil {
21090 return nil, err
21091 }
21092 c.urlParams_.Set("alt", alt)
21093 c.urlParams_.Set("prettyPrint", "false")
21094 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems:bulkEditAssignedTargetingOptions")
21095 urls += "?" + c.urlParams_.Encode()
21096 req, err := http.NewRequest("POST", urls, body)
21097 if err != nil {
21098 return nil, err
21099 }
21100 req.Header = reqHeaders
21101 googleapi.Expand(req.URL, map[string]string{
21102 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21103 })
21104 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21105 }
21106
21107
21108
21109
21110
21111
21112
21113 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedTargetingOptionsResponse, error) {
21114 gensupport.SetOptions(c.urlParams_, opts...)
21115 res, err := c.doRequest("json")
21116 if res != nil && res.StatusCode == http.StatusNotModified {
21117 if res.Body != nil {
21118 res.Body.Close()
21119 }
21120 return nil, gensupport.WrapError(&googleapi.Error{
21121 Code: res.StatusCode,
21122 Header: res.Header,
21123 })
21124 }
21125 if err != nil {
21126 return nil, err
21127 }
21128 defer googleapi.CloseBody(res)
21129 if err := googleapi.CheckResponse(res); err != nil {
21130 return nil, gensupport.WrapError(err)
21131 }
21132 ret := &BulkEditAssignedTargetingOptionsResponse{
21133 ServerResponse: googleapi.ServerResponse{
21134 Header: res.Header,
21135 HTTPStatusCode: res.StatusCode,
21136 },
21137 }
21138 target := &ret
21139 if err := gensupport.DecodeResponse(target, res); err != nil {
21140 return nil, err
21141 }
21142 return ret, nil
21143 }
21144
21145 type AdvertisersLineItemsBulkListAssignedTargetingOptionsCall struct {
21146 s *Service
21147 advertiserId int64
21148 urlParams_ gensupport.URLParams
21149 ifNoneMatch_ string
21150 ctx_ context.Context
21151 header_ http.Header
21152 }
21153
21154
21155
21156
21157
21158 func (r *AdvertisersLineItemsService) BulkListAssignedTargetingOptions(advertiserId int64) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21159 c := &AdvertisersLineItemsBulkListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21160 c.advertiserId = advertiserId
21161 return c
21162 }
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21180 c.urlParams_.Set("filter", filter)
21181 return c
21182 }
21183
21184
21185
21186 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) LineItemIds(lineItemIds ...int64) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21187 var lineItemIds_ []string
21188 for _, v := range lineItemIds {
21189 lineItemIds_ = append(lineItemIds_, fmt.Sprint(v))
21190 }
21191 c.urlParams_.SetMulti("lineItemIds", lineItemIds_)
21192 return c
21193 }
21194
21195
21196
21197
21198
21199
21200 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21201 c.urlParams_.Set("orderBy", orderBy)
21202 return c
21203 }
21204
21205
21206
21207
21208
21209 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21210 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21211 return c
21212 }
21213
21214
21215
21216
21217
21218
21219 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21220 c.urlParams_.Set("pageToken", pageToken)
21221 return c
21222 }
21223
21224
21225
21226
21227 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21228 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21229 return c
21230 }
21231
21232
21233
21234
21235 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21236 c.ifNoneMatch_ = entityTag
21237 return c
21238 }
21239
21240
21241 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
21242 c.ctx_ = ctx
21243 return c
21244 }
21245
21246
21247
21248 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Header() http.Header {
21249 if c.header_ == nil {
21250 c.header_ = make(http.Header)
21251 }
21252 return c.header_
21253 }
21254
21255 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
21256 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21257 if c.ifNoneMatch_ != "" {
21258 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21259 }
21260 var body io.Reader = nil
21261 c.urlParams_.Set("alt", alt)
21262 c.urlParams_.Set("prettyPrint", "false")
21263 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems:bulkListAssignedTargetingOptions")
21264 urls += "?" + c.urlParams_.Encode()
21265 req, err := http.NewRequest("GET", urls, body)
21266 if err != nil {
21267 return nil, err
21268 }
21269 req.Header = reqHeaders
21270 googleapi.Expand(req.URL, map[string]string{
21271 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21272 })
21273 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21274 }
21275
21276
21277
21278
21279
21280
21281
21282 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListAssignedTargetingOptionsResponse, error) {
21283 gensupport.SetOptions(c.urlParams_, opts...)
21284 res, err := c.doRequest("json")
21285 if res != nil && res.StatusCode == http.StatusNotModified {
21286 if res.Body != nil {
21287 res.Body.Close()
21288 }
21289 return nil, gensupport.WrapError(&googleapi.Error{
21290 Code: res.StatusCode,
21291 Header: res.Header,
21292 })
21293 }
21294 if err != nil {
21295 return nil, err
21296 }
21297 defer googleapi.CloseBody(res)
21298 if err := googleapi.CheckResponse(res); err != nil {
21299 return nil, gensupport.WrapError(err)
21300 }
21301 ret := &BulkListAssignedTargetingOptionsResponse{
21302 ServerResponse: googleapi.ServerResponse{
21303 Header: res.Header,
21304 HTTPStatusCode: res.StatusCode,
21305 },
21306 }
21307 target := &ret
21308 if err := gensupport.DecodeResponse(target, res); err != nil {
21309 return nil, err
21310 }
21311 return ret, nil
21312 }
21313
21314
21315
21316
21317 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListAssignedTargetingOptionsResponse) error) error {
21318 c.ctx_ = ctx
21319 defer c.PageToken(c.urlParams_.Get("pageToken"))
21320 for {
21321 x, err := c.Do()
21322 if err != nil {
21323 return err
21324 }
21325 if err := f(x); err != nil {
21326 return err
21327 }
21328 if x.NextPageToken == "" {
21329 return nil
21330 }
21331 c.PageToken(x.NextPageToken)
21332 }
21333 }
21334
21335 type AdvertisersLineItemsBulkUpdateCall struct {
21336 s *Service
21337 advertiserId int64
21338 bulkupdatelineitemsrequest *BulkUpdateLineItemsRequest
21339 urlParams_ gensupport.URLParams
21340 ctx_ context.Context
21341 header_ http.Header
21342 }
21343
21344
21345
21346
21347
21348
21349
21350
21351 func (r *AdvertisersLineItemsService) BulkUpdate(advertiserId int64, bulkupdatelineitemsrequest *BulkUpdateLineItemsRequest) *AdvertisersLineItemsBulkUpdateCall {
21352 c := &AdvertisersLineItemsBulkUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21353 c.advertiserId = advertiserId
21354 c.bulkupdatelineitemsrequest = bulkupdatelineitemsrequest
21355 return c
21356 }
21357
21358
21359
21360
21361 func (c *AdvertisersLineItemsBulkUpdateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkUpdateCall {
21362 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21363 return c
21364 }
21365
21366
21367 func (c *AdvertisersLineItemsBulkUpdateCall) Context(ctx context.Context) *AdvertisersLineItemsBulkUpdateCall {
21368 c.ctx_ = ctx
21369 return c
21370 }
21371
21372
21373
21374 func (c *AdvertisersLineItemsBulkUpdateCall) Header() http.Header {
21375 if c.header_ == nil {
21376 c.header_ = make(http.Header)
21377 }
21378 return c.header_
21379 }
21380
21381 func (c *AdvertisersLineItemsBulkUpdateCall) doRequest(alt string) (*http.Response, error) {
21382 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21383 var body io.Reader = nil
21384 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkupdatelineitemsrequest)
21385 if err != nil {
21386 return nil, err
21387 }
21388 c.urlParams_.Set("alt", alt)
21389 c.urlParams_.Set("prettyPrint", "false")
21390 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems:bulkUpdate")
21391 urls += "?" + c.urlParams_.Encode()
21392 req, err := http.NewRequest("POST", urls, body)
21393 if err != nil {
21394 return nil, err
21395 }
21396 req.Header = reqHeaders
21397 googleapi.Expand(req.URL, map[string]string{
21398 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21399 })
21400 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21401 }
21402
21403
21404
21405
21406
21407
21408
21409 func (c *AdvertisersLineItemsBulkUpdateCall) Do(opts ...googleapi.CallOption) (*BulkUpdateLineItemsResponse, error) {
21410 gensupport.SetOptions(c.urlParams_, opts...)
21411 res, err := c.doRequest("json")
21412 if res != nil && res.StatusCode == http.StatusNotModified {
21413 if res.Body != nil {
21414 res.Body.Close()
21415 }
21416 return nil, gensupport.WrapError(&googleapi.Error{
21417 Code: res.StatusCode,
21418 Header: res.Header,
21419 })
21420 }
21421 if err != nil {
21422 return nil, err
21423 }
21424 defer googleapi.CloseBody(res)
21425 if err := googleapi.CheckResponse(res); err != nil {
21426 return nil, gensupport.WrapError(err)
21427 }
21428 ret := &BulkUpdateLineItemsResponse{
21429 ServerResponse: googleapi.ServerResponse{
21430 Header: res.Header,
21431 HTTPStatusCode: res.StatusCode,
21432 },
21433 }
21434 target := &ret
21435 if err := gensupport.DecodeResponse(target, res); err != nil {
21436 return nil, err
21437 }
21438 return ret, nil
21439 }
21440
21441 type AdvertisersLineItemsCreateCall struct {
21442 s *Service
21443 advertiserId int64
21444 lineitem *LineItem
21445 urlParams_ gensupport.URLParams
21446 ctx_ context.Context
21447 header_ http.Header
21448 }
21449
21450
21451
21452
21453
21454
21455
21456 func (r *AdvertisersLineItemsService) Create(advertiserId int64, lineitem *LineItem) *AdvertisersLineItemsCreateCall {
21457 c := &AdvertisersLineItemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21458 c.advertiserId = advertiserId
21459 c.lineitem = lineitem
21460 return c
21461 }
21462
21463
21464
21465
21466 func (c *AdvertisersLineItemsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsCreateCall {
21467 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21468 return c
21469 }
21470
21471
21472 func (c *AdvertisersLineItemsCreateCall) Context(ctx context.Context) *AdvertisersLineItemsCreateCall {
21473 c.ctx_ = ctx
21474 return c
21475 }
21476
21477
21478
21479 func (c *AdvertisersLineItemsCreateCall) Header() http.Header {
21480 if c.header_ == nil {
21481 c.header_ = make(http.Header)
21482 }
21483 return c.header_
21484 }
21485
21486 func (c *AdvertisersLineItemsCreateCall) doRequest(alt string) (*http.Response, error) {
21487 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21488 var body io.Reader = nil
21489 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lineitem)
21490 if err != nil {
21491 return nil, err
21492 }
21493 c.urlParams_.Set("alt", alt)
21494 c.urlParams_.Set("prettyPrint", "false")
21495 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems")
21496 urls += "?" + c.urlParams_.Encode()
21497 req, err := http.NewRequest("POST", urls, body)
21498 if err != nil {
21499 return nil, err
21500 }
21501 req.Header = reqHeaders
21502 googleapi.Expand(req.URL, map[string]string{
21503 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21504 })
21505 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21506 }
21507
21508
21509
21510
21511
21512
21513 func (c *AdvertisersLineItemsCreateCall) Do(opts ...googleapi.CallOption) (*LineItem, error) {
21514 gensupport.SetOptions(c.urlParams_, opts...)
21515 res, err := c.doRequest("json")
21516 if res != nil && res.StatusCode == http.StatusNotModified {
21517 if res.Body != nil {
21518 res.Body.Close()
21519 }
21520 return nil, gensupport.WrapError(&googleapi.Error{
21521 Code: res.StatusCode,
21522 Header: res.Header,
21523 })
21524 }
21525 if err != nil {
21526 return nil, err
21527 }
21528 defer googleapi.CloseBody(res)
21529 if err := googleapi.CheckResponse(res); err != nil {
21530 return nil, gensupport.WrapError(err)
21531 }
21532 ret := &LineItem{
21533 ServerResponse: googleapi.ServerResponse{
21534 Header: res.Header,
21535 HTTPStatusCode: res.StatusCode,
21536 },
21537 }
21538 target := &ret
21539 if err := gensupport.DecodeResponse(target, res); err != nil {
21540 return nil, err
21541 }
21542 return ret, nil
21543 }
21544
21545 type AdvertisersLineItemsDeleteCall struct {
21546 s *Service
21547 advertiserId int64
21548 lineItemId int64
21549 urlParams_ gensupport.URLParams
21550 ctx_ context.Context
21551 header_ http.Header
21552 }
21553
21554
21555
21556
21557
21558
21559
21560
21561 func (r *AdvertisersLineItemsService) Delete(advertiserId int64, lineItemId int64) *AdvertisersLineItemsDeleteCall {
21562 c := &AdvertisersLineItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21563 c.advertiserId = advertiserId
21564 c.lineItemId = lineItemId
21565 return c
21566 }
21567
21568
21569
21570
21571 func (c *AdvertisersLineItemsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsDeleteCall {
21572 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21573 return c
21574 }
21575
21576
21577 func (c *AdvertisersLineItemsDeleteCall) Context(ctx context.Context) *AdvertisersLineItemsDeleteCall {
21578 c.ctx_ = ctx
21579 return c
21580 }
21581
21582
21583
21584 func (c *AdvertisersLineItemsDeleteCall) Header() http.Header {
21585 if c.header_ == nil {
21586 c.header_ = make(http.Header)
21587 }
21588 return c.header_
21589 }
21590
21591 func (c *AdvertisersLineItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
21592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21593 var body io.Reader = nil
21594 c.urlParams_.Set("alt", alt)
21595 c.urlParams_.Set("prettyPrint", "false")
21596 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}")
21597 urls += "?" + c.urlParams_.Encode()
21598 req, err := http.NewRequest("DELETE", urls, body)
21599 if err != nil {
21600 return nil, err
21601 }
21602 req.Header = reqHeaders
21603 googleapi.Expand(req.URL, map[string]string{
21604 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21605 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
21606 })
21607 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21608 }
21609
21610
21611
21612
21613
21614
21615 func (c *AdvertisersLineItemsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
21616 gensupport.SetOptions(c.urlParams_, opts...)
21617 res, err := c.doRequest("json")
21618 if res != nil && res.StatusCode == http.StatusNotModified {
21619 if res.Body != nil {
21620 res.Body.Close()
21621 }
21622 return nil, gensupport.WrapError(&googleapi.Error{
21623 Code: res.StatusCode,
21624 Header: res.Header,
21625 })
21626 }
21627 if err != nil {
21628 return nil, err
21629 }
21630 defer googleapi.CloseBody(res)
21631 if err := googleapi.CheckResponse(res); err != nil {
21632 return nil, gensupport.WrapError(err)
21633 }
21634 ret := &Empty{
21635 ServerResponse: googleapi.ServerResponse{
21636 Header: res.Header,
21637 HTTPStatusCode: res.StatusCode,
21638 },
21639 }
21640 target := &ret
21641 if err := gensupport.DecodeResponse(target, res); err != nil {
21642 return nil, err
21643 }
21644 return ret, nil
21645 }
21646
21647 type AdvertisersLineItemsDuplicateCall struct {
21648 s *Service
21649 advertiserId int64
21650 lineItemId int64
21651 duplicatelineitemrequest *DuplicateLineItemRequest
21652 urlParams_ gensupport.URLParams
21653 ctx_ context.Context
21654 header_ http.Header
21655 }
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666 func (r *AdvertisersLineItemsService) Duplicate(advertiserId int64, lineItemId int64, duplicatelineitemrequest *DuplicateLineItemRequest) *AdvertisersLineItemsDuplicateCall {
21667 c := &AdvertisersLineItemsDuplicateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21668 c.advertiserId = advertiserId
21669 c.lineItemId = lineItemId
21670 c.duplicatelineitemrequest = duplicatelineitemrequest
21671 return c
21672 }
21673
21674
21675
21676
21677 func (c *AdvertisersLineItemsDuplicateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsDuplicateCall {
21678 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21679 return c
21680 }
21681
21682
21683 func (c *AdvertisersLineItemsDuplicateCall) Context(ctx context.Context) *AdvertisersLineItemsDuplicateCall {
21684 c.ctx_ = ctx
21685 return c
21686 }
21687
21688
21689
21690 func (c *AdvertisersLineItemsDuplicateCall) Header() http.Header {
21691 if c.header_ == nil {
21692 c.header_ = make(http.Header)
21693 }
21694 return c.header_
21695 }
21696
21697 func (c *AdvertisersLineItemsDuplicateCall) doRequest(alt string) (*http.Response, error) {
21698 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21699 var body io.Reader = nil
21700 body, err := googleapi.WithoutDataWrapper.JSONReader(c.duplicatelineitemrequest)
21701 if err != nil {
21702 return nil, err
21703 }
21704 c.urlParams_.Set("alt", alt)
21705 c.urlParams_.Set("prettyPrint", "false")
21706 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}:duplicate")
21707 urls += "?" + c.urlParams_.Encode()
21708 req, err := http.NewRequest("POST", urls, body)
21709 if err != nil {
21710 return nil, err
21711 }
21712 req.Header = reqHeaders
21713 googleapi.Expand(req.URL, map[string]string{
21714 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21715 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
21716 })
21717 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21718 }
21719
21720
21721
21722
21723
21724
21725
21726 func (c *AdvertisersLineItemsDuplicateCall) Do(opts ...googleapi.CallOption) (*DuplicateLineItemResponse, error) {
21727 gensupport.SetOptions(c.urlParams_, opts...)
21728 res, err := c.doRequest("json")
21729 if res != nil && res.StatusCode == http.StatusNotModified {
21730 if res.Body != nil {
21731 res.Body.Close()
21732 }
21733 return nil, gensupport.WrapError(&googleapi.Error{
21734 Code: res.StatusCode,
21735 Header: res.Header,
21736 })
21737 }
21738 if err != nil {
21739 return nil, err
21740 }
21741 defer googleapi.CloseBody(res)
21742 if err := googleapi.CheckResponse(res); err != nil {
21743 return nil, gensupport.WrapError(err)
21744 }
21745 ret := &DuplicateLineItemResponse{
21746 ServerResponse: googleapi.ServerResponse{
21747 Header: res.Header,
21748 HTTPStatusCode: res.StatusCode,
21749 },
21750 }
21751 target := &ret
21752 if err := gensupport.DecodeResponse(target, res); err != nil {
21753 return nil, err
21754 }
21755 return ret, nil
21756 }
21757
21758 type AdvertisersLineItemsGenerateDefaultCall struct {
21759 s *Service
21760 advertiserId int64
21761 generatedefaultlineitemrequest *GenerateDefaultLineItemRequest
21762 urlParams_ gensupport.URLParams
21763 ctx_ context.Context
21764 header_ http.Header
21765 }
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776 func (r *AdvertisersLineItemsService) GenerateDefault(advertiserId int64, generatedefaultlineitemrequest *GenerateDefaultLineItemRequest) *AdvertisersLineItemsGenerateDefaultCall {
21777 c := &AdvertisersLineItemsGenerateDefaultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21778 c.advertiserId = advertiserId
21779 c.generatedefaultlineitemrequest = generatedefaultlineitemrequest
21780 return c
21781 }
21782
21783
21784
21785
21786 func (c *AdvertisersLineItemsGenerateDefaultCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsGenerateDefaultCall {
21787 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21788 return c
21789 }
21790
21791
21792 func (c *AdvertisersLineItemsGenerateDefaultCall) Context(ctx context.Context) *AdvertisersLineItemsGenerateDefaultCall {
21793 c.ctx_ = ctx
21794 return c
21795 }
21796
21797
21798
21799 func (c *AdvertisersLineItemsGenerateDefaultCall) Header() http.Header {
21800 if c.header_ == nil {
21801 c.header_ = make(http.Header)
21802 }
21803 return c.header_
21804 }
21805
21806 func (c *AdvertisersLineItemsGenerateDefaultCall) doRequest(alt string) (*http.Response, error) {
21807 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21808 var body io.Reader = nil
21809 body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatedefaultlineitemrequest)
21810 if err != nil {
21811 return nil, err
21812 }
21813 c.urlParams_.Set("alt", alt)
21814 c.urlParams_.Set("prettyPrint", "false")
21815 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems:generateDefault")
21816 urls += "?" + c.urlParams_.Encode()
21817 req, err := http.NewRequest("POST", urls, body)
21818 if err != nil {
21819 return nil, err
21820 }
21821 req.Header = reqHeaders
21822 googleapi.Expand(req.URL, map[string]string{
21823 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21824 })
21825 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21826 }
21827
21828
21829
21830
21831
21832
21833 func (c *AdvertisersLineItemsGenerateDefaultCall) Do(opts ...googleapi.CallOption) (*LineItem, error) {
21834 gensupport.SetOptions(c.urlParams_, opts...)
21835 res, err := c.doRequest("json")
21836 if res != nil && res.StatusCode == http.StatusNotModified {
21837 if res.Body != nil {
21838 res.Body.Close()
21839 }
21840 return nil, gensupport.WrapError(&googleapi.Error{
21841 Code: res.StatusCode,
21842 Header: res.Header,
21843 })
21844 }
21845 if err != nil {
21846 return nil, err
21847 }
21848 defer googleapi.CloseBody(res)
21849 if err := googleapi.CheckResponse(res); err != nil {
21850 return nil, gensupport.WrapError(err)
21851 }
21852 ret := &LineItem{
21853 ServerResponse: googleapi.ServerResponse{
21854 Header: res.Header,
21855 HTTPStatusCode: res.StatusCode,
21856 },
21857 }
21858 target := &ret
21859 if err := gensupport.DecodeResponse(target, res); err != nil {
21860 return nil, err
21861 }
21862 return ret, nil
21863 }
21864
21865 type AdvertisersLineItemsGetCall struct {
21866 s *Service
21867 advertiserId int64
21868 lineItemId int64
21869 urlParams_ gensupport.URLParams
21870 ifNoneMatch_ string
21871 ctx_ context.Context
21872 header_ http.Header
21873 }
21874
21875
21876
21877
21878
21879 func (r *AdvertisersLineItemsService) Get(advertiserId int64, lineItemId int64) *AdvertisersLineItemsGetCall {
21880 c := &AdvertisersLineItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21881 c.advertiserId = advertiserId
21882 c.lineItemId = lineItemId
21883 return c
21884 }
21885
21886
21887
21888
21889 func (c *AdvertisersLineItemsGetCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsGetCall {
21890 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21891 return c
21892 }
21893
21894
21895
21896
21897 func (c *AdvertisersLineItemsGetCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsGetCall {
21898 c.ifNoneMatch_ = entityTag
21899 return c
21900 }
21901
21902
21903 func (c *AdvertisersLineItemsGetCall) Context(ctx context.Context) *AdvertisersLineItemsGetCall {
21904 c.ctx_ = ctx
21905 return c
21906 }
21907
21908
21909
21910 func (c *AdvertisersLineItemsGetCall) Header() http.Header {
21911 if c.header_ == nil {
21912 c.header_ = make(http.Header)
21913 }
21914 return c.header_
21915 }
21916
21917 func (c *AdvertisersLineItemsGetCall) doRequest(alt string) (*http.Response, error) {
21918 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21919 if c.ifNoneMatch_ != "" {
21920 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21921 }
21922 var body io.Reader = nil
21923 c.urlParams_.Set("alt", alt)
21924 c.urlParams_.Set("prettyPrint", "false")
21925 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}")
21926 urls += "?" + c.urlParams_.Encode()
21927 req, err := http.NewRequest("GET", urls, body)
21928 if err != nil {
21929 return nil, err
21930 }
21931 req.Header = reqHeaders
21932 googleapi.Expand(req.URL, map[string]string{
21933 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21934 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
21935 })
21936 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21937 }
21938
21939
21940
21941
21942
21943
21944 func (c *AdvertisersLineItemsGetCall) Do(opts ...googleapi.CallOption) (*LineItem, error) {
21945 gensupport.SetOptions(c.urlParams_, opts...)
21946 res, err := c.doRequest("json")
21947 if res != nil && res.StatusCode == http.StatusNotModified {
21948 if res.Body != nil {
21949 res.Body.Close()
21950 }
21951 return nil, gensupport.WrapError(&googleapi.Error{
21952 Code: res.StatusCode,
21953 Header: res.Header,
21954 })
21955 }
21956 if err != nil {
21957 return nil, err
21958 }
21959 defer googleapi.CloseBody(res)
21960 if err := googleapi.CheckResponse(res); err != nil {
21961 return nil, gensupport.WrapError(err)
21962 }
21963 ret := &LineItem{
21964 ServerResponse: googleapi.ServerResponse{
21965 Header: res.Header,
21966 HTTPStatusCode: res.StatusCode,
21967 },
21968 }
21969 target := &ret
21970 if err := gensupport.DecodeResponse(target, res); err != nil {
21971 return nil, err
21972 }
21973 return ret, nil
21974 }
21975
21976 type AdvertisersLineItemsListCall struct {
21977 s *Service
21978 advertiserId int64
21979 urlParams_ gensupport.URLParams
21980 ifNoneMatch_ string
21981 ctx_ context.Context
21982 header_ http.Header
21983 }
21984
21985
21986
21987
21988
21989
21990 func (r *AdvertisersLineItemsService) List(advertiserId int64) *AdvertisersLineItemsListCall {
21991 c := &AdvertisersLineItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21992 c.advertiserId = advertiserId
21993 return c
21994 }
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017 func (c *AdvertisersLineItemsListCall) Filter(filter string) *AdvertisersLineItemsListCall {
22018 c.urlParams_.Set("filter", filter)
22019 return c
22020 }
22021
22022
22023
22024
22025
22026
22027 func (c *AdvertisersLineItemsListCall) OrderBy(orderBy string) *AdvertisersLineItemsListCall {
22028 c.urlParams_.Set("orderBy", orderBy)
22029 return c
22030 }
22031
22032
22033
22034
22035 func (c *AdvertisersLineItemsListCall) PageSize(pageSize int64) *AdvertisersLineItemsListCall {
22036 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22037 return c
22038 }
22039
22040
22041
22042
22043
22044 func (c *AdvertisersLineItemsListCall) PageToken(pageToken string) *AdvertisersLineItemsListCall {
22045 c.urlParams_.Set("pageToken", pageToken)
22046 return c
22047 }
22048
22049
22050
22051
22052 func (c *AdvertisersLineItemsListCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsListCall {
22053 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22054 return c
22055 }
22056
22057
22058
22059
22060 func (c *AdvertisersLineItemsListCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsListCall {
22061 c.ifNoneMatch_ = entityTag
22062 return c
22063 }
22064
22065
22066 func (c *AdvertisersLineItemsListCall) Context(ctx context.Context) *AdvertisersLineItemsListCall {
22067 c.ctx_ = ctx
22068 return c
22069 }
22070
22071
22072
22073 func (c *AdvertisersLineItemsListCall) Header() http.Header {
22074 if c.header_ == nil {
22075 c.header_ = make(http.Header)
22076 }
22077 return c.header_
22078 }
22079
22080 func (c *AdvertisersLineItemsListCall) doRequest(alt string) (*http.Response, error) {
22081 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22082 if c.ifNoneMatch_ != "" {
22083 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22084 }
22085 var body io.Reader = nil
22086 c.urlParams_.Set("alt", alt)
22087 c.urlParams_.Set("prettyPrint", "false")
22088 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems")
22089 urls += "?" + c.urlParams_.Encode()
22090 req, err := http.NewRequest("GET", urls, body)
22091 if err != nil {
22092 return nil, err
22093 }
22094 req.Header = reqHeaders
22095 googleapi.Expand(req.URL, map[string]string{
22096 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22097 })
22098 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22099 }
22100
22101
22102
22103
22104
22105
22106
22107 func (c *AdvertisersLineItemsListCall) Do(opts ...googleapi.CallOption) (*ListLineItemsResponse, error) {
22108 gensupport.SetOptions(c.urlParams_, opts...)
22109 res, err := c.doRequest("json")
22110 if res != nil && res.StatusCode == http.StatusNotModified {
22111 if res.Body != nil {
22112 res.Body.Close()
22113 }
22114 return nil, gensupport.WrapError(&googleapi.Error{
22115 Code: res.StatusCode,
22116 Header: res.Header,
22117 })
22118 }
22119 if err != nil {
22120 return nil, err
22121 }
22122 defer googleapi.CloseBody(res)
22123 if err := googleapi.CheckResponse(res); err != nil {
22124 return nil, gensupport.WrapError(err)
22125 }
22126 ret := &ListLineItemsResponse{
22127 ServerResponse: googleapi.ServerResponse{
22128 Header: res.Header,
22129 HTTPStatusCode: res.StatusCode,
22130 },
22131 }
22132 target := &ret
22133 if err := gensupport.DecodeResponse(target, res); err != nil {
22134 return nil, err
22135 }
22136 return ret, nil
22137 }
22138
22139
22140
22141
22142 func (c *AdvertisersLineItemsListCall) Pages(ctx context.Context, f func(*ListLineItemsResponse) error) error {
22143 c.ctx_ = ctx
22144 defer c.PageToken(c.urlParams_.Get("pageToken"))
22145 for {
22146 x, err := c.Do()
22147 if err != nil {
22148 return err
22149 }
22150 if err := f(x); err != nil {
22151 return err
22152 }
22153 if x.NextPageToken == "" {
22154 return nil
22155 }
22156 c.PageToken(x.NextPageToken)
22157 }
22158 }
22159
22160 type AdvertisersLineItemsPatchCall struct {
22161 s *Service
22162 advertiserId int64
22163 lineItemId int64
22164 lineitem *LineItem
22165 urlParams_ gensupport.URLParams
22166 ctx_ context.Context
22167 header_ http.Header
22168 }
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185 func (r *AdvertisersLineItemsService) Patch(advertiserId int64, lineItemId int64, lineitem *LineItem) *AdvertisersLineItemsPatchCall {
22186 c := &AdvertisersLineItemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22187 c.advertiserId = advertiserId
22188 c.lineItemId = lineItemId
22189 c.lineitem = lineitem
22190 return c
22191 }
22192
22193
22194
22195 func (c *AdvertisersLineItemsPatchCall) UpdateMask(updateMask string) *AdvertisersLineItemsPatchCall {
22196 c.urlParams_.Set("updateMask", updateMask)
22197 return c
22198 }
22199
22200
22201
22202
22203 func (c *AdvertisersLineItemsPatchCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsPatchCall {
22204 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22205 return c
22206 }
22207
22208
22209 func (c *AdvertisersLineItemsPatchCall) Context(ctx context.Context) *AdvertisersLineItemsPatchCall {
22210 c.ctx_ = ctx
22211 return c
22212 }
22213
22214
22215
22216 func (c *AdvertisersLineItemsPatchCall) Header() http.Header {
22217 if c.header_ == nil {
22218 c.header_ = make(http.Header)
22219 }
22220 return c.header_
22221 }
22222
22223 func (c *AdvertisersLineItemsPatchCall) doRequest(alt string) (*http.Response, error) {
22224 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22225 var body io.Reader = nil
22226 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lineitem)
22227 if err != nil {
22228 return nil, err
22229 }
22230 c.urlParams_.Set("alt", alt)
22231 c.urlParams_.Set("prettyPrint", "false")
22232 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}")
22233 urls += "?" + c.urlParams_.Encode()
22234 req, err := http.NewRequest("PATCH", urls, body)
22235 if err != nil {
22236 return nil, err
22237 }
22238 req.Header = reqHeaders
22239 googleapi.Expand(req.URL, map[string]string{
22240 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22241 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
22242 })
22243 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22244 }
22245
22246
22247
22248
22249
22250
22251 func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineItem, error) {
22252 gensupport.SetOptions(c.urlParams_, opts...)
22253 res, err := c.doRequest("json")
22254 if res != nil && res.StatusCode == http.StatusNotModified {
22255 if res.Body != nil {
22256 res.Body.Close()
22257 }
22258 return nil, gensupport.WrapError(&googleapi.Error{
22259 Code: res.StatusCode,
22260 Header: res.Header,
22261 })
22262 }
22263 if err != nil {
22264 return nil, err
22265 }
22266 defer googleapi.CloseBody(res)
22267 if err := googleapi.CheckResponse(res); err != nil {
22268 return nil, gensupport.WrapError(err)
22269 }
22270 ret := &LineItem{
22271 ServerResponse: googleapi.ServerResponse{
22272 Header: res.Header,
22273 HTTPStatusCode: res.StatusCode,
22274 },
22275 }
22276 target := &ret
22277 if err := gensupport.DecodeResponse(target, res); err != nil {
22278 return nil, err
22279 }
22280 return ret, nil
22281 }
22282
22283 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall struct {
22284 s *Service
22285 advertiserId int64
22286 lineItemId int64
22287 targetingType string
22288 assignedtargetingoption *AssignedTargetingOption
22289 urlParams_ gensupport.URLParams
22290 ctx_ context.Context
22291 header_ http.Header
22292 }
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, lineItemId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall {
22332 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22333 c.advertiserId = advertiserId
22334 c.lineItemId = lineItemId
22335 c.targetingType = targetingType
22336 c.assignedtargetingoption = assignedtargetingoption
22337 return c
22338 }
22339
22340
22341
22342
22343 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall {
22344 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22345 return c
22346 }
22347
22348
22349 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall {
22350 c.ctx_ = ctx
22351 return c
22352 }
22353
22354
22355
22356 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header {
22357 if c.header_ == nil {
22358 c.header_ = make(http.Header)
22359 }
22360 return c.header_
22361 }
22362
22363 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) {
22364 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22365 var body io.Reader = nil
22366 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption)
22367 if err != nil {
22368 return nil, err
22369 }
22370 c.urlParams_.Set("alt", alt)
22371 c.urlParams_.Set("prettyPrint", "false")
22372 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
22373 urls += "?" + c.urlParams_.Encode()
22374 req, err := http.NewRequest("POST", urls, body)
22375 if err != nil {
22376 return nil, err
22377 }
22378 req.Header = reqHeaders
22379 googleapi.Expand(req.URL, map[string]string{
22380 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22381 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
22382 "targetingType": c.targetingType,
22383 })
22384 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22385 }
22386
22387
22388
22389
22390
22391
22392
22393 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
22394 gensupport.SetOptions(c.urlParams_, opts...)
22395 res, err := c.doRequest("json")
22396 if res != nil && res.StatusCode == http.StatusNotModified {
22397 if res.Body != nil {
22398 res.Body.Close()
22399 }
22400 return nil, gensupport.WrapError(&googleapi.Error{
22401 Code: res.StatusCode,
22402 Header: res.Header,
22403 })
22404 }
22405 if err != nil {
22406 return nil, err
22407 }
22408 defer googleapi.CloseBody(res)
22409 if err := googleapi.CheckResponse(res); err != nil {
22410 return nil, gensupport.WrapError(err)
22411 }
22412 ret := &AssignedTargetingOption{
22413 ServerResponse: googleapi.ServerResponse{
22414 Header: res.Header,
22415 HTTPStatusCode: res.StatusCode,
22416 },
22417 }
22418 target := &ret
22419 if err := gensupport.DecodeResponse(target, res); err != nil {
22420 return nil, err
22421 }
22422 return ret, nil
22423 }
22424
22425 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall struct {
22426 s *Service
22427 advertiserId int64
22428 lineItemId int64
22429 targetingType string
22430 assignedTargetingOptionId string
22431 urlParams_ gensupport.URLParams
22432 ctx_ context.Context
22433 header_ http.Header
22434 }
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, lineItemId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall {
22476 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22477 c.advertiserId = advertiserId
22478 c.lineItemId = lineItemId
22479 c.targetingType = targetingType
22480 c.assignedTargetingOptionId = assignedTargetingOptionId
22481 return c
22482 }
22483
22484
22485
22486
22487 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall {
22488 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22489 return c
22490 }
22491
22492
22493 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall {
22494 c.ctx_ = ctx
22495 return c
22496 }
22497
22498
22499
22500 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header {
22501 if c.header_ == nil {
22502 c.header_ = make(http.Header)
22503 }
22504 return c.header_
22505 }
22506
22507 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
22508 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22509 var body io.Reader = nil
22510 c.urlParams_.Set("alt", alt)
22511 c.urlParams_.Set("prettyPrint", "false")
22512 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
22513 urls += "?" + c.urlParams_.Encode()
22514 req, err := http.NewRequest("DELETE", urls, body)
22515 if err != nil {
22516 return nil, err
22517 }
22518 req.Header = reqHeaders
22519 googleapi.Expand(req.URL, map[string]string{
22520 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22521 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
22522 "targetingType": c.targetingType,
22523 "assignedTargetingOptionId": c.assignedTargetingOptionId,
22524 })
22525 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22526 }
22527
22528
22529
22530
22531
22532
22533 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
22534 gensupport.SetOptions(c.urlParams_, opts...)
22535 res, err := c.doRequest("json")
22536 if res != nil && res.StatusCode == http.StatusNotModified {
22537 if res.Body != nil {
22538 res.Body.Close()
22539 }
22540 return nil, gensupport.WrapError(&googleapi.Error{
22541 Code: res.StatusCode,
22542 Header: res.Header,
22543 })
22544 }
22545 if err != nil {
22546 return nil, err
22547 }
22548 defer googleapi.CloseBody(res)
22549 if err := googleapi.CheckResponse(res); err != nil {
22550 return nil, gensupport.WrapError(err)
22551 }
22552 ret := &Empty{
22553 ServerResponse: googleapi.ServerResponse{
22554 Header: res.Header,
22555 HTTPStatusCode: res.StatusCode,
22556 },
22557 }
22558 target := &ret
22559 if err := gensupport.DecodeResponse(target, res); err != nil {
22560 return nil, err
22561 }
22562 return ret, nil
22563 }
22564
22565 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall struct {
22566 s *Service
22567 advertiserId int64
22568 lineItemId int64
22569 targetingType string
22570 assignedTargetingOptionId string
22571 urlParams_ gensupport.URLParams
22572 ifNoneMatch_ string
22573 ctx_ context.Context
22574 header_ http.Header
22575 }
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, lineItemId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall {
22617 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22618 c.advertiserId = advertiserId
22619 c.lineItemId = lineItemId
22620 c.targetingType = targetingType
22621 c.assignedTargetingOptionId = assignedTargetingOptionId
22622 return c
22623 }
22624
22625
22626
22627
22628 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall {
22629 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22630 return c
22631 }
22632
22633
22634
22635
22636 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall {
22637 c.ifNoneMatch_ = entityTag
22638 return c
22639 }
22640
22641
22642 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall {
22643 c.ctx_ = ctx
22644 return c
22645 }
22646
22647
22648
22649 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
22650 if c.header_ == nil {
22651 c.header_ = make(http.Header)
22652 }
22653 return c.header_
22654 }
22655
22656 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
22657 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22658 if c.ifNoneMatch_ != "" {
22659 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22660 }
22661 var body io.Reader = nil
22662 c.urlParams_.Set("alt", alt)
22663 c.urlParams_.Set("prettyPrint", "false")
22664 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
22665 urls += "?" + c.urlParams_.Encode()
22666 req, err := http.NewRequest("GET", urls, body)
22667 if err != nil {
22668 return nil, err
22669 }
22670 req.Header = reqHeaders
22671 googleapi.Expand(req.URL, map[string]string{
22672 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22673 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
22674 "targetingType": c.targetingType,
22675 "assignedTargetingOptionId": c.assignedTargetingOptionId,
22676 })
22677 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22678 }
22679
22680
22681
22682
22683
22684
22685
22686 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
22687 gensupport.SetOptions(c.urlParams_, opts...)
22688 res, err := c.doRequest("json")
22689 if res != nil && res.StatusCode == http.StatusNotModified {
22690 if res.Body != nil {
22691 res.Body.Close()
22692 }
22693 return nil, gensupport.WrapError(&googleapi.Error{
22694 Code: res.StatusCode,
22695 Header: res.Header,
22696 })
22697 }
22698 if err != nil {
22699 return nil, err
22700 }
22701 defer googleapi.CloseBody(res)
22702 if err := googleapi.CheckResponse(res); err != nil {
22703 return nil, gensupport.WrapError(err)
22704 }
22705 ret := &AssignedTargetingOption{
22706 ServerResponse: googleapi.ServerResponse{
22707 Header: res.Header,
22708 HTTPStatusCode: res.StatusCode,
22709 },
22710 }
22711 target := &ret
22712 if err := gensupport.DecodeResponse(target, res); err != nil {
22713 return nil, err
22714 }
22715 return ret, nil
22716 }
22717
22718 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall struct {
22719 s *Service
22720 advertiserId int64
22721 lineItemId int64
22722 targetingType string
22723 urlParams_ gensupport.URLParams
22724 ifNoneMatch_ string
22725 ctx_ context.Context
22726 header_ http.Header
22727 }
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, lineItemId int64, targetingType string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
22766 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22767 c.advertiserId = advertiserId
22768 c.lineItemId = lineItemId
22769 c.targetingType = targetingType
22770 return c
22771 }
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
22787 c.urlParams_.Set("filter", filter)
22788 return c
22789 }
22790
22791
22792
22793
22794
22795
22796 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
22797 c.urlParams_.Set("orderBy", orderBy)
22798 return c
22799 }
22800
22801
22802
22803
22804 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
22805 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22806 return c
22807 }
22808
22809
22810
22811
22812
22813
22814 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
22815 c.urlParams_.Set("pageToken", pageToken)
22816 return c
22817 }
22818
22819
22820
22821
22822 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
22823 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22824 return c
22825 }
22826
22827
22828
22829
22830 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
22831 c.ifNoneMatch_ = entityTag
22832 return c
22833 }
22834
22835
22836 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
22837 c.ctx_ = ctx
22838 return c
22839 }
22840
22841
22842
22843 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
22844 if c.header_ == nil {
22845 c.header_ = make(http.Header)
22846 }
22847 return c.header_
22848 }
22849
22850 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
22851 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22852 if c.ifNoneMatch_ != "" {
22853 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22854 }
22855 var body io.Reader = nil
22856 c.urlParams_.Set("alt", alt)
22857 c.urlParams_.Set("prettyPrint", "false")
22858 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
22859 urls += "?" + c.urlParams_.Encode()
22860 req, err := http.NewRequest("GET", urls, body)
22861 if err != nil {
22862 return nil, err
22863 }
22864 req.Header = reqHeaders
22865 googleapi.Expand(req.URL, map[string]string{
22866 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22867 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
22868 "targetingType": c.targetingType,
22869 })
22870 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22871 }
22872
22873
22874
22875
22876
22877
22878
22879 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListLineItemAssignedTargetingOptionsResponse, error) {
22880 gensupport.SetOptions(c.urlParams_, opts...)
22881 res, err := c.doRequest("json")
22882 if res != nil && res.StatusCode == http.StatusNotModified {
22883 if res.Body != nil {
22884 res.Body.Close()
22885 }
22886 return nil, gensupport.WrapError(&googleapi.Error{
22887 Code: res.StatusCode,
22888 Header: res.Header,
22889 })
22890 }
22891 if err != nil {
22892 return nil, err
22893 }
22894 defer googleapi.CloseBody(res)
22895 if err := googleapi.CheckResponse(res); err != nil {
22896 return nil, gensupport.WrapError(err)
22897 }
22898 ret := &ListLineItemAssignedTargetingOptionsResponse{
22899 ServerResponse: googleapi.ServerResponse{
22900 Header: res.Header,
22901 HTTPStatusCode: res.StatusCode,
22902 },
22903 }
22904 target := &ret
22905 if err := gensupport.DecodeResponse(target, res); err != nil {
22906 return nil, err
22907 }
22908 return ret, nil
22909 }
22910
22911
22912
22913
22914 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListLineItemAssignedTargetingOptionsResponse) error) error {
22915 c.ctx_ = ctx
22916 defer c.PageToken(c.urlParams_.Get("pageToken"))
22917 for {
22918 x, err := c.Do()
22919 if err != nil {
22920 return err
22921 }
22922 if err := f(x); err != nil {
22923 return err
22924 }
22925 if x.NextPageToken == "" {
22926 return nil
22927 }
22928 c.PageToken(x.NextPageToken)
22929 }
22930 }
22931
22932 type AdvertisersLocationListsCreateCall struct {
22933 s *Service
22934 advertiserId int64
22935 locationlist *LocationList
22936 urlParams_ gensupport.URLParams
22937 ctx_ context.Context
22938 header_ http.Header
22939 }
22940
22941
22942
22943
22944
22945
22946 func (r *AdvertisersLocationListsService) Create(advertiserId int64, locationlist *LocationList) *AdvertisersLocationListsCreateCall {
22947 c := &AdvertisersLocationListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22948 c.advertiserId = advertiserId
22949 c.locationlist = locationlist
22950 return c
22951 }
22952
22953
22954
22955
22956 func (c *AdvertisersLocationListsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsCreateCall {
22957 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22958 return c
22959 }
22960
22961
22962 func (c *AdvertisersLocationListsCreateCall) Context(ctx context.Context) *AdvertisersLocationListsCreateCall {
22963 c.ctx_ = ctx
22964 return c
22965 }
22966
22967
22968
22969 func (c *AdvertisersLocationListsCreateCall) Header() http.Header {
22970 if c.header_ == nil {
22971 c.header_ = make(http.Header)
22972 }
22973 return c.header_
22974 }
22975
22976 func (c *AdvertisersLocationListsCreateCall) doRequest(alt string) (*http.Response, error) {
22977 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22978 var body io.Reader = nil
22979 body, err := googleapi.WithoutDataWrapper.JSONReader(c.locationlist)
22980 if err != nil {
22981 return nil, err
22982 }
22983 c.urlParams_.Set("alt", alt)
22984 c.urlParams_.Set("prettyPrint", "false")
22985 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/locationLists")
22986 urls += "?" + c.urlParams_.Encode()
22987 req, err := http.NewRequest("POST", urls, body)
22988 if err != nil {
22989 return nil, err
22990 }
22991 req.Header = reqHeaders
22992 googleapi.Expand(req.URL, map[string]string{
22993 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22994 })
22995 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22996 }
22997
22998
22999
23000
23001
23002
23003 func (c *AdvertisersLocationListsCreateCall) Do(opts ...googleapi.CallOption) (*LocationList, error) {
23004 gensupport.SetOptions(c.urlParams_, opts...)
23005 res, err := c.doRequest("json")
23006 if res != nil && res.StatusCode == http.StatusNotModified {
23007 if res.Body != nil {
23008 res.Body.Close()
23009 }
23010 return nil, gensupport.WrapError(&googleapi.Error{
23011 Code: res.StatusCode,
23012 Header: res.Header,
23013 })
23014 }
23015 if err != nil {
23016 return nil, err
23017 }
23018 defer googleapi.CloseBody(res)
23019 if err := googleapi.CheckResponse(res); err != nil {
23020 return nil, gensupport.WrapError(err)
23021 }
23022 ret := &LocationList{
23023 ServerResponse: googleapi.ServerResponse{
23024 Header: res.Header,
23025 HTTPStatusCode: res.StatusCode,
23026 },
23027 }
23028 target := &ret
23029 if err := gensupport.DecodeResponse(target, res); err != nil {
23030 return nil, err
23031 }
23032 return ret, nil
23033 }
23034
23035 type AdvertisersLocationListsGetCall struct {
23036 s *Service
23037 advertiserId int64
23038 locationListId int64
23039 urlParams_ gensupport.URLParams
23040 ifNoneMatch_ string
23041 ctx_ context.Context
23042 header_ http.Header
23043 }
23044
23045
23046
23047
23048
23049
23050 func (r *AdvertisersLocationListsService) Get(advertiserId int64, locationListId int64) *AdvertisersLocationListsGetCall {
23051 c := &AdvertisersLocationListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23052 c.advertiserId = advertiserId
23053 c.locationListId = locationListId
23054 return c
23055 }
23056
23057
23058
23059
23060 func (c *AdvertisersLocationListsGetCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsGetCall {
23061 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23062 return c
23063 }
23064
23065
23066
23067
23068 func (c *AdvertisersLocationListsGetCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsGetCall {
23069 c.ifNoneMatch_ = entityTag
23070 return c
23071 }
23072
23073
23074 func (c *AdvertisersLocationListsGetCall) Context(ctx context.Context) *AdvertisersLocationListsGetCall {
23075 c.ctx_ = ctx
23076 return c
23077 }
23078
23079
23080
23081 func (c *AdvertisersLocationListsGetCall) Header() http.Header {
23082 if c.header_ == nil {
23083 c.header_ = make(http.Header)
23084 }
23085 return c.header_
23086 }
23087
23088 func (c *AdvertisersLocationListsGetCall) doRequest(alt string) (*http.Response, error) {
23089 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23090 if c.ifNoneMatch_ != "" {
23091 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23092 }
23093 var body io.Reader = nil
23094 c.urlParams_.Set("alt", alt)
23095 c.urlParams_.Set("prettyPrint", "false")
23096 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/locationLists/{+locationListId}")
23097 urls += "?" + c.urlParams_.Encode()
23098 req, err := http.NewRequest("GET", urls, body)
23099 if err != nil {
23100 return nil, err
23101 }
23102 req.Header = reqHeaders
23103 googleapi.Expand(req.URL, map[string]string{
23104 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23105 "locationListId": strconv.FormatInt(c.locationListId, 10),
23106 })
23107 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23108 }
23109
23110
23111
23112
23113
23114
23115 func (c *AdvertisersLocationListsGetCall) Do(opts ...googleapi.CallOption) (*LocationList, error) {
23116 gensupport.SetOptions(c.urlParams_, opts...)
23117 res, err := c.doRequest("json")
23118 if res != nil && res.StatusCode == http.StatusNotModified {
23119 if res.Body != nil {
23120 res.Body.Close()
23121 }
23122 return nil, gensupport.WrapError(&googleapi.Error{
23123 Code: res.StatusCode,
23124 Header: res.Header,
23125 })
23126 }
23127 if err != nil {
23128 return nil, err
23129 }
23130 defer googleapi.CloseBody(res)
23131 if err := googleapi.CheckResponse(res); err != nil {
23132 return nil, gensupport.WrapError(err)
23133 }
23134 ret := &LocationList{
23135 ServerResponse: googleapi.ServerResponse{
23136 Header: res.Header,
23137 HTTPStatusCode: res.StatusCode,
23138 },
23139 }
23140 target := &ret
23141 if err := gensupport.DecodeResponse(target, res); err != nil {
23142 return nil, err
23143 }
23144 return ret, nil
23145 }
23146
23147 type AdvertisersLocationListsListCall struct {
23148 s *Service
23149 advertiserId int64
23150 urlParams_ gensupport.URLParams
23151 ifNoneMatch_ string
23152 ctx_ context.Context
23153 header_ http.Header
23154 }
23155
23156
23157
23158
23159
23160 func (r *AdvertisersLocationListsService) List(advertiserId int64) *AdvertisersLocationListsListCall {
23161 c := &AdvertisersLocationListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23162 c.advertiserId = advertiserId
23163 return c
23164 }
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177 func (c *AdvertisersLocationListsListCall) Filter(filter string) *AdvertisersLocationListsListCall {
23178 c.urlParams_.Set("filter", filter)
23179 return c
23180 }
23181
23182
23183
23184
23185
23186
23187 func (c *AdvertisersLocationListsListCall) OrderBy(orderBy string) *AdvertisersLocationListsListCall {
23188 c.urlParams_.Set("orderBy", orderBy)
23189 return c
23190 }
23191
23192
23193
23194
23195 func (c *AdvertisersLocationListsListCall) PageSize(pageSize int64) *AdvertisersLocationListsListCall {
23196 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23197 return c
23198 }
23199
23200
23201
23202
23203
23204 func (c *AdvertisersLocationListsListCall) PageToken(pageToken string) *AdvertisersLocationListsListCall {
23205 c.urlParams_.Set("pageToken", pageToken)
23206 return c
23207 }
23208
23209
23210
23211
23212 func (c *AdvertisersLocationListsListCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsListCall {
23213 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23214 return c
23215 }
23216
23217
23218
23219
23220 func (c *AdvertisersLocationListsListCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsListCall {
23221 c.ifNoneMatch_ = entityTag
23222 return c
23223 }
23224
23225
23226 func (c *AdvertisersLocationListsListCall) Context(ctx context.Context) *AdvertisersLocationListsListCall {
23227 c.ctx_ = ctx
23228 return c
23229 }
23230
23231
23232
23233 func (c *AdvertisersLocationListsListCall) Header() http.Header {
23234 if c.header_ == nil {
23235 c.header_ = make(http.Header)
23236 }
23237 return c.header_
23238 }
23239
23240 func (c *AdvertisersLocationListsListCall) doRequest(alt string) (*http.Response, error) {
23241 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23242 if c.ifNoneMatch_ != "" {
23243 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23244 }
23245 var body io.Reader = nil
23246 c.urlParams_.Set("alt", alt)
23247 c.urlParams_.Set("prettyPrint", "false")
23248 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/locationLists")
23249 urls += "?" + c.urlParams_.Encode()
23250 req, err := http.NewRequest("GET", urls, body)
23251 if err != nil {
23252 return nil, err
23253 }
23254 req.Header = reqHeaders
23255 googleapi.Expand(req.URL, map[string]string{
23256 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23257 })
23258 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23259 }
23260
23261
23262
23263
23264
23265
23266
23267 func (c *AdvertisersLocationListsListCall) Do(opts ...googleapi.CallOption) (*ListLocationListsResponse, error) {
23268 gensupport.SetOptions(c.urlParams_, opts...)
23269 res, err := c.doRequest("json")
23270 if res != nil && res.StatusCode == http.StatusNotModified {
23271 if res.Body != nil {
23272 res.Body.Close()
23273 }
23274 return nil, gensupport.WrapError(&googleapi.Error{
23275 Code: res.StatusCode,
23276 Header: res.Header,
23277 })
23278 }
23279 if err != nil {
23280 return nil, err
23281 }
23282 defer googleapi.CloseBody(res)
23283 if err := googleapi.CheckResponse(res); err != nil {
23284 return nil, gensupport.WrapError(err)
23285 }
23286 ret := &ListLocationListsResponse{
23287 ServerResponse: googleapi.ServerResponse{
23288 Header: res.Header,
23289 HTTPStatusCode: res.StatusCode,
23290 },
23291 }
23292 target := &ret
23293 if err := gensupport.DecodeResponse(target, res); err != nil {
23294 return nil, err
23295 }
23296 return ret, nil
23297 }
23298
23299
23300
23301
23302 func (c *AdvertisersLocationListsListCall) Pages(ctx context.Context, f func(*ListLocationListsResponse) error) error {
23303 c.ctx_ = ctx
23304 defer c.PageToken(c.urlParams_.Get("pageToken"))
23305 for {
23306 x, err := c.Do()
23307 if err != nil {
23308 return err
23309 }
23310 if err := f(x); err != nil {
23311 return err
23312 }
23313 if x.NextPageToken == "" {
23314 return nil
23315 }
23316 c.PageToken(x.NextPageToken)
23317 }
23318 }
23319
23320 type AdvertisersLocationListsPatchCall struct {
23321 s *Service
23322 advertiserId int64
23323 locationListId int64
23324 locationlist *LocationList
23325 urlParams_ gensupport.URLParams
23326 ctx_ context.Context
23327 header_ http.Header
23328 }
23329
23330
23331
23332
23333
23334
23335
23336
23337 func (r *AdvertisersLocationListsService) Patch(advertiserId int64, locationListId int64, locationlist *LocationList) *AdvertisersLocationListsPatchCall {
23338 c := &AdvertisersLocationListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23339 c.advertiserId = advertiserId
23340 c.locationListId = locationListId
23341 c.locationlist = locationlist
23342 return c
23343 }
23344
23345
23346
23347 func (c *AdvertisersLocationListsPatchCall) UpdateMask(updateMask string) *AdvertisersLocationListsPatchCall {
23348 c.urlParams_.Set("updateMask", updateMask)
23349 return c
23350 }
23351
23352
23353
23354
23355 func (c *AdvertisersLocationListsPatchCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsPatchCall {
23356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23357 return c
23358 }
23359
23360
23361 func (c *AdvertisersLocationListsPatchCall) Context(ctx context.Context) *AdvertisersLocationListsPatchCall {
23362 c.ctx_ = ctx
23363 return c
23364 }
23365
23366
23367
23368 func (c *AdvertisersLocationListsPatchCall) Header() http.Header {
23369 if c.header_ == nil {
23370 c.header_ = make(http.Header)
23371 }
23372 return c.header_
23373 }
23374
23375 func (c *AdvertisersLocationListsPatchCall) doRequest(alt string) (*http.Response, error) {
23376 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23377 var body io.Reader = nil
23378 body, err := googleapi.WithoutDataWrapper.JSONReader(c.locationlist)
23379 if err != nil {
23380 return nil, err
23381 }
23382 c.urlParams_.Set("alt", alt)
23383 c.urlParams_.Set("prettyPrint", "false")
23384 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/locationLists/{locationListId}")
23385 urls += "?" + c.urlParams_.Encode()
23386 req, err := http.NewRequest("PATCH", urls, body)
23387 if err != nil {
23388 return nil, err
23389 }
23390 req.Header = reqHeaders
23391 googleapi.Expand(req.URL, map[string]string{
23392 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23393 "locationListId": strconv.FormatInt(c.locationListId, 10),
23394 })
23395 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23396 }
23397
23398
23399
23400
23401
23402
23403 func (c *AdvertisersLocationListsPatchCall) Do(opts ...googleapi.CallOption) (*LocationList, error) {
23404 gensupport.SetOptions(c.urlParams_, opts...)
23405 res, err := c.doRequest("json")
23406 if res != nil && res.StatusCode == http.StatusNotModified {
23407 if res.Body != nil {
23408 res.Body.Close()
23409 }
23410 return nil, gensupport.WrapError(&googleapi.Error{
23411 Code: res.StatusCode,
23412 Header: res.Header,
23413 })
23414 }
23415 if err != nil {
23416 return nil, err
23417 }
23418 defer googleapi.CloseBody(res)
23419 if err := googleapi.CheckResponse(res); err != nil {
23420 return nil, gensupport.WrapError(err)
23421 }
23422 ret := &LocationList{
23423 ServerResponse: googleapi.ServerResponse{
23424 Header: res.Header,
23425 HTTPStatusCode: res.StatusCode,
23426 },
23427 }
23428 target := &ret
23429 if err := gensupport.DecodeResponse(target, res); err != nil {
23430 return nil, err
23431 }
23432 return ret, nil
23433 }
23434
23435 type AdvertisersLocationListsAssignedLocationsBulkEditCall struct {
23436 s *Service
23437 advertiserId int64
23438 locationListId int64
23439 bulkeditassignedlocationsrequest *BulkEditAssignedLocationsRequest
23440 urlParams_ gensupport.URLParams
23441 ctx_ context.Context
23442 header_ http.Header
23443 }
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454 func (r *AdvertisersLocationListsAssignedLocationsService) BulkEdit(advertiserId int64, locationListId int64, bulkeditassignedlocationsrequest *BulkEditAssignedLocationsRequest) *AdvertisersLocationListsAssignedLocationsBulkEditCall {
23455 c := &AdvertisersLocationListsAssignedLocationsBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23456 c.advertiserId = advertiserId
23457 c.locationListId = locationListId
23458 c.bulkeditassignedlocationsrequest = bulkeditassignedlocationsrequest
23459 return c
23460 }
23461
23462
23463
23464
23465 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsBulkEditCall {
23466 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23467 return c
23468 }
23469
23470
23471 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsBulkEditCall {
23472 c.ctx_ = ctx
23473 return c
23474 }
23475
23476
23477
23478 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Header() http.Header {
23479 if c.header_ == nil {
23480 c.header_ = make(http.Header)
23481 }
23482 return c.header_
23483 }
23484
23485 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) doRequest(alt string) (*http.Response, error) {
23486 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23487 var body io.Reader = nil
23488 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassignedlocationsrequest)
23489 if err != nil {
23490 return nil, err
23491 }
23492 c.urlParams_.Set("alt", alt)
23493 c.urlParams_.Set("prettyPrint", "false")
23494 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/locationLists/{+locationListId}/assignedLocations:bulkEdit")
23495 urls += "?" + c.urlParams_.Encode()
23496 req, err := http.NewRequest("POST", urls, body)
23497 if err != nil {
23498 return nil, err
23499 }
23500 req.Header = reqHeaders
23501 googleapi.Expand(req.URL, map[string]string{
23502 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23503 "locationListId": strconv.FormatInt(c.locationListId, 10),
23504 })
23505 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23506 }
23507
23508
23509
23510
23511
23512
23513
23514 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedLocationsResponse, error) {
23515 gensupport.SetOptions(c.urlParams_, opts...)
23516 res, err := c.doRequest("json")
23517 if res != nil && res.StatusCode == http.StatusNotModified {
23518 if res.Body != nil {
23519 res.Body.Close()
23520 }
23521 return nil, gensupport.WrapError(&googleapi.Error{
23522 Code: res.StatusCode,
23523 Header: res.Header,
23524 })
23525 }
23526 if err != nil {
23527 return nil, err
23528 }
23529 defer googleapi.CloseBody(res)
23530 if err := googleapi.CheckResponse(res); err != nil {
23531 return nil, gensupport.WrapError(err)
23532 }
23533 ret := &BulkEditAssignedLocationsResponse{
23534 ServerResponse: googleapi.ServerResponse{
23535 Header: res.Header,
23536 HTTPStatusCode: res.StatusCode,
23537 },
23538 }
23539 target := &ret
23540 if err := gensupport.DecodeResponse(target, res); err != nil {
23541 return nil, err
23542 }
23543 return ret, nil
23544 }
23545
23546 type AdvertisersLocationListsAssignedLocationsCreateCall struct {
23547 s *Service
23548 advertiserId int64
23549 locationListId int64
23550 assignedlocation *AssignedLocation
23551 urlParams_ gensupport.URLParams
23552 ctx_ context.Context
23553 header_ http.Header
23554 }
23555
23556
23557
23558
23559
23560
23561
23562 func (r *AdvertisersLocationListsAssignedLocationsService) Create(advertiserId int64, locationListId int64, assignedlocation *AssignedLocation) *AdvertisersLocationListsAssignedLocationsCreateCall {
23563 c := &AdvertisersLocationListsAssignedLocationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23564 c.advertiserId = advertiserId
23565 c.locationListId = locationListId
23566 c.assignedlocation = assignedlocation
23567 return c
23568 }
23569
23570
23571
23572
23573 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsCreateCall {
23574 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23575 return c
23576 }
23577
23578
23579 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsCreateCall {
23580 c.ctx_ = ctx
23581 return c
23582 }
23583
23584
23585
23586 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Header() http.Header {
23587 if c.header_ == nil {
23588 c.header_ = make(http.Header)
23589 }
23590 return c.header_
23591 }
23592
23593 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) doRequest(alt string) (*http.Response, error) {
23594 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23595 var body io.Reader = nil
23596 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedlocation)
23597 if err != nil {
23598 return nil, err
23599 }
23600 c.urlParams_.Set("alt", alt)
23601 c.urlParams_.Set("prettyPrint", "false")
23602 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations")
23603 urls += "?" + c.urlParams_.Encode()
23604 req, err := http.NewRequest("POST", urls, body)
23605 if err != nil {
23606 return nil, err
23607 }
23608 req.Header = reqHeaders
23609 googleapi.Expand(req.URL, map[string]string{
23610 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23611 "locationListId": strconv.FormatInt(c.locationListId, 10),
23612 })
23613 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23614 }
23615
23616
23617
23618
23619
23620
23621
23622 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedLocation, error) {
23623 gensupport.SetOptions(c.urlParams_, opts...)
23624 res, err := c.doRequest("json")
23625 if res != nil && res.StatusCode == http.StatusNotModified {
23626 if res.Body != nil {
23627 res.Body.Close()
23628 }
23629 return nil, gensupport.WrapError(&googleapi.Error{
23630 Code: res.StatusCode,
23631 Header: res.Header,
23632 })
23633 }
23634 if err != nil {
23635 return nil, err
23636 }
23637 defer googleapi.CloseBody(res)
23638 if err := googleapi.CheckResponse(res); err != nil {
23639 return nil, gensupport.WrapError(err)
23640 }
23641 ret := &AssignedLocation{
23642 ServerResponse: googleapi.ServerResponse{
23643 Header: res.Header,
23644 HTTPStatusCode: res.StatusCode,
23645 },
23646 }
23647 target := &ret
23648 if err := gensupport.DecodeResponse(target, res); err != nil {
23649 return nil, err
23650 }
23651 return ret, nil
23652 }
23653
23654 type AdvertisersLocationListsAssignedLocationsDeleteCall struct {
23655 s *Service
23656 advertiserId int64
23657 locationListId int64
23658 assignedLocationId int64
23659 urlParams_ gensupport.URLParams
23660 ctx_ context.Context
23661 header_ http.Header
23662 }
23663
23664
23665
23666
23667
23668
23669
23670
23671 func (r *AdvertisersLocationListsAssignedLocationsService) Delete(advertiserId int64, locationListId int64, assignedLocationId int64) *AdvertisersLocationListsAssignedLocationsDeleteCall {
23672 c := &AdvertisersLocationListsAssignedLocationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23673 c.advertiserId = advertiserId
23674 c.locationListId = locationListId
23675 c.assignedLocationId = assignedLocationId
23676 return c
23677 }
23678
23679
23680
23681
23682 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsDeleteCall {
23683 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23684 return c
23685 }
23686
23687
23688 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsDeleteCall {
23689 c.ctx_ = ctx
23690 return c
23691 }
23692
23693
23694
23695 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Header() http.Header {
23696 if c.header_ == nil {
23697 c.header_ = make(http.Header)
23698 }
23699 return c.header_
23700 }
23701
23702 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) doRequest(alt string) (*http.Response, error) {
23703 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23704 var body io.Reader = nil
23705 c.urlParams_.Set("alt", alt)
23706 c.urlParams_.Set("prettyPrint", "false")
23707 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations/{+assignedLocationId}")
23708 urls += "?" + c.urlParams_.Encode()
23709 req, err := http.NewRequest("DELETE", urls, body)
23710 if err != nil {
23711 return nil, err
23712 }
23713 req.Header = reqHeaders
23714 googleapi.Expand(req.URL, map[string]string{
23715 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23716 "locationListId": strconv.FormatInt(c.locationListId, 10),
23717 "assignedLocationId": strconv.FormatInt(c.assignedLocationId, 10),
23718 })
23719 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23720 }
23721
23722
23723
23724
23725
23726
23727 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
23728 gensupport.SetOptions(c.urlParams_, opts...)
23729 res, err := c.doRequest("json")
23730 if res != nil && res.StatusCode == http.StatusNotModified {
23731 if res.Body != nil {
23732 res.Body.Close()
23733 }
23734 return nil, gensupport.WrapError(&googleapi.Error{
23735 Code: res.StatusCode,
23736 Header: res.Header,
23737 })
23738 }
23739 if err != nil {
23740 return nil, err
23741 }
23742 defer googleapi.CloseBody(res)
23743 if err := googleapi.CheckResponse(res); err != nil {
23744 return nil, gensupport.WrapError(err)
23745 }
23746 ret := &Empty{
23747 ServerResponse: googleapi.ServerResponse{
23748 Header: res.Header,
23749 HTTPStatusCode: res.StatusCode,
23750 },
23751 }
23752 target := &ret
23753 if err := gensupport.DecodeResponse(target, res); err != nil {
23754 return nil, err
23755 }
23756 return ret, nil
23757 }
23758
23759 type AdvertisersLocationListsAssignedLocationsListCall struct {
23760 s *Service
23761 advertiserId int64
23762 locationListId int64
23763 urlParams_ gensupport.URLParams
23764 ifNoneMatch_ string
23765 ctx_ context.Context
23766 header_ http.Header
23767 }
23768
23769
23770
23771
23772
23773
23774
23775 func (r *AdvertisersLocationListsAssignedLocationsService) List(advertiserId int64, locationListId int64) *AdvertisersLocationListsAssignedLocationsListCall {
23776 c := &AdvertisersLocationListsAssignedLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23777 c.advertiserId = advertiserId
23778 c.locationListId = locationListId
23779 return c
23780 }
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790 func (c *AdvertisersLocationListsAssignedLocationsListCall) Filter(filter string) *AdvertisersLocationListsAssignedLocationsListCall {
23791 c.urlParams_.Set("filter", filter)
23792 return c
23793 }
23794
23795
23796
23797
23798
23799
23800 func (c *AdvertisersLocationListsAssignedLocationsListCall) OrderBy(orderBy string) *AdvertisersLocationListsAssignedLocationsListCall {
23801 c.urlParams_.Set("orderBy", orderBy)
23802 return c
23803 }
23804
23805
23806
23807
23808 func (c *AdvertisersLocationListsAssignedLocationsListCall) PageSize(pageSize int64) *AdvertisersLocationListsAssignedLocationsListCall {
23809 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23810 return c
23811 }
23812
23813
23814
23815
23816
23817 func (c *AdvertisersLocationListsAssignedLocationsListCall) PageToken(pageToken string) *AdvertisersLocationListsAssignedLocationsListCall {
23818 c.urlParams_.Set("pageToken", pageToken)
23819 return c
23820 }
23821
23822
23823
23824
23825 func (c *AdvertisersLocationListsAssignedLocationsListCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsListCall {
23826 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23827 return c
23828 }
23829
23830
23831
23832
23833 func (c *AdvertisersLocationListsAssignedLocationsListCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsAssignedLocationsListCall {
23834 c.ifNoneMatch_ = entityTag
23835 return c
23836 }
23837
23838
23839 func (c *AdvertisersLocationListsAssignedLocationsListCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsListCall {
23840 c.ctx_ = ctx
23841 return c
23842 }
23843
23844
23845
23846 func (c *AdvertisersLocationListsAssignedLocationsListCall) Header() http.Header {
23847 if c.header_ == nil {
23848 c.header_ = make(http.Header)
23849 }
23850 return c.header_
23851 }
23852
23853 func (c *AdvertisersLocationListsAssignedLocationsListCall) doRequest(alt string) (*http.Response, error) {
23854 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23855 if c.ifNoneMatch_ != "" {
23856 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23857 }
23858 var body io.Reader = nil
23859 c.urlParams_.Set("alt", alt)
23860 c.urlParams_.Set("prettyPrint", "false")
23861 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations")
23862 urls += "?" + c.urlParams_.Encode()
23863 req, err := http.NewRequest("GET", urls, body)
23864 if err != nil {
23865 return nil, err
23866 }
23867 req.Header = reqHeaders
23868 googleapi.Expand(req.URL, map[string]string{
23869 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23870 "locationListId": strconv.FormatInt(c.locationListId, 10),
23871 })
23872 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23873 }
23874
23875
23876
23877
23878
23879
23880
23881 func (c *AdvertisersLocationListsAssignedLocationsListCall) Do(opts ...googleapi.CallOption) (*ListAssignedLocationsResponse, error) {
23882 gensupport.SetOptions(c.urlParams_, opts...)
23883 res, err := c.doRequest("json")
23884 if res != nil && res.StatusCode == http.StatusNotModified {
23885 if res.Body != nil {
23886 res.Body.Close()
23887 }
23888 return nil, gensupport.WrapError(&googleapi.Error{
23889 Code: res.StatusCode,
23890 Header: res.Header,
23891 })
23892 }
23893 if err != nil {
23894 return nil, err
23895 }
23896 defer googleapi.CloseBody(res)
23897 if err := googleapi.CheckResponse(res); err != nil {
23898 return nil, gensupport.WrapError(err)
23899 }
23900 ret := &ListAssignedLocationsResponse{
23901 ServerResponse: googleapi.ServerResponse{
23902 Header: res.Header,
23903 HTTPStatusCode: res.StatusCode,
23904 },
23905 }
23906 target := &ret
23907 if err := gensupport.DecodeResponse(target, res); err != nil {
23908 return nil, err
23909 }
23910 return ret, nil
23911 }
23912
23913
23914
23915
23916 func (c *AdvertisersLocationListsAssignedLocationsListCall) Pages(ctx context.Context, f func(*ListAssignedLocationsResponse) error) error {
23917 c.ctx_ = ctx
23918 defer c.PageToken(c.urlParams_.Get("pageToken"))
23919 for {
23920 x, err := c.Do()
23921 if err != nil {
23922 return err
23923 }
23924 if err := f(x); err != nil {
23925 return err
23926 }
23927 if x.NextPageToken == "" {
23928 return nil
23929 }
23930 c.PageToken(x.NextPageToken)
23931 }
23932 }
23933
23934 type AdvertisersManualTriggersActivateCall struct {
23935 s *Service
23936 advertiserId int64
23937 triggerId int64
23938 activatemanualtriggerrequest *ActivateManualTriggerRequest
23939 urlParams_ gensupport.URLParams
23940 ctx_ context.Context
23941 header_ http.Header
23942 }
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954 func (r *AdvertisersManualTriggersService) Activate(advertiserId int64, triggerId int64, activatemanualtriggerrequest *ActivateManualTriggerRequest) *AdvertisersManualTriggersActivateCall {
23955 c := &AdvertisersManualTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23956 c.advertiserId = advertiserId
23957 c.triggerId = triggerId
23958 c.activatemanualtriggerrequest = activatemanualtriggerrequest
23959 return c
23960 }
23961
23962
23963
23964
23965 func (c *AdvertisersManualTriggersActivateCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersActivateCall {
23966 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23967 return c
23968 }
23969
23970
23971 func (c *AdvertisersManualTriggersActivateCall) Context(ctx context.Context) *AdvertisersManualTriggersActivateCall {
23972 c.ctx_ = ctx
23973 return c
23974 }
23975
23976
23977
23978 func (c *AdvertisersManualTriggersActivateCall) Header() http.Header {
23979 if c.header_ == nil {
23980 c.header_ = make(http.Header)
23981 }
23982 return c.header_
23983 }
23984
23985 func (c *AdvertisersManualTriggersActivateCall) doRequest(alt string) (*http.Response, error) {
23986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23987 var body io.Reader = nil
23988 body, err := googleapi.WithoutDataWrapper.JSONReader(c.activatemanualtriggerrequest)
23989 if err != nil {
23990 return nil, err
23991 }
23992 c.urlParams_.Set("alt", alt)
23993 c.urlParams_.Set("prettyPrint", "false")
23994 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/manualTriggers/{+triggerId}:activate")
23995 urls += "?" + c.urlParams_.Encode()
23996 req, err := http.NewRequest("POST", urls, body)
23997 if err != nil {
23998 return nil, err
23999 }
24000 req.Header = reqHeaders
24001 googleapi.Expand(req.URL, map[string]string{
24002 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24003 "triggerId": strconv.FormatInt(c.triggerId, 10),
24004 })
24005 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24006 }
24007
24008
24009
24010
24011
24012
24013 func (c *AdvertisersManualTriggersActivateCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) {
24014 gensupport.SetOptions(c.urlParams_, opts...)
24015 res, err := c.doRequest("json")
24016 if res != nil && res.StatusCode == http.StatusNotModified {
24017 if res.Body != nil {
24018 res.Body.Close()
24019 }
24020 return nil, gensupport.WrapError(&googleapi.Error{
24021 Code: res.StatusCode,
24022 Header: res.Header,
24023 })
24024 }
24025 if err != nil {
24026 return nil, err
24027 }
24028 defer googleapi.CloseBody(res)
24029 if err := googleapi.CheckResponse(res); err != nil {
24030 return nil, gensupport.WrapError(err)
24031 }
24032 ret := &ManualTrigger{
24033 ServerResponse: googleapi.ServerResponse{
24034 Header: res.Header,
24035 HTTPStatusCode: res.StatusCode,
24036 },
24037 }
24038 target := &ret
24039 if err := gensupport.DecodeResponse(target, res); err != nil {
24040 return nil, err
24041 }
24042 return ret, nil
24043 }
24044
24045 type AdvertisersManualTriggersCreateCall struct {
24046 s *Service
24047 advertiserId int64
24048 manualtrigger *ManualTrigger
24049 urlParams_ gensupport.URLParams
24050 ctx_ context.Context
24051 header_ http.Header
24052 }
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063 func (r *AdvertisersManualTriggersService) Create(advertiserId int64, manualtrigger *ManualTrigger) *AdvertisersManualTriggersCreateCall {
24064 c := &AdvertisersManualTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24065 c.advertiserId = advertiserId
24066 c.manualtrigger = manualtrigger
24067 return c
24068 }
24069
24070
24071
24072
24073 func (c *AdvertisersManualTriggersCreateCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersCreateCall {
24074 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24075 return c
24076 }
24077
24078
24079 func (c *AdvertisersManualTriggersCreateCall) Context(ctx context.Context) *AdvertisersManualTriggersCreateCall {
24080 c.ctx_ = ctx
24081 return c
24082 }
24083
24084
24085
24086 func (c *AdvertisersManualTriggersCreateCall) Header() http.Header {
24087 if c.header_ == nil {
24088 c.header_ = make(http.Header)
24089 }
24090 return c.header_
24091 }
24092
24093 func (c *AdvertisersManualTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
24094 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24095 var body io.Reader = nil
24096 body, err := googleapi.WithoutDataWrapper.JSONReader(c.manualtrigger)
24097 if err != nil {
24098 return nil, err
24099 }
24100 c.urlParams_.Set("alt", alt)
24101 c.urlParams_.Set("prettyPrint", "false")
24102 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/manualTriggers")
24103 urls += "?" + c.urlParams_.Encode()
24104 req, err := http.NewRequest("POST", urls, body)
24105 if err != nil {
24106 return nil, err
24107 }
24108 req.Header = reqHeaders
24109 googleapi.Expand(req.URL, map[string]string{
24110 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24111 })
24112 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24113 }
24114
24115
24116
24117
24118
24119
24120 func (c *AdvertisersManualTriggersCreateCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) {
24121 gensupport.SetOptions(c.urlParams_, opts...)
24122 res, err := c.doRequest("json")
24123 if res != nil && res.StatusCode == http.StatusNotModified {
24124 if res.Body != nil {
24125 res.Body.Close()
24126 }
24127 return nil, gensupport.WrapError(&googleapi.Error{
24128 Code: res.StatusCode,
24129 Header: res.Header,
24130 })
24131 }
24132 if err != nil {
24133 return nil, err
24134 }
24135 defer googleapi.CloseBody(res)
24136 if err := googleapi.CheckResponse(res); err != nil {
24137 return nil, gensupport.WrapError(err)
24138 }
24139 ret := &ManualTrigger{
24140 ServerResponse: googleapi.ServerResponse{
24141 Header: res.Header,
24142 HTTPStatusCode: res.StatusCode,
24143 },
24144 }
24145 target := &ret
24146 if err := gensupport.DecodeResponse(target, res); err != nil {
24147 return nil, err
24148 }
24149 return ret, nil
24150 }
24151
24152 type AdvertisersManualTriggersDeactivateCall struct {
24153 s *Service
24154 advertiserId int64
24155 triggerId int64
24156 deactivatemanualtriggerrequest *DeactivateManualTriggerRequest
24157 urlParams_ gensupport.URLParams
24158 ctx_ context.Context
24159 header_ http.Header
24160 }
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170 func (r *AdvertisersManualTriggersService) Deactivate(advertiserId int64, triggerId int64, deactivatemanualtriggerrequest *DeactivateManualTriggerRequest) *AdvertisersManualTriggersDeactivateCall {
24171 c := &AdvertisersManualTriggersDeactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24172 c.advertiserId = advertiserId
24173 c.triggerId = triggerId
24174 c.deactivatemanualtriggerrequest = deactivatemanualtriggerrequest
24175 return c
24176 }
24177
24178
24179
24180
24181 func (c *AdvertisersManualTriggersDeactivateCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersDeactivateCall {
24182 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24183 return c
24184 }
24185
24186
24187 func (c *AdvertisersManualTriggersDeactivateCall) Context(ctx context.Context) *AdvertisersManualTriggersDeactivateCall {
24188 c.ctx_ = ctx
24189 return c
24190 }
24191
24192
24193
24194 func (c *AdvertisersManualTriggersDeactivateCall) Header() http.Header {
24195 if c.header_ == nil {
24196 c.header_ = make(http.Header)
24197 }
24198 return c.header_
24199 }
24200
24201 func (c *AdvertisersManualTriggersDeactivateCall) doRequest(alt string) (*http.Response, error) {
24202 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24203 var body io.Reader = nil
24204 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deactivatemanualtriggerrequest)
24205 if err != nil {
24206 return nil, err
24207 }
24208 c.urlParams_.Set("alt", alt)
24209 c.urlParams_.Set("prettyPrint", "false")
24210 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/manualTriggers/{+triggerId}:deactivate")
24211 urls += "?" + c.urlParams_.Encode()
24212 req, err := http.NewRequest("POST", urls, body)
24213 if err != nil {
24214 return nil, err
24215 }
24216 req.Header = reqHeaders
24217 googleapi.Expand(req.URL, map[string]string{
24218 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24219 "triggerId": strconv.FormatInt(c.triggerId, 10),
24220 })
24221 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24222 }
24223
24224
24225
24226
24227
24228
24229 func (c *AdvertisersManualTriggersDeactivateCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) {
24230 gensupport.SetOptions(c.urlParams_, opts...)
24231 res, err := c.doRequest("json")
24232 if res != nil && res.StatusCode == http.StatusNotModified {
24233 if res.Body != nil {
24234 res.Body.Close()
24235 }
24236 return nil, gensupport.WrapError(&googleapi.Error{
24237 Code: res.StatusCode,
24238 Header: res.Header,
24239 })
24240 }
24241 if err != nil {
24242 return nil, err
24243 }
24244 defer googleapi.CloseBody(res)
24245 if err := googleapi.CheckResponse(res); err != nil {
24246 return nil, gensupport.WrapError(err)
24247 }
24248 ret := &ManualTrigger{
24249 ServerResponse: googleapi.ServerResponse{
24250 Header: res.Header,
24251 HTTPStatusCode: res.StatusCode,
24252 },
24253 }
24254 target := &ret
24255 if err := gensupport.DecodeResponse(target, res); err != nil {
24256 return nil, err
24257 }
24258 return ret, nil
24259 }
24260
24261 type AdvertisersManualTriggersGetCall struct {
24262 s *Service
24263 advertiserId int64
24264 triggerId int64
24265 urlParams_ gensupport.URLParams
24266 ifNoneMatch_ string
24267 ctx_ context.Context
24268 header_ http.Header
24269 }
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279 func (r *AdvertisersManualTriggersService) Get(advertiserId int64, triggerId int64) *AdvertisersManualTriggersGetCall {
24280 c := &AdvertisersManualTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24281 c.advertiserId = advertiserId
24282 c.triggerId = triggerId
24283 return c
24284 }
24285
24286
24287
24288
24289 func (c *AdvertisersManualTriggersGetCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersGetCall {
24290 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24291 return c
24292 }
24293
24294
24295
24296
24297 func (c *AdvertisersManualTriggersGetCall) IfNoneMatch(entityTag string) *AdvertisersManualTriggersGetCall {
24298 c.ifNoneMatch_ = entityTag
24299 return c
24300 }
24301
24302
24303 func (c *AdvertisersManualTriggersGetCall) Context(ctx context.Context) *AdvertisersManualTriggersGetCall {
24304 c.ctx_ = ctx
24305 return c
24306 }
24307
24308
24309
24310 func (c *AdvertisersManualTriggersGetCall) Header() http.Header {
24311 if c.header_ == nil {
24312 c.header_ = make(http.Header)
24313 }
24314 return c.header_
24315 }
24316
24317 func (c *AdvertisersManualTriggersGetCall) doRequest(alt string) (*http.Response, error) {
24318 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24319 if c.ifNoneMatch_ != "" {
24320 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24321 }
24322 var body io.Reader = nil
24323 c.urlParams_.Set("alt", alt)
24324 c.urlParams_.Set("prettyPrint", "false")
24325 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/manualTriggers/{+triggerId}")
24326 urls += "?" + c.urlParams_.Encode()
24327 req, err := http.NewRequest("GET", urls, body)
24328 if err != nil {
24329 return nil, err
24330 }
24331 req.Header = reqHeaders
24332 googleapi.Expand(req.URL, map[string]string{
24333 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24334 "triggerId": strconv.FormatInt(c.triggerId, 10),
24335 })
24336 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24337 }
24338
24339
24340
24341
24342
24343
24344 func (c *AdvertisersManualTriggersGetCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) {
24345 gensupport.SetOptions(c.urlParams_, opts...)
24346 res, err := c.doRequest("json")
24347 if res != nil && res.StatusCode == http.StatusNotModified {
24348 if res.Body != nil {
24349 res.Body.Close()
24350 }
24351 return nil, gensupport.WrapError(&googleapi.Error{
24352 Code: res.StatusCode,
24353 Header: res.Header,
24354 })
24355 }
24356 if err != nil {
24357 return nil, err
24358 }
24359 defer googleapi.CloseBody(res)
24360 if err := googleapi.CheckResponse(res); err != nil {
24361 return nil, gensupport.WrapError(err)
24362 }
24363 ret := &ManualTrigger{
24364 ServerResponse: googleapi.ServerResponse{
24365 Header: res.Header,
24366 HTTPStatusCode: res.StatusCode,
24367 },
24368 }
24369 target := &ret
24370 if err := gensupport.DecodeResponse(target, res); err != nil {
24371 return nil, err
24372 }
24373 return ret, nil
24374 }
24375
24376 type AdvertisersManualTriggersListCall struct {
24377 s *Service
24378 advertiserId int64
24379 urlParams_ gensupport.URLParams
24380 ifNoneMatch_ string
24381 ctx_ context.Context
24382 header_ http.Header
24383 }
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395 func (r *AdvertisersManualTriggersService) List(advertiserId int64) *AdvertisersManualTriggersListCall {
24396 c := &AdvertisersManualTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24397 c.advertiserId = advertiserId
24398 return c
24399 }
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411 func (c *AdvertisersManualTriggersListCall) Filter(filter string) *AdvertisersManualTriggersListCall {
24412 c.urlParams_.Set("filter", filter)
24413 return c
24414 }
24415
24416
24417
24418
24419
24420
24421 func (c *AdvertisersManualTriggersListCall) OrderBy(orderBy string) *AdvertisersManualTriggersListCall {
24422 c.urlParams_.Set("orderBy", orderBy)
24423 return c
24424 }
24425
24426
24427
24428 func (c *AdvertisersManualTriggersListCall) PageSize(pageSize int64) *AdvertisersManualTriggersListCall {
24429 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24430 return c
24431 }
24432
24433
24434
24435
24436
24437 func (c *AdvertisersManualTriggersListCall) PageToken(pageToken string) *AdvertisersManualTriggersListCall {
24438 c.urlParams_.Set("pageToken", pageToken)
24439 return c
24440 }
24441
24442
24443
24444
24445 func (c *AdvertisersManualTriggersListCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersListCall {
24446 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24447 return c
24448 }
24449
24450
24451
24452
24453 func (c *AdvertisersManualTriggersListCall) IfNoneMatch(entityTag string) *AdvertisersManualTriggersListCall {
24454 c.ifNoneMatch_ = entityTag
24455 return c
24456 }
24457
24458
24459 func (c *AdvertisersManualTriggersListCall) Context(ctx context.Context) *AdvertisersManualTriggersListCall {
24460 c.ctx_ = ctx
24461 return c
24462 }
24463
24464
24465
24466 func (c *AdvertisersManualTriggersListCall) Header() http.Header {
24467 if c.header_ == nil {
24468 c.header_ = make(http.Header)
24469 }
24470 return c.header_
24471 }
24472
24473 func (c *AdvertisersManualTriggersListCall) doRequest(alt string) (*http.Response, error) {
24474 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24475 if c.ifNoneMatch_ != "" {
24476 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24477 }
24478 var body io.Reader = nil
24479 c.urlParams_.Set("alt", alt)
24480 c.urlParams_.Set("prettyPrint", "false")
24481 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/manualTriggers")
24482 urls += "?" + c.urlParams_.Encode()
24483 req, err := http.NewRequest("GET", urls, body)
24484 if err != nil {
24485 return nil, err
24486 }
24487 req.Header = reqHeaders
24488 googleapi.Expand(req.URL, map[string]string{
24489 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24490 })
24491 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24492 }
24493
24494
24495
24496
24497
24498
24499
24500 func (c *AdvertisersManualTriggersListCall) Do(opts ...googleapi.CallOption) (*ListManualTriggersResponse, error) {
24501 gensupport.SetOptions(c.urlParams_, opts...)
24502 res, err := c.doRequest("json")
24503 if res != nil && res.StatusCode == http.StatusNotModified {
24504 if res.Body != nil {
24505 res.Body.Close()
24506 }
24507 return nil, gensupport.WrapError(&googleapi.Error{
24508 Code: res.StatusCode,
24509 Header: res.Header,
24510 })
24511 }
24512 if err != nil {
24513 return nil, err
24514 }
24515 defer googleapi.CloseBody(res)
24516 if err := googleapi.CheckResponse(res); err != nil {
24517 return nil, gensupport.WrapError(err)
24518 }
24519 ret := &ListManualTriggersResponse{
24520 ServerResponse: googleapi.ServerResponse{
24521 Header: res.Header,
24522 HTTPStatusCode: res.StatusCode,
24523 },
24524 }
24525 target := &ret
24526 if err := gensupport.DecodeResponse(target, res); err != nil {
24527 return nil, err
24528 }
24529 return ret, nil
24530 }
24531
24532
24533
24534
24535 func (c *AdvertisersManualTriggersListCall) Pages(ctx context.Context, f func(*ListManualTriggersResponse) error) error {
24536 c.ctx_ = ctx
24537 defer c.PageToken(c.urlParams_.Get("pageToken"))
24538 for {
24539 x, err := c.Do()
24540 if err != nil {
24541 return err
24542 }
24543 if err := f(x); err != nil {
24544 return err
24545 }
24546 if x.NextPageToken == "" {
24547 return nil
24548 }
24549 c.PageToken(x.NextPageToken)
24550 }
24551 }
24552
24553 type AdvertisersManualTriggersPatchCall struct {
24554 s *Service
24555 advertiserId int64
24556 triggerId int64
24557 manualtrigger *ManualTrigger
24558 urlParams_ gensupport.URLParams
24559 ctx_ context.Context
24560 header_ http.Header
24561 }
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573 func (r *AdvertisersManualTriggersService) Patch(advertiserId int64, triggerId int64, manualtrigger *ManualTrigger) *AdvertisersManualTriggersPatchCall {
24574 c := &AdvertisersManualTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24575 c.advertiserId = advertiserId
24576 c.triggerId = triggerId
24577 c.manualtrigger = manualtrigger
24578 return c
24579 }
24580
24581
24582
24583 func (c *AdvertisersManualTriggersPatchCall) UpdateMask(updateMask string) *AdvertisersManualTriggersPatchCall {
24584 c.urlParams_.Set("updateMask", updateMask)
24585 return c
24586 }
24587
24588
24589
24590
24591 func (c *AdvertisersManualTriggersPatchCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersPatchCall {
24592 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24593 return c
24594 }
24595
24596
24597 func (c *AdvertisersManualTriggersPatchCall) Context(ctx context.Context) *AdvertisersManualTriggersPatchCall {
24598 c.ctx_ = ctx
24599 return c
24600 }
24601
24602
24603
24604 func (c *AdvertisersManualTriggersPatchCall) Header() http.Header {
24605 if c.header_ == nil {
24606 c.header_ = make(http.Header)
24607 }
24608 return c.header_
24609 }
24610
24611 func (c *AdvertisersManualTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
24612 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24613 var body io.Reader = nil
24614 body, err := googleapi.WithoutDataWrapper.JSONReader(c.manualtrigger)
24615 if err != nil {
24616 return nil, err
24617 }
24618 c.urlParams_.Set("alt", alt)
24619 c.urlParams_.Set("prettyPrint", "false")
24620 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/manualTriggers/{+triggerId}")
24621 urls += "?" + c.urlParams_.Encode()
24622 req, err := http.NewRequest("PATCH", urls, body)
24623 if err != nil {
24624 return nil, err
24625 }
24626 req.Header = reqHeaders
24627 googleapi.Expand(req.URL, map[string]string{
24628 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24629 "triggerId": strconv.FormatInt(c.triggerId, 10),
24630 })
24631 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24632 }
24633
24634
24635
24636
24637
24638
24639 func (c *AdvertisersManualTriggersPatchCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) {
24640 gensupport.SetOptions(c.urlParams_, opts...)
24641 res, err := c.doRequest("json")
24642 if res != nil && res.StatusCode == http.StatusNotModified {
24643 if res.Body != nil {
24644 res.Body.Close()
24645 }
24646 return nil, gensupport.WrapError(&googleapi.Error{
24647 Code: res.StatusCode,
24648 Header: res.Header,
24649 })
24650 }
24651 if err != nil {
24652 return nil, err
24653 }
24654 defer googleapi.CloseBody(res)
24655 if err := googleapi.CheckResponse(res); err != nil {
24656 return nil, gensupport.WrapError(err)
24657 }
24658 ret := &ManualTrigger{
24659 ServerResponse: googleapi.ServerResponse{
24660 Header: res.Header,
24661 HTTPStatusCode: res.StatusCode,
24662 },
24663 }
24664 target := &ret
24665 if err := gensupport.DecodeResponse(target, res); err != nil {
24666 return nil, err
24667 }
24668 return ret, nil
24669 }
24670
24671 type AdvertisersNegativeKeywordListsCreateCall struct {
24672 s *Service
24673 advertiserId int64
24674 negativekeywordlist *NegativeKeywordList
24675 urlParams_ gensupport.URLParams
24676 ctx_ context.Context
24677 header_ http.Header
24678 }
24679
24680
24681
24682
24683
24684
24685 func (r *AdvertisersNegativeKeywordListsService) Create(advertiserId int64, negativekeywordlist *NegativeKeywordList) *AdvertisersNegativeKeywordListsCreateCall {
24686 c := &AdvertisersNegativeKeywordListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24687 c.advertiserId = advertiserId
24688 c.negativekeywordlist = negativekeywordlist
24689 return c
24690 }
24691
24692
24693
24694
24695 func (c *AdvertisersNegativeKeywordListsCreateCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsCreateCall {
24696 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24697 return c
24698 }
24699
24700
24701 func (c *AdvertisersNegativeKeywordListsCreateCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsCreateCall {
24702 c.ctx_ = ctx
24703 return c
24704 }
24705
24706
24707
24708 func (c *AdvertisersNegativeKeywordListsCreateCall) Header() http.Header {
24709 if c.header_ == nil {
24710 c.header_ = make(http.Header)
24711 }
24712 return c.header_
24713 }
24714
24715 func (c *AdvertisersNegativeKeywordListsCreateCall) doRequest(alt string) (*http.Response, error) {
24716 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24717 var body io.Reader = nil
24718 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeywordlist)
24719 if err != nil {
24720 return nil, err
24721 }
24722 c.urlParams_.Set("alt", alt)
24723 c.urlParams_.Set("prettyPrint", "false")
24724 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/negativeKeywordLists")
24725 urls += "?" + c.urlParams_.Encode()
24726 req, err := http.NewRequest("POST", urls, body)
24727 if err != nil {
24728 return nil, err
24729 }
24730 req.Header = reqHeaders
24731 googleapi.Expand(req.URL, map[string]string{
24732 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24733 })
24734 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24735 }
24736
24737
24738
24739
24740
24741
24742
24743 func (c *AdvertisersNegativeKeywordListsCreateCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) {
24744 gensupport.SetOptions(c.urlParams_, opts...)
24745 res, err := c.doRequest("json")
24746 if res != nil && res.StatusCode == http.StatusNotModified {
24747 if res.Body != nil {
24748 res.Body.Close()
24749 }
24750 return nil, gensupport.WrapError(&googleapi.Error{
24751 Code: res.StatusCode,
24752 Header: res.Header,
24753 })
24754 }
24755 if err != nil {
24756 return nil, err
24757 }
24758 defer googleapi.CloseBody(res)
24759 if err := googleapi.CheckResponse(res); err != nil {
24760 return nil, gensupport.WrapError(err)
24761 }
24762 ret := &NegativeKeywordList{
24763 ServerResponse: googleapi.ServerResponse{
24764 Header: res.Header,
24765 HTTPStatusCode: res.StatusCode,
24766 },
24767 }
24768 target := &ret
24769 if err := gensupport.DecodeResponse(target, res); err != nil {
24770 return nil, err
24771 }
24772 return ret, nil
24773 }
24774
24775 type AdvertisersNegativeKeywordListsDeleteCall struct {
24776 s *Service
24777 advertiserId int64
24778 negativeKeywordListId int64
24779 urlParams_ gensupport.URLParams
24780 ctx_ context.Context
24781 header_ http.Header
24782 }
24783
24784
24785
24786
24787
24788
24789
24790 func (r *AdvertisersNegativeKeywordListsService) Delete(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsDeleteCall {
24791 c := &AdvertisersNegativeKeywordListsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24792 c.advertiserId = advertiserId
24793 c.negativeKeywordListId = negativeKeywordListId
24794 return c
24795 }
24796
24797
24798
24799
24800 func (c *AdvertisersNegativeKeywordListsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsDeleteCall {
24801 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24802 return c
24803 }
24804
24805
24806 func (c *AdvertisersNegativeKeywordListsDeleteCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsDeleteCall {
24807 c.ctx_ = ctx
24808 return c
24809 }
24810
24811
24812
24813 func (c *AdvertisersNegativeKeywordListsDeleteCall) Header() http.Header {
24814 if c.header_ == nil {
24815 c.header_ = make(http.Header)
24816 }
24817 return c.header_
24818 }
24819
24820 func (c *AdvertisersNegativeKeywordListsDeleteCall) doRequest(alt string) (*http.Response, error) {
24821 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24822 var body io.Reader = nil
24823 c.urlParams_.Set("alt", alt)
24824 c.urlParams_.Set("prettyPrint", "false")
24825 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}")
24826 urls += "?" + c.urlParams_.Encode()
24827 req, err := http.NewRequest("DELETE", urls, body)
24828 if err != nil {
24829 return nil, err
24830 }
24831 req.Header = reqHeaders
24832 googleapi.Expand(req.URL, map[string]string{
24833 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24834 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
24835 })
24836 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24837 }
24838
24839
24840
24841
24842
24843
24844 func (c *AdvertisersNegativeKeywordListsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
24845 gensupport.SetOptions(c.urlParams_, opts...)
24846 res, err := c.doRequest("json")
24847 if res != nil && res.StatusCode == http.StatusNotModified {
24848 if res.Body != nil {
24849 res.Body.Close()
24850 }
24851 return nil, gensupport.WrapError(&googleapi.Error{
24852 Code: res.StatusCode,
24853 Header: res.Header,
24854 })
24855 }
24856 if err != nil {
24857 return nil, err
24858 }
24859 defer googleapi.CloseBody(res)
24860 if err := googleapi.CheckResponse(res); err != nil {
24861 return nil, gensupport.WrapError(err)
24862 }
24863 ret := &Empty{
24864 ServerResponse: googleapi.ServerResponse{
24865 Header: res.Header,
24866 HTTPStatusCode: res.StatusCode,
24867 },
24868 }
24869 target := &ret
24870 if err := gensupport.DecodeResponse(target, res); err != nil {
24871 return nil, err
24872 }
24873 return ret, nil
24874 }
24875
24876 type AdvertisersNegativeKeywordListsGetCall struct {
24877 s *Service
24878 advertiserId int64
24879 negativeKeywordListId int64
24880 urlParams_ gensupport.URLParams
24881 ifNoneMatch_ string
24882 ctx_ context.Context
24883 header_ http.Header
24884 }
24885
24886
24887
24888
24889
24890
24891
24892 func (r *AdvertisersNegativeKeywordListsService) Get(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsGetCall {
24893 c := &AdvertisersNegativeKeywordListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24894 c.advertiserId = advertiserId
24895 c.negativeKeywordListId = negativeKeywordListId
24896 return c
24897 }
24898
24899
24900
24901
24902 func (c *AdvertisersNegativeKeywordListsGetCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsGetCall {
24903 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24904 return c
24905 }
24906
24907
24908
24909
24910 func (c *AdvertisersNegativeKeywordListsGetCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsGetCall {
24911 c.ifNoneMatch_ = entityTag
24912 return c
24913 }
24914
24915
24916 func (c *AdvertisersNegativeKeywordListsGetCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsGetCall {
24917 c.ctx_ = ctx
24918 return c
24919 }
24920
24921
24922
24923 func (c *AdvertisersNegativeKeywordListsGetCall) Header() http.Header {
24924 if c.header_ == nil {
24925 c.header_ = make(http.Header)
24926 }
24927 return c.header_
24928 }
24929
24930 func (c *AdvertisersNegativeKeywordListsGetCall) doRequest(alt string) (*http.Response, error) {
24931 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24932 if c.ifNoneMatch_ != "" {
24933 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24934 }
24935 var body io.Reader = nil
24936 c.urlParams_.Set("alt", alt)
24937 c.urlParams_.Set("prettyPrint", "false")
24938 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}")
24939 urls += "?" + c.urlParams_.Encode()
24940 req, err := http.NewRequest("GET", urls, body)
24941 if err != nil {
24942 return nil, err
24943 }
24944 req.Header = reqHeaders
24945 googleapi.Expand(req.URL, map[string]string{
24946 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24947 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
24948 })
24949 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24950 }
24951
24952
24953
24954
24955
24956
24957
24958 func (c *AdvertisersNegativeKeywordListsGetCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) {
24959 gensupport.SetOptions(c.urlParams_, opts...)
24960 res, err := c.doRequest("json")
24961 if res != nil && res.StatusCode == http.StatusNotModified {
24962 if res.Body != nil {
24963 res.Body.Close()
24964 }
24965 return nil, gensupport.WrapError(&googleapi.Error{
24966 Code: res.StatusCode,
24967 Header: res.Header,
24968 })
24969 }
24970 if err != nil {
24971 return nil, err
24972 }
24973 defer googleapi.CloseBody(res)
24974 if err := googleapi.CheckResponse(res); err != nil {
24975 return nil, gensupport.WrapError(err)
24976 }
24977 ret := &NegativeKeywordList{
24978 ServerResponse: googleapi.ServerResponse{
24979 Header: res.Header,
24980 HTTPStatusCode: res.StatusCode,
24981 },
24982 }
24983 target := &ret
24984 if err := gensupport.DecodeResponse(target, res); err != nil {
24985 return nil, err
24986 }
24987 return ret, nil
24988 }
24989
24990 type AdvertisersNegativeKeywordListsListCall struct {
24991 s *Service
24992 advertiserId int64
24993 urlParams_ gensupport.URLParams
24994 ifNoneMatch_ string
24995 ctx_ context.Context
24996 header_ http.Header
24997 }
24998
24999
25000
25001
25002
25003 func (r *AdvertisersNegativeKeywordListsService) List(advertiserId int64) *AdvertisersNegativeKeywordListsListCall {
25004 c := &AdvertisersNegativeKeywordListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25005 c.advertiserId = advertiserId
25006 return c
25007 }
25008
25009
25010
25011
25012 func (c *AdvertisersNegativeKeywordListsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsListCall {
25013 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25014 return c
25015 }
25016
25017
25018
25019
25020
25021
25022 func (c *AdvertisersNegativeKeywordListsListCall) PageToken(pageToken string) *AdvertisersNegativeKeywordListsListCall {
25023 c.urlParams_.Set("pageToken", pageToken)
25024 return c
25025 }
25026
25027
25028
25029
25030 func (c *AdvertisersNegativeKeywordListsListCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsListCall {
25031 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25032 return c
25033 }
25034
25035
25036
25037
25038 func (c *AdvertisersNegativeKeywordListsListCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsListCall {
25039 c.ifNoneMatch_ = entityTag
25040 return c
25041 }
25042
25043
25044 func (c *AdvertisersNegativeKeywordListsListCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsListCall {
25045 c.ctx_ = ctx
25046 return c
25047 }
25048
25049
25050
25051 func (c *AdvertisersNegativeKeywordListsListCall) Header() http.Header {
25052 if c.header_ == nil {
25053 c.header_ = make(http.Header)
25054 }
25055 return c.header_
25056 }
25057
25058 func (c *AdvertisersNegativeKeywordListsListCall) doRequest(alt string) (*http.Response, error) {
25059 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25060 if c.ifNoneMatch_ != "" {
25061 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25062 }
25063 var body io.Reader = nil
25064 c.urlParams_.Set("alt", alt)
25065 c.urlParams_.Set("prettyPrint", "false")
25066 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/negativeKeywordLists")
25067 urls += "?" + c.urlParams_.Encode()
25068 req, err := http.NewRequest("GET", urls, body)
25069 if err != nil {
25070 return nil, err
25071 }
25072 req.Header = reqHeaders
25073 googleapi.Expand(req.URL, map[string]string{
25074 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25075 })
25076 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25077 }
25078
25079
25080
25081
25082
25083
25084
25085 func (c *AdvertisersNegativeKeywordListsListCall) Do(opts ...googleapi.CallOption) (*ListNegativeKeywordListsResponse, error) {
25086 gensupport.SetOptions(c.urlParams_, opts...)
25087 res, err := c.doRequest("json")
25088 if res != nil && res.StatusCode == http.StatusNotModified {
25089 if res.Body != nil {
25090 res.Body.Close()
25091 }
25092 return nil, gensupport.WrapError(&googleapi.Error{
25093 Code: res.StatusCode,
25094 Header: res.Header,
25095 })
25096 }
25097 if err != nil {
25098 return nil, err
25099 }
25100 defer googleapi.CloseBody(res)
25101 if err := googleapi.CheckResponse(res); err != nil {
25102 return nil, gensupport.WrapError(err)
25103 }
25104 ret := &ListNegativeKeywordListsResponse{
25105 ServerResponse: googleapi.ServerResponse{
25106 Header: res.Header,
25107 HTTPStatusCode: res.StatusCode,
25108 },
25109 }
25110 target := &ret
25111 if err := gensupport.DecodeResponse(target, res); err != nil {
25112 return nil, err
25113 }
25114 return ret, nil
25115 }
25116
25117
25118
25119
25120 func (c *AdvertisersNegativeKeywordListsListCall) Pages(ctx context.Context, f func(*ListNegativeKeywordListsResponse) error) error {
25121 c.ctx_ = ctx
25122 defer c.PageToken(c.urlParams_.Get("pageToken"))
25123 for {
25124 x, err := c.Do()
25125 if err != nil {
25126 return err
25127 }
25128 if err := f(x); err != nil {
25129 return err
25130 }
25131 if x.NextPageToken == "" {
25132 return nil
25133 }
25134 c.PageToken(x.NextPageToken)
25135 }
25136 }
25137
25138 type AdvertisersNegativeKeywordListsPatchCall struct {
25139 s *Service
25140 advertiserId int64
25141 negativeKeywordListId int64
25142 negativekeywordlist *NegativeKeywordList
25143 urlParams_ gensupport.URLParams
25144 ctx_ context.Context
25145 header_ http.Header
25146 }
25147
25148
25149
25150
25151
25152
25153
25154
25155 func (r *AdvertisersNegativeKeywordListsService) Patch(advertiserId int64, negativeKeywordListId int64, negativekeywordlist *NegativeKeywordList) *AdvertisersNegativeKeywordListsPatchCall {
25156 c := &AdvertisersNegativeKeywordListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25157 c.advertiserId = advertiserId
25158 c.negativeKeywordListId = negativeKeywordListId
25159 c.negativekeywordlist = negativekeywordlist
25160 return c
25161 }
25162
25163
25164
25165 func (c *AdvertisersNegativeKeywordListsPatchCall) UpdateMask(updateMask string) *AdvertisersNegativeKeywordListsPatchCall {
25166 c.urlParams_.Set("updateMask", updateMask)
25167 return c
25168 }
25169
25170
25171
25172
25173 func (c *AdvertisersNegativeKeywordListsPatchCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsPatchCall {
25174 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25175 return c
25176 }
25177
25178
25179 func (c *AdvertisersNegativeKeywordListsPatchCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsPatchCall {
25180 c.ctx_ = ctx
25181 return c
25182 }
25183
25184
25185
25186 func (c *AdvertisersNegativeKeywordListsPatchCall) Header() http.Header {
25187 if c.header_ == nil {
25188 c.header_ = make(http.Header)
25189 }
25190 return c.header_
25191 }
25192
25193 func (c *AdvertisersNegativeKeywordListsPatchCall) doRequest(alt string) (*http.Response, error) {
25194 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25195 var body io.Reader = nil
25196 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeywordlist)
25197 if err != nil {
25198 return nil, err
25199 }
25200 c.urlParams_.Set("alt", alt)
25201 c.urlParams_.Set("prettyPrint", "false")
25202 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/negativeKeywordLists/{negativeKeywordListId}")
25203 urls += "?" + c.urlParams_.Encode()
25204 req, err := http.NewRequest("PATCH", urls, body)
25205 if err != nil {
25206 return nil, err
25207 }
25208 req.Header = reqHeaders
25209 googleapi.Expand(req.URL, map[string]string{
25210 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25211 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
25212 })
25213 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25214 }
25215
25216
25217
25218
25219
25220
25221
25222 func (c *AdvertisersNegativeKeywordListsPatchCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) {
25223 gensupport.SetOptions(c.urlParams_, opts...)
25224 res, err := c.doRequest("json")
25225 if res != nil && res.StatusCode == http.StatusNotModified {
25226 if res.Body != nil {
25227 res.Body.Close()
25228 }
25229 return nil, gensupport.WrapError(&googleapi.Error{
25230 Code: res.StatusCode,
25231 Header: res.Header,
25232 })
25233 }
25234 if err != nil {
25235 return nil, err
25236 }
25237 defer googleapi.CloseBody(res)
25238 if err := googleapi.CheckResponse(res); err != nil {
25239 return nil, gensupport.WrapError(err)
25240 }
25241 ret := &NegativeKeywordList{
25242 ServerResponse: googleapi.ServerResponse{
25243 Header: res.Header,
25244 HTTPStatusCode: res.StatusCode,
25245 },
25246 }
25247 target := &ret
25248 if err := gensupport.DecodeResponse(target, res); err != nil {
25249 return nil, err
25250 }
25251 return ret, nil
25252 }
25253
25254 type AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall struct {
25255 s *Service
25256 advertiserId int64
25257 negativeKeywordListId int64
25258 bulkeditnegativekeywordsrequest *BulkEditNegativeKeywordsRequest
25259 urlParams_ gensupport.URLParams
25260 ctx_ context.Context
25261 header_ http.Header
25262 }
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) BulkEdit(advertiserId int64, negativeKeywordListId int64, bulkeditnegativekeywordsrequest *BulkEditNegativeKeywordsRequest) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall {
25277 c := &AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25278 c.advertiserId = advertiserId
25279 c.negativeKeywordListId = negativeKeywordListId
25280 c.bulkeditnegativekeywordsrequest = bulkeditnegativekeywordsrequest
25281 return c
25282 }
25283
25284
25285
25286
25287 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall {
25288 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25289 return c
25290 }
25291
25292
25293 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall {
25294 c.ctx_ = ctx
25295 return c
25296 }
25297
25298
25299
25300 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Header() http.Header {
25301 if c.header_ == nil {
25302 c.header_ = make(http.Header)
25303 }
25304 return c.header_
25305 }
25306
25307 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) doRequest(alt string) (*http.Response, error) {
25308 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25309 var body io.Reader = nil
25310 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditnegativekeywordsrequest)
25311 if err != nil {
25312 return nil, err
25313 }
25314 c.urlParams_.Set("alt", alt)
25315 c.urlParams_.Set("prettyPrint", "false")
25316 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:bulkEdit")
25317 urls += "?" + c.urlParams_.Encode()
25318 req, err := http.NewRequest("POST", urls, body)
25319 if err != nil {
25320 return nil, err
25321 }
25322 req.Header = reqHeaders
25323 googleapi.Expand(req.URL, map[string]string{
25324 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25325 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
25326 })
25327 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25328 }
25329
25330
25331
25332
25333
25334
25335
25336 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditNegativeKeywordsResponse, error) {
25337 gensupport.SetOptions(c.urlParams_, opts...)
25338 res, err := c.doRequest("json")
25339 if res != nil && res.StatusCode == http.StatusNotModified {
25340 if res.Body != nil {
25341 res.Body.Close()
25342 }
25343 return nil, gensupport.WrapError(&googleapi.Error{
25344 Code: res.StatusCode,
25345 Header: res.Header,
25346 })
25347 }
25348 if err != nil {
25349 return nil, err
25350 }
25351 defer googleapi.CloseBody(res)
25352 if err := googleapi.CheckResponse(res); err != nil {
25353 return nil, gensupport.WrapError(err)
25354 }
25355 ret := &BulkEditNegativeKeywordsResponse{
25356 ServerResponse: googleapi.ServerResponse{
25357 Header: res.Header,
25358 HTTPStatusCode: res.StatusCode,
25359 },
25360 }
25361 target := &ret
25362 if err := gensupport.DecodeResponse(target, res); err != nil {
25363 return nil, err
25364 }
25365 return ret, nil
25366 }
25367
25368 type AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall struct {
25369 s *Service
25370 advertiserId int64
25371 negativeKeywordListId int64
25372 negativekeyword *NegativeKeyword
25373 urlParams_ gensupport.URLParams
25374 ctx_ context.Context
25375 header_ http.Header
25376 }
25377
25378
25379
25380
25381
25382
25383
25384 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Create(advertiserId int64, negativeKeywordListId int64, negativekeyword *NegativeKeyword) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall {
25385 c := &AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25386 c.advertiserId = advertiserId
25387 c.negativeKeywordListId = negativeKeywordListId
25388 c.negativekeyword = negativekeyword
25389 return c
25390 }
25391
25392
25393
25394
25395 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall {
25396 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25397 return c
25398 }
25399
25400
25401 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall {
25402 c.ctx_ = ctx
25403 return c
25404 }
25405
25406
25407
25408 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Header() http.Header {
25409 if c.header_ == nil {
25410 c.header_ = make(http.Header)
25411 }
25412 return c.header_
25413 }
25414
25415 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) doRequest(alt string) (*http.Response, error) {
25416 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25417 var body io.Reader = nil
25418 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeyword)
25419 if err != nil {
25420 return nil, err
25421 }
25422 c.urlParams_.Set("alt", alt)
25423 c.urlParams_.Set("prettyPrint", "false")
25424 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords")
25425 urls += "?" + c.urlParams_.Encode()
25426 req, err := http.NewRequest("POST", urls, body)
25427 if err != nil {
25428 return nil, err
25429 }
25430 req.Header = reqHeaders
25431 googleapi.Expand(req.URL, map[string]string{
25432 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25433 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
25434 })
25435 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25436 }
25437
25438
25439
25440
25441
25442
25443
25444 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Do(opts ...googleapi.CallOption) (*NegativeKeyword, error) {
25445 gensupport.SetOptions(c.urlParams_, opts...)
25446 res, err := c.doRequest("json")
25447 if res != nil && res.StatusCode == http.StatusNotModified {
25448 if res.Body != nil {
25449 res.Body.Close()
25450 }
25451 return nil, gensupport.WrapError(&googleapi.Error{
25452 Code: res.StatusCode,
25453 Header: res.Header,
25454 })
25455 }
25456 if err != nil {
25457 return nil, err
25458 }
25459 defer googleapi.CloseBody(res)
25460 if err := googleapi.CheckResponse(res); err != nil {
25461 return nil, gensupport.WrapError(err)
25462 }
25463 ret := &NegativeKeyword{
25464 ServerResponse: googleapi.ServerResponse{
25465 Header: res.Header,
25466 HTTPStatusCode: res.StatusCode,
25467 },
25468 }
25469 target := &ret
25470 if err := gensupport.DecodeResponse(target, res); err != nil {
25471 return nil, err
25472 }
25473 return ret, nil
25474 }
25475
25476 type AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall struct {
25477 s *Service
25478 advertiserId int64
25479 negativeKeywordListId int64
25480 keywordValue string
25481 urlParams_ gensupport.URLParams
25482 ctx_ context.Context
25483 header_ http.Header
25484 }
25485
25486
25487
25488
25489
25490
25491
25492
25493 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Delete(advertiserId int64, negativeKeywordListId int64, keywordValue string) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall {
25494 c := &AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25495 c.advertiserId = advertiserId
25496 c.negativeKeywordListId = negativeKeywordListId
25497 c.keywordValue = keywordValue
25498 return c
25499 }
25500
25501
25502
25503
25504 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall {
25505 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25506 return c
25507 }
25508
25509
25510 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall {
25511 c.ctx_ = ctx
25512 return c
25513 }
25514
25515
25516
25517 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Header() http.Header {
25518 if c.header_ == nil {
25519 c.header_ = make(http.Header)
25520 }
25521 return c.header_
25522 }
25523
25524 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) doRequest(alt string) (*http.Response, error) {
25525 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25526 var body io.Reader = nil
25527 c.urlParams_.Set("alt", alt)
25528 c.urlParams_.Set("prettyPrint", "false")
25529 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords/{+keywordValue}")
25530 urls += "?" + c.urlParams_.Encode()
25531 req, err := http.NewRequest("DELETE", urls, body)
25532 if err != nil {
25533 return nil, err
25534 }
25535 req.Header = reqHeaders
25536 googleapi.Expand(req.URL, map[string]string{
25537 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25538 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
25539 "keywordValue": c.keywordValue,
25540 })
25541 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25542 }
25543
25544
25545
25546
25547
25548
25549 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
25550 gensupport.SetOptions(c.urlParams_, opts...)
25551 res, err := c.doRequest("json")
25552 if res != nil && res.StatusCode == http.StatusNotModified {
25553 if res.Body != nil {
25554 res.Body.Close()
25555 }
25556 return nil, gensupport.WrapError(&googleapi.Error{
25557 Code: res.StatusCode,
25558 Header: res.Header,
25559 })
25560 }
25561 if err != nil {
25562 return nil, err
25563 }
25564 defer googleapi.CloseBody(res)
25565 if err := googleapi.CheckResponse(res); err != nil {
25566 return nil, gensupport.WrapError(err)
25567 }
25568 ret := &Empty{
25569 ServerResponse: googleapi.ServerResponse{
25570 Header: res.Header,
25571 HTTPStatusCode: res.StatusCode,
25572 },
25573 }
25574 target := &ret
25575 if err := gensupport.DecodeResponse(target, res); err != nil {
25576 return nil, err
25577 }
25578 return ret, nil
25579 }
25580
25581 type AdvertisersNegativeKeywordListsNegativeKeywordsListCall struct {
25582 s *Service
25583 advertiserId int64
25584 negativeKeywordListId int64
25585 urlParams_ gensupport.URLParams
25586 ifNoneMatch_ string
25587 ctx_ context.Context
25588 header_ http.Header
25589 }
25590
25591
25592
25593
25594
25595
25596
25597 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) List(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
25598 c := &AdvertisersNegativeKeywordListsNegativeKeywordsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25599 c.advertiserId = advertiserId
25600 c.negativeKeywordListId = negativeKeywordListId
25601 return c
25602 }
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Filter(filter string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
25614 c.urlParams_.Set("filter", filter)
25615 return c
25616 }
25617
25618
25619
25620
25621
25622 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) OrderBy(orderBy string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
25623 c.urlParams_.Set("orderBy", orderBy)
25624 return c
25625 }
25626
25627
25628
25629
25630 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
25631 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25632 return c
25633 }
25634
25635
25636
25637
25638
25639 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) PageToken(pageToken string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
25640 c.urlParams_.Set("pageToken", pageToken)
25641 return c
25642 }
25643
25644
25645
25646
25647 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
25648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25649 return c
25650 }
25651
25652
25653
25654
25655 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
25656 c.ifNoneMatch_ = entityTag
25657 return c
25658 }
25659
25660
25661 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
25662 c.ctx_ = ctx
25663 return c
25664 }
25665
25666
25667
25668 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Header() http.Header {
25669 if c.header_ == nil {
25670 c.header_ = make(http.Header)
25671 }
25672 return c.header_
25673 }
25674
25675 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) doRequest(alt string) (*http.Response, error) {
25676 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25677 if c.ifNoneMatch_ != "" {
25678 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25679 }
25680 var body io.Reader = nil
25681 c.urlParams_.Set("alt", alt)
25682 c.urlParams_.Set("prettyPrint", "false")
25683 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords")
25684 urls += "?" + c.urlParams_.Encode()
25685 req, err := http.NewRequest("GET", urls, body)
25686 if err != nil {
25687 return nil, err
25688 }
25689 req.Header = reqHeaders
25690 googleapi.Expand(req.URL, map[string]string{
25691 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25692 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
25693 })
25694 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25695 }
25696
25697
25698
25699
25700
25701
25702
25703 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Do(opts ...googleapi.CallOption) (*ListNegativeKeywordsResponse, error) {
25704 gensupport.SetOptions(c.urlParams_, opts...)
25705 res, err := c.doRequest("json")
25706 if res != nil && res.StatusCode == http.StatusNotModified {
25707 if res.Body != nil {
25708 res.Body.Close()
25709 }
25710 return nil, gensupport.WrapError(&googleapi.Error{
25711 Code: res.StatusCode,
25712 Header: res.Header,
25713 })
25714 }
25715 if err != nil {
25716 return nil, err
25717 }
25718 defer googleapi.CloseBody(res)
25719 if err := googleapi.CheckResponse(res); err != nil {
25720 return nil, gensupport.WrapError(err)
25721 }
25722 ret := &ListNegativeKeywordsResponse{
25723 ServerResponse: googleapi.ServerResponse{
25724 Header: res.Header,
25725 HTTPStatusCode: res.StatusCode,
25726 },
25727 }
25728 target := &ret
25729 if err := gensupport.DecodeResponse(target, res); err != nil {
25730 return nil, err
25731 }
25732 return ret, nil
25733 }
25734
25735
25736
25737
25738 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Pages(ctx context.Context, f func(*ListNegativeKeywordsResponse) error) error {
25739 c.ctx_ = ctx
25740 defer c.PageToken(c.urlParams_.Get("pageToken"))
25741 for {
25742 x, err := c.Do()
25743 if err != nil {
25744 return err
25745 }
25746 if err := f(x); err != nil {
25747 return err
25748 }
25749 if x.NextPageToken == "" {
25750 return nil
25751 }
25752 c.PageToken(x.NextPageToken)
25753 }
25754 }
25755
25756 type AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall struct {
25757 s *Service
25758 advertiserId int64
25759 negativeKeywordListId int64
25760 replacenegativekeywordsrequest *ReplaceNegativeKeywordsRequest
25761 urlParams_ gensupport.URLParams
25762 ctx_ context.Context
25763 header_ http.Header
25764 }
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Replace(advertiserId int64, negativeKeywordListId int64, replacenegativekeywordsrequest *ReplaceNegativeKeywordsRequest) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall {
25775 c := &AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25776 c.advertiserId = advertiserId
25777 c.negativeKeywordListId = negativeKeywordListId
25778 c.replacenegativekeywordsrequest = replacenegativekeywordsrequest
25779 return c
25780 }
25781
25782
25783
25784
25785 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall {
25786 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25787 return c
25788 }
25789
25790
25791 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall {
25792 c.ctx_ = ctx
25793 return c
25794 }
25795
25796
25797
25798 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Header() http.Header {
25799 if c.header_ == nil {
25800 c.header_ = make(http.Header)
25801 }
25802 return c.header_
25803 }
25804
25805 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) doRequest(alt string) (*http.Response, error) {
25806 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25807 var body io.Reader = nil
25808 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacenegativekeywordsrequest)
25809 if err != nil {
25810 return nil, err
25811 }
25812 c.urlParams_.Set("alt", alt)
25813 c.urlParams_.Set("prettyPrint", "false")
25814 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:replace")
25815 urls += "?" + c.urlParams_.Encode()
25816 req, err := http.NewRequest("POST", urls, body)
25817 if err != nil {
25818 return nil, err
25819 }
25820 req.Header = reqHeaders
25821 googleapi.Expand(req.URL, map[string]string{
25822 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25823 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
25824 })
25825 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25826 }
25827
25828
25829
25830
25831
25832
25833
25834 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceNegativeKeywordsResponse, error) {
25835 gensupport.SetOptions(c.urlParams_, opts...)
25836 res, err := c.doRequest("json")
25837 if res != nil && res.StatusCode == http.StatusNotModified {
25838 if res.Body != nil {
25839 res.Body.Close()
25840 }
25841 return nil, gensupport.WrapError(&googleapi.Error{
25842 Code: res.StatusCode,
25843 Header: res.Header,
25844 })
25845 }
25846 if err != nil {
25847 return nil, err
25848 }
25849 defer googleapi.CloseBody(res)
25850 if err := googleapi.CheckResponse(res); err != nil {
25851 return nil, gensupport.WrapError(err)
25852 }
25853 ret := &ReplaceNegativeKeywordsResponse{
25854 ServerResponse: googleapi.ServerResponse{
25855 Header: res.Header,
25856 HTTPStatusCode: res.StatusCode,
25857 },
25858 }
25859 target := &ret
25860 if err := gensupport.DecodeResponse(target, res); err != nil {
25861 return nil, err
25862 }
25863 return ret, nil
25864 }
25865
25866 type AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall struct {
25867 s *Service
25868 advertiserId int64
25869 targetingType string
25870 assignedtargetingoption *AssignedTargetingOption
25871 urlParams_ gensupport.URLParams
25872 ctx_ context.Context
25873 header_ http.Header
25874 }
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall {
25885 c := &AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25886 c.advertiserId = advertiserId
25887 c.targetingType = targetingType
25888 c.assignedtargetingoption = assignedtargetingoption
25889 return c
25890 }
25891
25892
25893
25894
25895 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall {
25896 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25897 return c
25898 }
25899
25900
25901 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall {
25902 c.ctx_ = ctx
25903 return c
25904 }
25905
25906
25907
25908 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header {
25909 if c.header_ == nil {
25910 c.header_ = make(http.Header)
25911 }
25912 return c.header_
25913 }
25914
25915 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) {
25916 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25917 var body io.Reader = nil
25918 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption)
25919 if err != nil {
25920 return nil, err
25921 }
25922 c.urlParams_.Set("alt", alt)
25923 c.urlParams_.Set("prettyPrint", "false")
25924 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
25925 urls += "?" + c.urlParams_.Encode()
25926 req, err := http.NewRequest("POST", urls, body)
25927 if err != nil {
25928 return nil, err
25929 }
25930 req.Header = reqHeaders
25931 googleapi.Expand(req.URL, map[string]string{
25932 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25933 "targetingType": c.targetingType,
25934 })
25935 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25936 }
25937
25938
25939
25940
25941
25942
25943
25944 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
25945 gensupport.SetOptions(c.urlParams_, opts...)
25946 res, err := c.doRequest("json")
25947 if res != nil && res.StatusCode == http.StatusNotModified {
25948 if res.Body != nil {
25949 res.Body.Close()
25950 }
25951 return nil, gensupport.WrapError(&googleapi.Error{
25952 Code: res.StatusCode,
25953 Header: res.Header,
25954 })
25955 }
25956 if err != nil {
25957 return nil, err
25958 }
25959 defer googleapi.CloseBody(res)
25960 if err := googleapi.CheckResponse(res); err != nil {
25961 return nil, gensupport.WrapError(err)
25962 }
25963 ret := &AssignedTargetingOption{
25964 ServerResponse: googleapi.ServerResponse{
25965 Header: res.Header,
25966 HTTPStatusCode: res.StatusCode,
25967 },
25968 }
25969 target := &ret
25970 if err := gensupport.DecodeResponse(target, res); err != nil {
25971 return nil, err
25972 }
25973 return ret, nil
25974 }
25975
25976 type AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall struct {
25977 s *Service
25978 advertiserId int64
25979 targetingType string
25980 assignedTargetingOptionId string
25981 urlParams_ gensupport.URLParams
25982 ctx_ context.Context
25983 header_ http.Header
25984 }
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall {
25996 c := &AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25997 c.advertiserId = advertiserId
25998 c.targetingType = targetingType
25999 c.assignedTargetingOptionId = assignedTargetingOptionId
26000 return c
26001 }
26002
26003
26004
26005
26006 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall {
26007 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26008 return c
26009 }
26010
26011
26012 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall {
26013 c.ctx_ = ctx
26014 return c
26015 }
26016
26017
26018
26019 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header {
26020 if c.header_ == nil {
26021 c.header_ = make(http.Header)
26022 }
26023 return c.header_
26024 }
26025
26026 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
26027 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26028 var body io.Reader = nil
26029 c.urlParams_.Set("alt", alt)
26030 c.urlParams_.Set("prettyPrint", "false")
26031 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
26032 urls += "?" + c.urlParams_.Encode()
26033 req, err := http.NewRequest("DELETE", urls, body)
26034 if err != nil {
26035 return nil, err
26036 }
26037 req.Header = reqHeaders
26038 googleapi.Expand(req.URL, map[string]string{
26039 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26040 "targetingType": c.targetingType,
26041 "assignedTargetingOptionId": c.assignedTargetingOptionId,
26042 })
26043 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26044 }
26045
26046
26047
26048
26049
26050
26051 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
26052 gensupport.SetOptions(c.urlParams_, opts...)
26053 res, err := c.doRequest("json")
26054 if res != nil && res.StatusCode == http.StatusNotModified {
26055 if res.Body != nil {
26056 res.Body.Close()
26057 }
26058 return nil, gensupport.WrapError(&googleapi.Error{
26059 Code: res.StatusCode,
26060 Header: res.Header,
26061 })
26062 }
26063 if err != nil {
26064 return nil, err
26065 }
26066 defer googleapi.CloseBody(res)
26067 if err := googleapi.CheckResponse(res); err != nil {
26068 return nil, gensupport.WrapError(err)
26069 }
26070 ret := &Empty{
26071 ServerResponse: googleapi.ServerResponse{
26072 Header: res.Header,
26073 HTTPStatusCode: res.StatusCode,
26074 },
26075 }
26076 target := &ret
26077 if err := gensupport.DecodeResponse(target, res); err != nil {
26078 return nil, err
26079 }
26080 return ret, nil
26081 }
26082
26083 type AdvertisersTargetingTypesAssignedTargetingOptionsGetCall struct {
26084 s *Service
26085 advertiserId int64
26086 targetingType string
26087 assignedTargetingOptionId string
26088 urlParams_ gensupport.URLParams
26089 ifNoneMatch_ string
26090 ctx_ context.Context
26091 header_ http.Header
26092 }
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall {
26106 c := &AdvertisersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26107 c.advertiserId = advertiserId
26108 c.targetingType = targetingType
26109 c.assignedTargetingOptionId = assignedTargetingOptionId
26110 return c
26111 }
26112
26113
26114
26115
26116 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall {
26117 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26118 return c
26119 }
26120
26121
26122
26123
26124 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall {
26125 c.ifNoneMatch_ = entityTag
26126 return c
26127 }
26128
26129
26130 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall {
26131 c.ctx_ = ctx
26132 return c
26133 }
26134
26135
26136
26137 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
26138 if c.header_ == nil {
26139 c.header_ = make(http.Header)
26140 }
26141 return c.header_
26142 }
26143
26144 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
26145 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26146 if c.ifNoneMatch_ != "" {
26147 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26148 }
26149 var body io.Reader = nil
26150 c.urlParams_.Set("alt", alt)
26151 c.urlParams_.Set("prettyPrint", "false")
26152 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
26153 urls += "?" + c.urlParams_.Encode()
26154 req, err := http.NewRequest("GET", urls, body)
26155 if err != nil {
26156 return nil, err
26157 }
26158 req.Header = reqHeaders
26159 googleapi.Expand(req.URL, map[string]string{
26160 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26161 "targetingType": c.targetingType,
26162 "assignedTargetingOptionId": c.assignedTargetingOptionId,
26163 })
26164 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26165 }
26166
26167
26168
26169
26170
26171
26172
26173 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
26174 gensupport.SetOptions(c.urlParams_, opts...)
26175 res, err := c.doRequest("json")
26176 if res != nil && res.StatusCode == http.StatusNotModified {
26177 if res.Body != nil {
26178 res.Body.Close()
26179 }
26180 return nil, gensupport.WrapError(&googleapi.Error{
26181 Code: res.StatusCode,
26182 Header: res.Header,
26183 })
26184 }
26185 if err != nil {
26186 return nil, err
26187 }
26188 defer googleapi.CloseBody(res)
26189 if err := googleapi.CheckResponse(res); err != nil {
26190 return nil, gensupport.WrapError(err)
26191 }
26192 ret := &AssignedTargetingOption{
26193 ServerResponse: googleapi.ServerResponse{
26194 Header: res.Header,
26195 HTTPStatusCode: res.StatusCode,
26196 },
26197 }
26198 target := &ret
26199 if err := gensupport.DecodeResponse(target, res); err != nil {
26200 return nil, err
26201 }
26202 return ret, nil
26203 }
26204
26205 type AdvertisersTargetingTypesAssignedTargetingOptionsListCall struct {
26206 s *Service
26207 advertiserId int64
26208 targetingType string
26209 urlParams_ gensupport.URLParams
26210 ifNoneMatch_ string
26211 ctx_ context.Context
26212 header_ http.Header
26213 }
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, targetingType string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
26224 c := &AdvertisersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26225 c.advertiserId = advertiserId
26226 c.targetingType = targetingType
26227 return c
26228 }
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
26240 c.urlParams_.Set("filter", filter)
26241 return c
26242 }
26243
26244
26245
26246
26247
26248
26249 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
26250 c.urlParams_.Set("orderBy", orderBy)
26251 return c
26252 }
26253
26254
26255
26256
26257 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
26258 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26259 return c
26260 }
26261
26262
26263
26264
26265
26266
26267 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
26268 c.urlParams_.Set("pageToken", pageToken)
26269 return c
26270 }
26271
26272
26273
26274
26275 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
26276 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26277 return c
26278 }
26279
26280
26281
26282
26283 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
26284 c.ifNoneMatch_ = entityTag
26285 return c
26286 }
26287
26288
26289 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
26290 c.ctx_ = ctx
26291 return c
26292 }
26293
26294
26295
26296 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
26297 if c.header_ == nil {
26298 c.header_ = make(http.Header)
26299 }
26300 return c.header_
26301 }
26302
26303 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
26304 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26305 if c.ifNoneMatch_ != "" {
26306 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26307 }
26308 var body io.Reader = nil
26309 c.urlParams_.Set("alt", alt)
26310 c.urlParams_.Set("prettyPrint", "false")
26311 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
26312 urls += "?" + c.urlParams_.Encode()
26313 req, err := http.NewRequest("GET", urls, body)
26314 if err != nil {
26315 return nil, err
26316 }
26317 req.Header = reqHeaders
26318 googleapi.Expand(req.URL, map[string]string{
26319 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26320 "targetingType": c.targetingType,
26321 })
26322 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26323 }
26324
26325
26326
26327
26328
26329
26330
26331 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListAdvertiserAssignedTargetingOptionsResponse, error) {
26332 gensupport.SetOptions(c.urlParams_, opts...)
26333 res, err := c.doRequest("json")
26334 if res != nil && res.StatusCode == http.StatusNotModified {
26335 if res.Body != nil {
26336 res.Body.Close()
26337 }
26338 return nil, gensupport.WrapError(&googleapi.Error{
26339 Code: res.StatusCode,
26340 Header: res.Header,
26341 })
26342 }
26343 if err != nil {
26344 return nil, err
26345 }
26346 defer googleapi.CloseBody(res)
26347 if err := googleapi.CheckResponse(res); err != nil {
26348 return nil, gensupport.WrapError(err)
26349 }
26350 ret := &ListAdvertiserAssignedTargetingOptionsResponse{
26351 ServerResponse: googleapi.ServerResponse{
26352 Header: res.Header,
26353 HTTPStatusCode: res.StatusCode,
26354 },
26355 }
26356 target := &ret
26357 if err := gensupport.DecodeResponse(target, res); err != nil {
26358 return nil, err
26359 }
26360 return ret, nil
26361 }
26362
26363
26364
26365
26366 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListAdvertiserAssignedTargetingOptionsResponse) error) error {
26367 c.ctx_ = ctx
26368 defer c.PageToken(c.urlParams_.Get("pageToken"))
26369 for {
26370 x, err := c.Do()
26371 if err != nil {
26372 return err
26373 }
26374 if err := f(x); err != nil {
26375 return err
26376 }
26377 if x.NextPageToken == "" {
26378 return nil
26379 }
26380 c.PageToken(x.NextPageToken)
26381 }
26382 }
26383
26384 type AdvertisersYoutubeAdGroupAdsGetCall struct {
26385 s *Service
26386 advertiserId int64
26387 youtubeAdGroupAdId int64
26388 urlParams_ gensupport.URLParams
26389 ifNoneMatch_ string
26390 ctx_ context.Context
26391 header_ http.Header
26392 }
26393
26394
26395
26396
26397
26398 func (r *AdvertisersYoutubeAdGroupAdsService) Get(advertiserId int64, youtubeAdGroupAdId int64) *AdvertisersYoutubeAdGroupAdsGetCall {
26399 c := &AdvertisersYoutubeAdGroupAdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26400 c.advertiserId = advertiserId
26401 c.youtubeAdGroupAdId = youtubeAdGroupAdId
26402 return c
26403 }
26404
26405
26406
26407
26408 func (c *AdvertisersYoutubeAdGroupAdsGetCall) Fields(s ...googleapi.Field) *AdvertisersYoutubeAdGroupAdsGetCall {
26409 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26410 return c
26411 }
26412
26413
26414
26415
26416 func (c *AdvertisersYoutubeAdGroupAdsGetCall) IfNoneMatch(entityTag string) *AdvertisersYoutubeAdGroupAdsGetCall {
26417 c.ifNoneMatch_ = entityTag
26418 return c
26419 }
26420
26421
26422 func (c *AdvertisersYoutubeAdGroupAdsGetCall) Context(ctx context.Context) *AdvertisersYoutubeAdGroupAdsGetCall {
26423 c.ctx_ = ctx
26424 return c
26425 }
26426
26427
26428
26429 func (c *AdvertisersYoutubeAdGroupAdsGetCall) Header() http.Header {
26430 if c.header_ == nil {
26431 c.header_ = make(http.Header)
26432 }
26433 return c.header_
26434 }
26435
26436 func (c *AdvertisersYoutubeAdGroupAdsGetCall) doRequest(alt string) (*http.Response, error) {
26437 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26438 if c.ifNoneMatch_ != "" {
26439 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26440 }
26441 var body io.Reader = nil
26442 c.urlParams_.Set("alt", alt)
26443 c.urlParams_.Set("prettyPrint", "false")
26444 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/youtubeAdGroupAds/{+youtubeAdGroupAdId}")
26445 urls += "?" + c.urlParams_.Encode()
26446 req, err := http.NewRequest("GET", urls, body)
26447 if err != nil {
26448 return nil, err
26449 }
26450 req.Header = reqHeaders
26451 googleapi.Expand(req.URL, map[string]string{
26452 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26453 "youtubeAdGroupAdId": strconv.FormatInt(c.youtubeAdGroupAdId, 10),
26454 })
26455 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26456 }
26457
26458
26459
26460
26461
26462
26463
26464 func (c *AdvertisersYoutubeAdGroupAdsGetCall) Do(opts ...googleapi.CallOption) (*YoutubeAdGroupAd, error) {
26465 gensupport.SetOptions(c.urlParams_, opts...)
26466 res, err := c.doRequest("json")
26467 if res != nil && res.StatusCode == http.StatusNotModified {
26468 if res.Body != nil {
26469 res.Body.Close()
26470 }
26471 return nil, gensupport.WrapError(&googleapi.Error{
26472 Code: res.StatusCode,
26473 Header: res.Header,
26474 })
26475 }
26476 if err != nil {
26477 return nil, err
26478 }
26479 defer googleapi.CloseBody(res)
26480 if err := googleapi.CheckResponse(res); err != nil {
26481 return nil, gensupport.WrapError(err)
26482 }
26483 ret := &YoutubeAdGroupAd{
26484 ServerResponse: googleapi.ServerResponse{
26485 Header: res.Header,
26486 HTTPStatusCode: res.StatusCode,
26487 },
26488 }
26489 target := &ret
26490 if err := gensupport.DecodeResponse(target, res); err != nil {
26491 return nil, err
26492 }
26493 return ret, nil
26494 }
26495
26496 type AdvertisersYoutubeAdGroupAdsListCall struct {
26497 s *Service
26498 advertiserId int64
26499 urlParams_ gensupport.URLParams
26500 ifNoneMatch_ string
26501 ctx_ context.Context
26502 header_ http.Header
26503 }
26504
26505
26506
26507
26508 func (r *AdvertisersYoutubeAdGroupAdsService) List(advertiserId int64) *AdvertisersYoutubeAdGroupAdsListCall {
26509 c := &AdvertisersYoutubeAdGroupAdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26510 c.advertiserId = advertiserId
26511 return c
26512 }
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528 func (c *AdvertisersYoutubeAdGroupAdsListCall) Filter(filter string) *AdvertisersYoutubeAdGroupAdsListCall {
26529 c.urlParams_.Set("filter", filter)
26530 return c
26531 }
26532
26533
26534
26535
26536
26537
26538 func (c *AdvertisersYoutubeAdGroupAdsListCall) OrderBy(orderBy string) *AdvertisersYoutubeAdGroupAdsListCall {
26539 c.urlParams_.Set("orderBy", orderBy)
26540 return c
26541 }
26542
26543
26544
26545
26546 func (c *AdvertisersYoutubeAdGroupAdsListCall) PageSize(pageSize int64) *AdvertisersYoutubeAdGroupAdsListCall {
26547 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26548 return c
26549 }
26550
26551
26552
26553
26554
26555 func (c *AdvertisersYoutubeAdGroupAdsListCall) PageToken(pageToken string) *AdvertisersYoutubeAdGroupAdsListCall {
26556 c.urlParams_.Set("pageToken", pageToken)
26557 return c
26558 }
26559
26560
26561
26562
26563 func (c *AdvertisersYoutubeAdGroupAdsListCall) Fields(s ...googleapi.Field) *AdvertisersYoutubeAdGroupAdsListCall {
26564 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26565 return c
26566 }
26567
26568
26569
26570
26571 func (c *AdvertisersYoutubeAdGroupAdsListCall) IfNoneMatch(entityTag string) *AdvertisersYoutubeAdGroupAdsListCall {
26572 c.ifNoneMatch_ = entityTag
26573 return c
26574 }
26575
26576
26577 func (c *AdvertisersYoutubeAdGroupAdsListCall) Context(ctx context.Context) *AdvertisersYoutubeAdGroupAdsListCall {
26578 c.ctx_ = ctx
26579 return c
26580 }
26581
26582
26583
26584 func (c *AdvertisersYoutubeAdGroupAdsListCall) Header() http.Header {
26585 if c.header_ == nil {
26586 c.header_ = make(http.Header)
26587 }
26588 return c.header_
26589 }
26590
26591 func (c *AdvertisersYoutubeAdGroupAdsListCall) doRequest(alt string) (*http.Response, error) {
26592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26593 if c.ifNoneMatch_ != "" {
26594 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26595 }
26596 var body io.Reader = nil
26597 c.urlParams_.Set("alt", alt)
26598 c.urlParams_.Set("prettyPrint", "false")
26599 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/youtubeAdGroupAds")
26600 urls += "?" + c.urlParams_.Encode()
26601 req, err := http.NewRequest("GET", urls, body)
26602 if err != nil {
26603 return nil, err
26604 }
26605 req.Header = reqHeaders
26606 googleapi.Expand(req.URL, map[string]string{
26607 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26608 })
26609 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26610 }
26611
26612
26613
26614
26615
26616
26617
26618 func (c *AdvertisersYoutubeAdGroupAdsListCall) Do(opts ...googleapi.CallOption) (*ListYoutubeAdGroupAdsResponse, error) {
26619 gensupport.SetOptions(c.urlParams_, opts...)
26620 res, err := c.doRequest("json")
26621 if res != nil && res.StatusCode == http.StatusNotModified {
26622 if res.Body != nil {
26623 res.Body.Close()
26624 }
26625 return nil, gensupport.WrapError(&googleapi.Error{
26626 Code: res.StatusCode,
26627 Header: res.Header,
26628 })
26629 }
26630 if err != nil {
26631 return nil, err
26632 }
26633 defer googleapi.CloseBody(res)
26634 if err := googleapi.CheckResponse(res); err != nil {
26635 return nil, gensupport.WrapError(err)
26636 }
26637 ret := &ListYoutubeAdGroupAdsResponse{
26638 ServerResponse: googleapi.ServerResponse{
26639 Header: res.Header,
26640 HTTPStatusCode: res.StatusCode,
26641 },
26642 }
26643 target := &ret
26644 if err := gensupport.DecodeResponse(target, res); err != nil {
26645 return nil, err
26646 }
26647 return ret, nil
26648 }
26649
26650
26651
26652
26653 func (c *AdvertisersYoutubeAdGroupAdsListCall) Pages(ctx context.Context, f func(*ListYoutubeAdGroupAdsResponse) error) error {
26654 c.ctx_ = ctx
26655 defer c.PageToken(c.urlParams_.Get("pageToken"))
26656 for {
26657 x, err := c.Do()
26658 if err != nil {
26659 return err
26660 }
26661 if err := f(x); err != nil {
26662 return err
26663 }
26664 if x.NextPageToken == "" {
26665 return nil
26666 }
26667 c.PageToken(x.NextPageToken)
26668 }
26669 }
26670
26671 type AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall struct {
26672 s *Service
26673 advertiserId int64
26674 urlParams_ gensupport.URLParams
26675 ifNoneMatch_ string
26676 ctx_ context.Context
26677 header_ http.Header
26678 }
26679
26680
26681
26682
26683
26684
26685 func (r *AdvertisersYoutubeAdGroupsService) BulkListAdGroupAssignedTargetingOptions(advertiserId int64) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26686 c := &AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26687 c.advertiserId = advertiserId
26688 return c
26689 }
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26703 c.urlParams_.Set("filter", filter)
26704 return c
26705 }
26706
26707
26708
26709
26710
26711
26712 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26713 c.urlParams_.Set("orderBy", orderBy)
26714 return c
26715 }
26716
26717
26718
26719
26720
26721 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26722 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26723 return c
26724 }
26725
26726
26727
26728
26729
26730
26731 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26732 c.urlParams_.Set("pageToken", pageToken)
26733 return c
26734 }
26735
26736
26737
26738 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) YoutubeAdGroupIds(youtubeAdGroupIds ...int64) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26739 var youtubeAdGroupIds_ []string
26740 for _, v := range youtubeAdGroupIds {
26741 youtubeAdGroupIds_ = append(youtubeAdGroupIds_, fmt.Sprint(v))
26742 }
26743 c.urlParams_.SetMulti("youtubeAdGroupIds", youtubeAdGroupIds_)
26744 return c
26745 }
26746
26747
26748
26749
26750 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26751 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26752 return c
26753 }
26754
26755
26756
26757
26758 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26759 c.ifNoneMatch_ = entityTag
26760 return c
26761 }
26762
26763
26764 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
26765 c.ctx_ = ctx
26766 return c
26767 }
26768
26769
26770
26771 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Header() http.Header {
26772 if c.header_ == nil {
26773 c.header_ = make(http.Header)
26774 }
26775 return c.header_
26776 }
26777
26778 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
26779 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26780 if c.ifNoneMatch_ != "" {
26781 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26782 }
26783 var body io.Reader = nil
26784 c.urlParams_.Set("alt", alt)
26785 c.urlParams_.Set("prettyPrint", "false")
26786 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/youtubeAdGroups:bulkListAdGroupAssignedTargetingOptions")
26787 urls += "?" + c.urlParams_.Encode()
26788 req, err := http.NewRequest("GET", urls, body)
26789 if err != nil {
26790 return nil, err
26791 }
26792 req.Header = reqHeaders
26793 googleapi.Expand(req.URL, map[string]string{
26794 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26795 })
26796 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26797 }
26798
26799
26800
26801
26802
26803
26804
26805 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListAdGroupAssignedTargetingOptionsResponse, error) {
26806 gensupport.SetOptions(c.urlParams_, opts...)
26807 res, err := c.doRequest("json")
26808 if res != nil && res.StatusCode == http.StatusNotModified {
26809 if res.Body != nil {
26810 res.Body.Close()
26811 }
26812 return nil, gensupport.WrapError(&googleapi.Error{
26813 Code: res.StatusCode,
26814 Header: res.Header,
26815 })
26816 }
26817 if err != nil {
26818 return nil, err
26819 }
26820 defer googleapi.CloseBody(res)
26821 if err := googleapi.CheckResponse(res); err != nil {
26822 return nil, gensupport.WrapError(err)
26823 }
26824 ret := &BulkListAdGroupAssignedTargetingOptionsResponse{
26825 ServerResponse: googleapi.ServerResponse{
26826 Header: res.Header,
26827 HTTPStatusCode: res.StatusCode,
26828 },
26829 }
26830 target := &ret
26831 if err := gensupport.DecodeResponse(target, res); err != nil {
26832 return nil, err
26833 }
26834 return ret, nil
26835 }
26836
26837
26838
26839
26840 func (c *AdvertisersYoutubeAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListAdGroupAssignedTargetingOptionsResponse) error) error {
26841 c.ctx_ = ctx
26842 defer c.PageToken(c.urlParams_.Get("pageToken"))
26843 for {
26844 x, err := c.Do()
26845 if err != nil {
26846 return err
26847 }
26848 if err := f(x); err != nil {
26849 return err
26850 }
26851 if x.NextPageToken == "" {
26852 return nil
26853 }
26854 c.PageToken(x.NextPageToken)
26855 }
26856 }
26857
26858 type AdvertisersYoutubeAdGroupsGetCall struct {
26859 s *Service
26860 advertiserId int64
26861 youtubeAdGroupId int64
26862 urlParams_ gensupport.URLParams
26863 ifNoneMatch_ string
26864 ctx_ context.Context
26865 header_ http.Header
26866 }
26867
26868
26869
26870
26871
26872 func (r *AdvertisersYoutubeAdGroupsService) Get(advertiserId int64, youtubeAdGroupId int64) *AdvertisersYoutubeAdGroupsGetCall {
26873 c := &AdvertisersYoutubeAdGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26874 c.advertiserId = advertiserId
26875 c.youtubeAdGroupId = youtubeAdGroupId
26876 return c
26877 }
26878
26879
26880
26881
26882 func (c *AdvertisersYoutubeAdGroupsGetCall) Fields(s ...googleapi.Field) *AdvertisersYoutubeAdGroupsGetCall {
26883 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26884 return c
26885 }
26886
26887
26888
26889
26890 func (c *AdvertisersYoutubeAdGroupsGetCall) IfNoneMatch(entityTag string) *AdvertisersYoutubeAdGroupsGetCall {
26891 c.ifNoneMatch_ = entityTag
26892 return c
26893 }
26894
26895
26896 func (c *AdvertisersYoutubeAdGroupsGetCall) Context(ctx context.Context) *AdvertisersYoutubeAdGroupsGetCall {
26897 c.ctx_ = ctx
26898 return c
26899 }
26900
26901
26902
26903 func (c *AdvertisersYoutubeAdGroupsGetCall) Header() http.Header {
26904 if c.header_ == nil {
26905 c.header_ = make(http.Header)
26906 }
26907 return c.header_
26908 }
26909
26910 func (c *AdvertisersYoutubeAdGroupsGetCall) doRequest(alt string) (*http.Response, error) {
26911 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26912 if c.ifNoneMatch_ != "" {
26913 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26914 }
26915 var body io.Reader = nil
26916 c.urlParams_.Set("alt", alt)
26917 c.urlParams_.Set("prettyPrint", "false")
26918 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/youtubeAdGroups/{+youtubeAdGroupId}")
26919 urls += "?" + c.urlParams_.Encode()
26920 req, err := http.NewRequest("GET", urls, body)
26921 if err != nil {
26922 return nil, err
26923 }
26924 req.Header = reqHeaders
26925 googleapi.Expand(req.URL, map[string]string{
26926 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26927 "youtubeAdGroupId": strconv.FormatInt(c.youtubeAdGroupId, 10),
26928 })
26929 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26930 }
26931
26932
26933
26934
26935
26936
26937 func (c *AdvertisersYoutubeAdGroupsGetCall) Do(opts ...googleapi.CallOption) (*YoutubeAdGroup, error) {
26938 gensupport.SetOptions(c.urlParams_, opts...)
26939 res, err := c.doRequest("json")
26940 if res != nil && res.StatusCode == http.StatusNotModified {
26941 if res.Body != nil {
26942 res.Body.Close()
26943 }
26944 return nil, gensupport.WrapError(&googleapi.Error{
26945 Code: res.StatusCode,
26946 Header: res.Header,
26947 })
26948 }
26949 if err != nil {
26950 return nil, err
26951 }
26952 defer googleapi.CloseBody(res)
26953 if err := googleapi.CheckResponse(res); err != nil {
26954 return nil, gensupport.WrapError(err)
26955 }
26956 ret := &YoutubeAdGroup{
26957 ServerResponse: googleapi.ServerResponse{
26958 Header: res.Header,
26959 HTTPStatusCode: res.StatusCode,
26960 },
26961 }
26962 target := &ret
26963 if err := gensupport.DecodeResponse(target, res); err != nil {
26964 return nil, err
26965 }
26966 return ret, nil
26967 }
26968
26969 type AdvertisersYoutubeAdGroupsListCall struct {
26970 s *Service
26971 advertiserId int64
26972 urlParams_ gensupport.URLParams
26973 ifNoneMatch_ string
26974 ctx_ context.Context
26975 header_ http.Header
26976 }
26977
26978
26979
26980
26981 func (r *AdvertisersYoutubeAdGroupsService) List(advertiserId int64) *AdvertisersYoutubeAdGroupsListCall {
26982 c := &AdvertisersYoutubeAdGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26983 c.advertiserId = advertiserId
26984 return c
26985 }
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002 func (c *AdvertisersYoutubeAdGroupsListCall) Filter(filter string) *AdvertisersYoutubeAdGroupsListCall {
27003 c.urlParams_.Set("filter", filter)
27004 return c
27005 }
27006
27007
27008
27009
27010
27011
27012 func (c *AdvertisersYoutubeAdGroupsListCall) OrderBy(orderBy string) *AdvertisersYoutubeAdGroupsListCall {
27013 c.urlParams_.Set("orderBy", orderBy)
27014 return c
27015 }
27016
27017
27018
27019
27020 func (c *AdvertisersYoutubeAdGroupsListCall) PageSize(pageSize int64) *AdvertisersYoutubeAdGroupsListCall {
27021 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27022 return c
27023 }
27024
27025
27026
27027
27028
27029 func (c *AdvertisersYoutubeAdGroupsListCall) PageToken(pageToken string) *AdvertisersYoutubeAdGroupsListCall {
27030 c.urlParams_.Set("pageToken", pageToken)
27031 return c
27032 }
27033
27034
27035
27036
27037 func (c *AdvertisersYoutubeAdGroupsListCall) Fields(s ...googleapi.Field) *AdvertisersYoutubeAdGroupsListCall {
27038 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27039 return c
27040 }
27041
27042
27043
27044
27045 func (c *AdvertisersYoutubeAdGroupsListCall) IfNoneMatch(entityTag string) *AdvertisersYoutubeAdGroupsListCall {
27046 c.ifNoneMatch_ = entityTag
27047 return c
27048 }
27049
27050
27051 func (c *AdvertisersYoutubeAdGroupsListCall) Context(ctx context.Context) *AdvertisersYoutubeAdGroupsListCall {
27052 c.ctx_ = ctx
27053 return c
27054 }
27055
27056
27057
27058 func (c *AdvertisersYoutubeAdGroupsListCall) Header() http.Header {
27059 if c.header_ == nil {
27060 c.header_ = make(http.Header)
27061 }
27062 return c.header_
27063 }
27064
27065 func (c *AdvertisersYoutubeAdGroupsListCall) doRequest(alt string) (*http.Response, error) {
27066 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27067 if c.ifNoneMatch_ != "" {
27068 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27069 }
27070 var body io.Reader = nil
27071 c.urlParams_.Set("alt", alt)
27072 c.urlParams_.Set("prettyPrint", "false")
27073 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/youtubeAdGroups")
27074 urls += "?" + c.urlParams_.Encode()
27075 req, err := http.NewRequest("GET", urls, body)
27076 if err != nil {
27077 return nil, err
27078 }
27079 req.Header = reqHeaders
27080 googleapi.Expand(req.URL, map[string]string{
27081 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
27082 })
27083 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27084 }
27085
27086
27087
27088
27089
27090
27091
27092 func (c *AdvertisersYoutubeAdGroupsListCall) Do(opts ...googleapi.CallOption) (*ListYoutubeAdGroupsResponse, error) {
27093 gensupport.SetOptions(c.urlParams_, opts...)
27094 res, err := c.doRequest("json")
27095 if res != nil && res.StatusCode == http.StatusNotModified {
27096 if res.Body != nil {
27097 res.Body.Close()
27098 }
27099 return nil, gensupport.WrapError(&googleapi.Error{
27100 Code: res.StatusCode,
27101 Header: res.Header,
27102 })
27103 }
27104 if err != nil {
27105 return nil, err
27106 }
27107 defer googleapi.CloseBody(res)
27108 if err := googleapi.CheckResponse(res); err != nil {
27109 return nil, gensupport.WrapError(err)
27110 }
27111 ret := &ListYoutubeAdGroupsResponse{
27112 ServerResponse: googleapi.ServerResponse{
27113 Header: res.Header,
27114 HTTPStatusCode: res.StatusCode,
27115 },
27116 }
27117 target := &ret
27118 if err := gensupport.DecodeResponse(target, res); err != nil {
27119 return nil, err
27120 }
27121 return ret, nil
27122 }
27123
27124
27125
27126
27127 func (c *AdvertisersYoutubeAdGroupsListCall) Pages(ctx context.Context, f func(*ListYoutubeAdGroupsResponse) error) error {
27128 c.ctx_ = ctx
27129 defer c.PageToken(c.urlParams_.Get("pageToken"))
27130 for {
27131 x, err := c.Do()
27132 if err != nil {
27133 return err
27134 }
27135 if err := f(x); err != nil {
27136 return err
27137 }
27138 if x.NextPageToken == "" {
27139 return nil
27140 }
27141 c.PageToken(x.NextPageToken)
27142 }
27143 }
27144
27145 type AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall struct {
27146 s *Service
27147 advertiserId int64
27148 youtubeAdGroupId int64
27149 targetingType string
27150 assignedTargetingOptionId string
27151 urlParams_ gensupport.URLParams
27152 ifNoneMatch_ string
27153 ctx_ context.Context
27154 header_ http.Header
27155 }
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174 func (r *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, youtubeAdGroupId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall {
27175 c := &AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27176 c.advertiserId = advertiserId
27177 c.youtubeAdGroupId = youtubeAdGroupId
27178 c.targetingType = targetingType
27179 c.assignedTargetingOptionId = assignedTargetingOptionId
27180 return c
27181 }
27182
27183
27184
27185
27186 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall {
27187 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27188 return c
27189 }
27190
27191
27192
27193
27194 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall {
27195 c.ifNoneMatch_ = entityTag
27196 return c
27197 }
27198
27199
27200 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall {
27201 c.ctx_ = ctx
27202 return c
27203 }
27204
27205
27206
27207 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
27208 if c.header_ == nil {
27209 c.header_ = make(http.Header)
27210 }
27211 return c.header_
27212 }
27213
27214 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
27215 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27216 if c.ifNoneMatch_ != "" {
27217 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27218 }
27219 var body io.Reader = nil
27220 c.urlParams_.Set("alt", alt)
27221 c.urlParams_.Set("prettyPrint", "false")
27222 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/youtubeAdGroups/{+youtubeAdGroupId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
27223 urls += "?" + c.urlParams_.Encode()
27224 req, err := http.NewRequest("GET", urls, body)
27225 if err != nil {
27226 return nil, err
27227 }
27228 req.Header = reqHeaders
27229 googleapi.Expand(req.URL, map[string]string{
27230 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
27231 "youtubeAdGroupId": strconv.FormatInt(c.youtubeAdGroupId, 10),
27232 "targetingType": c.targetingType,
27233 "assignedTargetingOptionId": c.assignedTargetingOptionId,
27234 })
27235 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27236 }
27237
27238
27239
27240
27241
27242
27243
27244 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
27245 gensupport.SetOptions(c.urlParams_, opts...)
27246 res, err := c.doRequest("json")
27247 if res != nil && res.StatusCode == http.StatusNotModified {
27248 if res.Body != nil {
27249 res.Body.Close()
27250 }
27251 return nil, gensupport.WrapError(&googleapi.Error{
27252 Code: res.StatusCode,
27253 Header: res.Header,
27254 })
27255 }
27256 if err != nil {
27257 return nil, err
27258 }
27259 defer googleapi.CloseBody(res)
27260 if err := googleapi.CheckResponse(res); err != nil {
27261 return nil, gensupport.WrapError(err)
27262 }
27263 ret := &AssignedTargetingOption{
27264 ServerResponse: googleapi.ServerResponse{
27265 Header: res.Header,
27266 HTTPStatusCode: res.StatusCode,
27267 },
27268 }
27269 target := &ret
27270 if err := gensupport.DecodeResponse(target, res); err != nil {
27271 return nil, err
27272 }
27273 return ret, nil
27274 }
27275
27276 type AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall struct {
27277 s *Service
27278 advertiserId int64
27279 youtubeAdGroupId int64
27280 targetingType string
27281 urlParams_ gensupport.URLParams
27282 ifNoneMatch_ string
27283 ctx_ context.Context
27284 header_ http.Header
27285 }
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301 func (r *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, youtubeAdGroupId int64, targetingType string) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
27302 c := &AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27303 c.advertiserId = advertiserId
27304 c.youtubeAdGroupId = youtubeAdGroupId
27305 c.targetingType = targetingType
27306 return c
27307 }
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
27320 c.urlParams_.Set("filter", filter)
27321 return c
27322 }
27323
27324
27325
27326
27327
27328
27329 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
27330 c.urlParams_.Set("orderBy", orderBy)
27331 return c
27332 }
27333
27334
27335
27336
27337 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
27338 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27339 return c
27340 }
27341
27342
27343
27344
27345
27346
27347 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
27348 c.urlParams_.Set("pageToken", pageToken)
27349 return c
27350 }
27351
27352
27353
27354
27355 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
27356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27357 return c
27358 }
27359
27360
27361
27362
27363 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
27364 c.ifNoneMatch_ = entityTag
27365 return c
27366 }
27367
27368
27369 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
27370 c.ctx_ = ctx
27371 return c
27372 }
27373
27374
27375
27376 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
27377 if c.header_ == nil {
27378 c.header_ = make(http.Header)
27379 }
27380 return c.header_
27381 }
27382
27383 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
27384 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27385 if c.ifNoneMatch_ != "" {
27386 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27387 }
27388 var body io.Reader = nil
27389 c.urlParams_.Set("alt", alt)
27390 c.urlParams_.Set("prettyPrint", "false")
27391 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/advertisers/{+advertiserId}/youtubeAdGroups/{+youtubeAdGroupId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
27392 urls += "?" + c.urlParams_.Encode()
27393 req, err := http.NewRequest("GET", urls, body)
27394 if err != nil {
27395 return nil, err
27396 }
27397 req.Header = reqHeaders
27398 googleapi.Expand(req.URL, map[string]string{
27399 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
27400 "youtubeAdGroupId": strconv.FormatInt(c.youtubeAdGroupId, 10),
27401 "targetingType": c.targetingType,
27402 })
27403 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27404 }
27405
27406
27407
27408
27409
27410
27411
27412 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListYoutubeAdGroupAssignedTargetingOptionsResponse, error) {
27413 gensupport.SetOptions(c.urlParams_, opts...)
27414 res, err := c.doRequest("json")
27415 if res != nil && res.StatusCode == http.StatusNotModified {
27416 if res.Body != nil {
27417 res.Body.Close()
27418 }
27419 return nil, gensupport.WrapError(&googleapi.Error{
27420 Code: res.StatusCode,
27421 Header: res.Header,
27422 })
27423 }
27424 if err != nil {
27425 return nil, err
27426 }
27427 defer googleapi.CloseBody(res)
27428 if err := googleapi.CheckResponse(res); err != nil {
27429 return nil, gensupport.WrapError(err)
27430 }
27431 ret := &ListYoutubeAdGroupAssignedTargetingOptionsResponse{
27432 ServerResponse: googleapi.ServerResponse{
27433 Header: res.Header,
27434 HTTPStatusCode: res.StatusCode,
27435 },
27436 }
27437 target := &ret
27438 if err := gensupport.DecodeResponse(target, res); err != nil {
27439 return nil, err
27440 }
27441 return ret, nil
27442 }
27443
27444
27445
27446
27447 func (c *AdvertisersYoutubeAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListYoutubeAdGroupAssignedTargetingOptionsResponse) error) error {
27448 c.ctx_ = ctx
27449 defer c.PageToken(c.urlParams_.Get("pageToken"))
27450 for {
27451 x, err := c.Do()
27452 if err != nil {
27453 return err
27454 }
27455 if err := f(x); err != nil {
27456 return err
27457 }
27458 if x.NextPageToken == "" {
27459 return nil
27460 }
27461 c.PageToken(x.NextPageToken)
27462 }
27463 }
27464
27465 type CombinedAudiencesGetCall struct {
27466 s *Service
27467 combinedAudienceId int64
27468 urlParams_ gensupport.URLParams
27469 ifNoneMatch_ string
27470 ctx_ context.Context
27471 header_ http.Header
27472 }
27473
27474
27475
27476
27477 func (r *CombinedAudiencesService) Get(combinedAudienceId int64) *CombinedAudiencesGetCall {
27478 c := &CombinedAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27479 c.combinedAudienceId = combinedAudienceId
27480 return c
27481 }
27482
27483
27484
27485 func (c *CombinedAudiencesGetCall) AdvertiserId(advertiserId int64) *CombinedAudiencesGetCall {
27486 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
27487 return c
27488 }
27489
27490
27491
27492 func (c *CombinedAudiencesGetCall) PartnerId(partnerId int64) *CombinedAudiencesGetCall {
27493 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
27494 return c
27495 }
27496
27497
27498
27499
27500 func (c *CombinedAudiencesGetCall) Fields(s ...googleapi.Field) *CombinedAudiencesGetCall {
27501 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27502 return c
27503 }
27504
27505
27506
27507
27508 func (c *CombinedAudiencesGetCall) IfNoneMatch(entityTag string) *CombinedAudiencesGetCall {
27509 c.ifNoneMatch_ = entityTag
27510 return c
27511 }
27512
27513
27514 func (c *CombinedAudiencesGetCall) Context(ctx context.Context) *CombinedAudiencesGetCall {
27515 c.ctx_ = ctx
27516 return c
27517 }
27518
27519
27520
27521 func (c *CombinedAudiencesGetCall) Header() http.Header {
27522 if c.header_ == nil {
27523 c.header_ = make(http.Header)
27524 }
27525 return c.header_
27526 }
27527
27528 func (c *CombinedAudiencesGetCall) doRequest(alt string) (*http.Response, error) {
27529 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27530 if c.ifNoneMatch_ != "" {
27531 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27532 }
27533 var body io.Reader = nil
27534 c.urlParams_.Set("alt", alt)
27535 c.urlParams_.Set("prettyPrint", "false")
27536 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/combinedAudiences/{+combinedAudienceId}")
27537 urls += "?" + c.urlParams_.Encode()
27538 req, err := http.NewRequest("GET", urls, body)
27539 if err != nil {
27540 return nil, err
27541 }
27542 req.Header = reqHeaders
27543 googleapi.Expand(req.URL, map[string]string{
27544 "combinedAudienceId": strconv.FormatInt(c.combinedAudienceId, 10),
27545 })
27546 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27547 }
27548
27549
27550
27551
27552
27553
27554
27555 func (c *CombinedAudiencesGetCall) Do(opts ...googleapi.CallOption) (*CombinedAudience, error) {
27556 gensupport.SetOptions(c.urlParams_, opts...)
27557 res, err := c.doRequest("json")
27558 if res != nil && res.StatusCode == http.StatusNotModified {
27559 if res.Body != nil {
27560 res.Body.Close()
27561 }
27562 return nil, gensupport.WrapError(&googleapi.Error{
27563 Code: res.StatusCode,
27564 Header: res.Header,
27565 })
27566 }
27567 if err != nil {
27568 return nil, err
27569 }
27570 defer googleapi.CloseBody(res)
27571 if err := googleapi.CheckResponse(res); err != nil {
27572 return nil, gensupport.WrapError(err)
27573 }
27574 ret := &CombinedAudience{
27575 ServerResponse: googleapi.ServerResponse{
27576 Header: res.Header,
27577 HTTPStatusCode: res.StatusCode,
27578 },
27579 }
27580 target := &ret
27581 if err := gensupport.DecodeResponse(target, res); err != nil {
27582 return nil, err
27583 }
27584 return ret, nil
27585 }
27586
27587 type CombinedAudiencesListCall struct {
27588 s *Service
27589 urlParams_ gensupport.URLParams
27590 ifNoneMatch_ string
27591 ctx_ context.Context
27592 header_ http.Header
27593 }
27594
27595
27596
27597 func (r *CombinedAudiencesService) List() *CombinedAudiencesListCall {
27598 c := &CombinedAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27599 return c
27600 }
27601
27602
27603
27604 func (c *CombinedAudiencesListCall) AdvertiserId(advertiserId int64) *CombinedAudiencesListCall {
27605 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
27606 return c
27607 }
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618 func (c *CombinedAudiencesListCall) Filter(filter string) *CombinedAudiencesListCall {
27619 c.urlParams_.Set("filter", filter)
27620 return c
27621 }
27622
27623
27624
27625
27626
27627
27628 func (c *CombinedAudiencesListCall) OrderBy(orderBy string) *CombinedAudiencesListCall {
27629 c.urlParams_.Set("orderBy", orderBy)
27630 return c
27631 }
27632
27633
27634
27635
27636 func (c *CombinedAudiencesListCall) PageSize(pageSize int64) *CombinedAudiencesListCall {
27637 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27638 return c
27639 }
27640
27641
27642
27643
27644
27645 func (c *CombinedAudiencesListCall) PageToken(pageToken string) *CombinedAudiencesListCall {
27646 c.urlParams_.Set("pageToken", pageToken)
27647 return c
27648 }
27649
27650
27651
27652 func (c *CombinedAudiencesListCall) PartnerId(partnerId int64) *CombinedAudiencesListCall {
27653 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
27654 return c
27655 }
27656
27657
27658
27659
27660 func (c *CombinedAudiencesListCall) Fields(s ...googleapi.Field) *CombinedAudiencesListCall {
27661 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27662 return c
27663 }
27664
27665
27666
27667
27668 func (c *CombinedAudiencesListCall) IfNoneMatch(entityTag string) *CombinedAudiencesListCall {
27669 c.ifNoneMatch_ = entityTag
27670 return c
27671 }
27672
27673
27674 func (c *CombinedAudiencesListCall) Context(ctx context.Context) *CombinedAudiencesListCall {
27675 c.ctx_ = ctx
27676 return c
27677 }
27678
27679
27680
27681 func (c *CombinedAudiencesListCall) Header() http.Header {
27682 if c.header_ == nil {
27683 c.header_ = make(http.Header)
27684 }
27685 return c.header_
27686 }
27687
27688 func (c *CombinedAudiencesListCall) doRequest(alt string) (*http.Response, error) {
27689 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27690 if c.ifNoneMatch_ != "" {
27691 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27692 }
27693 var body io.Reader = nil
27694 c.urlParams_.Set("alt", alt)
27695 c.urlParams_.Set("prettyPrint", "false")
27696 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/combinedAudiences")
27697 urls += "?" + c.urlParams_.Encode()
27698 req, err := http.NewRequest("GET", urls, body)
27699 if err != nil {
27700 return nil, err
27701 }
27702 req.Header = reqHeaders
27703 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27704 }
27705
27706
27707
27708
27709
27710
27711
27712 func (c *CombinedAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListCombinedAudiencesResponse, error) {
27713 gensupport.SetOptions(c.urlParams_, opts...)
27714 res, err := c.doRequest("json")
27715 if res != nil && res.StatusCode == http.StatusNotModified {
27716 if res.Body != nil {
27717 res.Body.Close()
27718 }
27719 return nil, gensupport.WrapError(&googleapi.Error{
27720 Code: res.StatusCode,
27721 Header: res.Header,
27722 })
27723 }
27724 if err != nil {
27725 return nil, err
27726 }
27727 defer googleapi.CloseBody(res)
27728 if err := googleapi.CheckResponse(res); err != nil {
27729 return nil, gensupport.WrapError(err)
27730 }
27731 ret := &ListCombinedAudiencesResponse{
27732 ServerResponse: googleapi.ServerResponse{
27733 Header: res.Header,
27734 HTTPStatusCode: res.StatusCode,
27735 },
27736 }
27737 target := &ret
27738 if err := gensupport.DecodeResponse(target, res); err != nil {
27739 return nil, err
27740 }
27741 return ret, nil
27742 }
27743
27744
27745
27746
27747 func (c *CombinedAudiencesListCall) Pages(ctx context.Context, f func(*ListCombinedAudiencesResponse) error) error {
27748 c.ctx_ = ctx
27749 defer c.PageToken(c.urlParams_.Get("pageToken"))
27750 for {
27751 x, err := c.Do()
27752 if err != nil {
27753 return err
27754 }
27755 if err := f(x); err != nil {
27756 return err
27757 }
27758 if x.NextPageToken == "" {
27759 return nil
27760 }
27761 c.PageToken(x.NextPageToken)
27762 }
27763 }
27764
27765 type CustomBiddingAlgorithmsCreateCall struct {
27766 s *Service
27767 custombiddingalgorithm *CustomBiddingAlgorithm
27768 urlParams_ gensupport.URLParams
27769 ctx_ context.Context
27770 header_ http.Header
27771 }
27772
27773
27774
27775 func (r *CustomBiddingAlgorithmsService) Create(custombiddingalgorithm *CustomBiddingAlgorithm) *CustomBiddingAlgorithmsCreateCall {
27776 c := &CustomBiddingAlgorithmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27777 c.custombiddingalgorithm = custombiddingalgorithm
27778 return c
27779 }
27780
27781
27782
27783
27784 func (c *CustomBiddingAlgorithmsCreateCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsCreateCall {
27785 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27786 return c
27787 }
27788
27789
27790 func (c *CustomBiddingAlgorithmsCreateCall) Context(ctx context.Context) *CustomBiddingAlgorithmsCreateCall {
27791 c.ctx_ = ctx
27792 return c
27793 }
27794
27795
27796
27797 func (c *CustomBiddingAlgorithmsCreateCall) Header() http.Header {
27798 if c.header_ == nil {
27799 c.header_ = make(http.Header)
27800 }
27801 return c.header_
27802 }
27803
27804 func (c *CustomBiddingAlgorithmsCreateCall) doRequest(alt string) (*http.Response, error) {
27805 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27806 var body io.Reader = nil
27807 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingalgorithm)
27808 if err != nil {
27809 return nil, err
27810 }
27811 c.urlParams_.Set("alt", alt)
27812 c.urlParams_.Set("prettyPrint", "false")
27813 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customBiddingAlgorithms")
27814 urls += "?" + c.urlParams_.Encode()
27815 req, err := http.NewRequest("POST", urls, body)
27816 if err != nil {
27817 return nil, err
27818 }
27819 req.Header = reqHeaders
27820 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27821 }
27822
27823
27824
27825
27826
27827
27828
27829 func (c *CustomBiddingAlgorithmsCreateCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) {
27830 gensupport.SetOptions(c.urlParams_, opts...)
27831 res, err := c.doRequest("json")
27832 if res != nil && res.StatusCode == http.StatusNotModified {
27833 if res.Body != nil {
27834 res.Body.Close()
27835 }
27836 return nil, gensupport.WrapError(&googleapi.Error{
27837 Code: res.StatusCode,
27838 Header: res.Header,
27839 })
27840 }
27841 if err != nil {
27842 return nil, err
27843 }
27844 defer googleapi.CloseBody(res)
27845 if err := googleapi.CheckResponse(res); err != nil {
27846 return nil, gensupport.WrapError(err)
27847 }
27848 ret := &CustomBiddingAlgorithm{
27849 ServerResponse: googleapi.ServerResponse{
27850 Header: res.Header,
27851 HTTPStatusCode: res.StatusCode,
27852 },
27853 }
27854 target := &ret
27855 if err := gensupport.DecodeResponse(target, res); err != nil {
27856 return nil, err
27857 }
27858 return ret, nil
27859 }
27860
27861 type CustomBiddingAlgorithmsGetCall struct {
27862 s *Service
27863 customBiddingAlgorithmId int64
27864 urlParams_ gensupport.URLParams
27865 ifNoneMatch_ string
27866 ctx_ context.Context
27867 header_ http.Header
27868 }
27869
27870
27871
27872
27873 func (r *CustomBiddingAlgorithmsService) Get(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsGetCall {
27874 c := &CustomBiddingAlgorithmsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27875 c.customBiddingAlgorithmId = customBiddingAlgorithmId
27876 return c
27877 }
27878
27879
27880
27881 func (c *CustomBiddingAlgorithmsGetCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsGetCall {
27882 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
27883 return c
27884 }
27885
27886
27887
27888 func (c *CustomBiddingAlgorithmsGetCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsGetCall {
27889 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
27890 return c
27891 }
27892
27893
27894
27895
27896 func (c *CustomBiddingAlgorithmsGetCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsGetCall {
27897 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27898 return c
27899 }
27900
27901
27902
27903
27904 func (c *CustomBiddingAlgorithmsGetCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsGetCall {
27905 c.ifNoneMatch_ = entityTag
27906 return c
27907 }
27908
27909
27910 func (c *CustomBiddingAlgorithmsGetCall) Context(ctx context.Context) *CustomBiddingAlgorithmsGetCall {
27911 c.ctx_ = ctx
27912 return c
27913 }
27914
27915
27916
27917 func (c *CustomBiddingAlgorithmsGetCall) Header() http.Header {
27918 if c.header_ == nil {
27919 c.header_ = make(http.Header)
27920 }
27921 return c.header_
27922 }
27923
27924 func (c *CustomBiddingAlgorithmsGetCall) doRequest(alt string) (*http.Response, error) {
27925 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27926 if c.ifNoneMatch_ != "" {
27927 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27928 }
27929 var body io.Reader = nil
27930 c.urlParams_.Set("alt", alt)
27931 c.urlParams_.Set("prettyPrint", "false")
27932 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customBiddingAlgorithms/{+customBiddingAlgorithmId}")
27933 urls += "?" + c.urlParams_.Encode()
27934 req, err := http.NewRequest("GET", urls, body)
27935 if err != nil {
27936 return nil, err
27937 }
27938 req.Header = reqHeaders
27939 googleapi.Expand(req.URL, map[string]string{
27940 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
27941 })
27942 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27943 }
27944
27945
27946
27947
27948
27949
27950
27951 func (c *CustomBiddingAlgorithmsGetCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) {
27952 gensupport.SetOptions(c.urlParams_, opts...)
27953 res, err := c.doRequest("json")
27954 if res != nil && res.StatusCode == http.StatusNotModified {
27955 if res.Body != nil {
27956 res.Body.Close()
27957 }
27958 return nil, gensupport.WrapError(&googleapi.Error{
27959 Code: res.StatusCode,
27960 Header: res.Header,
27961 })
27962 }
27963 if err != nil {
27964 return nil, err
27965 }
27966 defer googleapi.CloseBody(res)
27967 if err := googleapi.CheckResponse(res); err != nil {
27968 return nil, gensupport.WrapError(err)
27969 }
27970 ret := &CustomBiddingAlgorithm{
27971 ServerResponse: googleapi.ServerResponse{
27972 Header: res.Header,
27973 HTTPStatusCode: res.StatusCode,
27974 },
27975 }
27976 target := &ret
27977 if err := gensupport.DecodeResponse(target, res); err != nil {
27978 return nil, err
27979 }
27980 return ret, nil
27981 }
27982
27983 type CustomBiddingAlgorithmsListCall struct {
27984 s *Service
27985 urlParams_ gensupport.URLParams
27986 ifNoneMatch_ string
27987 ctx_ context.Context
27988 header_ http.Header
27989 }
27990
27991
27992
27993
27994 func (r *CustomBiddingAlgorithmsService) List() *CustomBiddingAlgorithmsListCall {
27995 c := &CustomBiddingAlgorithmsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27996 return c
27997 }
27998
27999
28000
28001 func (c *CustomBiddingAlgorithmsListCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsListCall {
28002 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28003 return c
28004 }
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019 func (c *CustomBiddingAlgorithmsListCall) Filter(filter string) *CustomBiddingAlgorithmsListCall {
28020 c.urlParams_.Set("filter", filter)
28021 return c
28022 }
28023
28024
28025
28026
28027
28028 func (c *CustomBiddingAlgorithmsListCall) OrderBy(orderBy string) *CustomBiddingAlgorithmsListCall {
28029 c.urlParams_.Set("orderBy", orderBy)
28030 return c
28031 }
28032
28033
28034
28035
28036 func (c *CustomBiddingAlgorithmsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsListCall {
28037 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28038 return c
28039 }
28040
28041
28042
28043
28044
28045
28046 func (c *CustomBiddingAlgorithmsListCall) PageToken(pageToken string) *CustomBiddingAlgorithmsListCall {
28047 c.urlParams_.Set("pageToken", pageToken)
28048 return c
28049 }
28050
28051
28052
28053 func (c *CustomBiddingAlgorithmsListCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsListCall {
28054 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28055 return c
28056 }
28057
28058
28059
28060
28061 func (c *CustomBiddingAlgorithmsListCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsListCall {
28062 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28063 return c
28064 }
28065
28066
28067
28068
28069 func (c *CustomBiddingAlgorithmsListCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsListCall {
28070 c.ifNoneMatch_ = entityTag
28071 return c
28072 }
28073
28074
28075 func (c *CustomBiddingAlgorithmsListCall) Context(ctx context.Context) *CustomBiddingAlgorithmsListCall {
28076 c.ctx_ = ctx
28077 return c
28078 }
28079
28080
28081
28082 func (c *CustomBiddingAlgorithmsListCall) Header() http.Header {
28083 if c.header_ == nil {
28084 c.header_ = make(http.Header)
28085 }
28086 return c.header_
28087 }
28088
28089 func (c *CustomBiddingAlgorithmsListCall) doRequest(alt string) (*http.Response, error) {
28090 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28091 if c.ifNoneMatch_ != "" {
28092 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28093 }
28094 var body io.Reader = nil
28095 c.urlParams_.Set("alt", alt)
28096 c.urlParams_.Set("prettyPrint", "false")
28097 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customBiddingAlgorithms")
28098 urls += "?" + c.urlParams_.Encode()
28099 req, err := http.NewRequest("GET", urls, body)
28100 if err != nil {
28101 return nil, err
28102 }
28103 req.Header = reqHeaders
28104 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28105 }
28106
28107
28108
28109
28110
28111
28112
28113 func (c *CustomBiddingAlgorithmsListCall) Do(opts ...googleapi.CallOption) (*ListCustomBiddingAlgorithmsResponse, error) {
28114 gensupport.SetOptions(c.urlParams_, opts...)
28115 res, err := c.doRequest("json")
28116 if res != nil && res.StatusCode == http.StatusNotModified {
28117 if res.Body != nil {
28118 res.Body.Close()
28119 }
28120 return nil, gensupport.WrapError(&googleapi.Error{
28121 Code: res.StatusCode,
28122 Header: res.Header,
28123 })
28124 }
28125 if err != nil {
28126 return nil, err
28127 }
28128 defer googleapi.CloseBody(res)
28129 if err := googleapi.CheckResponse(res); err != nil {
28130 return nil, gensupport.WrapError(err)
28131 }
28132 ret := &ListCustomBiddingAlgorithmsResponse{
28133 ServerResponse: googleapi.ServerResponse{
28134 Header: res.Header,
28135 HTTPStatusCode: res.StatusCode,
28136 },
28137 }
28138 target := &ret
28139 if err := gensupport.DecodeResponse(target, res); err != nil {
28140 return nil, err
28141 }
28142 return ret, nil
28143 }
28144
28145
28146
28147
28148 func (c *CustomBiddingAlgorithmsListCall) Pages(ctx context.Context, f func(*ListCustomBiddingAlgorithmsResponse) error) error {
28149 c.ctx_ = ctx
28150 defer c.PageToken(c.urlParams_.Get("pageToken"))
28151 for {
28152 x, err := c.Do()
28153 if err != nil {
28154 return err
28155 }
28156 if err := f(x); err != nil {
28157 return err
28158 }
28159 if x.NextPageToken == "" {
28160 return nil
28161 }
28162 c.PageToken(x.NextPageToken)
28163 }
28164 }
28165
28166 type CustomBiddingAlgorithmsPatchCall struct {
28167 s *Service
28168 customBiddingAlgorithmId int64
28169 custombiddingalgorithm *CustomBiddingAlgorithm
28170 urlParams_ gensupport.URLParams
28171 ctx_ context.Context
28172 header_ http.Header
28173 }
28174
28175
28176
28177
28178
28179
28180 func (r *CustomBiddingAlgorithmsService) Patch(customBiddingAlgorithmId int64, custombiddingalgorithm *CustomBiddingAlgorithm) *CustomBiddingAlgorithmsPatchCall {
28181 c := &CustomBiddingAlgorithmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28182 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28183 c.custombiddingalgorithm = custombiddingalgorithm
28184 return c
28185 }
28186
28187
28188
28189 func (c *CustomBiddingAlgorithmsPatchCall) UpdateMask(updateMask string) *CustomBiddingAlgorithmsPatchCall {
28190 c.urlParams_.Set("updateMask", updateMask)
28191 return c
28192 }
28193
28194
28195
28196
28197 func (c *CustomBiddingAlgorithmsPatchCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsPatchCall {
28198 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28199 return c
28200 }
28201
28202
28203 func (c *CustomBiddingAlgorithmsPatchCall) Context(ctx context.Context) *CustomBiddingAlgorithmsPatchCall {
28204 c.ctx_ = ctx
28205 return c
28206 }
28207
28208
28209
28210 func (c *CustomBiddingAlgorithmsPatchCall) Header() http.Header {
28211 if c.header_ == nil {
28212 c.header_ = make(http.Header)
28213 }
28214 return c.header_
28215 }
28216
28217 func (c *CustomBiddingAlgorithmsPatchCall) doRequest(alt string) (*http.Response, error) {
28218 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
28219 var body io.Reader = nil
28220 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingalgorithm)
28221 if err != nil {
28222 return nil, err
28223 }
28224 c.urlParams_.Set("alt", alt)
28225 c.urlParams_.Set("prettyPrint", "false")
28226 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customBiddingAlgorithms/{+customBiddingAlgorithmId}")
28227 urls += "?" + c.urlParams_.Encode()
28228 req, err := http.NewRequest("PATCH", urls, body)
28229 if err != nil {
28230 return nil, err
28231 }
28232 req.Header = reqHeaders
28233 googleapi.Expand(req.URL, map[string]string{
28234 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28235 })
28236 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28237 }
28238
28239
28240
28241
28242
28243
28244
28245 func (c *CustomBiddingAlgorithmsPatchCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) {
28246 gensupport.SetOptions(c.urlParams_, opts...)
28247 res, err := c.doRequest("json")
28248 if res != nil && res.StatusCode == http.StatusNotModified {
28249 if res.Body != nil {
28250 res.Body.Close()
28251 }
28252 return nil, gensupport.WrapError(&googleapi.Error{
28253 Code: res.StatusCode,
28254 Header: res.Header,
28255 })
28256 }
28257 if err != nil {
28258 return nil, err
28259 }
28260 defer googleapi.CloseBody(res)
28261 if err := googleapi.CheckResponse(res); err != nil {
28262 return nil, gensupport.WrapError(err)
28263 }
28264 ret := &CustomBiddingAlgorithm{
28265 ServerResponse: googleapi.ServerResponse{
28266 Header: res.Header,
28267 HTTPStatusCode: res.StatusCode,
28268 },
28269 }
28270 target := &ret
28271 if err := gensupport.DecodeResponse(target, res); err != nil {
28272 return nil, err
28273 }
28274 return ret, nil
28275 }
28276
28277 type CustomBiddingAlgorithmsUploadScriptCall struct {
28278 s *Service
28279 customBiddingAlgorithmId int64
28280 urlParams_ gensupport.URLParams
28281 ifNoneMatch_ string
28282 ctx_ context.Context
28283 header_ http.Header
28284 }
28285
28286
28287
28288
28289
28290
28291
28292
28293 func (r *CustomBiddingAlgorithmsService) UploadScript(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsUploadScriptCall {
28294 c := &CustomBiddingAlgorithmsUploadScriptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28295 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28296 return c
28297 }
28298
28299
28300
28301 func (c *CustomBiddingAlgorithmsUploadScriptCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsUploadScriptCall {
28302 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28303 return c
28304 }
28305
28306
28307
28308
28309 func (c *CustomBiddingAlgorithmsUploadScriptCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsUploadScriptCall {
28310 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28311 return c
28312 }
28313
28314
28315
28316
28317 func (c *CustomBiddingAlgorithmsUploadScriptCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsUploadScriptCall {
28318 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28319 return c
28320 }
28321
28322
28323
28324
28325 func (c *CustomBiddingAlgorithmsUploadScriptCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsUploadScriptCall {
28326 c.ifNoneMatch_ = entityTag
28327 return c
28328 }
28329
28330
28331 func (c *CustomBiddingAlgorithmsUploadScriptCall) Context(ctx context.Context) *CustomBiddingAlgorithmsUploadScriptCall {
28332 c.ctx_ = ctx
28333 return c
28334 }
28335
28336
28337
28338 func (c *CustomBiddingAlgorithmsUploadScriptCall) Header() http.Header {
28339 if c.header_ == nil {
28340 c.header_ = make(http.Header)
28341 }
28342 return c.header_
28343 }
28344
28345 func (c *CustomBiddingAlgorithmsUploadScriptCall) doRequest(alt string) (*http.Response, error) {
28346 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28347 if c.ifNoneMatch_ != "" {
28348 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28349 }
28350 var body io.Reader = nil
28351 c.urlParams_.Set("alt", alt)
28352 c.urlParams_.Set("prettyPrint", "false")
28353 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customBiddingAlgorithms/{+customBiddingAlgorithmId}:uploadScript")
28354 urls += "?" + c.urlParams_.Encode()
28355 req, err := http.NewRequest("GET", urls, body)
28356 if err != nil {
28357 return nil, err
28358 }
28359 req.Header = reqHeaders
28360 googleapi.Expand(req.URL, map[string]string{
28361 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28362 })
28363 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28364 }
28365
28366
28367
28368
28369
28370
28371
28372 func (c *CustomBiddingAlgorithmsUploadScriptCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScriptRef, error) {
28373 gensupport.SetOptions(c.urlParams_, opts...)
28374 res, err := c.doRequest("json")
28375 if res != nil && res.StatusCode == http.StatusNotModified {
28376 if res.Body != nil {
28377 res.Body.Close()
28378 }
28379 return nil, gensupport.WrapError(&googleapi.Error{
28380 Code: res.StatusCode,
28381 Header: res.Header,
28382 })
28383 }
28384 if err != nil {
28385 return nil, err
28386 }
28387 defer googleapi.CloseBody(res)
28388 if err := googleapi.CheckResponse(res); err != nil {
28389 return nil, gensupport.WrapError(err)
28390 }
28391 ret := &CustomBiddingScriptRef{
28392 ServerResponse: googleapi.ServerResponse{
28393 Header: res.Header,
28394 HTTPStatusCode: res.StatusCode,
28395 },
28396 }
28397 target := &ret
28398 if err := gensupport.DecodeResponse(target, res); err != nil {
28399 return nil, err
28400 }
28401 return ret, nil
28402 }
28403
28404 type CustomBiddingAlgorithmsScriptsCreateCall struct {
28405 s *Service
28406 customBiddingAlgorithmId int64
28407 custombiddingscript *CustomBiddingScript
28408 urlParams_ gensupport.URLParams
28409 ctx_ context.Context
28410 header_ http.Header
28411 }
28412
28413
28414
28415
28416
28417
28418 func (r *CustomBiddingAlgorithmsScriptsService) Create(customBiddingAlgorithmId int64, custombiddingscript *CustomBiddingScript) *CustomBiddingAlgorithmsScriptsCreateCall {
28419 c := &CustomBiddingAlgorithmsScriptsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28420 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28421 c.custombiddingscript = custombiddingscript
28422 return c
28423 }
28424
28425
28426
28427 func (c *CustomBiddingAlgorithmsScriptsCreateCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsCreateCall {
28428 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28429 return c
28430 }
28431
28432
28433
28434
28435 func (c *CustomBiddingAlgorithmsScriptsCreateCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsCreateCall {
28436 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28437 return c
28438 }
28439
28440
28441
28442
28443 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsCreateCall {
28444 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28445 return c
28446 }
28447
28448
28449 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsCreateCall {
28450 c.ctx_ = ctx
28451 return c
28452 }
28453
28454
28455
28456 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Header() http.Header {
28457 if c.header_ == nil {
28458 c.header_ = make(http.Header)
28459 }
28460 return c.header_
28461 }
28462
28463 func (c *CustomBiddingAlgorithmsScriptsCreateCall) doRequest(alt string) (*http.Response, error) {
28464 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
28465 var body io.Reader = nil
28466 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingscript)
28467 if err != nil {
28468 return nil, err
28469 }
28470 c.urlParams_.Set("alt", alt)
28471 c.urlParams_.Set("prettyPrint", "false")
28472 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts")
28473 urls += "?" + c.urlParams_.Encode()
28474 req, err := http.NewRequest("POST", urls, body)
28475 if err != nil {
28476 return nil, err
28477 }
28478 req.Header = reqHeaders
28479 googleapi.Expand(req.URL, map[string]string{
28480 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28481 })
28482 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28483 }
28484
28485
28486
28487
28488
28489
28490
28491 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScript, error) {
28492 gensupport.SetOptions(c.urlParams_, opts...)
28493 res, err := c.doRequest("json")
28494 if res != nil && res.StatusCode == http.StatusNotModified {
28495 if res.Body != nil {
28496 res.Body.Close()
28497 }
28498 return nil, gensupport.WrapError(&googleapi.Error{
28499 Code: res.StatusCode,
28500 Header: res.Header,
28501 })
28502 }
28503 if err != nil {
28504 return nil, err
28505 }
28506 defer googleapi.CloseBody(res)
28507 if err := googleapi.CheckResponse(res); err != nil {
28508 return nil, gensupport.WrapError(err)
28509 }
28510 ret := &CustomBiddingScript{
28511 ServerResponse: googleapi.ServerResponse{
28512 Header: res.Header,
28513 HTTPStatusCode: res.StatusCode,
28514 },
28515 }
28516 target := &ret
28517 if err := gensupport.DecodeResponse(target, res); err != nil {
28518 return nil, err
28519 }
28520 return ret, nil
28521 }
28522
28523 type CustomBiddingAlgorithmsScriptsGetCall struct {
28524 s *Service
28525 customBiddingAlgorithmId int64
28526 customBiddingScriptId int64
28527 urlParams_ gensupport.URLParams
28528 ifNoneMatch_ string
28529 ctx_ context.Context
28530 header_ http.Header
28531 }
28532
28533
28534
28535
28536
28537
28538 func (r *CustomBiddingAlgorithmsScriptsService) Get(customBiddingAlgorithmId int64, customBiddingScriptId int64) *CustomBiddingAlgorithmsScriptsGetCall {
28539 c := &CustomBiddingAlgorithmsScriptsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28540 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28541 c.customBiddingScriptId = customBiddingScriptId
28542 return c
28543 }
28544
28545
28546
28547 func (c *CustomBiddingAlgorithmsScriptsGetCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsGetCall {
28548 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28549 return c
28550 }
28551
28552
28553
28554
28555 func (c *CustomBiddingAlgorithmsScriptsGetCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsGetCall {
28556 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28557 return c
28558 }
28559
28560
28561
28562
28563 func (c *CustomBiddingAlgorithmsScriptsGetCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsGetCall {
28564 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28565 return c
28566 }
28567
28568
28569
28570
28571 func (c *CustomBiddingAlgorithmsScriptsGetCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsScriptsGetCall {
28572 c.ifNoneMatch_ = entityTag
28573 return c
28574 }
28575
28576
28577 func (c *CustomBiddingAlgorithmsScriptsGetCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsGetCall {
28578 c.ctx_ = ctx
28579 return c
28580 }
28581
28582
28583
28584 func (c *CustomBiddingAlgorithmsScriptsGetCall) Header() http.Header {
28585 if c.header_ == nil {
28586 c.header_ = make(http.Header)
28587 }
28588 return c.header_
28589 }
28590
28591 func (c *CustomBiddingAlgorithmsScriptsGetCall) doRequest(alt string) (*http.Response, error) {
28592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28593 if c.ifNoneMatch_ != "" {
28594 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28595 }
28596 var body io.Reader = nil
28597 c.urlParams_.Set("alt", alt)
28598 c.urlParams_.Set("prettyPrint", "false")
28599 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts/{+customBiddingScriptId}")
28600 urls += "?" + c.urlParams_.Encode()
28601 req, err := http.NewRequest("GET", urls, body)
28602 if err != nil {
28603 return nil, err
28604 }
28605 req.Header = reqHeaders
28606 googleapi.Expand(req.URL, map[string]string{
28607 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28608 "customBiddingScriptId": strconv.FormatInt(c.customBiddingScriptId, 10),
28609 })
28610 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28611 }
28612
28613
28614
28615
28616
28617
28618
28619 func (c *CustomBiddingAlgorithmsScriptsGetCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScript, error) {
28620 gensupport.SetOptions(c.urlParams_, opts...)
28621 res, err := c.doRequest("json")
28622 if res != nil && res.StatusCode == http.StatusNotModified {
28623 if res.Body != nil {
28624 res.Body.Close()
28625 }
28626 return nil, gensupport.WrapError(&googleapi.Error{
28627 Code: res.StatusCode,
28628 Header: res.Header,
28629 })
28630 }
28631 if err != nil {
28632 return nil, err
28633 }
28634 defer googleapi.CloseBody(res)
28635 if err := googleapi.CheckResponse(res); err != nil {
28636 return nil, gensupport.WrapError(err)
28637 }
28638 ret := &CustomBiddingScript{
28639 ServerResponse: googleapi.ServerResponse{
28640 Header: res.Header,
28641 HTTPStatusCode: res.StatusCode,
28642 },
28643 }
28644 target := &ret
28645 if err := gensupport.DecodeResponse(target, res); err != nil {
28646 return nil, err
28647 }
28648 return ret, nil
28649 }
28650
28651 type CustomBiddingAlgorithmsScriptsListCall struct {
28652 s *Service
28653 customBiddingAlgorithmId int64
28654 urlParams_ gensupport.URLParams
28655 ifNoneMatch_ string
28656 ctx_ context.Context
28657 header_ http.Header
28658 }
28659
28660
28661
28662
28663
28664
28665 func (r *CustomBiddingAlgorithmsScriptsService) List(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsScriptsListCall {
28666 c := &CustomBiddingAlgorithmsScriptsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28667 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28668 return c
28669 }
28670
28671
28672
28673 func (c *CustomBiddingAlgorithmsScriptsListCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsListCall {
28674 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28675 return c
28676 }
28677
28678
28679
28680
28681
28682 func (c *CustomBiddingAlgorithmsScriptsListCall) OrderBy(orderBy string) *CustomBiddingAlgorithmsScriptsListCall {
28683 c.urlParams_.Set("orderBy", orderBy)
28684 return c
28685 }
28686
28687
28688
28689
28690 func (c *CustomBiddingAlgorithmsScriptsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsScriptsListCall {
28691 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28692 return c
28693 }
28694
28695
28696
28697
28698
28699
28700 func (c *CustomBiddingAlgorithmsScriptsListCall) PageToken(pageToken string) *CustomBiddingAlgorithmsScriptsListCall {
28701 c.urlParams_.Set("pageToken", pageToken)
28702 return c
28703 }
28704
28705
28706
28707
28708 func (c *CustomBiddingAlgorithmsScriptsListCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsListCall {
28709 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28710 return c
28711 }
28712
28713
28714
28715
28716 func (c *CustomBiddingAlgorithmsScriptsListCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsListCall {
28717 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28718 return c
28719 }
28720
28721
28722
28723
28724 func (c *CustomBiddingAlgorithmsScriptsListCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsScriptsListCall {
28725 c.ifNoneMatch_ = entityTag
28726 return c
28727 }
28728
28729
28730 func (c *CustomBiddingAlgorithmsScriptsListCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsListCall {
28731 c.ctx_ = ctx
28732 return c
28733 }
28734
28735
28736
28737 func (c *CustomBiddingAlgorithmsScriptsListCall) Header() http.Header {
28738 if c.header_ == nil {
28739 c.header_ = make(http.Header)
28740 }
28741 return c.header_
28742 }
28743
28744 func (c *CustomBiddingAlgorithmsScriptsListCall) doRequest(alt string) (*http.Response, error) {
28745 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28746 if c.ifNoneMatch_ != "" {
28747 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28748 }
28749 var body io.Reader = nil
28750 c.urlParams_.Set("alt", alt)
28751 c.urlParams_.Set("prettyPrint", "false")
28752 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts")
28753 urls += "?" + c.urlParams_.Encode()
28754 req, err := http.NewRequest("GET", urls, body)
28755 if err != nil {
28756 return nil, err
28757 }
28758 req.Header = reqHeaders
28759 googleapi.Expand(req.URL, map[string]string{
28760 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28761 })
28762 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28763 }
28764
28765
28766
28767
28768
28769
28770
28771 func (c *CustomBiddingAlgorithmsScriptsListCall) Do(opts ...googleapi.CallOption) (*ListCustomBiddingScriptsResponse, error) {
28772 gensupport.SetOptions(c.urlParams_, opts...)
28773 res, err := c.doRequest("json")
28774 if res != nil && res.StatusCode == http.StatusNotModified {
28775 if res.Body != nil {
28776 res.Body.Close()
28777 }
28778 return nil, gensupport.WrapError(&googleapi.Error{
28779 Code: res.StatusCode,
28780 Header: res.Header,
28781 })
28782 }
28783 if err != nil {
28784 return nil, err
28785 }
28786 defer googleapi.CloseBody(res)
28787 if err := googleapi.CheckResponse(res); err != nil {
28788 return nil, gensupport.WrapError(err)
28789 }
28790 ret := &ListCustomBiddingScriptsResponse{
28791 ServerResponse: googleapi.ServerResponse{
28792 Header: res.Header,
28793 HTTPStatusCode: res.StatusCode,
28794 },
28795 }
28796 target := &ret
28797 if err := gensupport.DecodeResponse(target, res); err != nil {
28798 return nil, err
28799 }
28800 return ret, nil
28801 }
28802
28803
28804
28805
28806 func (c *CustomBiddingAlgorithmsScriptsListCall) Pages(ctx context.Context, f func(*ListCustomBiddingScriptsResponse) error) error {
28807 c.ctx_ = ctx
28808 defer c.PageToken(c.urlParams_.Get("pageToken"))
28809 for {
28810 x, err := c.Do()
28811 if err != nil {
28812 return err
28813 }
28814 if err := f(x); err != nil {
28815 return err
28816 }
28817 if x.NextPageToken == "" {
28818 return nil
28819 }
28820 c.PageToken(x.NextPageToken)
28821 }
28822 }
28823
28824 type CustomListsGetCall struct {
28825 s *Service
28826 customListId int64
28827 urlParams_ gensupport.URLParams
28828 ifNoneMatch_ string
28829 ctx_ context.Context
28830 header_ http.Header
28831 }
28832
28833
28834
28835
28836 func (r *CustomListsService) Get(customListId int64) *CustomListsGetCall {
28837 c := &CustomListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28838 c.customListId = customListId
28839 return c
28840 }
28841
28842
28843
28844 func (c *CustomListsGetCall) AdvertiserId(advertiserId int64) *CustomListsGetCall {
28845 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28846 return c
28847 }
28848
28849
28850
28851
28852 func (c *CustomListsGetCall) Fields(s ...googleapi.Field) *CustomListsGetCall {
28853 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28854 return c
28855 }
28856
28857
28858
28859
28860 func (c *CustomListsGetCall) IfNoneMatch(entityTag string) *CustomListsGetCall {
28861 c.ifNoneMatch_ = entityTag
28862 return c
28863 }
28864
28865
28866 func (c *CustomListsGetCall) Context(ctx context.Context) *CustomListsGetCall {
28867 c.ctx_ = ctx
28868 return c
28869 }
28870
28871
28872
28873 func (c *CustomListsGetCall) Header() http.Header {
28874 if c.header_ == nil {
28875 c.header_ = make(http.Header)
28876 }
28877 return c.header_
28878 }
28879
28880 func (c *CustomListsGetCall) doRequest(alt string) (*http.Response, error) {
28881 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28882 if c.ifNoneMatch_ != "" {
28883 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28884 }
28885 var body io.Reader = nil
28886 c.urlParams_.Set("alt", alt)
28887 c.urlParams_.Set("prettyPrint", "false")
28888 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customLists/{+customListId}")
28889 urls += "?" + c.urlParams_.Encode()
28890 req, err := http.NewRequest("GET", urls, body)
28891 if err != nil {
28892 return nil, err
28893 }
28894 req.Header = reqHeaders
28895 googleapi.Expand(req.URL, map[string]string{
28896 "customListId": strconv.FormatInt(c.customListId, 10),
28897 })
28898 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28899 }
28900
28901
28902
28903
28904
28905
28906 func (c *CustomListsGetCall) Do(opts ...googleapi.CallOption) (*CustomList, error) {
28907 gensupport.SetOptions(c.urlParams_, opts...)
28908 res, err := c.doRequest("json")
28909 if res != nil && res.StatusCode == http.StatusNotModified {
28910 if res.Body != nil {
28911 res.Body.Close()
28912 }
28913 return nil, gensupport.WrapError(&googleapi.Error{
28914 Code: res.StatusCode,
28915 Header: res.Header,
28916 })
28917 }
28918 if err != nil {
28919 return nil, err
28920 }
28921 defer googleapi.CloseBody(res)
28922 if err := googleapi.CheckResponse(res); err != nil {
28923 return nil, gensupport.WrapError(err)
28924 }
28925 ret := &CustomList{
28926 ServerResponse: googleapi.ServerResponse{
28927 Header: res.Header,
28928 HTTPStatusCode: res.StatusCode,
28929 },
28930 }
28931 target := &ret
28932 if err := gensupport.DecodeResponse(target, res); err != nil {
28933 return nil, err
28934 }
28935 return ret, nil
28936 }
28937
28938 type CustomListsListCall struct {
28939 s *Service
28940 urlParams_ gensupport.URLParams
28941 ifNoneMatch_ string
28942 ctx_ context.Context
28943 header_ http.Header
28944 }
28945
28946
28947 func (r *CustomListsService) List() *CustomListsListCall {
28948 c := &CustomListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28949 return c
28950 }
28951
28952
28953
28954 func (c *CustomListsListCall) AdvertiserId(advertiserId int64) *CustomListsListCall {
28955 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28956 return c
28957 }
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967 func (c *CustomListsListCall) Filter(filter string) *CustomListsListCall {
28968 c.urlParams_.Set("filter", filter)
28969 return c
28970 }
28971
28972
28973
28974
28975
28976
28977 func (c *CustomListsListCall) OrderBy(orderBy string) *CustomListsListCall {
28978 c.urlParams_.Set("orderBy", orderBy)
28979 return c
28980 }
28981
28982
28983
28984
28985 func (c *CustomListsListCall) PageSize(pageSize int64) *CustomListsListCall {
28986 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28987 return c
28988 }
28989
28990
28991
28992
28993
28994 func (c *CustomListsListCall) PageToken(pageToken string) *CustomListsListCall {
28995 c.urlParams_.Set("pageToken", pageToken)
28996 return c
28997 }
28998
28999
29000
29001
29002 func (c *CustomListsListCall) Fields(s ...googleapi.Field) *CustomListsListCall {
29003 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29004 return c
29005 }
29006
29007
29008
29009
29010 func (c *CustomListsListCall) IfNoneMatch(entityTag string) *CustomListsListCall {
29011 c.ifNoneMatch_ = entityTag
29012 return c
29013 }
29014
29015
29016 func (c *CustomListsListCall) Context(ctx context.Context) *CustomListsListCall {
29017 c.ctx_ = ctx
29018 return c
29019 }
29020
29021
29022
29023 func (c *CustomListsListCall) Header() http.Header {
29024 if c.header_ == nil {
29025 c.header_ = make(http.Header)
29026 }
29027 return c.header_
29028 }
29029
29030 func (c *CustomListsListCall) doRequest(alt string) (*http.Response, error) {
29031 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29032 if c.ifNoneMatch_ != "" {
29033 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29034 }
29035 var body io.Reader = nil
29036 c.urlParams_.Set("alt", alt)
29037 c.urlParams_.Set("prettyPrint", "false")
29038 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/customLists")
29039 urls += "?" + c.urlParams_.Encode()
29040 req, err := http.NewRequest("GET", urls, body)
29041 if err != nil {
29042 return nil, err
29043 }
29044 req.Header = reqHeaders
29045 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29046 }
29047
29048
29049
29050
29051
29052
29053
29054 func (c *CustomListsListCall) Do(opts ...googleapi.CallOption) (*ListCustomListsResponse, error) {
29055 gensupport.SetOptions(c.urlParams_, opts...)
29056 res, err := c.doRequest("json")
29057 if res != nil && res.StatusCode == http.StatusNotModified {
29058 if res.Body != nil {
29059 res.Body.Close()
29060 }
29061 return nil, gensupport.WrapError(&googleapi.Error{
29062 Code: res.StatusCode,
29063 Header: res.Header,
29064 })
29065 }
29066 if err != nil {
29067 return nil, err
29068 }
29069 defer googleapi.CloseBody(res)
29070 if err := googleapi.CheckResponse(res); err != nil {
29071 return nil, gensupport.WrapError(err)
29072 }
29073 ret := &ListCustomListsResponse{
29074 ServerResponse: googleapi.ServerResponse{
29075 Header: res.Header,
29076 HTTPStatusCode: res.StatusCode,
29077 },
29078 }
29079 target := &ret
29080 if err := gensupport.DecodeResponse(target, res); err != nil {
29081 return nil, err
29082 }
29083 return ret, nil
29084 }
29085
29086
29087
29088
29089 func (c *CustomListsListCall) Pages(ctx context.Context, f func(*ListCustomListsResponse) error) error {
29090 c.ctx_ = ctx
29091 defer c.PageToken(c.urlParams_.Get("pageToken"))
29092 for {
29093 x, err := c.Do()
29094 if err != nil {
29095 return err
29096 }
29097 if err := f(x); err != nil {
29098 return err
29099 }
29100 if x.NextPageToken == "" {
29101 return nil
29102 }
29103 c.PageToken(x.NextPageToken)
29104 }
29105 }
29106
29107 type FirstAndThirdPartyAudiencesCreateCall struct {
29108 s *Service
29109 firstandthirdpartyaudience *FirstAndThirdPartyAudience
29110 urlParams_ gensupport.URLParams
29111 ctx_ context.Context
29112 header_ http.Header
29113 }
29114
29115
29116
29117
29118 func (r *FirstAndThirdPartyAudiencesService) Create(firstandthirdpartyaudience *FirstAndThirdPartyAudience) *FirstAndThirdPartyAudiencesCreateCall {
29119 c := &FirstAndThirdPartyAudiencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29120 c.firstandthirdpartyaudience = firstandthirdpartyaudience
29121 return c
29122 }
29123
29124
29125
29126 func (c *FirstAndThirdPartyAudiencesCreateCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesCreateCall {
29127 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29128 return c
29129 }
29130
29131
29132
29133
29134 func (c *FirstAndThirdPartyAudiencesCreateCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesCreateCall {
29135 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29136 return c
29137 }
29138
29139
29140 func (c *FirstAndThirdPartyAudiencesCreateCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesCreateCall {
29141 c.ctx_ = ctx
29142 return c
29143 }
29144
29145
29146
29147 func (c *FirstAndThirdPartyAudiencesCreateCall) Header() http.Header {
29148 if c.header_ == nil {
29149 c.header_ = make(http.Header)
29150 }
29151 return c.header_
29152 }
29153
29154 func (c *FirstAndThirdPartyAudiencesCreateCall) doRequest(alt string) (*http.Response, error) {
29155 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29156 var body io.Reader = nil
29157 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firstandthirdpartyaudience)
29158 if err != nil {
29159 return nil, err
29160 }
29161 c.urlParams_.Set("alt", alt)
29162 c.urlParams_.Set("prettyPrint", "false")
29163 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/firstAndThirdPartyAudiences")
29164 urls += "?" + c.urlParams_.Encode()
29165 req, err := http.NewRequest("POST", urls, body)
29166 if err != nil {
29167 return nil, err
29168 }
29169 req.Header = reqHeaders
29170 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29171 }
29172
29173
29174
29175
29176
29177
29178
29179 func (c *FirstAndThirdPartyAudiencesCreateCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) {
29180 gensupport.SetOptions(c.urlParams_, opts...)
29181 res, err := c.doRequest("json")
29182 if res != nil && res.StatusCode == http.StatusNotModified {
29183 if res.Body != nil {
29184 res.Body.Close()
29185 }
29186 return nil, gensupport.WrapError(&googleapi.Error{
29187 Code: res.StatusCode,
29188 Header: res.Header,
29189 })
29190 }
29191 if err != nil {
29192 return nil, err
29193 }
29194 defer googleapi.CloseBody(res)
29195 if err := googleapi.CheckResponse(res); err != nil {
29196 return nil, gensupport.WrapError(err)
29197 }
29198 ret := &FirstAndThirdPartyAudience{
29199 ServerResponse: googleapi.ServerResponse{
29200 Header: res.Header,
29201 HTTPStatusCode: res.StatusCode,
29202 },
29203 }
29204 target := &ret
29205 if err := gensupport.DecodeResponse(target, res); err != nil {
29206 return nil, err
29207 }
29208 return ret, nil
29209 }
29210
29211 type FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall struct {
29212 s *Service
29213 firstAndThirdPartyAudienceId int64
29214 editcustomermatchmembersrequest *EditCustomerMatchMembersRequest
29215 urlParams_ gensupport.URLParams
29216 ctx_ context.Context
29217 header_ http.Header
29218 }
29219
29220
29221
29222
29223
29224
29225
29226 func (r *FirstAndThirdPartyAudiencesService) EditCustomerMatchMembers(firstAndThirdPartyAudienceId int64, editcustomermatchmembersrequest *EditCustomerMatchMembersRequest) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall {
29227 c := &FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29228 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId
29229 c.editcustomermatchmembersrequest = editcustomermatchmembersrequest
29230 return c
29231 }
29232
29233
29234
29235
29236 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall {
29237 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29238 return c
29239 }
29240
29241
29242 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall {
29243 c.ctx_ = ctx
29244 return c
29245 }
29246
29247
29248
29249 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Header() http.Header {
29250 if c.header_ == nil {
29251 c.header_ = make(http.Header)
29252 }
29253 return c.header_
29254 }
29255
29256 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) doRequest(alt string) (*http.Response, error) {
29257 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29258 var body io.Reader = nil
29259 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editcustomermatchmembersrequest)
29260 if err != nil {
29261 return nil, err
29262 }
29263 c.urlParams_.Set("alt", alt)
29264 c.urlParams_.Set("prettyPrint", "false")
29265 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}:editCustomerMatchMembers")
29266 urls += "?" + c.urlParams_.Encode()
29267 req, err := http.NewRequest("POST", urls, body)
29268 if err != nil {
29269 return nil, err
29270 }
29271 req.Header = reqHeaders
29272 googleapi.Expand(req.URL, map[string]string{
29273 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10),
29274 })
29275 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29276 }
29277
29278
29279
29280
29281
29282
29283
29284 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Do(opts ...googleapi.CallOption) (*EditCustomerMatchMembersResponse, error) {
29285 gensupport.SetOptions(c.urlParams_, opts...)
29286 res, err := c.doRequest("json")
29287 if res != nil && res.StatusCode == http.StatusNotModified {
29288 if res.Body != nil {
29289 res.Body.Close()
29290 }
29291 return nil, gensupport.WrapError(&googleapi.Error{
29292 Code: res.StatusCode,
29293 Header: res.Header,
29294 })
29295 }
29296 if err != nil {
29297 return nil, err
29298 }
29299 defer googleapi.CloseBody(res)
29300 if err := googleapi.CheckResponse(res); err != nil {
29301 return nil, gensupport.WrapError(err)
29302 }
29303 ret := &EditCustomerMatchMembersResponse{
29304 ServerResponse: googleapi.ServerResponse{
29305 Header: res.Header,
29306 HTTPStatusCode: res.StatusCode,
29307 },
29308 }
29309 target := &ret
29310 if err := gensupport.DecodeResponse(target, res); err != nil {
29311 return nil, err
29312 }
29313 return ret, nil
29314 }
29315
29316 type FirstAndThirdPartyAudiencesGetCall struct {
29317 s *Service
29318 firstAndThirdPartyAudienceId int64
29319 urlParams_ gensupport.URLParams
29320 ifNoneMatch_ string
29321 ctx_ context.Context
29322 header_ http.Header
29323 }
29324
29325
29326
29327
29328
29329 func (r *FirstAndThirdPartyAudiencesService) Get(firstAndThirdPartyAudienceId int64) *FirstAndThirdPartyAudiencesGetCall {
29330 c := &FirstAndThirdPartyAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29331 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId
29332 return c
29333 }
29334
29335
29336
29337 func (c *FirstAndThirdPartyAudiencesGetCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesGetCall {
29338 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29339 return c
29340 }
29341
29342
29343
29344 func (c *FirstAndThirdPartyAudiencesGetCall) PartnerId(partnerId int64) *FirstAndThirdPartyAudiencesGetCall {
29345 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
29346 return c
29347 }
29348
29349
29350
29351
29352 func (c *FirstAndThirdPartyAudiencesGetCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesGetCall {
29353 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29354 return c
29355 }
29356
29357
29358
29359
29360 func (c *FirstAndThirdPartyAudiencesGetCall) IfNoneMatch(entityTag string) *FirstAndThirdPartyAudiencesGetCall {
29361 c.ifNoneMatch_ = entityTag
29362 return c
29363 }
29364
29365
29366 func (c *FirstAndThirdPartyAudiencesGetCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesGetCall {
29367 c.ctx_ = ctx
29368 return c
29369 }
29370
29371
29372
29373 func (c *FirstAndThirdPartyAudiencesGetCall) Header() http.Header {
29374 if c.header_ == nil {
29375 c.header_ = make(http.Header)
29376 }
29377 return c.header_
29378 }
29379
29380 func (c *FirstAndThirdPartyAudiencesGetCall) doRequest(alt string) (*http.Response, error) {
29381 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29382 if c.ifNoneMatch_ != "" {
29383 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29384 }
29385 var body io.Reader = nil
29386 c.urlParams_.Set("alt", alt)
29387 c.urlParams_.Set("prettyPrint", "false")
29388 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}")
29389 urls += "?" + c.urlParams_.Encode()
29390 req, err := http.NewRequest("GET", urls, body)
29391 if err != nil {
29392 return nil, err
29393 }
29394 req.Header = reqHeaders
29395 googleapi.Expand(req.URL, map[string]string{
29396 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10),
29397 })
29398 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29399 }
29400
29401
29402
29403
29404
29405
29406
29407 func (c *FirstAndThirdPartyAudiencesGetCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) {
29408 gensupport.SetOptions(c.urlParams_, opts...)
29409 res, err := c.doRequest("json")
29410 if res != nil && res.StatusCode == http.StatusNotModified {
29411 if res.Body != nil {
29412 res.Body.Close()
29413 }
29414 return nil, gensupport.WrapError(&googleapi.Error{
29415 Code: res.StatusCode,
29416 Header: res.Header,
29417 })
29418 }
29419 if err != nil {
29420 return nil, err
29421 }
29422 defer googleapi.CloseBody(res)
29423 if err := googleapi.CheckResponse(res); err != nil {
29424 return nil, gensupport.WrapError(err)
29425 }
29426 ret := &FirstAndThirdPartyAudience{
29427 ServerResponse: googleapi.ServerResponse{
29428 Header: res.Header,
29429 HTTPStatusCode: res.StatusCode,
29430 },
29431 }
29432 target := &ret
29433 if err := gensupport.DecodeResponse(target, res); err != nil {
29434 return nil, err
29435 }
29436 return ret, nil
29437 }
29438
29439 type FirstAndThirdPartyAudiencesListCall struct {
29440 s *Service
29441 urlParams_ gensupport.URLParams
29442 ifNoneMatch_ string
29443 ctx_ context.Context
29444 header_ http.Header
29445 }
29446
29447
29448
29449 func (r *FirstAndThirdPartyAudiencesService) List() *FirstAndThirdPartyAudiencesListCall {
29450 c := &FirstAndThirdPartyAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29451 return c
29452 }
29453
29454
29455
29456 func (c *FirstAndThirdPartyAudiencesListCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesListCall {
29457 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29458 return c
29459 }
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470 func (c *FirstAndThirdPartyAudiencesListCall) Filter(filter string) *FirstAndThirdPartyAudiencesListCall {
29471 c.urlParams_.Set("filter", filter)
29472 return c
29473 }
29474
29475
29476
29477
29478
29479
29480 func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndThirdPartyAudiencesListCall {
29481 c.urlParams_.Set("orderBy", orderBy)
29482 return c
29483 }
29484
29485
29486
29487
29488 func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall {
29489 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29490 return c
29491 }
29492
29493
29494
29495
29496
29497
29498 func (c *FirstAndThirdPartyAudiencesListCall) PageToken(pageToken string) *FirstAndThirdPartyAudiencesListCall {
29499 c.urlParams_.Set("pageToken", pageToken)
29500 return c
29501 }
29502
29503
29504
29505 func (c *FirstAndThirdPartyAudiencesListCall) PartnerId(partnerId int64) *FirstAndThirdPartyAudiencesListCall {
29506 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
29507 return c
29508 }
29509
29510
29511
29512
29513 func (c *FirstAndThirdPartyAudiencesListCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesListCall {
29514 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29515 return c
29516 }
29517
29518
29519
29520
29521 func (c *FirstAndThirdPartyAudiencesListCall) IfNoneMatch(entityTag string) *FirstAndThirdPartyAudiencesListCall {
29522 c.ifNoneMatch_ = entityTag
29523 return c
29524 }
29525
29526
29527 func (c *FirstAndThirdPartyAudiencesListCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesListCall {
29528 c.ctx_ = ctx
29529 return c
29530 }
29531
29532
29533
29534 func (c *FirstAndThirdPartyAudiencesListCall) Header() http.Header {
29535 if c.header_ == nil {
29536 c.header_ = make(http.Header)
29537 }
29538 return c.header_
29539 }
29540
29541 func (c *FirstAndThirdPartyAudiencesListCall) doRequest(alt string) (*http.Response, error) {
29542 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29543 if c.ifNoneMatch_ != "" {
29544 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29545 }
29546 var body io.Reader = nil
29547 c.urlParams_.Set("alt", alt)
29548 c.urlParams_.Set("prettyPrint", "false")
29549 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/firstAndThirdPartyAudiences")
29550 urls += "?" + c.urlParams_.Encode()
29551 req, err := http.NewRequest("GET", urls, body)
29552 if err != nil {
29553 return nil, err
29554 }
29555 req.Header = reqHeaders
29556 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29557 }
29558
29559
29560
29561
29562
29563
29564
29565 func (c *FirstAndThirdPartyAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListFirstAndThirdPartyAudiencesResponse, error) {
29566 gensupport.SetOptions(c.urlParams_, opts...)
29567 res, err := c.doRequest("json")
29568 if res != nil && res.StatusCode == http.StatusNotModified {
29569 if res.Body != nil {
29570 res.Body.Close()
29571 }
29572 return nil, gensupport.WrapError(&googleapi.Error{
29573 Code: res.StatusCode,
29574 Header: res.Header,
29575 })
29576 }
29577 if err != nil {
29578 return nil, err
29579 }
29580 defer googleapi.CloseBody(res)
29581 if err := googleapi.CheckResponse(res); err != nil {
29582 return nil, gensupport.WrapError(err)
29583 }
29584 ret := &ListFirstAndThirdPartyAudiencesResponse{
29585 ServerResponse: googleapi.ServerResponse{
29586 Header: res.Header,
29587 HTTPStatusCode: res.StatusCode,
29588 },
29589 }
29590 target := &ret
29591 if err := gensupport.DecodeResponse(target, res); err != nil {
29592 return nil, err
29593 }
29594 return ret, nil
29595 }
29596
29597
29598
29599
29600 func (c *FirstAndThirdPartyAudiencesListCall) Pages(ctx context.Context, f func(*ListFirstAndThirdPartyAudiencesResponse) error) error {
29601 c.ctx_ = ctx
29602 defer c.PageToken(c.urlParams_.Get("pageToken"))
29603 for {
29604 x, err := c.Do()
29605 if err != nil {
29606 return err
29607 }
29608 if err := f(x); err != nil {
29609 return err
29610 }
29611 if x.NextPageToken == "" {
29612 return nil
29613 }
29614 c.PageToken(x.NextPageToken)
29615 }
29616 }
29617
29618 type FirstAndThirdPartyAudiencesPatchCall struct {
29619 s *Service
29620 firstAndThirdPartyAudienceId int64
29621 firstandthirdpartyaudience *FirstAndThirdPartyAudience
29622 urlParams_ gensupport.URLParams
29623 ctx_ context.Context
29624 header_ http.Header
29625 }
29626
29627
29628
29629
29630
29631
29632
29633 func (r *FirstAndThirdPartyAudiencesService) Patch(firstAndThirdPartyAudienceId int64, firstandthirdpartyaudience *FirstAndThirdPartyAudience) *FirstAndThirdPartyAudiencesPatchCall {
29634 c := &FirstAndThirdPartyAudiencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29635 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId
29636 c.firstandthirdpartyaudience = firstandthirdpartyaudience
29637 return c
29638 }
29639
29640
29641
29642 func (c *FirstAndThirdPartyAudiencesPatchCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesPatchCall {
29643 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29644 return c
29645 }
29646
29647
29648
29649
29650 func (c *FirstAndThirdPartyAudiencesPatchCall) UpdateMask(updateMask string) *FirstAndThirdPartyAudiencesPatchCall {
29651 c.urlParams_.Set("updateMask", updateMask)
29652 return c
29653 }
29654
29655
29656
29657
29658 func (c *FirstAndThirdPartyAudiencesPatchCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesPatchCall {
29659 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29660 return c
29661 }
29662
29663
29664 func (c *FirstAndThirdPartyAudiencesPatchCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesPatchCall {
29665 c.ctx_ = ctx
29666 return c
29667 }
29668
29669
29670
29671 func (c *FirstAndThirdPartyAudiencesPatchCall) Header() http.Header {
29672 if c.header_ == nil {
29673 c.header_ = make(http.Header)
29674 }
29675 return c.header_
29676 }
29677
29678 func (c *FirstAndThirdPartyAudiencesPatchCall) doRequest(alt string) (*http.Response, error) {
29679 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29680 var body io.Reader = nil
29681 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firstandthirdpartyaudience)
29682 if err != nil {
29683 return nil, err
29684 }
29685 c.urlParams_.Set("alt", alt)
29686 c.urlParams_.Set("prettyPrint", "false")
29687 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}")
29688 urls += "?" + c.urlParams_.Encode()
29689 req, err := http.NewRequest("PATCH", urls, body)
29690 if err != nil {
29691 return nil, err
29692 }
29693 req.Header = reqHeaders
29694 googleapi.Expand(req.URL, map[string]string{
29695 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10),
29696 })
29697 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29698 }
29699
29700
29701
29702
29703
29704
29705
29706 func (c *FirstAndThirdPartyAudiencesPatchCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) {
29707 gensupport.SetOptions(c.urlParams_, opts...)
29708 res, err := c.doRequest("json")
29709 if res != nil && res.StatusCode == http.StatusNotModified {
29710 if res.Body != nil {
29711 res.Body.Close()
29712 }
29713 return nil, gensupport.WrapError(&googleapi.Error{
29714 Code: res.StatusCode,
29715 Header: res.Header,
29716 })
29717 }
29718 if err != nil {
29719 return nil, err
29720 }
29721 defer googleapi.CloseBody(res)
29722 if err := googleapi.CheckResponse(res); err != nil {
29723 return nil, gensupport.WrapError(err)
29724 }
29725 ret := &FirstAndThirdPartyAudience{
29726 ServerResponse: googleapi.ServerResponse{
29727 Header: res.Header,
29728 HTTPStatusCode: res.StatusCode,
29729 },
29730 }
29731 target := &ret
29732 if err := gensupport.DecodeResponse(target, res); err != nil {
29733 return nil, err
29734 }
29735 return ret, nil
29736 }
29737
29738 type FloodlightGroupsGetCall struct {
29739 s *Service
29740 floodlightGroupId int64
29741 urlParams_ gensupport.URLParams
29742 ifNoneMatch_ string
29743 ctx_ context.Context
29744 header_ http.Header
29745 }
29746
29747
29748
29749
29750 func (r *FloodlightGroupsService) Get(floodlightGroupId int64) *FloodlightGroupsGetCall {
29751 c := &FloodlightGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29752 c.floodlightGroupId = floodlightGroupId
29753 return c
29754 }
29755
29756
29757
29758 func (c *FloodlightGroupsGetCall) PartnerId(partnerId int64) *FloodlightGroupsGetCall {
29759 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
29760 return c
29761 }
29762
29763
29764
29765
29766 func (c *FloodlightGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightGroupsGetCall {
29767 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29768 return c
29769 }
29770
29771
29772
29773
29774 func (c *FloodlightGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightGroupsGetCall {
29775 c.ifNoneMatch_ = entityTag
29776 return c
29777 }
29778
29779
29780 func (c *FloodlightGroupsGetCall) Context(ctx context.Context) *FloodlightGroupsGetCall {
29781 c.ctx_ = ctx
29782 return c
29783 }
29784
29785
29786
29787 func (c *FloodlightGroupsGetCall) Header() http.Header {
29788 if c.header_ == nil {
29789 c.header_ = make(http.Header)
29790 }
29791 return c.header_
29792 }
29793
29794 func (c *FloodlightGroupsGetCall) doRequest(alt string) (*http.Response, error) {
29795 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29796 if c.ifNoneMatch_ != "" {
29797 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29798 }
29799 var body io.Reader = nil
29800 c.urlParams_.Set("alt", alt)
29801 c.urlParams_.Set("prettyPrint", "false")
29802 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/floodlightGroups/{+floodlightGroupId}")
29803 urls += "?" + c.urlParams_.Encode()
29804 req, err := http.NewRequest("GET", urls, body)
29805 if err != nil {
29806 return nil, err
29807 }
29808 req.Header = reqHeaders
29809 googleapi.Expand(req.URL, map[string]string{
29810 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10),
29811 })
29812 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29813 }
29814
29815
29816
29817
29818
29819
29820
29821 func (c *FloodlightGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightGroup, error) {
29822 gensupport.SetOptions(c.urlParams_, opts...)
29823 res, err := c.doRequest("json")
29824 if res != nil && res.StatusCode == http.StatusNotModified {
29825 if res.Body != nil {
29826 res.Body.Close()
29827 }
29828 return nil, gensupport.WrapError(&googleapi.Error{
29829 Code: res.StatusCode,
29830 Header: res.Header,
29831 })
29832 }
29833 if err != nil {
29834 return nil, err
29835 }
29836 defer googleapi.CloseBody(res)
29837 if err := googleapi.CheckResponse(res); err != nil {
29838 return nil, gensupport.WrapError(err)
29839 }
29840 ret := &FloodlightGroup{
29841 ServerResponse: googleapi.ServerResponse{
29842 Header: res.Header,
29843 HTTPStatusCode: res.StatusCode,
29844 },
29845 }
29846 target := &ret
29847 if err := gensupport.DecodeResponse(target, res); err != nil {
29848 return nil, err
29849 }
29850 return ret, nil
29851 }
29852
29853 type FloodlightGroupsPatchCall struct {
29854 s *Service
29855 floodlightGroupId int64
29856 floodlightgroup *FloodlightGroup
29857 urlParams_ gensupport.URLParams
29858 ctx_ context.Context
29859 header_ http.Header
29860 }
29861
29862
29863
29864
29865
29866
29867 func (r *FloodlightGroupsService) Patch(floodlightGroupId int64, floodlightgroup *FloodlightGroup) *FloodlightGroupsPatchCall {
29868 c := &FloodlightGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29869 c.floodlightGroupId = floodlightGroupId
29870 c.floodlightgroup = floodlightgroup
29871 return c
29872 }
29873
29874
29875
29876 func (c *FloodlightGroupsPatchCall) PartnerId(partnerId int64) *FloodlightGroupsPatchCall {
29877 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
29878 return c
29879 }
29880
29881
29882
29883 func (c *FloodlightGroupsPatchCall) UpdateMask(updateMask string) *FloodlightGroupsPatchCall {
29884 c.urlParams_.Set("updateMask", updateMask)
29885 return c
29886 }
29887
29888
29889
29890
29891 func (c *FloodlightGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightGroupsPatchCall {
29892 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29893 return c
29894 }
29895
29896
29897 func (c *FloodlightGroupsPatchCall) Context(ctx context.Context) *FloodlightGroupsPatchCall {
29898 c.ctx_ = ctx
29899 return c
29900 }
29901
29902
29903
29904 func (c *FloodlightGroupsPatchCall) Header() http.Header {
29905 if c.header_ == nil {
29906 c.header_ = make(http.Header)
29907 }
29908 return c.header_
29909 }
29910
29911 func (c *FloodlightGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
29912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29913 var body io.Reader = nil
29914 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightgroup)
29915 if err != nil {
29916 return nil, err
29917 }
29918 c.urlParams_.Set("alt", alt)
29919 c.urlParams_.Set("prettyPrint", "false")
29920 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/floodlightGroups/{floodlightGroupId}")
29921 urls += "?" + c.urlParams_.Encode()
29922 req, err := http.NewRequest("PATCH", urls, body)
29923 if err != nil {
29924 return nil, err
29925 }
29926 req.Header = reqHeaders
29927 googleapi.Expand(req.URL, map[string]string{
29928 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10),
29929 })
29930 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29931 }
29932
29933
29934
29935
29936
29937
29938
29939 func (c *FloodlightGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightGroup, error) {
29940 gensupport.SetOptions(c.urlParams_, opts...)
29941 res, err := c.doRequest("json")
29942 if res != nil && res.StatusCode == http.StatusNotModified {
29943 if res.Body != nil {
29944 res.Body.Close()
29945 }
29946 return nil, gensupport.WrapError(&googleapi.Error{
29947 Code: res.StatusCode,
29948 Header: res.Header,
29949 })
29950 }
29951 if err != nil {
29952 return nil, err
29953 }
29954 defer googleapi.CloseBody(res)
29955 if err := googleapi.CheckResponse(res); err != nil {
29956 return nil, gensupport.WrapError(err)
29957 }
29958 ret := &FloodlightGroup{
29959 ServerResponse: googleapi.ServerResponse{
29960 Header: res.Header,
29961 HTTPStatusCode: res.StatusCode,
29962 },
29963 }
29964 target := &ret
29965 if err := gensupport.DecodeResponse(target, res); err != nil {
29966 return nil, err
29967 }
29968 return ret, nil
29969 }
29970
29971 type FloodlightGroupsFloodlightActivitiesGetCall struct {
29972 s *Service
29973 floodlightGroupId int64
29974 floodlightActivityId int64
29975 urlParams_ gensupport.URLParams
29976 ifNoneMatch_ string
29977 ctx_ context.Context
29978 header_ http.Header
29979 }
29980
29981
29982
29983
29984
29985
29986 func (r *FloodlightGroupsFloodlightActivitiesService) Get(floodlightGroupId int64, floodlightActivityId int64) *FloodlightGroupsFloodlightActivitiesGetCall {
29987 c := &FloodlightGroupsFloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29988 c.floodlightGroupId = floodlightGroupId
29989 c.floodlightActivityId = floodlightActivityId
29990 return c
29991 }
29992
29993
29994
29995 func (c *FloodlightGroupsFloodlightActivitiesGetCall) PartnerId(partnerId int64) *FloodlightGroupsFloodlightActivitiesGetCall {
29996 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
29997 return c
29998 }
29999
30000
30001
30002
30003 func (c *FloodlightGroupsFloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightGroupsFloodlightActivitiesGetCall {
30004 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30005 return c
30006 }
30007
30008
30009
30010
30011 func (c *FloodlightGroupsFloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightGroupsFloodlightActivitiesGetCall {
30012 c.ifNoneMatch_ = entityTag
30013 return c
30014 }
30015
30016
30017 func (c *FloodlightGroupsFloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightGroupsFloodlightActivitiesGetCall {
30018 c.ctx_ = ctx
30019 return c
30020 }
30021
30022
30023
30024 func (c *FloodlightGroupsFloodlightActivitiesGetCall) Header() http.Header {
30025 if c.header_ == nil {
30026 c.header_ = make(http.Header)
30027 }
30028 return c.header_
30029 }
30030
30031 func (c *FloodlightGroupsFloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
30032 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30033 if c.ifNoneMatch_ != "" {
30034 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30035 }
30036 var body io.Reader = nil
30037 c.urlParams_.Set("alt", alt)
30038 c.urlParams_.Set("prettyPrint", "false")
30039 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/floodlightGroups/{+floodlightGroupId}/floodlightActivities/{+floodlightActivityId}")
30040 urls += "?" + c.urlParams_.Encode()
30041 req, err := http.NewRequest("GET", urls, body)
30042 if err != nil {
30043 return nil, err
30044 }
30045 req.Header = reqHeaders
30046 googleapi.Expand(req.URL, map[string]string{
30047 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10),
30048 "floodlightActivityId": strconv.FormatInt(c.floodlightActivityId, 10),
30049 })
30050 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30051 }
30052
30053
30054
30055
30056
30057
30058
30059 func (c *FloodlightGroupsFloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
30060 gensupport.SetOptions(c.urlParams_, opts...)
30061 res, err := c.doRequest("json")
30062 if res != nil && res.StatusCode == http.StatusNotModified {
30063 if res.Body != nil {
30064 res.Body.Close()
30065 }
30066 return nil, gensupport.WrapError(&googleapi.Error{
30067 Code: res.StatusCode,
30068 Header: res.Header,
30069 })
30070 }
30071 if err != nil {
30072 return nil, err
30073 }
30074 defer googleapi.CloseBody(res)
30075 if err := googleapi.CheckResponse(res); err != nil {
30076 return nil, gensupport.WrapError(err)
30077 }
30078 ret := &FloodlightActivity{
30079 ServerResponse: googleapi.ServerResponse{
30080 Header: res.Header,
30081 HTTPStatusCode: res.StatusCode,
30082 },
30083 }
30084 target := &ret
30085 if err := gensupport.DecodeResponse(target, res); err != nil {
30086 return nil, err
30087 }
30088 return ret, nil
30089 }
30090
30091 type FloodlightGroupsFloodlightActivitiesListCall struct {
30092 s *Service
30093 floodlightGroupId int64
30094 urlParams_ gensupport.URLParams
30095 ifNoneMatch_ string
30096 ctx_ context.Context
30097 header_ http.Header
30098 }
30099
30100
30101
30102
30103
30104 func (r *FloodlightGroupsFloodlightActivitiesService) List(floodlightGroupId int64) *FloodlightGroupsFloodlightActivitiesListCall {
30105 c := &FloodlightGroupsFloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30106 c.floodlightGroupId = floodlightGroupId
30107 return c
30108 }
30109
30110
30111
30112
30113
30114
30115 func (c *FloodlightGroupsFloodlightActivitiesListCall) OrderBy(orderBy string) *FloodlightGroupsFloodlightActivitiesListCall {
30116 c.urlParams_.Set("orderBy", orderBy)
30117 return c
30118 }
30119
30120
30121
30122
30123 func (c *FloodlightGroupsFloodlightActivitiesListCall) PageSize(pageSize int64) *FloodlightGroupsFloodlightActivitiesListCall {
30124 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30125 return c
30126 }
30127
30128
30129
30130
30131
30132
30133 func (c *FloodlightGroupsFloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightGroupsFloodlightActivitiesListCall {
30134 c.urlParams_.Set("pageToken", pageToken)
30135 return c
30136 }
30137
30138
30139
30140 func (c *FloodlightGroupsFloodlightActivitiesListCall) PartnerId(partnerId int64) *FloodlightGroupsFloodlightActivitiesListCall {
30141 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30142 return c
30143 }
30144
30145
30146
30147
30148 func (c *FloodlightGroupsFloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightGroupsFloodlightActivitiesListCall {
30149 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30150 return c
30151 }
30152
30153
30154
30155
30156 func (c *FloodlightGroupsFloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightGroupsFloodlightActivitiesListCall {
30157 c.ifNoneMatch_ = entityTag
30158 return c
30159 }
30160
30161
30162 func (c *FloodlightGroupsFloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightGroupsFloodlightActivitiesListCall {
30163 c.ctx_ = ctx
30164 return c
30165 }
30166
30167
30168
30169 func (c *FloodlightGroupsFloodlightActivitiesListCall) Header() http.Header {
30170 if c.header_ == nil {
30171 c.header_ = make(http.Header)
30172 }
30173 return c.header_
30174 }
30175
30176 func (c *FloodlightGroupsFloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
30177 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30178 if c.ifNoneMatch_ != "" {
30179 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30180 }
30181 var body io.Reader = nil
30182 c.urlParams_.Set("alt", alt)
30183 c.urlParams_.Set("prettyPrint", "false")
30184 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/floodlightGroups/{+floodlightGroupId}/floodlightActivities")
30185 urls += "?" + c.urlParams_.Encode()
30186 req, err := http.NewRequest("GET", urls, body)
30187 if err != nil {
30188 return nil, err
30189 }
30190 req.Header = reqHeaders
30191 googleapi.Expand(req.URL, map[string]string{
30192 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10),
30193 })
30194 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30195 }
30196
30197
30198
30199
30200
30201
30202
30203 func (c *FloodlightGroupsFloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*ListFloodlightActivitiesResponse, error) {
30204 gensupport.SetOptions(c.urlParams_, opts...)
30205 res, err := c.doRequest("json")
30206 if res != nil && res.StatusCode == http.StatusNotModified {
30207 if res.Body != nil {
30208 res.Body.Close()
30209 }
30210 return nil, gensupport.WrapError(&googleapi.Error{
30211 Code: res.StatusCode,
30212 Header: res.Header,
30213 })
30214 }
30215 if err != nil {
30216 return nil, err
30217 }
30218 defer googleapi.CloseBody(res)
30219 if err := googleapi.CheckResponse(res); err != nil {
30220 return nil, gensupport.WrapError(err)
30221 }
30222 ret := &ListFloodlightActivitiesResponse{
30223 ServerResponse: googleapi.ServerResponse{
30224 Header: res.Header,
30225 HTTPStatusCode: res.StatusCode,
30226 },
30227 }
30228 target := &ret
30229 if err := gensupport.DecodeResponse(target, res); err != nil {
30230 return nil, err
30231 }
30232 return ret, nil
30233 }
30234
30235
30236
30237
30238 func (c *FloodlightGroupsFloodlightActivitiesListCall) Pages(ctx context.Context, f func(*ListFloodlightActivitiesResponse) error) error {
30239 c.ctx_ = ctx
30240 defer c.PageToken(c.urlParams_.Get("pageToken"))
30241 for {
30242 x, err := c.Do()
30243 if err != nil {
30244 return err
30245 }
30246 if err := f(x); err != nil {
30247 return err
30248 }
30249 if x.NextPageToken == "" {
30250 return nil
30251 }
30252 c.PageToken(x.NextPageToken)
30253 }
30254 }
30255
30256 type GoogleAudiencesGetCall struct {
30257 s *Service
30258 googleAudienceId int64
30259 urlParams_ gensupport.URLParams
30260 ifNoneMatch_ string
30261 ctx_ context.Context
30262 header_ http.Header
30263 }
30264
30265
30266
30267
30268 func (r *GoogleAudiencesService) Get(googleAudienceId int64) *GoogleAudiencesGetCall {
30269 c := &GoogleAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30270 c.googleAudienceId = googleAudienceId
30271 return c
30272 }
30273
30274
30275
30276 func (c *GoogleAudiencesGetCall) AdvertiserId(advertiserId int64) *GoogleAudiencesGetCall {
30277 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30278 return c
30279 }
30280
30281
30282
30283 func (c *GoogleAudiencesGetCall) PartnerId(partnerId int64) *GoogleAudiencesGetCall {
30284 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30285 return c
30286 }
30287
30288
30289
30290
30291 func (c *GoogleAudiencesGetCall) Fields(s ...googleapi.Field) *GoogleAudiencesGetCall {
30292 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30293 return c
30294 }
30295
30296
30297
30298
30299 func (c *GoogleAudiencesGetCall) IfNoneMatch(entityTag string) *GoogleAudiencesGetCall {
30300 c.ifNoneMatch_ = entityTag
30301 return c
30302 }
30303
30304
30305 func (c *GoogleAudiencesGetCall) Context(ctx context.Context) *GoogleAudiencesGetCall {
30306 c.ctx_ = ctx
30307 return c
30308 }
30309
30310
30311
30312 func (c *GoogleAudiencesGetCall) Header() http.Header {
30313 if c.header_ == nil {
30314 c.header_ = make(http.Header)
30315 }
30316 return c.header_
30317 }
30318
30319 func (c *GoogleAudiencesGetCall) doRequest(alt string) (*http.Response, error) {
30320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30321 if c.ifNoneMatch_ != "" {
30322 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30323 }
30324 var body io.Reader = nil
30325 c.urlParams_.Set("alt", alt)
30326 c.urlParams_.Set("prettyPrint", "false")
30327 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/googleAudiences/{+googleAudienceId}")
30328 urls += "?" + c.urlParams_.Encode()
30329 req, err := http.NewRequest("GET", urls, body)
30330 if err != nil {
30331 return nil, err
30332 }
30333 req.Header = reqHeaders
30334 googleapi.Expand(req.URL, map[string]string{
30335 "googleAudienceId": strconv.FormatInt(c.googleAudienceId, 10),
30336 })
30337 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30338 }
30339
30340
30341
30342
30343
30344
30345 func (c *GoogleAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAudience, error) {
30346 gensupport.SetOptions(c.urlParams_, opts...)
30347 res, err := c.doRequest("json")
30348 if res != nil && res.StatusCode == http.StatusNotModified {
30349 if res.Body != nil {
30350 res.Body.Close()
30351 }
30352 return nil, gensupport.WrapError(&googleapi.Error{
30353 Code: res.StatusCode,
30354 Header: res.Header,
30355 })
30356 }
30357 if err != nil {
30358 return nil, err
30359 }
30360 defer googleapi.CloseBody(res)
30361 if err := googleapi.CheckResponse(res); err != nil {
30362 return nil, gensupport.WrapError(err)
30363 }
30364 ret := &GoogleAudience{
30365 ServerResponse: googleapi.ServerResponse{
30366 Header: res.Header,
30367 HTTPStatusCode: res.StatusCode,
30368 },
30369 }
30370 target := &ret
30371 if err := gensupport.DecodeResponse(target, res); err != nil {
30372 return nil, err
30373 }
30374 return ret, nil
30375 }
30376
30377 type GoogleAudiencesListCall struct {
30378 s *Service
30379 urlParams_ gensupport.URLParams
30380 ifNoneMatch_ string
30381 ctx_ context.Context
30382 header_ http.Header
30383 }
30384
30385
30386
30387 func (r *GoogleAudiencesService) List() *GoogleAudiencesListCall {
30388 c := &GoogleAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30389 return c
30390 }
30391
30392
30393
30394 func (c *GoogleAudiencesListCall) AdvertiserId(advertiserId int64) *GoogleAudiencesListCall {
30395 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30396 return c
30397 }
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408 func (c *GoogleAudiencesListCall) Filter(filter string) *GoogleAudiencesListCall {
30409 c.urlParams_.Set("filter", filter)
30410 return c
30411 }
30412
30413
30414
30415
30416
30417
30418 func (c *GoogleAudiencesListCall) OrderBy(orderBy string) *GoogleAudiencesListCall {
30419 c.urlParams_.Set("orderBy", orderBy)
30420 return c
30421 }
30422
30423
30424
30425
30426 func (c *GoogleAudiencesListCall) PageSize(pageSize int64) *GoogleAudiencesListCall {
30427 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30428 return c
30429 }
30430
30431
30432
30433
30434
30435 func (c *GoogleAudiencesListCall) PageToken(pageToken string) *GoogleAudiencesListCall {
30436 c.urlParams_.Set("pageToken", pageToken)
30437 return c
30438 }
30439
30440
30441
30442 func (c *GoogleAudiencesListCall) PartnerId(partnerId int64) *GoogleAudiencesListCall {
30443 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30444 return c
30445 }
30446
30447
30448
30449
30450 func (c *GoogleAudiencesListCall) Fields(s ...googleapi.Field) *GoogleAudiencesListCall {
30451 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30452 return c
30453 }
30454
30455
30456
30457
30458 func (c *GoogleAudiencesListCall) IfNoneMatch(entityTag string) *GoogleAudiencesListCall {
30459 c.ifNoneMatch_ = entityTag
30460 return c
30461 }
30462
30463
30464 func (c *GoogleAudiencesListCall) Context(ctx context.Context) *GoogleAudiencesListCall {
30465 c.ctx_ = ctx
30466 return c
30467 }
30468
30469
30470
30471 func (c *GoogleAudiencesListCall) Header() http.Header {
30472 if c.header_ == nil {
30473 c.header_ = make(http.Header)
30474 }
30475 return c.header_
30476 }
30477
30478 func (c *GoogleAudiencesListCall) doRequest(alt string) (*http.Response, error) {
30479 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30480 if c.ifNoneMatch_ != "" {
30481 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30482 }
30483 var body io.Reader = nil
30484 c.urlParams_.Set("alt", alt)
30485 c.urlParams_.Set("prettyPrint", "false")
30486 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/googleAudiences")
30487 urls += "?" + c.urlParams_.Encode()
30488 req, err := http.NewRequest("GET", urls, body)
30489 if err != nil {
30490 return nil, err
30491 }
30492 req.Header = reqHeaders
30493 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30494 }
30495
30496
30497
30498
30499
30500
30501
30502 func (c *GoogleAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListGoogleAudiencesResponse, error) {
30503 gensupport.SetOptions(c.urlParams_, opts...)
30504 res, err := c.doRequest("json")
30505 if res != nil && res.StatusCode == http.StatusNotModified {
30506 if res.Body != nil {
30507 res.Body.Close()
30508 }
30509 return nil, gensupport.WrapError(&googleapi.Error{
30510 Code: res.StatusCode,
30511 Header: res.Header,
30512 })
30513 }
30514 if err != nil {
30515 return nil, err
30516 }
30517 defer googleapi.CloseBody(res)
30518 if err := googleapi.CheckResponse(res); err != nil {
30519 return nil, gensupport.WrapError(err)
30520 }
30521 ret := &ListGoogleAudiencesResponse{
30522 ServerResponse: googleapi.ServerResponse{
30523 Header: res.Header,
30524 HTTPStatusCode: res.StatusCode,
30525 },
30526 }
30527 target := &ret
30528 if err := gensupport.DecodeResponse(target, res); err != nil {
30529 return nil, err
30530 }
30531 return ret, nil
30532 }
30533
30534
30535
30536
30537 func (c *GoogleAudiencesListCall) Pages(ctx context.Context, f func(*ListGoogleAudiencesResponse) error) error {
30538 c.ctx_ = ctx
30539 defer c.PageToken(c.urlParams_.Get("pageToken"))
30540 for {
30541 x, err := c.Do()
30542 if err != nil {
30543 return err
30544 }
30545 if err := f(x); err != nil {
30546 return err
30547 }
30548 if x.NextPageToken == "" {
30549 return nil
30550 }
30551 c.PageToken(x.NextPageToken)
30552 }
30553 }
30554
30555 type GuaranteedOrdersCreateCall struct {
30556 s *Service
30557 guaranteedorder *GuaranteedOrder
30558 urlParams_ gensupport.URLParams
30559 ctx_ context.Context
30560 header_ http.Header
30561 }
30562
30563
30564
30565 func (r *GuaranteedOrdersService) Create(guaranteedorder *GuaranteedOrder) *GuaranteedOrdersCreateCall {
30566 c := &GuaranteedOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30567 c.guaranteedorder = guaranteedorder
30568 return c
30569 }
30570
30571
30572
30573 func (c *GuaranteedOrdersCreateCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersCreateCall {
30574 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30575 return c
30576 }
30577
30578
30579
30580 func (c *GuaranteedOrdersCreateCall) PartnerId(partnerId int64) *GuaranteedOrdersCreateCall {
30581 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30582 return c
30583 }
30584
30585
30586
30587
30588 func (c *GuaranteedOrdersCreateCall) Fields(s ...googleapi.Field) *GuaranteedOrdersCreateCall {
30589 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30590 return c
30591 }
30592
30593
30594 func (c *GuaranteedOrdersCreateCall) Context(ctx context.Context) *GuaranteedOrdersCreateCall {
30595 c.ctx_ = ctx
30596 return c
30597 }
30598
30599
30600
30601 func (c *GuaranteedOrdersCreateCall) Header() http.Header {
30602 if c.header_ == nil {
30603 c.header_ = make(http.Header)
30604 }
30605 return c.header_
30606 }
30607
30608 func (c *GuaranteedOrdersCreateCall) doRequest(alt string) (*http.Response, error) {
30609 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30610 var body io.Reader = nil
30611 body, err := googleapi.WithoutDataWrapper.JSONReader(c.guaranteedorder)
30612 if err != nil {
30613 return nil, err
30614 }
30615 c.urlParams_.Set("alt", alt)
30616 c.urlParams_.Set("prettyPrint", "false")
30617 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/guaranteedOrders")
30618 urls += "?" + c.urlParams_.Encode()
30619 req, err := http.NewRequest("POST", urls, body)
30620 if err != nil {
30621 return nil, err
30622 }
30623 req.Header = reqHeaders
30624 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30625 }
30626
30627
30628
30629
30630
30631
30632
30633 func (c *GuaranteedOrdersCreateCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) {
30634 gensupport.SetOptions(c.urlParams_, opts...)
30635 res, err := c.doRequest("json")
30636 if res != nil && res.StatusCode == http.StatusNotModified {
30637 if res.Body != nil {
30638 res.Body.Close()
30639 }
30640 return nil, gensupport.WrapError(&googleapi.Error{
30641 Code: res.StatusCode,
30642 Header: res.Header,
30643 })
30644 }
30645 if err != nil {
30646 return nil, err
30647 }
30648 defer googleapi.CloseBody(res)
30649 if err := googleapi.CheckResponse(res); err != nil {
30650 return nil, gensupport.WrapError(err)
30651 }
30652 ret := &GuaranteedOrder{
30653 ServerResponse: googleapi.ServerResponse{
30654 Header: res.Header,
30655 HTTPStatusCode: res.StatusCode,
30656 },
30657 }
30658 target := &ret
30659 if err := gensupport.DecodeResponse(target, res); err != nil {
30660 return nil, err
30661 }
30662 return ret, nil
30663 }
30664
30665 type GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall struct {
30666 s *Service
30667 guaranteedOrderId string
30668 editguaranteedorderreadaccessorsrequest *EditGuaranteedOrderReadAccessorsRequest
30669 urlParams_ gensupport.URLParams
30670 ctx_ context.Context
30671 header_ http.Header
30672 }
30673
30674
30675
30676
30677
30678
30679 func (r *GuaranteedOrdersService) EditGuaranteedOrderReadAccessors(guaranteedOrderId string, editguaranteedorderreadaccessorsrequest *EditGuaranteedOrderReadAccessorsRequest) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall {
30680 c := &GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30681 c.guaranteedOrderId = guaranteedOrderId
30682 c.editguaranteedorderreadaccessorsrequest = editguaranteedorderreadaccessorsrequest
30683 return c
30684 }
30685
30686
30687
30688
30689 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Fields(s ...googleapi.Field) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall {
30690 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30691 return c
30692 }
30693
30694
30695 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Context(ctx context.Context) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall {
30696 c.ctx_ = ctx
30697 return c
30698 }
30699
30700
30701
30702 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Header() http.Header {
30703 if c.header_ == nil {
30704 c.header_ = make(http.Header)
30705 }
30706 return c.header_
30707 }
30708
30709 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) doRequest(alt string) (*http.Response, error) {
30710 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30711 var body io.Reader = nil
30712 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editguaranteedorderreadaccessorsrequest)
30713 if err != nil {
30714 return nil, err
30715 }
30716 c.urlParams_.Set("alt", alt)
30717 c.urlParams_.Set("prettyPrint", "false")
30718 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/guaranteedOrders/{+guaranteedOrderId}:editGuaranteedOrderReadAccessors")
30719 urls += "?" + c.urlParams_.Encode()
30720 req, err := http.NewRequest("POST", urls, body)
30721 if err != nil {
30722 return nil, err
30723 }
30724 req.Header = reqHeaders
30725 googleapi.Expand(req.URL, map[string]string{
30726 "guaranteedOrderId": c.guaranteedOrderId,
30727 })
30728 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30729 }
30730
30731
30732
30733
30734
30735
30736
30737 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Do(opts ...googleapi.CallOption) (*EditGuaranteedOrderReadAccessorsResponse, error) {
30738 gensupport.SetOptions(c.urlParams_, opts...)
30739 res, err := c.doRequest("json")
30740 if res != nil && res.StatusCode == http.StatusNotModified {
30741 if res.Body != nil {
30742 res.Body.Close()
30743 }
30744 return nil, gensupport.WrapError(&googleapi.Error{
30745 Code: res.StatusCode,
30746 Header: res.Header,
30747 })
30748 }
30749 if err != nil {
30750 return nil, err
30751 }
30752 defer googleapi.CloseBody(res)
30753 if err := googleapi.CheckResponse(res); err != nil {
30754 return nil, gensupport.WrapError(err)
30755 }
30756 ret := &EditGuaranteedOrderReadAccessorsResponse{
30757 ServerResponse: googleapi.ServerResponse{
30758 Header: res.Header,
30759 HTTPStatusCode: res.StatusCode,
30760 },
30761 }
30762 target := &ret
30763 if err := gensupport.DecodeResponse(target, res); err != nil {
30764 return nil, err
30765 }
30766 return ret, nil
30767 }
30768
30769 type GuaranteedOrdersGetCall struct {
30770 s *Service
30771 guaranteedOrderId string
30772 urlParams_ gensupport.URLParams
30773 ifNoneMatch_ string
30774 ctx_ context.Context
30775 header_ http.Header
30776 }
30777
30778
30779
30780
30781
30782 func (r *GuaranteedOrdersService) Get(guaranteedOrderId string) *GuaranteedOrdersGetCall {
30783 c := &GuaranteedOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30784 c.guaranteedOrderId = guaranteedOrderId
30785 return c
30786 }
30787
30788
30789
30790 func (c *GuaranteedOrdersGetCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersGetCall {
30791 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30792 return c
30793 }
30794
30795
30796
30797 func (c *GuaranteedOrdersGetCall) PartnerId(partnerId int64) *GuaranteedOrdersGetCall {
30798 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30799 return c
30800 }
30801
30802
30803
30804
30805 func (c *GuaranteedOrdersGetCall) Fields(s ...googleapi.Field) *GuaranteedOrdersGetCall {
30806 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30807 return c
30808 }
30809
30810
30811
30812
30813 func (c *GuaranteedOrdersGetCall) IfNoneMatch(entityTag string) *GuaranteedOrdersGetCall {
30814 c.ifNoneMatch_ = entityTag
30815 return c
30816 }
30817
30818
30819 func (c *GuaranteedOrdersGetCall) Context(ctx context.Context) *GuaranteedOrdersGetCall {
30820 c.ctx_ = ctx
30821 return c
30822 }
30823
30824
30825
30826 func (c *GuaranteedOrdersGetCall) Header() http.Header {
30827 if c.header_ == nil {
30828 c.header_ = make(http.Header)
30829 }
30830 return c.header_
30831 }
30832
30833 func (c *GuaranteedOrdersGetCall) doRequest(alt string) (*http.Response, error) {
30834 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30835 if c.ifNoneMatch_ != "" {
30836 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30837 }
30838 var body io.Reader = nil
30839 c.urlParams_.Set("alt", alt)
30840 c.urlParams_.Set("prettyPrint", "false")
30841 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/guaranteedOrders/{+guaranteedOrderId}")
30842 urls += "?" + c.urlParams_.Encode()
30843 req, err := http.NewRequest("GET", urls, body)
30844 if err != nil {
30845 return nil, err
30846 }
30847 req.Header = reqHeaders
30848 googleapi.Expand(req.URL, map[string]string{
30849 "guaranteedOrderId": c.guaranteedOrderId,
30850 })
30851 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30852 }
30853
30854
30855
30856
30857
30858
30859
30860 func (c *GuaranteedOrdersGetCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) {
30861 gensupport.SetOptions(c.urlParams_, opts...)
30862 res, err := c.doRequest("json")
30863 if res != nil && res.StatusCode == http.StatusNotModified {
30864 if res.Body != nil {
30865 res.Body.Close()
30866 }
30867 return nil, gensupport.WrapError(&googleapi.Error{
30868 Code: res.StatusCode,
30869 Header: res.Header,
30870 })
30871 }
30872 if err != nil {
30873 return nil, err
30874 }
30875 defer googleapi.CloseBody(res)
30876 if err := googleapi.CheckResponse(res); err != nil {
30877 return nil, gensupport.WrapError(err)
30878 }
30879 ret := &GuaranteedOrder{
30880 ServerResponse: googleapi.ServerResponse{
30881 Header: res.Header,
30882 HTTPStatusCode: res.StatusCode,
30883 },
30884 }
30885 target := &ret
30886 if err := gensupport.DecodeResponse(target, res); err != nil {
30887 return nil, err
30888 }
30889 return ret, nil
30890 }
30891
30892 type GuaranteedOrdersListCall struct {
30893 s *Service
30894 urlParams_ gensupport.URLParams
30895 ifNoneMatch_ string
30896 ctx_ context.Context
30897 header_ http.Header
30898 }
30899
30900
30901
30902
30903
30904 func (r *GuaranteedOrdersService) List() *GuaranteedOrdersListCall {
30905 c := &GuaranteedOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30906 return c
30907 }
30908
30909
30910
30911 func (c *GuaranteedOrdersListCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersListCall {
30912 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30913 return c
30914 }
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929 func (c *GuaranteedOrdersListCall) Filter(filter string) *GuaranteedOrdersListCall {
30930 c.urlParams_.Set("filter", filter)
30931 return c
30932 }
30933
30934
30935
30936
30937
30938 func (c *GuaranteedOrdersListCall) OrderBy(orderBy string) *GuaranteedOrdersListCall {
30939 c.urlParams_.Set("orderBy", orderBy)
30940 return c
30941 }
30942
30943
30944
30945 func (c *GuaranteedOrdersListCall) PageSize(pageSize int64) *GuaranteedOrdersListCall {
30946 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30947 return c
30948 }
30949
30950
30951
30952
30953
30954 func (c *GuaranteedOrdersListCall) PageToken(pageToken string) *GuaranteedOrdersListCall {
30955 c.urlParams_.Set("pageToken", pageToken)
30956 return c
30957 }
30958
30959
30960
30961 func (c *GuaranteedOrdersListCall) PartnerId(partnerId int64) *GuaranteedOrdersListCall {
30962 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30963 return c
30964 }
30965
30966
30967
30968
30969 func (c *GuaranteedOrdersListCall) Fields(s ...googleapi.Field) *GuaranteedOrdersListCall {
30970 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30971 return c
30972 }
30973
30974
30975
30976
30977 func (c *GuaranteedOrdersListCall) IfNoneMatch(entityTag string) *GuaranteedOrdersListCall {
30978 c.ifNoneMatch_ = entityTag
30979 return c
30980 }
30981
30982
30983 func (c *GuaranteedOrdersListCall) Context(ctx context.Context) *GuaranteedOrdersListCall {
30984 c.ctx_ = ctx
30985 return c
30986 }
30987
30988
30989
30990 func (c *GuaranteedOrdersListCall) Header() http.Header {
30991 if c.header_ == nil {
30992 c.header_ = make(http.Header)
30993 }
30994 return c.header_
30995 }
30996
30997 func (c *GuaranteedOrdersListCall) doRequest(alt string) (*http.Response, error) {
30998 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30999 if c.ifNoneMatch_ != "" {
31000 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31001 }
31002 var body io.Reader = nil
31003 c.urlParams_.Set("alt", alt)
31004 c.urlParams_.Set("prettyPrint", "false")
31005 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/guaranteedOrders")
31006 urls += "?" + c.urlParams_.Encode()
31007 req, err := http.NewRequest("GET", urls, body)
31008 if err != nil {
31009 return nil, err
31010 }
31011 req.Header = reqHeaders
31012 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31013 }
31014
31015
31016
31017
31018
31019
31020
31021 func (c *GuaranteedOrdersListCall) Do(opts ...googleapi.CallOption) (*ListGuaranteedOrdersResponse, error) {
31022 gensupport.SetOptions(c.urlParams_, opts...)
31023 res, err := c.doRequest("json")
31024 if res != nil && res.StatusCode == http.StatusNotModified {
31025 if res.Body != nil {
31026 res.Body.Close()
31027 }
31028 return nil, gensupport.WrapError(&googleapi.Error{
31029 Code: res.StatusCode,
31030 Header: res.Header,
31031 })
31032 }
31033 if err != nil {
31034 return nil, err
31035 }
31036 defer googleapi.CloseBody(res)
31037 if err := googleapi.CheckResponse(res); err != nil {
31038 return nil, gensupport.WrapError(err)
31039 }
31040 ret := &ListGuaranteedOrdersResponse{
31041 ServerResponse: googleapi.ServerResponse{
31042 Header: res.Header,
31043 HTTPStatusCode: res.StatusCode,
31044 },
31045 }
31046 target := &ret
31047 if err := gensupport.DecodeResponse(target, res); err != nil {
31048 return nil, err
31049 }
31050 return ret, nil
31051 }
31052
31053
31054
31055
31056 func (c *GuaranteedOrdersListCall) Pages(ctx context.Context, f func(*ListGuaranteedOrdersResponse) error) error {
31057 c.ctx_ = ctx
31058 defer c.PageToken(c.urlParams_.Get("pageToken"))
31059 for {
31060 x, err := c.Do()
31061 if err != nil {
31062 return err
31063 }
31064 if err := f(x); err != nil {
31065 return err
31066 }
31067 if x.NextPageToken == "" {
31068 return nil
31069 }
31070 c.PageToken(x.NextPageToken)
31071 }
31072 }
31073
31074 type GuaranteedOrdersPatchCall struct {
31075 s *Service
31076 guaranteedOrderId string
31077 guaranteedorder *GuaranteedOrder
31078 urlParams_ gensupport.URLParams
31079 ctx_ context.Context
31080 header_ http.Header
31081 }
31082
31083
31084
31085
31086
31087
31088
31089 func (r *GuaranteedOrdersService) Patch(guaranteedOrderId string, guaranteedorder *GuaranteedOrder) *GuaranteedOrdersPatchCall {
31090 c := &GuaranteedOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31091 c.guaranteedOrderId = guaranteedOrderId
31092 c.guaranteedorder = guaranteedorder
31093 return c
31094 }
31095
31096
31097
31098 func (c *GuaranteedOrdersPatchCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersPatchCall {
31099 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31100 return c
31101 }
31102
31103
31104
31105 func (c *GuaranteedOrdersPatchCall) PartnerId(partnerId int64) *GuaranteedOrdersPatchCall {
31106 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31107 return c
31108 }
31109
31110
31111
31112 func (c *GuaranteedOrdersPatchCall) UpdateMask(updateMask string) *GuaranteedOrdersPatchCall {
31113 c.urlParams_.Set("updateMask", updateMask)
31114 return c
31115 }
31116
31117
31118
31119
31120 func (c *GuaranteedOrdersPatchCall) Fields(s ...googleapi.Field) *GuaranteedOrdersPatchCall {
31121 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31122 return c
31123 }
31124
31125
31126 func (c *GuaranteedOrdersPatchCall) Context(ctx context.Context) *GuaranteedOrdersPatchCall {
31127 c.ctx_ = ctx
31128 return c
31129 }
31130
31131
31132
31133 func (c *GuaranteedOrdersPatchCall) Header() http.Header {
31134 if c.header_ == nil {
31135 c.header_ = make(http.Header)
31136 }
31137 return c.header_
31138 }
31139
31140 func (c *GuaranteedOrdersPatchCall) doRequest(alt string) (*http.Response, error) {
31141 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31142 var body io.Reader = nil
31143 body, err := googleapi.WithoutDataWrapper.JSONReader(c.guaranteedorder)
31144 if err != nil {
31145 return nil, err
31146 }
31147 c.urlParams_.Set("alt", alt)
31148 c.urlParams_.Set("prettyPrint", "false")
31149 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/guaranteedOrders/{+guaranteedOrderId}")
31150 urls += "?" + c.urlParams_.Encode()
31151 req, err := http.NewRequest("PATCH", urls, body)
31152 if err != nil {
31153 return nil, err
31154 }
31155 req.Header = reqHeaders
31156 googleapi.Expand(req.URL, map[string]string{
31157 "guaranteedOrderId": c.guaranteedOrderId,
31158 })
31159 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31160 }
31161
31162
31163
31164
31165
31166
31167
31168 func (c *GuaranteedOrdersPatchCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) {
31169 gensupport.SetOptions(c.urlParams_, opts...)
31170 res, err := c.doRequest("json")
31171 if res != nil && res.StatusCode == http.StatusNotModified {
31172 if res.Body != nil {
31173 res.Body.Close()
31174 }
31175 return nil, gensupport.WrapError(&googleapi.Error{
31176 Code: res.StatusCode,
31177 Header: res.Header,
31178 })
31179 }
31180 if err != nil {
31181 return nil, err
31182 }
31183 defer googleapi.CloseBody(res)
31184 if err := googleapi.CheckResponse(res); err != nil {
31185 return nil, gensupport.WrapError(err)
31186 }
31187 ret := &GuaranteedOrder{
31188 ServerResponse: googleapi.ServerResponse{
31189 Header: res.Header,
31190 HTTPStatusCode: res.StatusCode,
31191 },
31192 }
31193 target := &ret
31194 if err := gensupport.DecodeResponse(target, res); err != nil {
31195 return nil, err
31196 }
31197 return ret, nil
31198 }
31199
31200 type InventorySourceGroupsCreateCall struct {
31201 s *Service
31202 inventorysourcegroup *InventorySourceGroup
31203 urlParams_ gensupport.URLParams
31204 ctx_ context.Context
31205 header_ http.Header
31206 }
31207
31208
31209
31210 func (r *InventorySourceGroupsService) Create(inventorysourcegroup *InventorySourceGroup) *InventorySourceGroupsCreateCall {
31211 c := &InventorySourceGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31212 c.inventorysourcegroup = inventorysourcegroup
31213 return c
31214 }
31215
31216
31217
31218
31219 func (c *InventorySourceGroupsCreateCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsCreateCall {
31220 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31221 return c
31222 }
31223
31224
31225
31226
31227
31228 func (c *InventorySourceGroupsCreateCall) PartnerId(partnerId int64) *InventorySourceGroupsCreateCall {
31229 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31230 return c
31231 }
31232
31233
31234
31235
31236 func (c *InventorySourceGroupsCreateCall) Fields(s ...googleapi.Field) *InventorySourceGroupsCreateCall {
31237 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31238 return c
31239 }
31240
31241
31242 func (c *InventorySourceGroupsCreateCall) Context(ctx context.Context) *InventorySourceGroupsCreateCall {
31243 c.ctx_ = ctx
31244 return c
31245 }
31246
31247
31248
31249 func (c *InventorySourceGroupsCreateCall) Header() http.Header {
31250 if c.header_ == nil {
31251 c.header_ = make(http.Header)
31252 }
31253 return c.header_
31254 }
31255
31256 func (c *InventorySourceGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
31257 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31258 var body io.Reader = nil
31259 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysourcegroup)
31260 if err != nil {
31261 return nil, err
31262 }
31263 c.urlParams_.Set("alt", alt)
31264 c.urlParams_.Set("prettyPrint", "false")
31265 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups")
31266 urls += "?" + c.urlParams_.Encode()
31267 req, err := http.NewRequest("POST", urls, body)
31268 if err != nil {
31269 return nil, err
31270 }
31271 req.Header = reqHeaders
31272 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31273 }
31274
31275
31276
31277
31278
31279
31280
31281 func (c *InventorySourceGroupsCreateCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) {
31282 gensupport.SetOptions(c.urlParams_, opts...)
31283 res, err := c.doRequest("json")
31284 if res != nil && res.StatusCode == http.StatusNotModified {
31285 if res.Body != nil {
31286 res.Body.Close()
31287 }
31288 return nil, gensupport.WrapError(&googleapi.Error{
31289 Code: res.StatusCode,
31290 Header: res.Header,
31291 })
31292 }
31293 if err != nil {
31294 return nil, err
31295 }
31296 defer googleapi.CloseBody(res)
31297 if err := googleapi.CheckResponse(res); err != nil {
31298 return nil, gensupport.WrapError(err)
31299 }
31300 ret := &InventorySourceGroup{
31301 ServerResponse: googleapi.ServerResponse{
31302 Header: res.Header,
31303 HTTPStatusCode: res.StatusCode,
31304 },
31305 }
31306 target := &ret
31307 if err := gensupport.DecodeResponse(target, res); err != nil {
31308 return nil, err
31309 }
31310 return ret, nil
31311 }
31312
31313 type InventorySourceGroupsDeleteCall struct {
31314 s *Service
31315 inventorySourceGroupId int64
31316 urlParams_ gensupport.URLParams
31317 ctx_ context.Context
31318 header_ http.Header
31319 }
31320
31321
31322
31323
31324 func (r *InventorySourceGroupsService) Delete(inventorySourceGroupId int64) *InventorySourceGroupsDeleteCall {
31325 c := &InventorySourceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31326 c.inventorySourceGroupId = inventorySourceGroupId
31327 return c
31328 }
31329
31330
31331
31332
31333 func (c *InventorySourceGroupsDeleteCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsDeleteCall {
31334 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31335 return c
31336 }
31337
31338
31339
31340
31341 func (c *InventorySourceGroupsDeleteCall) PartnerId(partnerId int64) *InventorySourceGroupsDeleteCall {
31342 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31343 return c
31344 }
31345
31346
31347
31348
31349 func (c *InventorySourceGroupsDeleteCall) Fields(s ...googleapi.Field) *InventorySourceGroupsDeleteCall {
31350 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31351 return c
31352 }
31353
31354
31355 func (c *InventorySourceGroupsDeleteCall) Context(ctx context.Context) *InventorySourceGroupsDeleteCall {
31356 c.ctx_ = ctx
31357 return c
31358 }
31359
31360
31361
31362 func (c *InventorySourceGroupsDeleteCall) Header() http.Header {
31363 if c.header_ == nil {
31364 c.header_ = make(http.Header)
31365 }
31366 return c.header_
31367 }
31368
31369 func (c *InventorySourceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
31370 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31371 var body io.Reader = nil
31372 c.urlParams_.Set("alt", alt)
31373 c.urlParams_.Set("prettyPrint", "false")
31374 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups/{+inventorySourceGroupId}")
31375 urls += "?" + c.urlParams_.Encode()
31376 req, err := http.NewRequest("DELETE", urls, body)
31377 if err != nil {
31378 return nil, err
31379 }
31380 req.Header = reqHeaders
31381 googleapi.Expand(req.URL, map[string]string{
31382 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
31383 })
31384 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31385 }
31386
31387
31388
31389
31390
31391
31392 func (c *InventorySourceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
31393 gensupport.SetOptions(c.urlParams_, opts...)
31394 res, err := c.doRequest("json")
31395 if res != nil && res.StatusCode == http.StatusNotModified {
31396 if res.Body != nil {
31397 res.Body.Close()
31398 }
31399 return nil, gensupport.WrapError(&googleapi.Error{
31400 Code: res.StatusCode,
31401 Header: res.Header,
31402 })
31403 }
31404 if err != nil {
31405 return nil, err
31406 }
31407 defer googleapi.CloseBody(res)
31408 if err := googleapi.CheckResponse(res); err != nil {
31409 return nil, gensupport.WrapError(err)
31410 }
31411 ret := &Empty{
31412 ServerResponse: googleapi.ServerResponse{
31413 Header: res.Header,
31414 HTTPStatusCode: res.StatusCode,
31415 },
31416 }
31417 target := &ret
31418 if err := gensupport.DecodeResponse(target, res); err != nil {
31419 return nil, err
31420 }
31421 return ret, nil
31422 }
31423
31424 type InventorySourceGroupsGetCall struct {
31425 s *Service
31426 inventorySourceGroupId int64
31427 urlParams_ gensupport.URLParams
31428 ifNoneMatch_ string
31429 ctx_ context.Context
31430 header_ http.Header
31431 }
31432
31433
31434
31435
31436 func (r *InventorySourceGroupsService) Get(inventorySourceGroupId int64) *InventorySourceGroupsGetCall {
31437 c := &InventorySourceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31438 c.inventorySourceGroupId = inventorySourceGroupId
31439 return c
31440 }
31441
31442
31443
31444
31445
31446 func (c *InventorySourceGroupsGetCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsGetCall {
31447 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31448 return c
31449 }
31450
31451
31452
31453
31454 func (c *InventorySourceGroupsGetCall) PartnerId(partnerId int64) *InventorySourceGroupsGetCall {
31455 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31456 return c
31457 }
31458
31459
31460
31461
31462 func (c *InventorySourceGroupsGetCall) Fields(s ...googleapi.Field) *InventorySourceGroupsGetCall {
31463 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31464 return c
31465 }
31466
31467
31468
31469
31470 func (c *InventorySourceGroupsGetCall) IfNoneMatch(entityTag string) *InventorySourceGroupsGetCall {
31471 c.ifNoneMatch_ = entityTag
31472 return c
31473 }
31474
31475
31476 func (c *InventorySourceGroupsGetCall) Context(ctx context.Context) *InventorySourceGroupsGetCall {
31477 c.ctx_ = ctx
31478 return c
31479 }
31480
31481
31482
31483 func (c *InventorySourceGroupsGetCall) Header() http.Header {
31484 if c.header_ == nil {
31485 c.header_ = make(http.Header)
31486 }
31487 return c.header_
31488 }
31489
31490 func (c *InventorySourceGroupsGetCall) doRequest(alt string) (*http.Response, error) {
31491 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31492 if c.ifNoneMatch_ != "" {
31493 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31494 }
31495 var body io.Reader = nil
31496 c.urlParams_.Set("alt", alt)
31497 c.urlParams_.Set("prettyPrint", "false")
31498 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups/{+inventorySourceGroupId}")
31499 urls += "?" + c.urlParams_.Encode()
31500 req, err := http.NewRequest("GET", urls, body)
31501 if err != nil {
31502 return nil, err
31503 }
31504 req.Header = reqHeaders
31505 googleapi.Expand(req.URL, map[string]string{
31506 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
31507 })
31508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31509 }
31510
31511
31512
31513
31514
31515
31516
31517 func (c *InventorySourceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) {
31518 gensupport.SetOptions(c.urlParams_, opts...)
31519 res, err := c.doRequest("json")
31520 if res != nil && res.StatusCode == http.StatusNotModified {
31521 if res.Body != nil {
31522 res.Body.Close()
31523 }
31524 return nil, gensupport.WrapError(&googleapi.Error{
31525 Code: res.StatusCode,
31526 Header: res.Header,
31527 })
31528 }
31529 if err != nil {
31530 return nil, err
31531 }
31532 defer googleapi.CloseBody(res)
31533 if err := googleapi.CheckResponse(res); err != nil {
31534 return nil, gensupport.WrapError(err)
31535 }
31536 ret := &InventorySourceGroup{
31537 ServerResponse: googleapi.ServerResponse{
31538 Header: res.Header,
31539 HTTPStatusCode: res.StatusCode,
31540 },
31541 }
31542 target := &ret
31543 if err := gensupport.DecodeResponse(target, res); err != nil {
31544 return nil, err
31545 }
31546 return ret, nil
31547 }
31548
31549 type InventorySourceGroupsListCall struct {
31550 s *Service
31551 urlParams_ gensupport.URLParams
31552 ifNoneMatch_ string
31553 ctx_ context.Context
31554 header_ http.Header
31555 }
31556
31557
31558
31559 func (r *InventorySourceGroupsService) List() *InventorySourceGroupsListCall {
31560 c := &InventorySourceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31561 return c
31562 }
31563
31564
31565
31566
31567
31568 func (c *InventorySourceGroupsListCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsListCall {
31569 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31570 return c
31571 }
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581 func (c *InventorySourceGroupsListCall) Filter(filter string) *InventorySourceGroupsListCall {
31582 c.urlParams_.Set("filter", filter)
31583 return c
31584 }
31585
31586
31587
31588
31589
31590
31591 func (c *InventorySourceGroupsListCall) OrderBy(orderBy string) *InventorySourceGroupsListCall {
31592 c.urlParams_.Set("orderBy", orderBy)
31593 return c
31594 }
31595
31596
31597
31598 func (c *InventorySourceGroupsListCall) PageSize(pageSize int64) *InventorySourceGroupsListCall {
31599 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
31600 return c
31601 }
31602
31603
31604
31605
31606
31607 func (c *InventorySourceGroupsListCall) PageToken(pageToken string) *InventorySourceGroupsListCall {
31608 c.urlParams_.Set("pageToken", pageToken)
31609 return c
31610 }
31611
31612
31613
31614
31615 func (c *InventorySourceGroupsListCall) PartnerId(partnerId int64) *InventorySourceGroupsListCall {
31616 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31617 return c
31618 }
31619
31620
31621
31622
31623 func (c *InventorySourceGroupsListCall) Fields(s ...googleapi.Field) *InventorySourceGroupsListCall {
31624 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31625 return c
31626 }
31627
31628
31629
31630
31631 func (c *InventorySourceGroupsListCall) IfNoneMatch(entityTag string) *InventorySourceGroupsListCall {
31632 c.ifNoneMatch_ = entityTag
31633 return c
31634 }
31635
31636
31637 func (c *InventorySourceGroupsListCall) Context(ctx context.Context) *InventorySourceGroupsListCall {
31638 c.ctx_ = ctx
31639 return c
31640 }
31641
31642
31643
31644 func (c *InventorySourceGroupsListCall) Header() http.Header {
31645 if c.header_ == nil {
31646 c.header_ = make(http.Header)
31647 }
31648 return c.header_
31649 }
31650
31651 func (c *InventorySourceGroupsListCall) doRequest(alt string) (*http.Response, error) {
31652 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31653 if c.ifNoneMatch_ != "" {
31654 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31655 }
31656 var body io.Reader = nil
31657 c.urlParams_.Set("alt", alt)
31658 c.urlParams_.Set("prettyPrint", "false")
31659 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups")
31660 urls += "?" + c.urlParams_.Encode()
31661 req, err := http.NewRequest("GET", urls, body)
31662 if err != nil {
31663 return nil, err
31664 }
31665 req.Header = reqHeaders
31666 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31667 }
31668
31669
31670
31671
31672
31673
31674
31675 func (c *InventorySourceGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInventorySourceGroupsResponse, error) {
31676 gensupport.SetOptions(c.urlParams_, opts...)
31677 res, err := c.doRequest("json")
31678 if res != nil && res.StatusCode == http.StatusNotModified {
31679 if res.Body != nil {
31680 res.Body.Close()
31681 }
31682 return nil, gensupport.WrapError(&googleapi.Error{
31683 Code: res.StatusCode,
31684 Header: res.Header,
31685 })
31686 }
31687 if err != nil {
31688 return nil, err
31689 }
31690 defer googleapi.CloseBody(res)
31691 if err := googleapi.CheckResponse(res); err != nil {
31692 return nil, gensupport.WrapError(err)
31693 }
31694 ret := &ListInventorySourceGroupsResponse{
31695 ServerResponse: googleapi.ServerResponse{
31696 Header: res.Header,
31697 HTTPStatusCode: res.StatusCode,
31698 },
31699 }
31700 target := &ret
31701 if err := gensupport.DecodeResponse(target, res); err != nil {
31702 return nil, err
31703 }
31704 return ret, nil
31705 }
31706
31707
31708
31709
31710 func (c *InventorySourceGroupsListCall) Pages(ctx context.Context, f func(*ListInventorySourceGroupsResponse) error) error {
31711 c.ctx_ = ctx
31712 defer c.PageToken(c.urlParams_.Get("pageToken"))
31713 for {
31714 x, err := c.Do()
31715 if err != nil {
31716 return err
31717 }
31718 if err := f(x); err != nil {
31719 return err
31720 }
31721 if x.NextPageToken == "" {
31722 return nil
31723 }
31724 c.PageToken(x.NextPageToken)
31725 }
31726 }
31727
31728 type InventorySourceGroupsPatchCall struct {
31729 s *Service
31730 inventorySourceGroupId int64
31731 inventorysourcegroup *InventorySourceGroup
31732 urlParams_ gensupport.URLParams
31733 ctx_ context.Context
31734 header_ http.Header
31735 }
31736
31737
31738
31739
31740
31741
31742 func (r *InventorySourceGroupsService) Patch(inventorySourceGroupId int64, inventorysourcegroup *InventorySourceGroup) *InventorySourceGroupsPatchCall {
31743 c := &InventorySourceGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31744 c.inventorySourceGroupId = inventorySourceGroupId
31745 c.inventorysourcegroup = inventorysourcegroup
31746 return c
31747 }
31748
31749
31750
31751
31752 func (c *InventorySourceGroupsPatchCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsPatchCall {
31753 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31754 return c
31755 }
31756
31757
31758
31759
31760 func (c *InventorySourceGroupsPatchCall) PartnerId(partnerId int64) *InventorySourceGroupsPatchCall {
31761 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31762 return c
31763 }
31764
31765
31766
31767 func (c *InventorySourceGroupsPatchCall) UpdateMask(updateMask string) *InventorySourceGroupsPatchCall {
31768 c.urlParams_.Set("updateMask", updateMask)
31769 return c
31770 }
31771
31772
31773
31774
31775 func (c *InventorySourceGroupsPatchCall) Fields(s ...googleapi.Field) *InventorySourceGroupsPatchCall {
31776 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31777 return c
31778 }
31779
31780
31781 func (c *InventorySourceGroupsPatchCall) Context(ctx context.Context) *InventorySourceGroupsPatchCall {
31782 c.ctx_ = ctx
31783 return c
31784 }
31785
31786
31787
31788 func (c *InventorySourceGroupsPatchCall) Header() http.Header {
31789 if c.header_ == nil {
31790 c.header_ = make(http.Header)
31791 }
31792 return c.header_
31793 }
31794
31795 func (c *InventorySourceGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
31796 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31797 var body io.Reader = nil
31798 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysourcegroup)
31799 if err != nil {
31800 return nil, err
31801 }
31802 c.urlParams_.Set("alt", alt)
31803 c.urlParams_.Set("prettyPrint", "false")
31804 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups/{inventorySourceGroupId}")
31805 urls += "?" + c.urlParams_.Encode()
31806 req, err := http.NewRequest("PATCH", urls, body)
31807 if err != nil {
31808 return nil, err
31809 }
31810 req.Header = reqHeaders
31811 googleapi.Expand(req.URL, map[string]string{
31812 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
31813 })
31814 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31815 }
31816
31817
31818
31819
31820
31821
31822
31823 func (c *InventorySourceGroupsPatchCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) {
31824 gensupport.SetOptions(c.urlParams_, opts...)
31825 res, err := c.doRequest("json")
31826 if res != nil && res.StatusCode == http.StatusNotModified {
31827 if res.Body != nil {
31828 res.Body.Close()
31829 }
31830 return nil, gensupport.WrapError(&googleapi.Error{
31831 Code: res.StatusCode,
31832 Header: res.Header,
31833 })
31834 }
31835 if err != nil {
31836 return nil, err
31837 }
31838 defer googleapi.CloseBody(res)
31839 if err := googleapi.CheckResponse(res); err != nil {
31840 return nil, gensupport.WrapError(err)
31841 }
31842 ret := &InventorySourceGroup{
31843 ServerResponse: googleapi.ServerResponse{
31844 Header: res.Header,
31845 HTTPStatusCode: res.StatusCode,
31846 },
31847 }
31848 target := &ret
31849 if err := gensupport.DecodeResponse(target, res); err != nil {
31850 return nil, err
31851 }
31852 return ret, nil
31853 }
31854
31855 type InventorySourceGroupsAssignedInventorySourcesBulkEditCall struct {
31856 s *Service
31857 inventorySourceGroupId int64
31858 bulkeditassignedinventorysourcesrequest *BulkEditAssignedInventorySourcesRequest
31859 urlParams_ gensupport.URLParams
31860 ctx_ context.Context
31861 header_ http.Header
31862 }
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873 func (r *InventorySourceGroupsAssignedInventorySourcesService) BulkEdit(inventorySourceGroupId int64, bulkeditassignedinventorysourcesrequest *BulkEditAssignedInventorySourcesRequest) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall {
31874 c := &InventorySourceGroupsAssignedInventorySourcesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31875 c.inventorySourceGroupId = inventorySourceGroupId
31876 c.bulkeditassignedinventorysourcesrequest = bulkeditassignedinventorysourcesrequest
31877 return c
31878 }
31879
31880
31881
31882
31883 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall {
31884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31885 return c
31886 }
31887
31888
31889 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall {
31890 c.ctx_ = ctx
31891 return c
31892 }
31893
31894
31895
31896 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Header() http.Header {
31897 if c.header_ == nil {
31898 c.header_ = make(http.Header)
31899 }
31900 return c.header_
31901 }
31902
31903 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) doRequest(alt string) (*http.Response, error) {
31904 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31905 var body io.Reader = nil
31906 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassignedinventorysourcesrequest)
31907 if err != nil {
31908 return nil, err
31909 }
31910 c.urlParams_.Set("alt", alt)
31911 c.urlParams_.Set("prettyPrint", "false")
31912 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources:bulkEdit")
31913 urls += "?" + c.urlParams_.Encode()
31914 req, err := http.NewRequest("POST", urls, body)
31915 if err != nil {
31916 return nil, err
31917 }
31918 req.Header = reqHeaders
31919 googleapi.Expand(req.URL, map[string]string{
31920 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
31921 })
31922 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31923 }
31924
31925
31926
31927
31928
31929
31930
31931 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedInventorySourcesResponse, error) {
31932 gensupport.SetOptions(c.urlParams_, opts...)
31933 res, err := c.doRequest("json")
31934 if res != nil && res.StatusCode == http.StatusNotModified {
31935 if res.Body != nil {
31936 res.Body.Close()
31937 }
31938 return nil, gensupport.WrapError(&googleapi.Error{
31939 Code: res.StatusCode,
31940 Header: res.Header,
31941 })
31942 }
31943 if err != nil {
31944 return nil, err
31945 }
31946 defer googleapi.CloseBody(res)
31947 if err := googleapi.CheckResponse(res); err != nil {
31948 return nil, gensupport.WrapError(err)
31949 }
31950 ret := &BulkEditAssignedInventorySourcesResponse{
31951 ServerResponse: googleapi.ServerResponse{
31952 Header: res.Header,
31953 HTTPStatusCode: res.StatusCode,
31954 },
31955 }
31956 target := &ret
31957 if err := gensupport.DecodeResponse(target, res); err != nil {
31958 return nil, err
31959 }
31960 return ret, nil
31961 }
31962
31963 type InventorySourceGroupsAssignedInventorySourcesCreateCall struct {
31964 s *Service
31965 inventorySourceGroupId int64
31966 assignedinventorysource *AssignedInventorySource
31967 urlParams_ gensupport.URLParams
31968 ctx_ context.Context
31969 header_ http.Header
31970 }
31971
31972
31973
31974
31975
31976
31977 func (r *InventorySourceGroupsAssignedInventorySourcesService) Create(inventorySourceGroupId int64, assignedinventorysource *AssignedInventorySource) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
31978 c := &InventorySourceGroupsAssignedInventorySourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31979 c.inventorySourceGroupId = inventorySourceGroupId
31980 c.assignedinventorysource = assignedinventorysource
31981 return c
31982 }
31983
31984
31985
31986
31987 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
31988 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31989 return c
31990 }
31991
31992
31993
31994
31995 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
31996 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31997 return c
31998 }
31999
32000
32001
32002
32003 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
32004 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32005 return c
32006 }
32007
32008
32009 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
32010 c.ctx_ = ctx
32011 return c
32012 }
32013
32014
32015
32016 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Header() http.Header {
32017 if c.header_ == nil {
32018 c.header_ = make(http.Header)
32019 }
32020 return c.header_
32021 }
32022
32023 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) doRequest(alt string) (*http.Response, error) {
32024 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32025 var body io.Reader = nil
32026 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedinventorysource)
32027 if err != nil {
32028 return nil, err
32029 }
32030 c.urlParams_.Set("alt", alt)
32031 c.urlParams_.Set("prettyPrint", "false")
32032 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources")
32033 urls += "?" + c.urlParams_.Encode()
32034 req, err := http.NewRequest("POST", urls, body)
32035 if err != nil {
32036 return nil, err
32037 }
32038 req.Header = reqHeaders
32039 googleapi.Expand(req.URL, map[string]string{
32040 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
32041 })
32042 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32043 }
32044
32045
32046
32047
32048
32049
32050
32051 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Do(opts ...googleapi.CallOption) (*AssignedInventorySource, error) {
32052 gensupport.SetOptions(c.urlParams_, opts...)
32053 res, err := c.doRequest("json")
32054 if res != nil && res.StatusCode == http.StatusNotModified {
32055 if res.Body != nil {
32056 res.Body.Close()
32057 }
32058 return nil, gensupport.WrapError(&googleapi.Error{
32059 Code: res.StatusCode,
32060 Header: res.Header,
32061 })
32062 }
32063 if err != nil {
32064 return nil, err
32065 }
32066 defer googleapi.CloseBody(res)
32067 if err := googleapi.CheckResponse(res); err != nil {
32068 return nil, gensupport.WrapError(err)
32069 }
32070 ret := &AssignedInventorySource{
32071 ServerResponse: googleapi.ServerResponse{
32072 Header: res.Header,
32073 HTTPStatusCode: res.StatusCode,
32074 },
32075 }
32076 target := &ret
32077 if err := gensupport.DecodeResponse(target, res); err != nil {
32078 return nil, err
32079 }
32080 return ret, nil
32081 }
32082
32083 type InventorySourceGroupsAssignedInventorySourcesDeleteCall struct {
32084 s *Service
32085 inventorySourceGroupId int64
32086 assignedInventorySourceId int64
32087 urlParams_ gensupport.URLParams
32088 ctx_ context.Context
32089 header_ http.Header
32090 }
32091
32092
32093
32094
32095
32096
32097
32098
32099 func (r *InventorySourceGroupsAssignedInventorySourcesService) Delete(inventorySourceGroupId int64, assignedInventorySourceId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32100 c := &InventorySourceGroupsAssignedInventorySourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32101 c.inventorySourceGroupId = inventorySourceGroupId
32102 c.assignedInventorySourceId = assignedInventorySourceId
32103 return c
32104 }
32105
32106
32107
32108
32109 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32110 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32111 return c
32112 }
32113
32114
32115
32116
32117 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32118 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32119 return c
32120 }
32121
32122
32123
32124
32125 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32126 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32127 return c
32128 }
32129
32130
32131 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32132 c.ctx_ = ctx
32133 return c
32134 }
32135
32136
32137
32138 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Header() http.Header {
32139 if c.header_ == nil {
32140 c.header_ = make(http.Header)
32141 }
32142 return c.header_
32143 }
32144
32145 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
32146 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32147 var body io.Reader = nil
32148 c.urlParams_.Set("alt", alt)
32149 c.urlParams_.Set("prettyPrint", "false")
32150 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources/{+assignedInventorySourceId}")
32151 urls += "?" + c.urlParams_.Encode()
32152 req, err := http.NewRequest("DELETE", urls, body)
32153 if err != nil {
32154 return nil, err
32155 }
32156 req.Header = reqHeaders
32157 googleapi.Expand(req.URL, map[string]string{
32158 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
32159 "assignedInventorySourceId": strconv.FormatInt(c.assignedInventorySourceId, 10),
32160 })
32161 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32162 }
32163
32164
32165
32166
32167
32168
32169 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
32170 gensupport.SetOptions(c.urlParams_, opts...)
32171 res, err := c.doRequest("json")
32172 if res != nil && res.StatusCode == http.StatusNotModified {
32173 if res.Body != nil {
32174 res.Body.Close()
32175 }
32176 return nil, gensupport.WrapError(&googleapi.Error{
32177 Code: res.StatusCode,
32178 Header: res.Header,
32179 })
32180 }
32181 if err != nil {
32182 return nil, err
32183 }
32184 defer googleapi.CloseBody(res)
32185 if err := googleapi.CheckResponse(res); err != nil {
32186 return nil, gensupport.WrapError(err)
32187 }
32188 ret := &Empty{
32189 ServerResponse: googleapi.ServerResponse{
32190 Header: res.Header,
32191 HTTPStatusCode: res.StatusCode,
32192 },
32193 }
32194 target := &ret
32195 if err := gensupport.DecodeResponse(target, res); err != nil {
32196 return nil, err
32197 }
32198 return ret, nil
32199 }
32200
32201 type InventorySourceGroupsAssignedInventorySourcesListCall struct {
32202 s *Service
32203 inventorySourceGroupId int64
32204 urlParams_ gensupport.URLParams
32205 ifNoneMatch_ string
32206 ctx_ context.Context
32207 header_ http.Header
32208 }
32209
32210
32211
32212
32213
32214 func (r *InventorySourceGroupsAssignedInventorySourcesService) List(inventorySourceGroupId int64) *InventorySourceGroupsAssignedInventorySourcesListCall {
32215 c := &InventorySourceGroupsAssignedInventorySourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32216 c.inventorySourceGroupId = inventorySourceGroupId
32217 return c
32218 }
32219
32220
32221
32222
32223
32224 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesListCall {
32225 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32226 return c
32227 }
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Filter(filter string) *InventorySourceGroupsAssignedInventorySourcesListCall {
32238 c.urlParams_.Set("filter", filter)
32239 return c
32240 }
32241
32242
32243
32244
32245
32246
32247 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) OrderBy(orderBy string) *InventorySourceGroupsAssignedInventorySourcesListCall {
32248 c.urlParams_.Set("orderBy", orderBy)
32249 return c
32250 }
32251
32252
32253
32254
32255 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PageSize(pageSize int64) *InventorySourceGroupsAssignedInventorySourcesListCall {
32256 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
32257 return c
32258 }
32259
32260
32261
32262
32263
32264
32265 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PageToken(pageToken string) *InventorySourceGroupsAssignedInventorySourcesListCall {
32266 c.urlParams_.Set("pageToken", pageToken)
32267 return c
32268 }
32269
32270
32271
32272
32273 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesListCall {
32274 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32275 return c
32276 }
32277
32278
32279
32280
32281 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesListCall {
32282 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32283 return c
32284 }
32285
32286
32287
32288
32289 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) IfNoneMatch(entityTag string) *InventorySourceGroupsAssignedInventorySourcesListCall {
32290 c.ifNoneMatch_ = entityTag
32291 return c
32292 }
32293
32294
32295 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesListCall {
32296 c.ctx_ = ctx
32297 return c
32298 }
32299
32300
32301
32302 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Header() http.Header {
32303 if c.header_ == nil {
32304 c.header_ = make(http.Header)
32305 }
32306 return c.header_
32307 }
32308
32309 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) doRequest(alt string) (*http.Response, error) {
32310 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32311 if c.ifNoneMatch_ != "" {
32312 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32313 }
32314 var body io.Reader = nil
32315 c.urlParams_.Set("alt", alt)
32316 c.urlParams_.Set("prettyPrint", "false")
32317 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources")
32318 urls += "?" + c.urlParams_.Encode()
32319 req, err := http.NewRequest("GET", urls, body)
32320 if err != nil {
32321 return nil, err
32322 }
32323 req.Header = reqHeaders
32324 googleapi.Expand(req.URL, map[string]string{
32325 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
32326 })
32327 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32328 }
32329
32330
32331
32332
32333
32334
32335
32336 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListAssignedInventorySourcesResponse, error) {
32337 gensupport.SetOptions(c.urlParams_, opts...)
32338 res, err := c.doRequest("json")
32339 if res != nil && res.StatusCode == http.StatusNotModified {
32340 if res.Body != nil {
32341 res.Body.Close()
32342 }
32343 return nil, gensupport.WrapError(&googleapi.Error{
32344 Code: res.StatusCode,
32345 Header: res.Header,
32346 })
32347 }
32348 if err != nil {
32349 return nil, err
32350 }
32351 defer googleapi.CloseBody(res)
32352 if err := googleapi.CheckResponse(res); err != nil {
32353 return nil, gensupport.WrapError(err)
32354 }
32355 ret := &ListAssignedInventorySourcesResponse{
32356 ServerResponse: googleapi.ServerResponse{
32357 Header: res.Header,
32358 HTTPStatusCode: res.StatusCode,
32359 },
32360 }
32361 target := &ret
32362 if err := gensupport.DecodeResponse(target, res); err != nil {
32363 return nil, err
32364 }
32365 return ret, nil
32366 }
32367
32368
32369
32370
32371 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Pages(ctx context.Context, f func(*ListAssignedInventorySourcesResponse) error) error {
32372 c.ctx_ = ctx
32373 defer c.PageToken(c.urlParams_.Get("pageToken"))
32374 for {
32375 x, err := c.Do()
32376 if err != nil {
32377 return err
32378 }
32379 if err := f(x); err != nil {
32380 return err
32381 }
32382 if x.NextPageToken == "" {
32383 return nil
32384 }
32385 c.PageToken(x.NextPageToken)
32386 }
32387 }
32388
32389 type InventorySourcesCreateCall struct {
32390 s *Service
32391 inventorysource *InventorySource
32392 urlParams_ gensupport.URLParams
32393 ctx_ context.Context
32394 header_ http.Header
32395 }
32396
32397
32398
32399 func (r *InventorySourcesService) Create(inventorysource *InventorySource) *InventorySourcesCreateCall {
32400 c := &InventorySourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32401 c.inventorysource = inventorysource
32402 return c
32403 }
32404
32405
32406
32407 func (c *InventorySourcesCreateCall) AdvertiserId(advertiserId int64) *InventorySourcesCreateCall {
32408 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32409 return c
32410 }
32411
32412
32413
32414 func (c *InventorySourcesCreateCall) PartnerId(partnerId int64) *InventorySourcesCreateCall {
32415 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32416 return c
32417 }
32418
32419
32420
32421
32422 func (c *InventorySourcesCreateCall) Fields(s ...googleapi.Field) *InventorySourcesCreateCall {
32423 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32424 return c
32425 }
32426
32427
32428 func (c *InventorySourcesCreateCall) Context(ctx context.Context) *InventorySourcesCreateCall {
32429 c.ctx_ = ctx
32430 return c
32431 }
32432
32433
32434
32435 func (c *InventorySourcesCreateCall) Header() http.Header {
32436 if c.header_ == nil {
32437 c.header_ = make(http.Header)
32438 }
32439 return c.header_
32440 }
32441
32442 func (c *InventorySourcesCreateCall) doRequest(alt string) (*http.Response, error) {
32443 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32444 var body io.Reader = nil
32445 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysource)
32446 if err != nil {
32447 return nil, err
32448 }
32449 c.urlParams_.Set("alt", alt)
32450 c.urlParams_.Set("prettyPrint", "false")
32451 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySources")
32452 urls += "?" + c.urlParams_.Encode()
32453 req, err := http.NewRequest("POST", urls, body)
32454 if err != nil {
32455 return nil, err
32456 }
32457 req.Header = reqHeaders
32458 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32459 }
32460
32461
32462
32463
32464
32465
32466
32467 func (c *InventorySourcesCreateCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) {
32468 gensupport.SetOptions(c.urlParams_, opts...)
32469 res, err := c.doRequest("json")
32470 if res != nil && res.StatusCode == http.StatusNotModified {
32471 if res.Body != nil {
32472 res.Body.Close()
32473 }
32474 return nil, gensupport.WrapError(&googleapi.Error{
32475 Code: res.StatusCode,
32476 Header: res.Header,
32477 })
32478 }
32479 if err != nil {
32480 return nil, err
32481 }
32482 defer googleapi.CloseBody(res)
32483 if err := googleapi.CheckResponse(res); err != nil {
32484 return nil, gensupport.WrapError(err)
32485 }
32486 ret := &InventorySource{
32487 ServerResponse: googleapi.ServerResponse{
32488 Header: res.Header,
32489 HTTPStatusCode: res.StatusCode,
32490 },
32491 }
32492 target := &ret
32493 if err := gensupport.DecodeResponse(target, res); err != nil {
32494 return nil, err
32495 }
32496 return ret, nil
32497 }
32498
32499 type InventorySourcesEditInventorySourceReadWriteAccessorsCall struct {
32500 s *Service
32501 inventorySourceId int64
32502 editinventorysourcereadwriteaccessorsrequest *EditInventorySourceReadWriteAccessorsRequest
32503 urlParams_ gensupport.URLParams
32504 ctx_ context.Context
32505 header_ http.Header
32506 }
32507
32508
32509
32510
32511
32512
32513 func (r *InventorySourcesService) EditInventorySourceReadWriteAccessors(inventorySourceId int64, editinventorysourcereadwriteaccessorsrequest *EditInventorySourceReadWriteAccessorsRequest) *InventorySourcesEditInventorySourceReadWriteAccessorsCall {
32514 c := &InventorySourcesEditInventorySourceReadWriteAccessorsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32515 c.inventorySourceId = inventorySourceId
32516 c.editinventorysourcereadwriteaccessorsrequest = editinventorysourcereadwriteaccessorsrequest
32517 return c
32518 }
32519
32520
32521
32522
32523 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Fields(s ...googleapi.Field) *InventorySourcesEditInventorySourceReadWriteAccessorsCall {
32524 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32525 return c
32526 }
32527
32528
32529 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Context(ctx context.Context) *InventorySourcesEditInventorySourceReadWriteAccessorsCall {
32530 c.ctx_ = ctx
32531 return c
32532 }
32533
32534
32535
32536 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Header() http.Header {
32537 if c.header_ == nil {
32538 c.header_ = make(http.Header)
32539 }
32540 return c.header_
32541 }
32542
32543 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) doRequest(alt string) (*http.Response, error) {
32544 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32545 var body io.Reader = nil
32546 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editinventorysourcereadwriteaccessorsrequest)
32547 if err != nil {
32548 return nil, err
32549 }
32550 c.urlParams_.Set("alt", alt)
32551 c.urlParams_.Set("prettyPrint", "false")
32552 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySources/{+inventorySourceId}:editInventorySourceReadWriteAccessors")
32553 urls += "?" + c.urlParams_.Encode()
32554 req, err := http.NewRequest("POST", urls, body)
32555 if err != nil {
32556 return nil, err
32557 }
32558 req.Header = reqHeaders
32559 googleapi.Expand(req.URL, map[string]string{
32560 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10),
32561 })
32562 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32563 }
32564
32565
32566
32567
32568
32569
32570
32571 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Do(opts ...googleapi.CallOption) (*InventorySourceAccessors, error) {
32572 gensupport.SetOptions(c.urlParams_, opts...)
32573 res, err := c.doRequest("json")
32574 if res != nil && res.StatusCode == http.StatusNotModified {
32575 if res.Body != nil {
32576 res.Body.Close()
32577 }
32578 return nil, gensupport.WrapError(&googleapi.Error{
32579 Code: res.StatusCode,
32580 Header: res.Header,
32581 })
32582 }
32583 if err != nil {
32584 return nil, err
32585 }
32586 defer googleapi.CloseBody(res)
32587 if err := googleapi.CheckResponse(res); err != nil {
32588 return nil, gensupport.WrapError(err)
32589 }
32590 ret := &InventorySourceAccessors{
32591 ServerResponse: googleapi.ServerResponse{
32592 Header: res.Header,
32593 HTTPStatusCode: res.StatusCode,
32594 },
32595 }
32596 target := &ret
32597 if err := gensupport.DecodeResponse(target, res); err != nil {
32598 return nil, err
32599 }
32600 return ret, nil
32601 }
32602
32603 type InventorySourcesGetCall struct {
32604 s *Service
32605 inventorySourceId int64
32606 urlParams_ gensupport.URLParams
32607 ifNoneMatch_ string
32608 ctx_ context.Context
32609 header_ http.Header
32610 }
32611
32612
32613
32614
32615 func (r *InventorySourcesService) Get(inventorySourceId int64) *InventorySourcesGetCall {
32616 c := &InventorySourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32617 c.inventorySourceId = inventorySourceId
32618 return c
32619 }
32620
32621
32622
32623 func (c *InventorySourcesGetCall) PartnerId(partnerId int64) *InventorySourcesGetCall {
32624 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32625 return c
32626 }
32627
32628
32629
32630
32631 func (c *InventorySourcesGetCall) Fields(s ...googleapi.Field) *InventorySourcesGetCall {
32632 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32633 return c
32634 }
32635
32636
32637
32638
32639 func (c *InventorySourcesGetCall) IfNoneMatch(entityTag string) *InventorySourcesGetCall {
32640 c.ifNoneMatch_ = entityTag
32641 return c
32642 }
32643
32644
32645 func (c *InventorySourcesGetCall) Context(ctx context.Context) *InventorySourcesGetCall {
32646 c.ctx_ = ctx
32647 return c
32648 }
32649
32650
32651
32652 func (c *InventorySourcesGetCall) Header() http.Header {
32653 if c.header_ == nil {
32654 c.header_ = make(http.Header)
32655 }
32656 return c.header_
32657 }
32658
32659 func (c *InventorySourcesGetCall) doRequest(alt string) (*http.Response, error) {
32660 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32661 if c.ifNoneMatch_ != "" {
32662 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32663 }
32664 var body io.Reader = nil
32665 c.urlParams_.Set("alt", alt)
32666 c.urlParams_.Set("prettyPrint", "false")
32667 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySources/{+inventorySourceId}")
32668 urls += "?" + c.urlParams_.Encode()
32669 req, err := http.NewRequest("GET", urls, body)
32670 if err != nil {
32671 return nil, err
32672 }
32673 req.Header = reqHeaders
32674 googleapi.Expand(req.URL, map[string]string{
32675 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10),
32676 })
32677 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32678 }
32679
32680
32681
32682
32683
32684
32685
32686 func (c *InventorySourcesGetCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) {
32687 gensupport.SetOptions(c.urlParams_, opts...)
32688 res, err := c.doRequest("json")
32689 if res != nil && res.StatusCode == http.StatusNotModified {
32690 if res.Body != nil {
32691 res.Body.Close()
32692 }
32693 return nil, gensupport.WrapError(&googleapi.Error{
32694 Code: res.StatusCode,
32695 Header: res.Header,
32696 })
32697 }
32698 if err != nil {
32699 return nil, err
32700 }
32701 defer googleapi.CloseBody(res)
32702 if err := googleapi.CheckResponse(res); err != nil {
32703 return nil, gensupport.WrapError(err)
32704 }
32705 ret := &InventorySource{
32706 ServerResponse: googleapi.ServerResponse{
32707 Header: res.Header,
32708 HTTPStatusCode: res.StatusCode,
32709 },
32710 }
32711 target := &ret
32712 if err := gensupport.DecodeResponse(target, res); err != nil {
32713 return nil, err
32714 }
32715 return ret, nil
32716 }
32717
32718 type InventorySourcesListCall struct {
32719 s *Service
32720 urlParams_ gensupport.URLParams
32721 ifNoneMatch_ string
32722 ctx_ context.Context
32723 header_ http.Header
32724 }
32725
32726
32727
32728
32729
32730 func (r *InventorySourcesService) List() *InventorySourcesListCall {
32731 c := &InventorySourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32732 return c
32733 }
32734
32735
32736
32737 func (c *InventorySourcesListCall) AdvertiserId(advertiserId int64) *InventorySourcesListCall {
32738 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32739 return c
32740 }
32741
32742
32743
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753
32754
32755
32756 func (c *InventorySourcesListCall) Filter(filter string) *InventorySourcesListCall {
32757 c.urlParams_.Set("filter", filter)
32758 return c
32759 }
32760
32761
32762
32763
32764
32765 func (c *InventorySourcesListCall) OrderBy(orderBy string) *InventorySourcesListCall {
32766 c.urlParams_.Set("orderBy", orderBy)
32767 return c
32768 }
32769
32770
32771
32772 func (c *InventorySourcesListCall) PageSize(pageSize int64) *InventorySourcesListCall {
32773 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
32774 return c
32775 }
32776
32777
32778
32779
32780
32781 func (c *InventorySourcesListCall) PageToken(pageToken string) *InventorySourcesListCall {
32782 c.urlParams_.Set("pageToken", pageToken)
32783 return c
32784 }
32785
32786
32787
32788 func (c *InventorySourcesListCall) PartnerId(partnerId int64) *InventorySourcesListCall {
32789 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32790 return c
32791 }
32792
32793
32794
32795
32796 func (c *InventorySourcesListCall) Fields(s ...googleapi.Field) *InventorySourcesListCall {
32797 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32798 return c
32799 }
32800
32801
32802
32803
32804 func (c *InventorySourcesListCall) IfNoneMatch(entityTag string) *InventorySourcesListCall {
32805 c.ifNoneMatch_ = entityTag
32806 return c
32807 }
32808
32809
32810 func (c *InventorySourcesListCall) Context(ctx context.Context) *InventorySourcesListCall {
32811 c.ctx_ = ctx
32812 return c
32813 }
32814
32815
32816
32817 func (c *InventorySourcesListCall) Header() http.Header {
32818 if c.header_ == nil {
32819 c.header_ = make(http.Header)
32820 }
32821 return c.header_
32822 }
32823
32824 func (c *InventorySourcesListCall) doRequest(alt string) (*http.Response, error) {
32825 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32826 if c.ifNoneMatch_ != "" {
32827 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32828 }
32829 var body io.Reader = nil
32830 c.urlParams_.Set("alt", alt)
32831 c.urlParams_.Set("prettyPrint", "false")
32832 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySources")
32833 urls += "?" + c.urlParams_.Encode()
32834 req, err := http.NewRequest("GET", urls, body)
32835 if err != nil {
32836 return nil, err
32837 }
32838 req.Header = reqHeaders
32839 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32840 }
32841
32842
32843
32844
32845
32846
32847
32848 func (c *InventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListInventorySourcesResponse, error) {
32849 gensupport.SetOptions(c.urlParams_, opts...)
32850 res, err := c.doRequest("json")
32851 if res != nil && res.StatusCode == http.StatusNotModified {
32852 if res.Body != nil {
32853 res.Body.Close()
32854 }
32855 return nil, gensupport.WrapError(&googleapi.Error{
32856 Code: res.StatusCode,
32857 Header: res.Header,
32858 })
32859 }
32860 if err != nil {
32861 return nil, err
32862 }
32863 defer googleapi.CloseBody(res)
32864 if err := googleapi.CheckResponse(res); err != nil {
32865 return nil, gensupport.WrapError(err)
32866 }
32867 ret := &ListInventorySourcesResponse{
32868 ServerResponse: googleapi.ServerResponse{
32869 Header: res.Header,
32870 HTTPStatusCode: res.StatusCode,
32871 },
32872 }
32873 target := &ret
32874 if err := gensupport.DecodeResponse(target, res); err != nil {
32875 return nil, err
32876 }
32877 return ret, nil
32878 }
32879
32880
32881
32882
32883 func (c *InventorySourcesListCall) Pages(ctx context.Context, f func(*ListInventorySourcesResponse) error) error {
32884 c.ctx_ = ctx
32885 defer c.PageToken(c.urlParams_.Get("pageToken"))
32886 for {
32887 x, err := c.Do()
32888 if err != nil {
32889 return err
32890 }
32891 if err := f(x); err != nil {
32892 return err
32893 }
32894 if x.NextPageToken == "" {
32895 return nil
32896 }
32897 c.PageToken(x.NextPageToken)
32898 }
32899 }
32900
32901 type InventorySourcesPatchCall struct {
32902 s *Service
32903 inventorySourceId int64
32904 inventorysource *InventorySource
32905 urlParams_ gensupport.URLParams
32906 ctx_ context.Context
32907 header_ http.Header
32908 }
32909
32910
32911
32912
32913
32914
32915 func (r *InventorySourcesService) Patch(inventorySourceId int64, inventorysource *InventorySource) *InventorySourcesPatchCall {
32916 c := &InventorySourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32917 c.inventorySourceId = inventorySourceId
32918 c.inventorysource = inventorysource
32919 return c
32920 }
32921
32922
32923
32924 func (c *InventorySourcesPatchCall) AdvertiserId(advertiserId int64) *InventorySourcesPatchCall {
32925 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32926 return c
32927 }
32928
32929
32930
32931 func (c *InventorySourcesPatchCall) PartnerId(partnerId int64) *InventorySourcesPatchCall {
32932 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32933 return c
32934 }
32935
32936
32937
32938 func (c *InventorySourcesPatchCall) UpdateMask(updateMask string) *InventorySourcesPatchCall {
32939 c.urlParams_.Set("updateMask", updateMask)
32940 return c
32941 }
32942
32943
32944
32945
32946 func (c *InventorySourcesPatchCall) Fields(s ...googleapi.Field) *InventorySourcesPatchCall {
32947 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32948 return c
32949 }
32950
32951
32952 func (c *InventorySourcesPatchCall) Context(ctx context.Context) *InventorySourcesPatchCall {
32953 c.ctx_ = ctx
32954 return c
32955 }
32956
32957
32958
32959 func (c *InventorySourcesPatchCall) Header() http.Header {
32960 if c.header_ == nil {
32961 c.header_ = make(http.Header)
32962 }
32963 return c.header_
32964 }
32965
32966 func (c *InventorySourcesPatchCall) doRequest(alt string) (*http.Response, error) {
32967 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32968 var body io.Reader = nil
32969 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysource)
32970 if err != nil {
32971 return nil, err
32972 }
32973 c.urlParams_.Set("alt", alt)
32974 c.urlParams_.Set("prettyPrint", "false")
32975 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/inventorySources/{+inventorySourceId}")
32976 urls += "?" + c.urlParams_.Encode()
32977 req, err := http.NewRequest("PATCH", urls, body)
32978 if err != nil {
32979 return nil, err
32980 }
32981 req.Header = reqHeaders
32982 googleapi.Expand(req.URL, map[string]string{
32983 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10),
32984 })
32985 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32986 }
32987
32988
32989
32990
32991
32992
32993
32994 func (c *InventorySourcesPatchCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) {
32995 gensupport.SetOptions(c.urlParams_, opts...)
32996 res, err := c.doRequest("json")
32997 if res != nil && res.StatusCode == http.StatusNotModified {
32998 if res.Body != nil {
32999 res.Body.Close()
33000 }
33001 return nil, gensupport.WrapError(&googleapi.Error{
33002 Code: res.StatusCode,
33003 Header: res.Header,
33004 })
33005 }
33006 if err != nil {
33007 return nil, err
33008 }
33009 defer googleapi.CloseBody(res)
33010 if err := googleapi.CheckResponse(res); err != nil {
33011 return nil, gensupport.WrapError(err)
33012 }
33013 ret := &InventorySource{
33014 ServerResponse: googleapi.ServerResponse{
33015 Header: res.Header,
33016 HTTPStatusCode: res.StatusCode,
33017 },
33018 }
33019 target := &ret
33020 if err := gensupport.DecodeResponse(target, res); err != nil {
33021 return nil, err
33022 }
33023 return ret, nil
33024 }
33025
33026 type MediaDownloadCall struct {
33027 s *Service
33028 resourceName string
33029 urlParams_ gensupport.URLParams
33030 ifNoneMatch_ string
33031 ctx_ context.Context
33032 header_ http.Header
33033 }
33034
33035
33036
33037
33038
33039
33040
33041 func (r *MediaService) Download(resourceName string) *MediaDownloadCall {
33042 c := &MediaDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33043 c.resourceName = resourceName
33044 return c
33045 }
33046
33047
33048
33049
33050 func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall {
33051 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33052 return c
33053 }
33054
33055
33056
33057
33058 func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall {
33059 c.ifNoneMatch_ = entityTag
33060 return c
33061 }
33062
33063
33064 func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall {
33065 c.ctx_ = ctx
33066 return c
33067 }
33068
33069
33070
33071 func (c *MediaDownloadCall) Header() http.Header {
33072 if c.header_ == nil {
33073 c.header_ = make(http.Header)
33074 }
33075 return c.header_
33076 }
33077
33078 func (c *MediaDownloadCall) doRequest(alt string) (*http.Response, error) {
33079 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33080 if c.ifNoneMatch_ != "" {
33081 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33082 }
33083 var body io.Reader = nil
33084 c.urlParams_.Set("alt", alt)
33085 c.urlParams_.Set("prettyPrint", "false")
33086 urls := googleapi.ResolveRelative(c.s.BasePath, "download/{+resourceName}")
33087 urls += "?" + c.urlParams_.Encode()
33088 req, err := http.NewRequest("GET", urls, body)
33089 if err != nil {
33090 return nil, err
33091 }
33092 req.Header = reqHeaders
33093 googleapi.Expand(req.URL, map[string]string{
33094 "resourceName": c.resourceName,
33095 })
33096 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33097 }
33098
33099
33100
33101
33102 func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
33103 gensupport.SetOptions(c.urlParams_, opts...)
33104 res, err := c.doRequest("media")
33105 if err != nil {
33106 return nil, err
33107 }
33108 if err := googleapi.CheckResponse(res); err != nil {
33109 res.Body.Close()
33110 return nil, gensupport.WrapError(err)
33111 }
33112 return res, nil
33113 }
33114
33115
33116
33117
33118
33119
33120
33121 func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) {
33122 gensupport.SetOptions(c.urlParams_, opts...)
33123 res, err := c.doRequest("json")
33124 if res != nil && res.StatusCode == http.StatusNotModified {
33125 if res.Body != nil {
33126 res.Body.Close()
33127 }
33128 return nil, gensupport.WrapError(&googleapi.Error{
33129 Code: res.StatusCode,
33130 Header: res.Header,
33131 })
33132 }
33133 if err != nil {
33134 return nil, err
33135 }
33136 defer googleapi.CloseBody(res)
33137 if err := googleapi.CheckResponse(res); err != nil {
33138 return nil, gensupport.WrapError(err)
33139 }
33140 ret := &GoogleBytestreamMedia{
33141 ServerResponse: googleapi.ServerResponse{
33142 Header: res.Header,
33143 HTTPStatusCode: res.StatusCode,
33144 },
33145 }
33146 target := &ret
33147 if err := gensupport.DecodeResponse(target, res); err != nil {
33148 return nil, err
33149 }
33150 return ret, nil
33151 }
33152
33153 type MediaUploadCall struct {
33154 s *Service
33155 resourceName string
33156 googlebytestreammedia *GoogleBytestreamMedia
33157 urlParams_ gensupport.URLParams
33158 mediaInfo_ *gensupport.MediaInfo
33159 ctx_ context.Context
33160 header_ http.Header
33161 }
33162
33163
33164
33165
33166
33167
33168
33169
33170 func (r *MediaService) Upload(resourceName string, googlebytestreammedia *GoogleBytestreamMedia) *MediaUploadCall {
33171 c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33172 c.resourceName = resourceName
33173 c.googlebytestreammedia = googlebytestreammedia
33174 return c
33175 }
33176
33177
33178
33179
33180
33181
33182
33183
33184 func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall {
33185 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
33186 return c
33187 }
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198 func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall {
33199 c.ctx_ = ctx
33200 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
33201 return c
33202 }
33203
33204
33205
33206
33207
33208 func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall {
33209 c.mediaInfo_.SetProgressUpdater(pu)
33210 return c
33211 }
33212
33213
33214
33215
33216 func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall {
33217 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33218 return c
33219 }
33220
33221
33222
33223
33224 func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall {
33225 c.ctx_ = ctx
33226 return c
33227 }
33228
33229
33230
33231 func (c *MediaUploadCall) Header() http.Header {
33232 if c.header_ == nil {
33233 c.header_ = make(http.Header)
33234 }
33235 return c.header_
33236 }
33237
33238 func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) {
33239 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33240 var body io.Reader = nil
33241 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlebytestreammedia)
33242 if err != nil {
33243 return nil, err
33244 }
33245 c.urlParams_.Set("alt", alt)
33246 c.urlParams_.Set("prettyPrint", "false")
33247 urls := googleapi.ResolveRelative(c.s.BasePath, "media/{+resourceName}")
33248 if c.mediaInfo_ != nil {
33249 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/media/{+resourceName}")
33250 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
33251 }
33252 if body == nil {
33253 body = new(bytes.Buffer)
33254 reqHeaders.Set("Content-Type", "application/json")
33255 }
33256 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
33257 defer cleanup()
33258 urls += "?" + c.urlParams_.Encode()
33259 req, err := http.NewRequest("POST", urls, body)
33260 if err != nil {
33261 return nil, err
33262 }
33263 req.Header = reqHeaders
33264 req.GetBody = getBody
33265 googleapi.Expand(req.URL, map[string]string{
33266 "resourceName": c.resourceName,
33267 })
33268 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33269 }
33270
33271
33272
33273
33274
33275
33276
33277 func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) {
33278 gensupport.SetOptions(c.urlParams_, opts...)
33279 res, err := c.doRequest("json")
33280 if res != nil && res.StatusCode == http.StatusNotModified {
33281 if res.Body != nil {
33282 res.Body.Close()
33283 }
33284 return nil, gensupport.WrapError(&googleapi.Error{
33285 Code: res.StatusCode,
33286 Header: res.Header,
33287 })
33288 }
33289 if err != nil {
33290 return nil, err
33291 }
33292 defer googleapi.CloseBody(res)
33293 if err := googleapi.CheckResponse(res); err != nil {
33294 return nil, gensupport.WrapError(err)
33295 }
33296 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
33297 if rx != nil {
33298 rx.Client = c.s.client
33299 rx.UserAgent = c.s.userAgent()
33300 ctx := c.ctx_
33301 if ctx == nil {
33302 ctx = context.TODO()
33303 }
33304 res, err = rx.Upload(ctx)
33305 if err != nil {
33306 return nil, err
33307 }
33308 defer res.Body.Close()
33309 if err := googleapi.CheckResponse(res); err != nil {
33310 return nil, gensupport.WrapError(err)
33311 }
33312 }
33313 ret := &GoogleBytestreamMedia{
33314 ServerResponse: googleapi.ServerResponse{
33315 Header: res.Header,
33316 HTTPStatusCode: res.StatusCode,
33317 },
33318 }
33319 target := &ret
33320 if err := gensupport.DecodeResponse(target, res); err != nil {
33321 return nil, err
33322 }
33323 return ret, nil
33324 }
33325
33326 type PartnersEditAssignedTargetingOptionsCall struct {
33327 s *Service
33328 partnerId int64
33329 bulkeditpartnerassignedtargetingoptionsrequest *BulkEditPartnerAssignedTargetingOptionsRequest
33330 urlParams_ gensupport.URLParams
33331 ctx_ context.Context
33332 header_ http.Header
33333 }
33334
33335
33336
33337
33338
33339
33340
33341
33342 func (r *PartnersService) EditAssignedTargetingOptions(partnerId int64, bulkeditpartnerassignedtargetingoptionsrequest *BulkEditPartnerAssignedTargetingOptionsRequest) *PartnersEditAssignedTargetingOptionsCall {
33343 c := &PartnersEditAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33344 c.partnerId = partnerId
33345 c.bulkeditpartnerassignedtargetingoptionsrequest = bulkeditpartnerassignedtargetingoptionsrequest
33346 return c
33347 }
33348
33349
33350
33351
33352 func (c *PartnersEditAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *PartnersEditAssignedTargetingOptionsCall {
33353 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33354 return c
33355 }
33356
33357
33358 func (c *PartnersEditAssignedTargetingOptionsCall) Context(ctx context.Context) *PartnersEditAssignedTargetingOptionsCall {
33359 c.ctx_ = ctx
33360 return c
33361 }
33362
33363
33364
33365 func (c *PartnersEditAssignedTargetingOptionsCall) Header() http.Header {
33366 if c.header_ == nil {
33367 c.header_ = make(http.Header)
33368 }
33369 return c.header_
33370 }
33371
33372 func (c *PartnersEditAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
33373 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33374 var body io.Reader = nil
33375 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditpartnerassignedtargetingoptionsrequest)
33376 if err != nil {
33377 return nil, err
33378 }
33379 c.urlParams_.Set("alt", alt)
33380 c.urlParams_.Set("prettyPrint", "false")
33381 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}:editAssignedTargetingOptions")
33382 urls += "?" + c.urlParams_.Encode()
33383 req, err := http.NewRequest("POST", urls, body)
33384 if err != nil {
33385 return nil, err
33386 }
33387 req.Header = reqHeaders
33388 googleapi.Expand(req.URL, map[string]string{
33389 "partnerId": strconv.FormatInt(c.partnerId, 10),
33390 })
33391 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33392 }
33393
33394
33395
33396
33397
33398
33399
33400 func (c *PartnersEditAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditPartnerAssignedTargetingOptionsResponse, error) {
33401 gensupport.SetOptions(c.urlParams_, opts...)
33402 res, err := c.doRequest("json")
33403 if res != nil && res.StatusCode == http.StatusNotModified {
33404 if res.Body != nil {
33405 res.Body.Close()
33406 }
33407 return nil, gensupport.WrapError(&googleapi.Error{
33408 Code: res.StatusCode,
33409 Header: res.Header,
33410 })
33411 }
33412 if err != nil {
33413 return nil, err
33414 }
33415 defer googleapi.CloseBody(res)
33416 if err := googleapi.CheckResponse(res); err != nil {
33417 return nil, gensupport.WrapError(err)
33418 }
33419 ret := &BulkEditPartnerAssignedTargetingOptionsResponse{
33420 ServerResponse: googleapi.ServerResponse{
33421 Header: res.Header,
33422 HTTPStatusCode: res.StatusCode,
33423 },
33424 }
33425 target := &ret
33426 if err := gensupport.DecodeResponse(target, res); err != nil {
33427 return nil, err
33428 }
33429 return ret, nil
33430 }
33431
33432 type PartnersGetCall struct {
33433 s *Service
33434 partnerId int64
33435 urlParams_ gensupport.URLParams
33436 ifNoneMatch_ string
33437 ctx_ context.Context
33438 header_ http.Header
33439 }
33440
33441
33442
33443
33444 func (r *PartnersService) Get(partnerId int64) *PartnersGetCall {
33445 c := &PartnersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33446 c.partnerId = partnerId
33447 return c
33448 }
33449
33450
33451
33452
33453 func (c *PartnersGetCall) Fields(s ...googleapi.Field) *PartnersGetCall {
33454 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33455 return c
33456 }
33457
33458
33459
33460
33461 func (c *PartnersGetCall) IfNoneMatch(entityTag string) *PartnersGetCall {
33462 c.ifNoneMatch_ = entityTag
33463 return c
33464 }
33465
33466
33467 func (c *PartnersGetCall) Context(ctx context.Context) *PartnersGetCall {
33468 c.ctx_ = ctx
33469 return c
33470 }
33471
33472
33473
33474 func (c *PartnersGetCall) Header() http.Header {
33475 if c.header_ == nil {
33476 c.header_ = make(http.Header)
33477 }
33478 return c.header_
33479 }
33480
33481 func (c *PartnersGetCall) doRequest(alt string) (*http.Response, error) {
33482 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33483 if c.ifNoneMatch_ != "" {
33484 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33485 }
33486 var body io.Reader = nil
33487 c.urlParams_.Set("alt", alt)
33488 c.urlParams_.Set("prettyPrint", "false")
33489 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}")
33490 urls += "?" + c.urlParams_.Encode()
33491 req, err := http.NewRequest("GET", urls, body)
33492 if err != nil {
33493 return nil, err
33494 }
33495 req.Header = reqHeaders
33496 googleapi.Expand(req.URL, map[string]string{
33497 "partnerId": strconv.FormatInt(c.partnerId, 10),
33498 })
33499 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33500 }
33501
33502
33503
33504
33505
33506
33507 func (c *PartnersGetCall) Do(opts ...googleapi.CallOption) (*Partner, error) {
33508 gensupport.SetOptions(c.urlParams_, opts...)
33509 res, err := c.doRequest("json")
33510 if res != nil && res.StatusCode == http.StatusNotModified {
33511 if res.Body != nil {
33512 res.Body.Close()
33513 }
33514 return nil, gensupport.WrapError(&googleapi.Error{
33515 Code: res.StatusCode,
33516 Header: res.Header,
33517 })
33518 }
33519 if err != nil {
33520 return nil, err
33521 }
33522 defer googleapi.CloseBody(res)
33523 if err := googleapi.CheckResponse(res); err != nil {
33524 return nil, gensupport.WrapError(err)
33525 }
33526 ret := &Partner{
33527 ServerResponse: googleapi.ServerResponse{
33528 Header: res.Header,
33529 HTTPStatusCode: res.StatusCode,
33530 },
33531 }
33532 target := &ret
33533 if err := gensupport.DecodeResponse(target, res); err != nil {
33534 return nil, err
33535 }
33536 return ret, nil
33537 }
33538
33539 type PartnersListCall struct {
33540 s *Service
33541 urlParams_ gensupport.URLParams
33542 ifNoneMatch_ string
33543 ctx_ context.Context
33544 header_ http.Header
33545 }
33546
33547
33548
33549 func (r *PartnersService) List() *PartnersListCall {
33550 c := &PartnersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33551 return c
33552 }
33553
33554
33555
33556
33557
33558
33559
33560
33561
33562
33563
33564 func (c *PartnersListCall) Filter(filter string) *PartnersListCall {
33565 c.urlParams_.Set("filter", filter)
33566 return c
33567 }
33568
33569
33570
33571
33572
33573 func (c *PartnersListCall) OrderBy(orderBy string) *PartnersListCall {
33574 c.urlParams_.Set("orderBy", orderBy)
33575 return c
33576 }
33577
33578
33579
33580 func (c *PartnersListCall) PageSize(pageSize int64) *PartnersListCall {
33581 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
33582 return c
33583 }
33584
33585
33586
33587
33588
33589 func (c *PartnersListCall) PageToken(pageToken string) *PartnersListCall {
33590 c.urlParams_.Set("pageToken", pageToken)
33591 return c
33592 }
33593
33594
33595
33596
33597 func (c *PartnersListCall) Fields(s ...googleapi.Field) *PartnersListCall {
33598 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33599 return c
33600 }
33601
33602
33603
33604
33605 func (c *PartnersListCall) IfNoneMatch(entityTag string) *PartnersListCall {
33606 c.ifNoneMatch_ = entityTag
33607 return c
33608 }
33609
33610
33611 func (c *PartnersListCall) Context(ctx context.Context) *PartnersListCall {
33612 c.ctx_ = ctx
33613 return c
33614 }
33615
33616
33617
33618 func (c *PartnersListCall) Header() http.Header {
33619 if c.header_ == nil {
33620 c.header_ = make(http.Header)
33621 }
33622 return c.header_
33623 }
33624
33625 func (c *PartnersListCall) doRequest(alt string) (*http.Response, error) {
33626 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33627 if c.ifNoneMatch_ != "" {
33628 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33629 }
33630 var body io.Reader = nil
33631 c.urlParams_.Set("alt", alt)
33632 c.urlParams_.Set("prettyPrint", "false")
33633 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners")
33634 urls += "?" + c.urlParams_.Encode()
33635 req, err := http.NewRequest("GET", urls, body)
33636 if err != nil {
33637 return nil, err
33638 }
33639 req.Header = reqHeaders
33640 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33641 }
33642
33643
33644
33645
33646
33647
33648
33649 func (c *PartnersListCall) Do(opts ...googleapi.CallOption) (*ListPartnersResponse, error) {
33650 gensupport.SetOptions(c.urlParams_, opts...)
33651 res, err := c.doRequest("json")
33652 if res != nil && res.StatusCode == http.StatusNotModified {
33653 if res.Body != nil {
33654 res.Body.Close()
33655 }
33656 return nil, gensupport.WrapError(&googleapi.Error{
33657 Code: res.StatusCode,
33658 Header: res.Header,
33659 })
33660 }
33661 if err != nil {
33662 return nil, err
33663 }
33664 defer googleapi.CloseBody(res)
33665 if err := googleapi.CheckResponse(res); err != nil {
33666 return nil, gensupport.WrapError(err)
33667 }
33668 ret := &ListPartnersResponse{
33669 ServerResponse: googleapi.ServerResponse{
33670 Header: res.Header,
33671 HTTPStatusCode: res.StatusCode,
33672 },
33673 }
33674 target := &ret
33675 if err := gensupport.DecodeResponse(target, res); err != nil {
33676 return nil, err
33677 }
33678 return ret, nil
33679 }
33680
33681
33682
33683
33684 func (c *PartnersListCall) Pages(ctx context.Context, f func(*ListPartnersResponse) error) error {
33685 c.ctx_ = ctx
33686 defer c.PageToken(c.urlParams_.Get("pageToken"))
33687 for {
33688 x, err := c.Do()
33689 if err != nil {
33690 return err
33691 }
33692 if err := f(x); err != nil {
33693 return err
33694 }
33695 if x.NextPageToken == "" {
33696 return nil
33697 }
33698 c.PageToken(x.NextPageToken)
33699 }
33700 }
33701
33702 type PartnersChannelsCreateCall struct {
33703 s *Service
33704 partnerId int64
33705 channel *Channel
33706 urlParams_ gensupport.URLParams
33707 ctx_ context.Context
33708 header_ http.Header
33709 }
33710
33711
33712
33713
33714
33715 func (r *PartnersChannelsService) Create(partnerId int64, channel *Channel) *PartnersChannelsCreateCall {
33716 c := &PartnersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33717 c.partnerId = partnerId
33718 c.channel = channel
33719 return c
33720 }
33721
33722
33723
33724 func (c *PartnersChannelsCreateCall) AdvertiserId(advertiserId int64) *PartnersChannelsCreateCall {
33725 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33726 return c
33727 }
33728
33729
33730
33731
33732 func (c *PartnersChannelsCreateCall) Fields(s ...googleapi.Field) *PartnersChannelsCreateCall {
33733 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33734 return c
33735 }
33736
33737
33738 func (c *PartnersChannelsCreateCall) Context(ctx context.Context) *PartnersChannelsCreateCall {
33739 c.ctx_ = ctx
33740 return c
33741 }
33742
33743
33744
33745 func (c *PartnersChannelsCreateCall) Header() http.Header {
33746 if c.header_ == nil {
33747 c.header_ = make(http.Header)
33748 }
33749 return c.header_
33750 }
33751
33752 func (c *PartnersChannelsCreateCall) doRequest(alt string) (*http.Response, error) {
33753 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33754 var body io.Reader = nil
33755 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
33756 if err != nil {
33757 return nil, err
33758 }
33759 c.urlParams_.Set("alt", alt)
33760 c.urlParams_.Set("prettyPrint", "false")
33761 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/channels")
33762 urls += "?" + c.urlParams_.Encode()
33763 req, err := http.NewRequest("POST", urls, body)
33764 if err != nil {
33765 return nil, err
33766 }
33767 req.Header = reqHeaders
33768 googleapi.Expand(req.URL, map[string]string{
33769 "partnerId": strconv.FormatInt(c.partnerId, 10),
33770 })
33771 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33772 }
33773
33774
33775
33776
33777
33778
33779 func (c *PartnersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
33780 gensupport.SetOptions(c.urlParams_, opts...)
33781 res, err := c.doRequest("json")
33782 if res != nil && res.StatusCode == http.StatusNotModified {
33783 if res.Body != nil {
33784 res.Body.Close()
33785 }
33786 return nil, gensupport.WrapError(&googleapi.Error{
33787 Code: res.StatusCode,
33788 Header: res.Header,
33789 })
33790 }
33791 if err != nil {
33792 return nil, err
33793 }
33794 defer googleapi.CloseBody(res)
33795 if err := googleapi.CheckResponse(res); err != nil {
33796 return nil, gensupport.WrapError(err)
33797 }
33798 ret := &Channel{
33799 ServerResponse: googleapi.ServerResponse{
33800 Header: res.Header,
33801 HTTPStatusCode: res.StatusCode,
33802 },
33803 }
33804 target := &ret
33805 if err := gensupport.DecodeResponse(target, res); err != nil {
33806 return nil, err
33807 }
33808 return ret, nil
33809 }
33810
33811 type PartnersChannelsGetCall struct {
33812 s *Service
33813 partnerId int64
33814 channelId int64
33815 urlParams_ gensupport.URLParams
33816 ifNoneMatch_ string
33817 ctx_ context.Context
33818 header_ http.Header
33819 }
33820
33821
33822
33823
33824
33825 func (r *PartnersChannelsService) Get(partnerId int64, channelId int64) *PartnersChannelsGetCall {
33826 c := &PartnersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33827 c.partnerId = partnerId
33828 c.channelId = channelId
33829 return c
33830 }
33831
33832
33833
33834 func (c *PartnersChannelsGetCall) AdvertiserId(advertiserId int64) *PartnersChannelsGetCall {
33835 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33836 return c
33837 }
33838
33839
33840
33841
33842 func (c *PartnersChannelsGetCall) Fields(s ...googleapi.Field) *PartnersChannelsGetCall {
33843 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33844 return c
33845 }
33846
33847
33848
33849
33850 func (c *PartnersChannelsGetCall) IfNoneMatch(entityTag string) *PartnersChannelsGetCall {
33851 c.ifNoneMatch_ = entityTag
33852 return c
33853 }
33854
33855
33856 func (c *PartnersChannelsGetCall) Context(ctx context.Context) *PartnersChannelsGetCall {
33857 c.ctx_ = ctx
33858 return c
33859 }
33860
33861
33862
33863 func (c *PartnersChannelsGetCall) Header() http.Header {
33864 if c.header_ == nil {
33865 c.header_ = make(http.Header)
33866 }
33867 return c.header_
33868 }
33869
33870 func (c *PartnersChannelsGetCall) doRequest(alt string) (*http.Response, error) {
33871 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33872 if c.ifNoneMatch_ != "" {
33873 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33874 }
33875 var body io.Reader = nil
33876 c.urlParams_.Set("alt", alt)
33877 c.urlParams_.Set("prettyPrint", "false")
33878 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/channels/{+channelId}")
33879 urls += "?" + c.urlParams_.Encode()
33880 req, err := http.NewRequest("GET", urls, body)
33881 if err != nil {
33882 return nil, err
33883 }
33884 req.Header = reqHeaders
33885 googleapi.Expand(req.URL, map[string]string{
33886 "partnerId": strconv.FormatInt(c.partnerId, 10),
33887 "channelId": strconv.FormatInt(c.channelId, 10),
33888 })
33889 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33890 }
33891
33892
33893
33894
33895
33896
33897 func (c *PartnersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
33898 gensupport.SetOptions(c.urlParams_, opts...)
33899 res, err := c.doRequest("json")
33900 if res != nil && res.StatusCode == http.StatusNotModified {
33901 if res.Body != nil {
33902 res.Body.Close()
33903 }
33904 return nil, gensupport.WrapError(&googleapi.Error{
33905 Code: res.StatusCode,
33906 Header: res.Header,
33907 })
33908 }
33909 if err != nil {
33910 return nil, err
33911 }
33912 defer googleapi.CloseBody(res)
33913 if err := googleapi.CheckResponse(res); err != nil {
33914 return nil, gensupport.WrapError(err)
33915 }
33916 ret := &Channel{
33917 ServerResponse: googleapi.ServerResponse{
33918 Header: res.Header,
33919 HTTPStatusCode: res.StatusCode,
33920 },
33921 }
33922 target := &ret
33923 if err := gensupport.DecodeResponse(target, res); err != nil {
33924 return nil, err
33925 }
33926 return ret, nil
33927 }
33928
33929 type PartnersChannelsListCall struct {
33930 s *Service
33931 partnerId int64
33932 urlParams_ gensupport.URLParams
33933 ifNoneMatch_ string
33934 ctx_ context.Context
33935 header_ http.Header
33936 }
33937
33938
33939
33940
33941 func (r *PartnersChannelsService) List(partnerId int64) *PartnersChannelsListCall {
33942 c := &PartnersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33943 c.partnerId = partnerId
33944 return c
33945 }
33946
33947
33948
33949 func (c *PartnersChannelsListCall) AdvertiserId(advertiserId int64) *PartnersChannelsListCall {
33950 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33951 return c
33952 }
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962 func (c *PartnersChannelsListCall) Filter(filter string) *PartnersChannelsListCall {
33963 c.urlParams_.Set("filter", filter)
33964 return c
33965 }
33966
33967
33968
33969
33970
33971
33972 func (c *PartnersChannelsListCall) OrderBy(orderBy string) *PartnersChannelsListCall {
33973 c.urlParams_.Set("orderBy", orderBy)
33974 return c
33975 }
33976
33977
33978
33979
33980 func (c *PartnersChannelsListCall) PageSize(pageSize int64) *PartnersChannelsListCall {
33981 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
33982 return c
33983 }
33984
33985
33986
33987
33988
33989 func (c *PartnersChannelsListCall) PageToken(pageToken string) *PartnersChannelsListCall {
33990 c.urlParams_.Set("pageToken", pageToken)
33991 return c
33992 }
33993
33994
33995
33996
33997 func (c *PartnersChannelsListCall) Fields(s ...googleapi.Field) *PartnersChannelsListCall {
33998 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33999 return c
34000 }
34001
34002
34003
34004
34005 func (c *PartnersChannelsListCall) IfNoneMatch(entityTag string) *PartnersChannelsListCall {
34006 c.ifNoneMatch_ = entityTag
34007 return c
34008 }
34009
34010
34011 func (c *PartnersChannelsListCall) Context(ctx context.Context) *PartnersChannelsListCall {
34012 c.ctx_ = ctx
34013 return c
34014 }
34015
34016
34017
34018 func (c *PartnersChannelsListCall) Header() http.Header {
34019 if c.header_ == nil {
34020 c.header_ = make(http.Header)
34021 }
34022 return c.header_
34023 }
34024
34025 func (c *PartnersChannelsListCall) doRequest(alt string) (*http.Response, error) {
34026 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34027 if c.ifNoneMatch_ != "" {
34028 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34029 }
34030 var body io.Reader = nil
34031 c.urlParams_.Set("alt", alt)
34032 c.urlParams_.Set("prettyPrint", "false")
34033 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/channels")
34034 urls += "?" + c.urlParams_.Encode()
34035 req, err := http.NewRequest("GET", urls, body)
34036 if err != nil {
34037 return nil, err
34038 }
34039 req.Header = reqHeaders
34040 googleapi.Expand(req.URL, map[string]string{
34041 "partnerId": strconv.FormatInt(c.partnerId, 10),
34042 })
34043 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34044 }
34045
34046
34047
34048
34049
34050
34051
34052 func (c *PartnersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) {
34053 gensupport.SetOptions(c.urlParams_, opts...)
34054 res, err := c.doRequest("json")
34055 if res != nil && res.StatusCode == http.StatusNotModified {
34056 if res.Body != nil {
34057 res.Body.Close()
34058 }
34059 return nil, gensupport.WrapError(&googleapi.Error{
34060 Code: res.StatusCode,
34061 Header: res.Header,
34062 })
34063 }
34064 if err != nil {
34065 return nil, err
34066 }
34067 defer googleapi.CloseBody(res)
34068 if err := googleapi.CheckResponse(res); err != nil {
34069 return nil, gensupport.WrapError(err)
34070 }
34071 ret := &ListChannelsResponse{
34072 ServerResponse: googleapi.ServerResponse{
34073 Header: res.Header,
34074 HTTPStatusCode: res.StatusCode,
34075 },
34076 }
34077 target := &ret
34078 if err := gensupport.DecodeResponse(target, res); err != nil {
34079 return nil, err
34080 }
34081 return ret, nil
34082 }
34083
34084
34085
34086
34087 func (c *PartnersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error {
34088 c.ctx_ = ctx
34089 defer c.PageToken(c.urlParams_.Get("pageToken"))
34090 for {
34091 x, err := c.Do()
34092 if err != nil {
34093 return err
34094 }
34095 if err := f(x); err != nil {
34096 return err
34097 }
34098 if x.NextPageToken == "" {
34099 return nil
34100 }
34101 c.PageToken(x.NextPageToken)
34102 }
34103 }
34104
34105 type PartnersChannelsPatchCall struct {
34106 s *Service
34107 partnerId int64
34108 channelId int64
34109 channel *Channel
34110 urlParams_ gensupport.URLParams
34111 ctx_ context.Context
34112 header_ http.Header
34113 }
34114
34115
34116
34117
34118
34119
34120 func (r *PartnersChannelsService) Patch(partnerId int64, channelId int64, channel *Channel) *PartnersChannelsPatchCall {
34121 c := &PartnersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34122 c.partnerId = partnerId
34123 c.channelId = channelId
34124 c.channel = channel
34125 return c
34126 }
34127
34128
34129
34130 func (c *PartnersChannelsPatchCall) AdvertiserId(advertiserId int64) *PartnersChannelsPatchCall {
34131 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34132 return c
34133 }
34134
34135
34136
34137 func (c *PartnersChannelsPatchCall) UpdateMask(updateMask string) *PartnersChannelsPatchCall {
34138 c.urlParams_.Set("updateMask", updateMask)
34139 return c
34140 }
34141
34142
34143
34144
34145 func (c *PartnersChannelsPatchCall) Fields(s ...googleapi.Field) *PartnersChannelsPatchCall {
34146 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34147 return c
34148 }
34149
34150
34151 func (c *PartnersChannelsPatchCall) Context(ctx context.Context) *PartnersChannelsPatchCall {
34152 c.ctx_ = ctx
34153 return c
34154 }
34155
34156
34157
34158 func (c *PartnersChannelsPatchCall) Header() http.Header {
34159 if c.header_ == nil {
34160 c.header_ = make(http.Header)
34161 }
34162 return c.header_
34163 }
34164
34165 func (c *PartnersChannelsPatchCall) doRequest(alt string) (*http.Response, error) {
34166 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34167 var body io.Reader = nil
34168 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
34169 if err != nil {
34170 return nil, err
34171 }
34172 c.urlParams_.Set("alt", alt)
34173 c.urlParams_.Set("prettyPrint", "false")
34174 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/channels/{channelId}")
34175 urls += "?" + c.urlParams_.Encode()
34176 req, err := http.NewRequest("PATCH", urls, body)
34177 if err != nil {
34178 return nil, err
34179 }
34180 req.Header = reqHeaders
34181 googleapi.Expand(req.URL, map[string]string{
34182 "partnerId": strconv.FormatInt(c.partnerId, 10),
34183 "channelId": strconv.FormatInt(c.channelId, 10),
34184 })
34185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34186 }
34187
34188
34189
34190
34191
34192
34193 func (c *PartnersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
34194 gensupport.SetOptions(c.urlParams_, opts...)
34195 res, err := c.doRequest("json")
34196 if res != nil && res.StatusCode == http.StatusNotModified {
34197 if res.Body != nil {
34198 res.Body.Close()
34199 }
34200 return nil, gensupport.WrapError(&googleapi.Error{
34201 Code: res.StatusCode,
34202 Header: res.Header,
34203 })
34204 }
34205 if err != nil {
34206 return nil, err
34207 }
34208 defer googleapi.CloseBody(res)
34209 if err := googleapi.CheckResponse(res); err != nil {
34210 return nil, gensupport.WrapError(err)
34211 }
34212 ret := &Channel{
34213 ServerResponse: googleapi.ServerResponse{
34214 Header: res.Header,
34215 HTTPStatusCode: res.StatusCode,
34216 },
34217 }
34218 target := &ret
34219 if err := gensupport.DecodeResponse(target, res); err != nil {
34220 return nil, err
34221 }
34222 return ret, nil
34223 }
34224
34225 type PartnersChannelsSitesBulkEditCall struct {
34226 s *Service
34227 partnerId int64
34228 channelId int64
34229 bulkeditsitesrequest *BulkEditSitesRequest
34230 urlParams_ gensupport.URLParams
34231 ctx_ context.Context
34232 header_ http.Header
34233 }
34234
34235
34236
34237
34238
34239
34240
34241 func (r *PartnersChannelsSitesService) BulkEdit(partnerId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *PartnersChannelsSitesBulkEditCall {
34242 c := &PartnersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34243 c.partnerId = partnerId
34244 c.channelId = channelId
34245 c.bulkeditsitesrequest = bulkeditsitesrequest
34246 return c
34247 }
34248
34249
34250
34251
34252 func (c *PartnersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesBulkEditCall {
34253 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34254 return c
34255 }
34256
34257
34258 func (c *PartnersChannelsSitesBulkEditCall) Context(ctx context.Context) *PartnersChannelsSitesBulkEditCall {
34259 c.ctx_ = ctx
34260 return c
34261 }
34262
34263
34264
34265 func (c *PartnersChannelsSitesBulkEditCall) Header() http.Header {
34266 if c.header_ == nil {
34267 c.header_ = make(http.Header)
34268 }
34269 return c.header_
34270 }
34271
34272 func (c *PartnersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) {
34273 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34274 var body io.Reader = nil
34275 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditsitesrequest)
34276 if err != nil {
34277 return nil, err
34278 }
34279 c.urlParams_.Set("alt", alt)
34280 c.urlParams_.Set("prettyPrint", "false")
34281 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{partnerId}/channels/{+channelId}/sites:bulkEdit")
34282 urls += "?" + c.urlParams_.Encode()
34283 req, err := http.NewRequest("POST", urls, body)
34284 if err != nil {
34285 return nil, err
34286 }
34287 req.Header = reqHeaders
34288 googleapi.Expand(req.URL, map[string]string{
34289 "partnerId": strconv.FormatInt(c.partnerId, 10),
34290 "channelId": strconv.FormatInt(c.channelId, 10),
34291 })
34292 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34293 }
34294
34295
34296
34297
34298
34299
34300
34301 func (c *PartnersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) {
34302 gensupport.SetOptions(c.urlParams_, opts...)
34303 res, err := c.doRequest("json")
34304 if res != nil && res.StatusCode == http.StatusNotModified {
34305 if res.Body != nil {
34306 res.Body.Close()
34307 }
34308 return nil, gensupport.WrapError(&googleapi.Error{
34309 Code: res.StatusCode,
34310 Header: res.Header,
34311 })
34312 }
34313 if err != nil {
34314 return nil, err
34315 }
34316 defer googleapi.CloseBody(res)
34317 if err := googleapi.CheckResponse(res); err != nil {
34318 return nil, gensupport.WrapError(err)
34319 }
34320 ret := &BulkEditSitesResponse{
34321 ServerResponse: googleapi.ServerResponse{
34322 Header: res.Header,
34323 HTTPStatusCode: res.StatusCode,
34324 },
34325 }
34326 target := &ret
34327 if err := gensupport.DecodeResponse(target, res); err != nil {
34328 return nil, err
34329 }
34330 return ret, nil
34331 }
34332
34333 type PartnersChannelsSitesCreateCall struct {
34334 s *Service
34335 partnerId int64
34336 channelId int64
34337 site *Site
34338 urlParams_ gensupport.URLParams
34339 ctx_ context.Context
34340 header_ http.Header
34341 }
34342
34343
34344
34345
34346
34347 func (r *PartnersChannelsSitesService) Create(partnerId int64, channelId int64, site *Site) *PartnersChannelsSitesCreateCall {
34348 c := &PartnersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34349 c.partnerId = partnerId
34350 c.channelId = channelId
34351 c.site = site
34352 return c
34353 }
34354
34355
34356
34357 func (c *PartnersChannelsSitesCreateCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesCreateCall {
34358 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34359 return c
34360 }
34361
34362
34363
34364
34365 func (c *PartnersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesCreateCall {
34366 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34367 return c
34368 }
34369
34370
34371 func (c *PartnersChannelsSitesCreateCall) Context(ctx context.Context) *PartnersChannelsSitesCreateCall {
34372 c.ctx_ = ctx
34373 return c
34374 }
34375
34376
34377
34378 func (c *PartnersChannelsSitesCreateCall) Header() http.Header {
34379 if c.header_ == nil {
34380 c.header_ = make(http.Header)
34381 }
34382 return c.header_
34383 }
34384
34385 func (c *PartnersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) {
34386 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34387 var body io.Reader = nil
34388 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
34389 if err != nil {
34390 return nil, err
34391 }
34392 c.urlParams_.Set("alt", alt)
34393 c.urlParams_.Set("prettyPrint", "false")
34394 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{partnerId}/channels/{+channelId}/sites")
34395 urls += "?" + c.urlParams_.Encode()
34396 req, err := http.NewRequest("POST", urls, body)
34397 if err != nil {
34398 return nil, err
34399 }
34400 req.Header = reqHeaders
34401 googleapi.Expand(req.URL, map[string]string{
34402 "partnerId": strconv.FormatInt(c.partnerId, 10),
34403 "channelId": strconv.FormatInt(c.channelId, 10),
34404 })
34405 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34406 }
34407
34408
34409
34410
34411
34412
34413 func (c *PartnersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
34414 gensupport.SetOptions(c.urlParams_, opts...)
34415 res, err := c.doRequest("json")
34416 if res != nil && res.StatusCode == http.StatusNotModified {
34417 if res.Body != nil {
34418 res.Body.Close()
34419 }
34420 return nil, gensupport.WrapError(&googleapi.Error{
34421 Code: res.StatusCode,
34422 Header: res.Header,
34423 })
34424 }
34425 if err != nil {
34426 return nil, err
34427 }
34428 defer googleapi.CloseBody(res)
34429 if err := googleapi.CheckResponse(res); err != nil {
34430 return nil, gensupport.WrapError(err)
34431 }
34432 ret := &Site{
34433 ServerResponse: googleapi.ServerResponse{
34434 Header: res.Header,
34435 HTTPStatusCode: res.StatusCode,
34436 },
34437 }
34438 target := &ret
34439 if err := gensupport.DecodeResponse(target, res); err != nil {
34440 return nil, err
34441 }
34442 return ret, nil
34443 }
34444
34445 type PartnersChannelsSitesDeleteCall struct {
34446 s *Service
34447 partnerId int64
34448 channelId int64
34449 urlOrAppId string
34450 urlParams_ gensupport.URLParams
34451 ctx_ context.Context
34452 header_ http.Header
34453 }
34454
34455
34456
34457
34458
34459
34460 func (r *PartnersChannelsSitesService) Delete(partnerId int64, channelId int64, urlOrAppId string) *PartnersChannelsSitesDeleteCall {
34461 c := &PartnersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34462 c.partnerId = partnerId
34463 c.channelId = channelId
34464 c.urlOrAppId = urlOrAppId
34465 return c
34466 }
34467
34468
34469
34470 func (c *PartnersChannelsSitesDeleteCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesDeleteCall {
34471 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34472 return c
34473 }
34474
34475
34476
34477
34478 func (c *PartnersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesDeleteCall {
34479 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34480 return c
34481 }
34482
34483
34484 func (c *PartnersChannelsSitesDeleteCall) Context(ctx context.Context) *PartnersChannelsSitesDeleteCall {
34485 c.ctx_ = ctx
34486 return c
34487 }
34488
34489
34490
34491 func (c *PartnersChannelsSitesDeleteCall) Header() http.Header {
34492 if c.header_ == nil {
34493 c.header_ = make(http.Header)
34494 }
34495 return c.header_
34496 }
34497
34498 func (c *PartnersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) {
34499 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34500 var body io.Reader = nil
34501 c.urlParams_.Set("alt", alt)
34502 c.urlParams_.Set("prettyPrint", "false")
34503 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{partnerId}/channels/{+channelId}/sites/{+urlOrAppId}")
34504 urls += "?" + c.urlParams_.Encode()
34505 req, err := http.NewRequest("DELETE", urls, body)
34506 if err != nil {
34507 return nil, err
34508 }
34509 req.Header = reqHeaders
34510 googleapi.Expand(req.URL, map[string]string{
34511 "partnerId": strconv.FormatInt(c.partnerId, 10),
34512 "channelId": strconv.FormatInt(c.channelId, 10),
34513 "urlOrAppId": c.urlOrAppId,
34514 })
34515 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34516 }
34517
34518
34519
34520
34521
34522
34523 func (c *PartnersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
34524 gensupport.SetOptions(c.urlParams_, opts...)
34525 res, err := c.doRequest("json")
34526 if res != nil && res.StatusCode == http.StatusNotModified {
34527 if res.Body != nil {
34528 res.Body.Close()
34529 }
34530 return nil, gensupport.WrapError(&googleapi.Error{
34531 Code: res.StatusCode,
34532 Header: res.Header,
34533 })
34534 }
34535 if err != nil {
34536 return nil, err
34537 }
34538 defer googleapi.CloseBody(res)
34539 if err := googleapi.CheckResponse(res); err != nil {
34540 return nil, gensupport.WrapError(err)
34541 }
34542 ret := &Empty{
34543 ServerResponse: googleapi.ServerResponse{
34544 Header: res.Header,
34545 HTTPStatusCode: res.StatusCode,
34546 },
34547 }
34548 target := &ret
34549 if err := gensupport.DecodeResponse(target, res); err != nil {
34550 return nil, err
34551 }
34552 return ret, nil
34553 }
34554
34555 type PartnersChannelsSitesListCall struct {
34556 s *Service
34557 partnerId int64
34558 channelId int64
34559 urlParams_ gensupport.URLParams
34560 ifNoneMatch_ string
34561 ctx_ context.Context
34562 header_ http.Header
34563 }
34564
34565
34566
34567
34568
34569
34570 func (r *PartnersChannelsSitesService) List(partnerId int64, channelId int64) *PartnersChannelsSitesListCall {
34571 c := &PartnersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34572 c.partnerId = partnerId
34573 c.channelId = channelId
34574 return c
34575 }
34576
34577
34578
34579 func (c *PartnersChannelsSitesListCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesListCall {
34580 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34581 return c
34582 }
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592 func (c *PartnersChannelsSitesListCall) Filter(filter string) *PartnersChannelsSitesListCall {
34593 c.urlParams_.Set("filter", filter)
34594 return c
34595 }
34596
34597
34598
34599
34600
34601 func (c *PartnersChannelsSitesListCall) OrderBy(orderBy string) *PartnersChannelsSitesListCall {
34602 c.urlParams_.Set("orderBy", orderBy)
34603 return c
34604 }
34605
34606
34607
34608
34609 func (c *PartnersChannelsSitesListCall) PageSize(pageSize int64) *PartnersChannelsSitesListCall {
34610 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
34611 return c
34612 }
34613
34614
34615
34616
34617
34618 func (c *PartnersChannelsSitesListCall) PageToken(pageToken string) *PartnersChannelsSitesListCall {
34619 c.urlParams_.Set("pageToken", pageToken)
34620 return c
34621 }
34622
34623
34624
34625
34626 func (c *PartnersChannelsSitesListCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesListCall {
34627 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34628 return c
34629 }
34630
34631
34632
34633
34634 func (c *PartnersChannelsSitesListCall) IfNoneMatch(entityTag string) *PartnersChannelsSitesListCall {
34635 c.ifNoneMatch_ = entityTag
34636 return c
34637 }
34638
34639
34640 func (c *PartnersChannelsSitesListCall) Context(ctx context.Context) *PartnersChannelsSitesListCall {
34641 c.ctx_ = ctx
34642 return c
34643 }
34644
34645
34646
34647 func (c *PartnersChannelsSitesListCall) Header() http.Header {
34648 if c.header_ == nil {
34649 c.header_ = make(http.Header)
34650 }
34651 return c.header_
34652 }
34653
34654 func (c *PartnersChannelsSitesListCall) doRequest(alt string) (*http.Response, error) {
34655 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34656 if c.ifNoneMatch_ != "" {
34657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34658 }
34659 var body io.Reader = nil
34660 c.urlParams_.Set("alt", alt)
34661 c.urlParams_.Set("prettyPrint", "false")
34662 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/channels/{+channelId}/sites")
34663 urls += "?" + c.urlParams_.Encode()
34664 req, err := http.NewRequest("GET", urls, body)
34665 if err != nil {
34666 return nil, err
34667 }
34668 req.Header = reqHeaders
34669 googleapi.Expand(req.URL, map[string]string{
34670 "partnerId": strconv.FormatInt(c.partnerId, 10),
34671 "channelId": strconv.FormatInt(c.channelId, 10),
34672 })
34673 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34674 }
34675
34676
34677
34678
34679
34680
34681
34682 func (c *PartnersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) {
34683 gensupport.SetOptions(c.urlParams_, opts...)
34684 res, err := c.doRequest("json")
34685 if res != nil && res.StatusCode == http.StatusNotModified {
34686 if res.Body != nil {
34687 res.Body.Close()
34688 }
34689 return nil, gensupport.WrapError(&googleapi.Error{
34690 Code: res.StatusCode,
34691 Header: res.Header,
34692 })
34693 }
34694 if err != nil {
34695 return nil, err
34696 }
34697 defer googleapi.CloseBody(res)
34698 if err := googleapi.CheckResponse(res); err != nil {
34699 return nil, gensupport.WrapError(err)
34700 }
34701 ret := &ListSitesResponse{
34702 ServerResponse: googleapi.ServerResponse{
34703 Header: res.Header,
34704 HTTPStatusCode: res.StatusCode,
34705 },
34706 }
34707 target := &ret
34708 if err := gensupport.DecodeResponse(target, res); err != nil {
34709 return nil, err
34710 }
34711 return ret, nil
34712 }
34713
34714
34715
34716
34717 func (c *PartnersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) error) error {
34718 c.ctx_ = ctx
34719 defer c.PageToken(c.urlParams_.Get("pageToken"))
34720 for {
34721 x, err := c.Do()
34722 if err != nil {
34723 return err
34724 }
34725 if err := f(x); err != nil {
34726 return err
34727 }
34728 if x.NextPageToken == "" {
34729 return nil
34730 }
34731 c.PageToken(x.NextPageToken)
34732 }
34733 }
34734
34735 type PartnersChannelsSitesReplaceCall struct {
34736 s *Service
34737 partnerId int64
34738 channelId int64
34739 replacesitesrequest *ReplaceSitesRequest
34740 urlParams_ gensupport.URLParams
34741 ctx_ context.Context
34742 header_ http.Header
34743 }
34744
34745
34746
34747
34748
34749
34750
34751
34752
34753
34754 func (r *PartnersChannelsSitesService) Replace(partnerId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *PartnersChannelsSitesReplaceCall {
34755 c := &PartnersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34756 c.partnerId = partnerId
34757 c.channelId = channelId
34758 c.replacesitesrequest = replacesitesrequest
34759 return c
34760 }
34761
34762
34763
34764
34765 func (c *PartnersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesReplaceCall {
34766 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34767 return c
34768 }
34769
34770
34771 func (c *PartnersChannelsSitesReplaceCall) Context(ctx context.Context) *PartnersChannelsSitesReplaceCall {
34772 c.ctx_ = ctx
34773 return c
34774 }
34775
34776
34777
34778 func (c *PartnersChannelsSitesReplaceCall) Header() http.Header {
34779 if c.header_ == nil {
34780 c.header_ = make(http.Header)
34781 }
34782 return c.header_
34783 }
34784
34785 func (c *PartnersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) {
34786 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34787 var body io.Reader = nil
34788 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacesitesrequest)
34789 if err != nil {
34790 return nil, err
34791 }
34792 c.urlParams_.Set("alt", alt)
34793 c.urlParams_.Set("prettyPrint", "false")
34794 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{partnerId}/channels/{+channelId}/sites:replace")
34795 urls += "?" + c.urlParams_.Encode()
34796 req, err := http.NewRequest("POST", urls, body)
34797 if err != nil {
34798 return nil, err
34799 }
34800 req.Header = reqHeaders
34801 googleapi.Expand(req.URL, map[string]string{
34802 "partnerId": strconv.FormatInt(c.partnerId, 10),
34803 "channelId": strconv.FormatInt(c.channelId, 10),
34804 })
34805 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34806 }
34807
34808
34809
34810
34811
34812
34813
34814 func (c *PartnersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, error) {
34815 gensupport.SetOptions(c.urlParams_, opts...)
34816 res, err := c.doRequest("json")
34817 if res != nil && res.StatusCode == http.StatusNotModified {
34818 if res.Body != nil {
34819 res.Body.Close()
34820 }
34821 return nil, gensupport.WrapError(&googleapi.Error{
34822 Code: res.StatusCode,
34823 Header: res.Header,
34824 })
34825 }
34826 if err != nil {
34827 return nil, err
34828 }
34829 defer googleapi.CloseBody(res)
34830 if err := googleapi.CheckResponse(res); err != nil {
34831 return nil, gensupport.WrapError(err)
34832 }
34833 ret := &ReplaceSitesResponse{
34834 ServerResponse: googleapi.ServerResponse{
34835 Header: res.Header,
34836 HTTPStatusCode: res.StatusCode,
34837 },
34838 }
34839 target := &ret
34840 if err := gensupport.DecodeResponse(target, res); err != nil {
34841 return nil, err
34842 }
34843 return ret, nil
34844 }
34845
34846 type PartnersTargetingTypesAssignedTargetingOptionsCreateCall struct {
34847 s *Service
34848 partnerId int64
34849 targetingType string
34850 assignedtargetingoption *AssignedTargetingOption
34851 urlParams_ gensupport.URLParams
34852 ctx_ context.Context
34853 header_ http.Header
34854 }
34855
34856
34857
34858
34859
34860
34861
34862 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Create(partnerId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall {
34863 c := &PartnersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34864 c.partnerId = partnerId
34865 c.targetingType = targetingType
34866 c.assignedtargetingoption = assignedtargetingoption
34867 return c
34868 }
34869
34870
34871
34872
34873 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall {
34874 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34875 return c
34876 }
34877
34878
34879 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall {
34880 c.ctx_ = ctx
34881 return c
34882 }
34883
34884
34885
34886 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header {
34887 if c.header_ == nil {
34888 c.header_ = make(http.Header)
34889 }
34890 return c.header_
34891 }
34892
34893 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) {
34894 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34895 var body io.Reader = nil
34896 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption)
34897 if err != nil {
34898 return nil, err
34899 }
34900 c.urlParams_.Set("alt", alt)
34901 c.urlParams_.Set("prettyPrint", "false")
34902 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
34903 urls += "?" + c.urlParams_.Encode()
34904 req, err := http.NewRequest("POST", urls, body)
34905 if err != nil {
34906 return nil, err
34907 }
34908 req.Header = reqHeaders
34909 googleapi.Expand(req.URL, map[string]string{
34910 "partnerId": strconv.FormatInt(c.partnerId, 10),
34911 "targetingType": c.targetingType,
34912 })
34913 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34914 }
34915
34916
34917
34918
34919
34920
34921
34922 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
34923 gensupport.SetOptions(c.urlParams_, opts...)
34924 res, err := c.doRequest("json")
34925 if res != nil && res.StatusCode == http.StatusNotModified {
34926 if res.Body != nil {
34927 res.Body.Close()
34928 }
34929 return nil, gensupport.WrapError(&googleapi.Error{
34930 Code: res.StatusCode,
34931 Header: res.Header,
34932 })
34933 }
34934 if err != nil {
34935 return nil, err
34936 }
34937 defer googleapi.CloseBody(res)
34938 if err := googleapi.CheckResponse(res); err != nil {
34939 return nil, gensupport.WrapError(err)
34940 }
34941 ret := &AssignedTargetingOption{
34942 ServerResponse: googleapi.ServerResponse{
34943 Header: res.Header,
34944 HTTPStatusCode: res.StatusCode,
34945 },
34946 }
34947 target := &ret
34948 if err := gensupport.DecodeResponse(target, res); err != nil {
34949 return nil, err
34950 }
34951 return ret, nil
34952 }
34953
34954 type PartnersTargetingTypesAssignedTargetingOptionsDeleteCall struct {
34955 s *Service
34956 partnerId int64
34957 targetingType string
34958 assignedTargetingOptionId string
34959 urlParams_ gensupport.URLParams
34960 ctx_ context.Context
34961 header_ http.Header
34962 }
34963
34964
34965
34966
34967
34968
34969
34970
34971 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Delete(partnerId int64, targetingType string, assignedTargetingOptionId string) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall {
34972 c := &PartnersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34973 c.partnerId = partnerId
34974 c.targetingType = targetingType
34975 c.assignedTargetingOptionId = assignedTargetingOptionId
34976 return c
34977 }
34978
34979
34980
34981
34982 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall {
34983 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34984 return c
34985 }
34986
34987
34988 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall {
34989 c.ctx_ = ctx
34990 return c
34991 }
34992
34993
34994
34995 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header {
34996 if c.header_ == nil {
34997 c.header_ = make(http.Header)
34998 }
34999 return c.header_
35000 }
35001
35002 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
35003 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35004 var body io.Reader = nil
35005 c.urlParams_.Set("alt", alt)
35006 c.urlParams_.Set("prettyPrint", "false")
35007 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
35008 urls += "?" + c.urlParams_.Encode()
35009 req, err := http.NewRequest("DELETE", urls, body)
35010 if err != nil {
35011 return nil, err
35012 }
35013 req.Header = reqHeaders
35014 googleapi.Expand(req.URL, map[string]string{
35015 "partnerId": strconv.FormatInt(c.partnerId, 10),
35016 "targetingType": c.targetingType,
35017 "assignedTargetingOptionId": c.assignedTargetingOptionId,
35018 })
35019 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35020 }
35021
35022
35023
35024
35025
35026
35027 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
35028 gensupport.SetOptions(c.urlParams_, opts...)
35029 res, err := c.doRequest("json")
35030 if res != nil && res.StatusCode == http.StatusNotModified {
35031 if res.Body != nil {
35032 res.Body.Close()
35033 }
35034 return nil, gensupport.WrapError(&googleapi.Error{
35035 Code: res.StatusCode,
35036 Header: res.Header,
35037 })
35038 }
35039 if err != nil {
35040 return nil, err
35041 }
35042 defer googleapi.CloseBody(res)
35043 if err := googleapi.CheckResponse(res); err != nil {
35044 return nil, gensupport.WrapError(err)
35045 }
35046 ret := &Empty{
35047 ServerResponse: googleapi.ServerResponse{
35048 Header: res.Header,
35049 HTTPStatusCode: res.StatusCode,
35050 },
35051 }
35052 target := &ret
35053 if err := gensupport.DecodeResponse(target, res); err != nil {
35054 return nil, err
35055 }
35056 return ret, nil
35057 }
35058
35059 type PartnersTargetingTypesAssignedTargetingOptionsGetCall struct {
35060 s *Service
35061 partnerId int64
35062 targetingType string
35063 assignedTargetingOptionId string
35064 urlParams_ gensupport.URLParams
35065 ifNoneMatch_ string
35066 ctx_ context.Context
35067 header_ http.Header
35068 }
35069
35070
35071
35072
35073
35074
35075
35076
35077
35078 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Get(partnerId int64, targetingType string, assignedTargetingOptionId string) *PartnersTargetingTypesAssignedTargetingOptionsGetCall {
35079 c := &PartnersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35080 c.partnerId = partnerId
35081 c.targetingType = targetingType
35082 c.assignedTargetingOptionId = assignedTargetingOptionId
35083 return c
35084 }
35085
35086
35087
35088
35089 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsGetCall {
35090 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35091 return c
35092 }
35093
35094
35095
35096
35097 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *PartnersTargetingTypesAssignedTargetingOptionsGetCall {
35098 c.ifNoneMatch_ = entityTag
35099 return c
35100 }
35101
35102
35103 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsGetCall {
35104 c.ctx_ = ctx
35105 return c
35106 }
35107
35108
35109
35110 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
35111 if c.header_ == nil {
35112 c.header_ = make(http.Header)
35113 }
35114 return c.header_
35115 }
35116
35117 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
35118 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35119 if c.ifNoneMatch_ != "" {
35120 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35121 }
35122 var body io.Reader = nil
35123 c.urlParams_.Set("alt", alt)
35124 c.urlParams_.Set("prettyPrint", "false")
35125 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
35126 urls += "?" + c.urlParams_.Encode()
35127 req, err := http.NewRequest("GET", urls, body)
35128 if err != nil {
35129 return nil, err
35130 }
35131 req.Header = reqHeaders
35132 googleapi.Expand(req.URL, map[string]string{
35133 "partnerId": strconv.FormatInt(c.partnerId, 10),
35134 "targetingType": c.targetingType,
35135 "assignedTargetingOptionId": c.assignedTargetingOptionId,
35136 })
35137 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35138 }
35139
35140
35141
35142
35143
35144
35145
35146 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
35147 gensupport.SetOptions(c.urlParams_, opts...)
35148 res, err := c.doRequest("json")
35149 if res != nil && res.StatusCode == http.StatusNotModified {
35150 if res.Body != nil {
35151 res.Body.Close()
35152 }
35153 return nil, gensupport.WrapError(&googleapi.Error{
35154 Code: res.StatusCode,
35155 Header: res.Header,
35156 })
35157 }
35158 if err != nil {
35159 return nil, err
35160 }
35161 defer googleapi.CloseBody(res)
35162 if err := googleapi.CheckResponse(res); err != nil {
35163 return nil, gensupport.WrapError(err)
35164 }
35165 ret := &AssignedTargetingOption{
35166 ServerResponse: googleapi.ServerResponse{
35167 Header: res.Header,
35168 HTTPStatusCode: res.StatusCode,
35169 },
35170 }
35171 target := &ret
35172 if err := gensupport.DecodeResponse(target, res); err != nil {
35173 return nil, err
35174 }
35175 return ret, nil
35176 }
35177
35178 type PartnersTargetingTypesAssignedTargetingOptionsListCall struct {
35179 s *Service
35180 partnerId int64
35181 targetingType string
35182 urlParams_ gensupport.URLParams
35183 ifNoneMatch_ string
35184 ctx_ context.Context
35185 header_ http.Header
35186 }
35187
35188
35189
35190
35191
35192
35193 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) List(partnerId int64, targetingType string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35194 c := &PartnersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35195 c.partnerId = partnerId
35196 c.targetingType = targetingType
35197 return c
35198 }
35199
35200
35201
35202
35203
35204
35205
35206
35207
35208
35209
35210 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35211 c.urlParams_.Set("filter", filter)
35212 return c
35213 }
35214
35215
35216
35217
35218
35219
35220 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35221 c.urlParams_.Set("orderBy", orderBy)
35222 return c
35223 }
35224
35225
35226
35227
35228 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35229 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
35230 return c
35231 }
35232
35233
35234
35235
35236
35237
35238 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35239 c.urlParams_.Set("pageToken", pageToken)
35240 return c
35241 }
35242
35243
35244
35245
35246 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35247 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35248 return c
35249 }
35250
35251
35252
35253
35254 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35255 c.ifNoneMatch_ = entityTag
35256 return c
35257 }
35258
35259
35260 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35261 c.ctx_ = ctx
35262 return c
35263 }
35264
35265
35266
35267 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
35268 if c.header_ == nil {
35269 c.header_ = make(http.Header)
35270 }
35271 return c.header_
35272 }
35273
35274 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
35275 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35276 if c.ifNoneMatch_ != "" {
35277 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35278 }
35279 var body io.Reader = nil
35280 c.urlParams_.Set("alt", alt)
35281 c.urlParams_.Set("prettyPrint", "false")
35282 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
35283 urls += "?" + c.urlParams_.Encode()
35284 req, err := http.NewRequest("GET", urls, body)
35285 if err != nil {
35286 return nil, err
35287 }
35288 req.Header = reqHeaders
35289 googleapi.Expand(req.URL, map[string]string{
35290 "partnerId": strconv.FormatInt(c.partnerId, 10),
35291 "targetingType": c.targetingType,
35292 })
35293 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35294 }
35295
35296
35297
35298
35299
35300
35301
35302 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListPartnerAssignedTargetingOptionsResponse, error) {
35303 gensupport.SetOptions(c.urlParams_, opts...)
35304 res, err := c.doRequest("json")
35305 if res != nil && res.StatusCode == http.StatusNotModified {
35306 if res.Body != nil {
35307 res.Body.Close()
35308 }
35309 return nil, gensupport.WrapError(&googleapi.Error{
35310 Code: res.StatusCode,
35311 Header: res.Header,
35312 })
35313 }
35314 if err != nil {
35315 return nil, err
35316 }
35317 defer googleapi.CloseBody(res)
35318 if err := googleapi.CheckResponse(res); err != nil {
35319 return nil, gensupport.WrapError(err)
35320 }
35321 ret := &ListPartnerAssignedTargetingOptionsResponse{
35322 ServerResponse: googleapi.ServerResponse{
35323 Header: res.Header,
35324 HTTPStatusCode: res.StatusCode,
35325 },
35326 }
35327 target := &ret
35328 if err := gensupport.DecodeResponse(target, res); err != nil {
35329 return nil, err
35330 }
35331 return ret, nil
35332 }
35333
35334
35335
35336
35337 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListPartnerAssignedTargetingOptionsResponse) error) error {
35338 c.ctx_ = ctx
35339 defer c.PageToken(c.urlParams_.Get("pageToken"))
35340 for {
35341 x, err := c.Do()
35342 if err != nil {
35343 return err
35344 }
35345 if err := f(x); err != nil {
35346 return err
35347 }
35348 if x.NextPageToken == "" {
35349 return nil
35350 }
35351 c.PageToken(x.NextPageToken)
35352 }
35353 }
35354
35355 type SdfdownloadtasksCreateCall struct {
35356 s *Service
35357 createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest
35358 urlParams_ gensupport.URLParams
35359 ctx_ context.Context
35360 header_ http.Header
35361 }
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371 func (r *SdfdownloadtasksService) Create(createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest) *SdfdownloadtasksCreateCall {
35372 c := &SdfdownloadtasksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35373 c.createsdfdownloadtaskrequest = createsdfdownloadtaskrequest
35374 return c
35375 }
35376
35377
35378
35379
35380 func (c *SdfdownloadtasksCreateCall) Fields(s ...googleapi.Field) *SdfdownloadtasksCreateCall {
35381 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35382 return c
35383 }
35384
35385
35386 func (c *SdfdownloadtasksCreateCall) Context(ctx context.Context) *SdfdownloadtasksCreateCall {
35387 c.ctx_ = ctx
35388 return c
35389 }
35390
35391
35392
35393 func (c *SdfdownloadtasksCreateCall) Header() http.Header {
35394 if c.header_ == nil {
35395 c.header_ = make(http.Header)
35396 }
35397 return c.header_
35398 }
35399
35400 func (c *SdfdownloadtasksCreateCall) doRequest(alt string) (*http.Response, error) {
35401 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35402 var body io.Reader = nil
35403 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createsdfdownloadtaskrequest)
35404 if err != nil {
35405 return nil, err
35406 }
35407 c.urlParams_.Set("alt", alt)
35408 c.urlParams_.Set("prettyPrint", "false")
35409 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/sdfdownloadtasks")
35410 urls += "?" + c.urlParams_.Encode()
35411 req, err := http.NewRequest("POST", urls, body)
35412 if err != nil {
35413 return nil, err
35414 }
35415 req.Header = reqHeaders
35416 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35417 }
35418
35419
35420
35421
35422
35423
35424 func (c *SdfdownloadtasksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35425 gensupport.SetOptions(c.urlParams_, opts...)
35426 res, err := c.doRequest("json")
35427 if res != nil && res.StatusCode == http.StatusNotModified {
35428 if res.Body != nil {
35429 res.Body.Close()
35430 }
35431 return nil, gensupport.WrapError(&googleapi.Error{
35432 Code: res.StatusCode,
35433 Header: res.Header,
35434 })
35435 }
35436 if err != nil {
35437 return nil, err
35438 }
35439 defer googleapi.CloseBody(res)
35440 if err := googleapi.CheckResponse(res); err != nil {
35441 return nil, gensupport.WrapError(err)
35442 }
35443 ret := &Operation{
35444 ServerResponse: googleapi.ServerResponse{
35445 Header: res.Header,
35446 HTTPStatusCode: res.StatusCode,
35447 },
35448 }
35449 target := &ret
35450 if err := gensupport.DecodeResponse(target, res); err != nil {
35451 return nil, err
35452 }
35453 return ret, nil
35454 }
35455
35456 type SdfdownloadtasksOperationsGetCall struct {
35457 s *Service
35458 name string
35459 urlParams_ gensupport.URLParams
35460 ifNoneMatch_ string
35461 ctx_ context.Context
35462 header_ http.Header
35463 }
35464
35465
35466
35467
35468
35469 func (r *SdfdownloadtasksOperationsService) Get(name string) *SdfdownloadtasksOperationsGetCall {
35470 c := &SdfdownloadtasksOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35471 c.name = name
35472 return c
35473 }
35474
35475
35476
35477
35478 func (c *SdfdownloadtasksOperationsGetCall) Fields(s ...googleapi.Field) *SdfdownloadtasksOperationsGetCall {
35479 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35480 return c
35481 }
35482
35483
35484
35485
35486 func (c *SdfdownloadtasksOperationsGetCall) IfNoneMatch(entityTag string) *SdfdownloadtasksOperationsGetCall {
35487 c.ifNoneMatch_ = entityTag
35488 return c
35489 }
35490
35491
35492 func (c *SdfdownloadtasksOperationsGetCall) Context(ctx context.Context) *SdfdownloadtasksOperationsGetCall {
35493 c.ctx_ = ctx
35494 return c
35495 }
35496
35497
35498
35499 func (c *SdfdownloadtasksOperationsGetCall) Header() http.Header {
35500 if c.header_ == nil {
35501 c.header_ = make(http.Header)
35502 }
35503 return c.header_
35504 }
35505
35506 func (c *SdfdownloadtasksOperationsGetCall) doRequest(alt string) (*http.Response, error) {
35507 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35508 if c.ifNoneMatch_ != "" {
35509 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35510 }
35511 var body io.Reader = nil
35512 c.urlParams_.Set("alt", alt)
35513 c.urlParams_.Set("prettyPrint", "false")
35514 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
35515 urls += "?" + c.urlParams_.Encode()
35516 req, err := http.NewRequest("GET", urls, body)
35517 if err != nil {
35518 return nil, err
35519 }
35520 req.Header = reqHeaders
35521 googleapi.Expand(req.URL, map[string]string{
35522 "name": c.name,
35523 })
35524 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35525 }
35526
35527
35528
35529
35530
35531
35532 func (c *SdfdownloadtasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35533 gensupport.SetOptions(c.urlParams_, opts...)
35534 res, err := c.doRequest("json")
35535 if res != nil && res.StatusCode == http.StatusNotModified {
35536 if res.Body != nil {
35537 res.Body.Close()
35538 }
35539 return nil, gensupport.WrapError(&googleapi.Error{
35540 Code: res.StatusCode,
35541 Header: res.Header,
35542 })
35543 }
35544 if err != nil {
35545 return nil, err
35546 }
35547 defer googleapi.CloseBody(res)
35548 if err := googleapi.CheckResponse(res); err != nil {
35549 return nil, gensupport.WrapError(err)
35550 }
35551 ret := &Operation{
35552 ServerResponse: googleapi.ServerResponse{
35553 Header: res.Header,
35554 HTTPStatusCode: res.StatusCode,
35555 },
35556 }
35557 target := &ret
35558 if err := gensupport.DecodeResponse(target, res); err != nil {
35559 return nil, err
35560 }
35561 return ret, nil
35562 }
35563
35564 type TargetingTypesTargetingOptionsGetCall struct {
35565 s *Service
35566 targetingType string
35567 targetingOptionId string
35568 urlParams_ gensupport.URLParams
35569 ifNoneMatch_ string
35570 ctx_ context.Context
35571 header_ http.Header
35572 }
35573
35574
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593 func (r *TargetingTypesTargetingOptionsService) Get(targetingType string, targetingOptionId string) *TargetingTypesTargetingOptionsGetCall {
35594 c := &TargetingTypesTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35595 c.targetingType = targetingType
35596 c.targetingOptionId = targetingOptionId
35597 return c
35598 }
35599
35600
35601
35602 func (c *TargetingTypesTargetingOptionsGetCall) AdvertiserId(advertiserId int64) *TargetingTypesTargetingOptionsGetCall {
35603 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
35604 return c
35605 }
35606
35607
35608
35609
35610 func (c *TargetingTypesTargetingOptionsGetCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsGetCall {
35611 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35612 return c
35613 }
35614
35615
35616
35617
35618 func (c *TargetingTypesTargetingOptionsGetCall) IfNoneMatch(entityTag string) *TargetingTypesTargetingOptionsGetCall {
35619 c.ifNoneMatch_ = entityTag
35620 return c
35621 }
35622
35623
35624 func (c *TargetingTypesTargetingOptionsGetCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsGetCall {
35625 c.ctx_ = ctx
35626 return c
35627 }
35628
35629
35630
35631 func (c *TargetingTypesTargetingOptionsGetCall) Header() http.Header {
35632 if c.header_ == nil {
35633 c.header_ = make(http.Header)
35634 }
35635 return c.header_
35636 }
35637
35638 func (c *TargetingTypesTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
35639 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35640 if c.ifNoneMatch_ != "" {
35641 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35642 }
35643 var body io.Reader = nil
35644 c.urlParams_.Set("alt", alt)
35645 c.urlParams_.Set("prettyPrint", "false")
35646 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/targetingTypes/{+targetingType}/targetingOptions/{+targetingOptionId}")
35647 urls += "?" + c.urlParams_.Encode()
35648 req, err := http.NewRequest("GET", urls, body)
35649 if err != nil {
35650 return nil, err
35651 }
35652 req.Header = reqHeaders
35653 googleapi.Expand(req.URL, map[string]string{
35654 "targetingType": c.targetingType,
35655 "targetingOptionId": c.targetingOptionId,
35656 })
35657 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35658 }
35659
35660
35661
35662
35663
35664
35665
35666 func (c *TargetingTypesTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*TargetingOption, error) {
35667 gensupport.SetOptions(c.urlParams_, opts...)
35668 res, err := c.doRequest("json")
35669 if res != nil && res.StatusCode == http.StatusNotModified {
35670 if res.Body != nil {
35671 res.Body.Close()
35672 }
35673 return nil, gensupport.WrapError(&googleapi.Error{
35674 Code: res.StatusCode,
35675 Header: res.Header,
35676 })
35677 }
35678 if err != nil {
35679 return nil, err
35680 }
35681 defer googleapi.CloseBody(res)
35682 if err := googleapi.CheckResponse(res); err != nil {
35683 return nil, gensupport.WrapError(err)
35684 }
35685 ret := &TargetingOption{
35686 ServerResponse: googleapi.ServerResponse{
35687 Header: res.Header,
35688 HTTPStatusCode: res.StatusCode,
35689 },
35690 }
35691 target := &ret
35692 if err := gensupport.DecodeResponse(target, res); err != nil {
35693 return nil, err
35694 }
35695 return ret, nil
35696 }
35697
35698 type TargetingTypesTargetingOptionsListCall struct {
35699 s *Service
35700 targetingType string
35701 urlParams_ gensupport.URLParams
35702 ifNoneMatch_ string
35703 ctx_ context.Context
35704 header_ http.Header
35705 }
35706
35707
35708
35709
35710
35711
35712
35713
35714
35715
35716
35717
35718
35719
35720
35721
35722
35723
35724
35725 func (r *TargetingTypesTargetingOptionsService) List(targetingType string) *TargetingTypesTargetingOptionsListCall {
35726 c := &TargetingTypesTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35727 c.targetingType = targetingType
35728 return c
35729 }
35730
35731
35732
35733 func (c *TargetingTypesTargetingOptionsListCall) AdvertiserId(advertiserId int64) *TargetingTypesTargetingOptionsListCall {
35734 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
35735 return c
35736 }
35737
35738
35739
35740
35741
35742
35743
35744
35745
35746
35747
35748
35749
35750
35751
35752
35753
35754 func (c *TargetingTypesTargetingOptionsListCall) Filter(filter string) *TargetingTypesTargetingOptionsListCall {
35755 c.urlParams_.Set("filter", filter)
35756 return c
35757 }
35758
35759
35760
35761
35762
35763
35764 func (c *TargetingTypesTargetingOptionsListCall) OrderBy(orderBy string) *TargetingTypesTargetingOptionsListCall {
35765 c.urlParams_.Set("orderBy", orderBy)
35766 return c
35767 }
35768
35769
35770
35771
35772 func (c *TargetingTypesTargetingOptionsListCall) PageSize(pageSize int64) *TargetingTypesTargetingOptionsListCall {
35773 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
35774 return c
35775 }
35776
35777
35778
35779
35780
35781 func (c *TargetingTypesTargetingOptionsListCall) PageToken(pageToken string) *TargetingTypesTargetingOptionsListCall {
35782 c.urlParams_.Set("pageToken", pageToken)
35783 return c
35784 }
35785
35786
35787
35788
35789 func (c *TargetingTypesTargetingOptionsListCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsListCall {
35790 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35791 return c
35792 }
35793
35794
35795
35796
35797 func (c *TargetingTypesTargetingOptionsListCall) IfNoneMatch(entityTag string) *TargetingTypesTargetingOptionsListCall {
35798 c.ifNoneMatch_ = entityTag
35799 return c
35800 }
35801
35802
35803 func (c *TargetingTypesTargetingOptionsListCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsListCall {
35804 c.ctx_ = ctx
35805 return c
35806 }
35807
35808
35809
35810 func (c *TargetingTypesTargetingOptionsListCall) Header() http.Header {
35811 if c.header_ == nil {
35812 c.header_ = make(http.Header)
35813 }
35814 return c.header_
35815 }
35816
35817 func (c *TargetingTypesTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
35818 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35819 if c.ifNoneMatch_ != "" {
35820 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35821 }
35822 var body io.Reader = nil
35823 c.urlParams_.Set("alt", alt)
35824 c.urlParams_.Set("prettyPrint", "false")
35825 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/targetingTypes/{+targetingType}/targetingOptions")
35826 urls += "?" + c.urlParams_.Encode()
35827 req, err := http.NewRequest("GET", urls, body)
35828 if err != nil {
35829 return nil, err
35830 }
35831 req.Header = reqHeaders
35832 googleapi.Expand(req.URL, map[string]string{
35833 "targetingType": c.targetingType,
35834 })
35835 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35836 }
35837
35838
35839
35840
35841
35842
35843
35844 func (c *TargetingTypesTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListTargetingOptionsResponse, error) {
35845 gensupport.SetOptions(c.urlParams_, opts...)
35846 res, err := c.doRequest("json")
35847 if res != nil && res.StatusCode == http.StatusNotModified {
35848 if res.Body != nil {
35849 res.Body.Close()
35850 }
35851 return nil, gensupport.WrapError(&googleapi.Error{
35852 Code: res.StatusCode,
35853 Header: res.Header,
35854 })
35855 }
35856 if err != nil {
35857 return nil, err
35858 }
35859 defer googleapi.CloseBody(res)
35860 if err := googleapi.CheckResponse(res); err != nil {
35861 return nil, gensupport.WrapError(err)
35862 }
35863 ret := &ListTargetingOptionsResponse{
35864 ServerResponse: googleapi.ServerResponse{
35865 Header: res.Header,
35866 HTTPStatusCode: res.StatusCode,
35867 },
35868 }
35869 target := &ret
35870 if err := gensupport.DecodeResponse(target, res); err != nil {
35871 return nil, err
35872 }
35873 return ret, nil
35874 }
35875
35876
35877
35878
35879 func (c *TargetingTypesTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListTargetingOptionsResponse) error) error {
35880 c.ctx_ = ctx
35881 defer c.PageToken(c.urlParams_.Get("pageToken"))
35882 for {
35883 x, err := c.Do()
35884 if err != nil {
35885 return err
35886 }
35887 if err := f(x); err != nil {
35888 return err
35889 }
35890 if x.NextPageToken == "" {
35891 return nil
35892 }
35893 c.PageToken(x.NextPageToken)
35894 }
35895 }
35896
35897 type TargetingTypesTargetingOptionsSearchCall struct {
35898 s *Service
35899 targetingType string
35900 searchtargetingoptionsrequest *SearchTargetingOptionsRequest
35901 urlParams_ gensupport.URLParams
35902 ctx_ context.Context
35903 header_ http.Header
35904 }
35905
35906
35907
35908
35909
35910
35911
35912 func (r *TargetingTypesTargetingOptionsService) Search(targetingType string, searchtargetingoptionsrequest *SearchTargetingOptionsRequest) *TargetingTypesTargetingOptionsSearchCall {
35913 c := &TargetingTypesTargetingOptionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35914 c.targetingType = targetingType
35915 c.searchtargetingoptionsrequest = searchtargetingoptionsrequest
35916 return c
35917 }
35918
35919
35920
35921
35922 func (c *TargetingTypesTargetingOptionsSearchCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsSearchCall {
35923 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35924 return c
35925 }
35926
35927
35928 func (c *TargetingTypesTargetingOptionsSearchCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsSearchCall {
35929 c.ctx_ = ctx
35930 return c
35931 }
35932
35933
35934
35935 func (c *TargetingTypesTargetingOptionsSearchCall) Header() http.Header {
35936 if c.header_ == nil {
35937 c.header_ = make(http.Header)
35938 }
35939 return c.header_
35940 }
35941
35942 func (c *TargetingTypesTargetingOptionsSearchCall) doRequest(alt string) (*http.Response, error) {
35943 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35944 var body io.Reader = nil
35945 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchtargetingoptionsrequest)
35946 if err != nil {
35947 return nil, err
35948 }
35949 c.urlParams_.Set("alt", alt)
35950 c.urlParams_.Set("prettyPrint", "false")
35951 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/targetingTypes/{+targetingType}/targetingOptions:search")
35952 urls += "?" + c.urlParams_.Encode()
35953 req, err := http.NewRequest("POST", urls, body)
35954 if err != nil {
35955 return nil, err
35956 }
35957 req.Header = reqHeaders
35958 googleapi.Expand(req.URL, map[string]string{
35959 "targetingType": c.targetingType,
35960 })
35961 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35962 }
35963
35964
35965
35966
35967
35968
35969
35970 func (c *TargetingTypesTargetingOptionsSearchCall) Do(opts ...googleapi.CallOption) (*SearchTargetingOptionsResponse, error) {
35971 gensupport.SetOptions(c.urlParams_, opts...)
35972 res, err := c.doRequest("json")
35973 if res != nil && res.StatusCode == http.StatusNotModified {
35974 if res.Body != nil {
35975 res.Body.Close()
35976 }
35977 return nil, gensupport.WrapError(&googleapi.Error{
35978 Code: res.StatusCode,
35979 Header: res.Header,
35980 })
35981 }
35982 if err != nil {
35983 return nil, err
35984 }
35985 defer googleapi.CloseBody(res)
35986 if err := googleapi.CheckResponse(res); err != nil {
35987 return nil, gensupport.WrapError(err)
35988 }
35989 ret := &SearchTargetingOptionsResponse{
35990 ServerResponse: googleapi.ServerResponse{
35991 Header: res.Header,
35992 HTTPStatusCode: res.StatusCode,
35993 },
35994 }
35995 target := &ret
35996 if err := gensupport.DecodeResponse(target, res); err != nil {
35997 return nil, err
35998 }
35999 return ret, nil
36000 }
36001
36002
36003
36004
36005 func (c *TargetingTypesTargetingOptionsSearchCall) Pages(ctx context.Context, f func(*SearchTargetingOptionsResponse) error) error {
36006 c.ctx_ = ctx
36007 defer func(pt string) { c.searchtargetingoptionsrequest.PageToken = pt }(c.searchtargetingoptionsrequest.PageToken)
36008 for {
36009 x, err := c.Do()
36010 if err != nil {
36011 return err
36012 }
36013 if err := f(x); err != nil {
36014 return err
36015 }
36016 if x.NextPageToken == "" {
36017 return nil
36018 }
36019 c.searchtargetingoptionsrequest.PageToken = x.NextPageToken
36020 }
36021 }
36022
36023 type UsersBulkEditAssignedUserRolesCall struct {
36024 s *Service
36025 userId int64
36026 bulkeditassigneduserrolesrequest *BulkEditAssignedUserRolesRequest
36027 urlParams_ gensupport.URLParams
36028 ctx_ context.Context
36029 header_ http.Header
36030 }
36031
36032
36033
36034
36035
36036
36037
36038
36039
36040
36041
36042
36043 func (r *UsersService) BulkEditAssignedUserRoles(userId int64, bulkeditassigneduserrolesrequest *BulkEditAssignedUserRolesRequest) *UsersBulkEditAssignedUserRolesCall {
36044 c := &UsersBulkEditAssignedUserRolesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36045 c.userId = userId
36046 c.bulkeditassigneduserrolesrequest = bulkeditassigneduserrolesrequest
36047 return c
36048 }
36049
36050
36051
36052
36053 func (c *UsersBulkEditAssignedUserRolesCall) Fields(s ...googleapi.Field) *UsersBulkEditAssignedUserRolesCall {
36054 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36055 return c
36056 }
36057
36058
36059 func (c *UsersBulkEditAssignedUserRolesCall) Context(ctx context.Context) *UsersBulkEditAssignedUserRolesCall {
36060 c.ctx_ = ctx
36061 return c
36062 }
36063
36064
36065
36066 func (c *UsersBulkEditAssignedUserRolesCall) Header() http.Header {
36067 if c.header_ == nil {
36068 c.header_ = make(http.Header)
36069 }
36070 return c.header_
36071 }
36072
36073 func (c *UsersBulkEditAssignedUserRolesCall) doRequest(alt string) (*http.Response, error) {
36074 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36075 var body io.Reader = nil
36076 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassigneduserrolesrequest)
36077 if err != nil {
36078 return nil, err
36079 }
36080 c.urlParams_.Set("alt", alt)
36081 c.urlParams_.Set("prettyPrint", "false")
36082 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{+userId}:bulkEditAssignedUserRoles")
36083 urls += "?" + c.urlParams_.Encode()
36084 req, err := http.NewRequest("POST", urls, body)
36085 if err != nil {
36086 return nil, err
36087 }
36088 req.Header = reqHeaders
36089 googleapi.Expand(req.URL, map[string]string{
36090 "userId": strconv.FormatInt(c.userId, 10),
36091 })
36092 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36093 }
36094
36095
36096
36097
36098
36099
36100
36101 func (c *UsersBulkEditAssignedUserRolesCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedUserRolesResponse, error) {
36102 gensupport.SetOptions(c.urlParams_, opts...)
36103 res, err := c.doRequest("json")
36104 if res != nil && res.StatusCode == http.StatusNotModified {
36105 if res.Body != nil {
36106 res.Body.Close()
36107 }
36108 return nil, gensupport.WrapError(&googleapi.Error{
36109 Code: res.StatusCode,
36110 Header: res.Header,
36111 })
36112 }
36113 if err != nil {
36114 return nil, err
36115 }
36116 defer googleapi.CloseBody(res)
36117 if err := googleapi.CheckResponse(res); err != nil {
36118 return nil, gensupport.WrapError(err)
36119 }
36120 ret := &BulkEditAssignedUserRolesResponse{
36121 ServerResponse: googleapi.ServerResponse{
36122 Header: res.Header,
36123 HTTPStatusCode: res.StatusCode,
36124 },
36125 }
36126 target := &ret
36127 if err := gensupport.DecodeResponse(target, res); err != nil {
36128 return nil, err
36129 }
36130 return ret, nil
36131 }
36132
36133 type UsersCreateCall struct {
36134 s *Service
36135 user *User
36136 urlParams_ gensupport.URLParams
36137 ctx_ context.Context
36138 header_ http.Header
36139 }
36140
36141
36142
36143
36144
36145
36146 func (r *UsersService) Create(user *User) *UsersCreateCall {
36147 c := &UsersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36148 c.user = user
36149 return c
36150 }
36151
36152
36153
36154
36155 func (c *UsersCreateCall) Fields(s ...googleapi.Field) *UsersCreateCall {
36156 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36157 return c
36158 }
36159
36160
36161 func (c *UsersCreateCall) Context(ctx context.Context) *UsersCreateCall {
36162 c.ctx_ = ctx
36163 return c
36164 }
36165
36166
36167
36168 func (c *UsersCreateCall) Header() http.Header {
36169 if c.header_ == nil {
36170 c.header_ = make(http.Header)
36171 }
36172 return c.header_
36173 }
36174
36175 func (c *UsersCreateCall) doRequest(alt string) (*http.Response, error) {
36176 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36177 var body io.Reader = nil
36178 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
36179 if err != nil {
36180 return nil, err
36181 }
36182 c.urlParams_.Set("alt", alt)
36183 c.urlParams_.Set("prettyPrint", "false")
36184 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users")
36185 urls += "?" + c.urlParams_.Encode()
36186 req, err := http.NewRequest("POST", urls, body)
36187 if err != nil {
36188 return nil, err
36189 }
36190 req.Header = reqHeaders
36191 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36192 }
36193
36194
36195
36196
36197
36198
36199 func (c *UsersCreateCall) Do(opts ...googleapi.CallOption) (*User, error) {
36200 gensupport.SetOptions(c.urlParams_, opts...)
36201 res, err := c.doRequest("json")
36202 if res != nil && res.StatusCode == http.StatusNotModified {
36203 if res.Body != nil {
36204 res.Body.Close()
36205 }
36206 return nil, gensupport.WrapError(&googleapi.Error{
36207 Code: res.StatusCode,
36208 Header: res.Header,
36209 })
36210 }
36211 if err != nil {
36212 return nil, err
36213 }
36214 defer googleapi.CloseBody(res)
36215 if err := googleapi.CheckResponse(res); err != nil {
36216 return nil, gensupport.WrapError(err)
36217 }
36218 ret := &User{
36219 ServerResponse: googleapi.ServerResponse{
36220 Header: res.Header,
36221 HTTPStatusCode: res.StatusCode,
36222 },
36223 }
36224 target := &ret
36225 if err := gensupport.DecodeResponse(target, res); err != nil {
36226 return nil, err
36227 }
36228 return ret, nil
36229 }
36230
36231 type UsersDeleteCall struct {
36232 s *Service
36233 userId int64
36234 urlParams_ gensupport.URLParams
36235 ctx_ context.Context
36236 header_ http.Header
36237 }
36238
36239
36240
36241
36242
36243
36244
36245 func (r *UsersService) Delete(userId int64) *UsersDeleteCall {
36246 c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36247 c.userId = userId
36248 return c
36249 }
36250
36251
36252
36253
36254 func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
36255 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36256 return c
36257 }
36258
36259
36260 func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
36261 c.ctx_ = ctx
36262 return c
36263 }
36264
36265
36266
36267 func (c *UsersDeleteCall) Header() http.Header {
36268 if c.header_ == nil {
36269 c.header_ = make(http.Header)
36270 }
36271 return c.header_
36272 }
36273
36274 func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
36275 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36276 var body io.Reader = nil
36277 c.urlParams_.Set("alt", alt)
36278 c.urlParams_.Set("prettyPrint", "false")
36279 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{+userId}")
36280 urls += "?" + c.urlParams_.Encode()
36281 req, err := http.NewRequest("DELETE", urls, body)
36282 if err != nil {
36283 return nil, err
36284 }
36285 req.Header = reqHeaders
36286 googleapi.Expand(req.URL, map[string]string{
36287 "userId": strconv.FormatInt(c.userId, 10),
36288 })
36289 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36290 }
36291
36292
36293
36294
36295
36296
36297 func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
36298 gensupport.SetOptions(c.urlParams_, opts...)
36299 res, err := c.doRequest("json")
36300 if res != nil && res.StatusCode == http.StatusNotModified {
36301 if res.Body != nil {
36302 res.Body.Close()
36303 }
36304 return nil, gensupport.WrapError(&googleapi.Error{
36305 Code: res.StatusCode,
36306 Header: res.Header,
36307 })
36308 }
36309 if err != nil {
36310 return nil, err
36311 }
36312 defer googleapi.CloseBody(res)
36313 if err := googleapi.CheckResponse(res); err != nil {
36314 return nil, gensupport.WrapError(err)
36315 }
36316 ret := &Empty{
36317 ServerResponse: googleapi.ServerResponse{
36318 Header: res.Header,
36319 HTTPStatusCode: res.StatusCode,
36320 },
36321 }
36322 target := &ret
36323 if err := gensupport.DecodeResponse(target, res); err != nil {
36324 return nil, err
36325 }
36326 return ret, nil
36327 }
36328
36329 type UsersGetCall struct {
36330 s *Service
36331 userId int64
36332 urlParams_ gensupport.URLParams
36333 ifNoneMatch_ string
36334 ctx_ context.Context
36335 header_ http.Header
36336 }
36337
36338
36339
36340
36341
36342
36343
36344 func (r *UsersService) Get(userId int64) *UsersGetCall {
36345 c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36346 c.userId = userId
36347 return c
36348 }
36349
36350
36351
36352
36353 func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
36354 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36355 return c
36356 }
36357
36358
36359
36360
36361 func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
36362 c.ifNoneMatch_ = entityTag
36363 return c
36364 }
36365
36366
36367 func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
36368 c.ctx_ = ctx
36369 return c
36370 }
36371
36372
36373
36374 func (c *UsersGetCall) Header() http.Header {
36375 if c.header_ == nil {
36376 c.header_ = make(http.Header)
36377 }
36378 return c.header_
36379 }
36380
36381 func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
36382 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36383 if c.ifNoneMatch_ != "" {
36384 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36385 }
36386 var body io.Reader = nil
36387 c.urlParams_.Set("alt", alt)
36388 c.urlParams_.Set("prettyPrint", "false")
36389 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{+userId}")
36390 urls += "?" + c.urlParams_.Encode()
36391 req, err := http.NewRequest("GET", urls, body)
36392 if err != nil {
36393 return nil, err
36394 }
36395 req.Header = reqHeaders
36396 googleapi.Expand(req.URL, map[string]string{
36397 "userId": strconv.FormatInt(c.userId, 10),
36398 })
36399 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36400 }
36401
36402
36403
36404
36405
36406
36407 func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
36408 gensupport.SetOptions(c.urlParams_, opts...)
36409 res, err := c.doRequest("json")
36410 if res != nil && res.StatusCode == http.StatusNotModified {
36411 if res.Body != nil {
36412 res.Body.Close()
36413 }
36414 return nil, gensupport.WrapError(&googleapi.Error{
36415 Code: res.StatusCode,
36416 Header: res.Header,
36417 })
36418 }
36419 if err != nil {
36420 return nil, err
36421 }
36422 defer googleapi.CloseBody(res)
36423 if err := googleapi.CheckResponse(res); err != nil {
36424 return nil, gensupport.WrapError(err)
36425 }
36426 ret := &User{
36427 ServerResponse: googleapi.ServerResponse{
36428 Header: res.Header,
36429 HTTPStatusCode: res.StatusCode,
36430 },
36431 }
36432 target := &ret
36433 if err := gensupport.DecodeResponse(target, res); err != nil {
36434 return nil, err
36435 }
36436 return ret, nil
36437 }
36438
36439 type UsersListCall struct {
36440 s *Service
36441 urlParams_ gensupport.URLParams
36442 ifNoneMatch_ string
36443 ctx_ context.Context
36444 header_ http.Header
36445 }
36446
36447
36448
36449
36450
36451
36452
36453 func (r *UsersService) List() *UsersListCall {
36454 c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36455 return c
36456 }
36457
36458
36459
36460
36461
36462
36463
36464
36465
36466
36467
36468
36469
36470
36471
36472
36473
36474
36475
36476
36477
36478
36479
36480
36481
36482
36483
36484
36485
36486 func (c *UsersListCall) Filter(filter string) *UsersListCall {
36487 c.urlParams_.Set("filter", filter)
36488 return c
36489 }
36490
36491
36492
36493
36494
36495 func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall {
36496 c.urlParams_.Set("orderBy", orderBy)
36497 return c
36498 }
36499
36500
36501
36502 func (c *UsersListCall) PageSize(pageSize int64) *UsersListCall {
36503 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
36504 return c
36505 }
36506
36507
36508
36509
36510
36511 func (c *UsersListCall) PageToken(pageToken string) *UsersListCall {
36512 c.urlParams_.Set("pageToken", pageToken)
36513 return c
36514 }
36515
36516
36517
36518
36519 func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
36520 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36521 return c
36522 }
36523
36524
36525
36526
36527 func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
36528 c.ifNoneMatch_ = entityTag
36529 return c
36530 }
36531
36532
36533 func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
36534 c.ctx_ = ctx
36535 return c
36536 }
36537
36538
36539
36540 func (c *UsersListCall) Header() http.Header {
36541 if c.header_ == nil {
36542 c.header_ = make(http.Header)
36543 }
36544 return c.header_
36545 }
36546
36547 func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
36548 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36549 if c.ifNoneMatch_ != "" {
36550 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36551 }
36552 var body io.Reader = nil
36553 c.urlParams_.Set("alt", alt)
36554 c.urlParams_.Set("prettyPrint", "false")
36555 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users")
36556 urls += "?" + c.urlParams_.Encode()
36557 req, err := http.NewRequest("GET", urls, body)
36558 if err != nil {
36559 return nil, err
36560 }
36561 req.Header = reqHeaders
36562 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36563 }
36564
36565
36566
36567
36568
36569
36570
36571 func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error) {
36572 gensupport.SetOptions(c.urlParams_, opts...)
36573 res, err := c.doRequest("json")
36574 if res != nil && res.StatusCode == http.StatusNotModified {
36575 if res.Body != nil {
36576 res.Body.Close()
36577 }
36578 return nil, gensupport.WrapError(&googleapi.Error{
36579 Code: res.StatusCode,
36580 Header: res.Header,
36581 })
36582 }
36583 if err != nil {
36584 return nil, err
36585 }
36586 defer googleapi.CloseBody(res)
36587 if err := googleapi.CheckResponse(res); err != nil {
36588 return nil, gensupport.WrapError(err)
36589 }
36590 ret := &ListUsersResponse{
36591 ServerResponse: googleapi.ServerResponse{
36592 Header: res.Header,
36593 HTTPStatusCode: res.StatusCode,
36594 },
36595 }
36596 target := &ret
36597 if err := gensupport.DecodeResponse(target, res); err != nil {
36598 return nil, err
36599 }
36600 return ret, nil
36601 }
36602
36603
36604
36605
36606 func (c *UsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) error) error {
36607 c.ctx_ = ctx
36608 defer c.PageToken(c.urlParams_.Get("pageToken"))
36609 for {
36610 x, err := c.Do()
36611 if err != nil {
36612 return err
36613 }
36614 if err := f(x); err != nil {
36615 return err
36616 }
36617 if x.NextPageToken == "" {
36618 return nil
36619 }
36620 c.PageToken(x.NextPageToken)
36621 }
36622 }
36623
36624 type UsersPatchCall struct {
36625 s *Service
36626 userId int64
36627 user *User
36628 urlParams_ gensupport.URLParams
36629 ctx_ context.Context
36630 header_ http.Header
36631 }
36632
36633
36634
36635
36636
36637
36638
36639
36640 func (r *UsersService) Patch(userId int64, user *User) *UsersPatchCall {
36641 c := &UsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36642 c.userId = userId
36643 c.user = user
36644 return c
36645 }
36646
36647
36648
36649 func (c *UsersPatchCall) UpdateMask(updateMask string) *UsersPatchCall {
36650 c.urlParams_.Set("updateMask", updateMask)
36651 return c
36652 }
36653
36654
36655
36656
36657 func (c *UsersPatchCall) Fields(s ...googleapi.Field) *UsersPatchCall {
36658 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36659 return c
36660 }
36661
36662
36663 func (c *UsersPatchCall) Context(ctx context.Context) *UsersPatchCall {
36664 c.ctx_ = ctx
36665 return c
36666 }
36667
36668
36669
36670 func (c *UsersPatchCall) Header() http.Header {
36671 if c.header_ == nil {
36672 c.header_ = make(http.Header)
36673 }
36674 return c.header_
36675 }
36676
36677 func (c *UsersPatchCall) doRequest(alt string) (*http.Response, error) {
36678 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36679 var body io.Reader = nil
36680 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
36681 if err != nil {
36682 return nil, err
36683 }
36684 c.urlParams_.Set("alt", alt)
36685 c.urlParams_.Set("prettyPrint", "false")
36686 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/users/{+userId}")
36687 urls += "?" + c.urlParams_.Encode()
36688 req, err := http.NewRequest("PATCH", urls, body)
36689 if err != nil {
36690 return nil, err
36691 }
36692 req.Header = reqHeaders
36693 googleapi.Expand(req.URL, map[string]string{
36694 "userId": strconv.FormatInt(c.userId, 10),
36695 })
36696 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36697 }
36698
36699
36700
36701
36702
36703
36704 func (c *UsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) {
36705 gensupport.SetOptions(c.urlParams_, opts...)
36706 res, err := c.doRequest("json")
36707 if res != nil && res.StatusCode == http.StatusNotModified {
36708 if res.Body != nil {
36709 res.Body.Close()
36710 }
36711 return nil, gensupport.WrapError(&googleapi.Error{
36712 Code: res.StatusCode,
36713 Header: res.Header,
36714 })
36715 }
36716 if err != nil {
36717 return nil, err
36718 }
36719 defer googleapi.CloseBody(res)
36720 if err := googleapi.CheckResponse(res); err != nil {
36721 return nil, gensupport.WrapError(err)
36722 }
36723 ret := &User{
36724 ServerResponse: googleapi.ServerResponse{
36725 Header: res.Header,
36726 HTTPStatusCode: res.StatusCode,
36727 },
36728 }
36729 target := &ret
36730 if err := gensupport.DecodeResponse(target, res); err != nil {
36731 return nil, err
36732 }
36733 return ret, nil
36734 }
36735
View as plain text