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:v3"
95 const apiName = "displayvideo"
96 const apiVersion = "v3"
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.AdGroupAds = NewAdvertisersAdGroupAdsService(s)
221 rs.AdGroups = NewAdvertisersAdGroupsService(s)
222 rs.Assets = NewAdvertisersAssetsService(s)
223 rs.Campaigns = NewAdvertisersCampaignsService(s)
224 rs.Channels = NewAdvertisersChannelsService(s)
225 rs.Creatives = NewAdvertisersCreativesService(s)
226 rs.InsertionOrders = NewAdvertisersInsertionOrdersService(s)
227 rs.Invoices = NewAdvertisersInvoicesService(s)
228 rs.LineItems = NewAdvertisersLineItemsService(s)
229 rs.LocationLists = NewAdvertisersLocationListsService(s)
230 rs.NegativeKeywordLists = NewAdvertisersNegativeKeywordListsService(s)
231 rs.TargetingTypes = NewAdvertisersTargetingTypesService(s)
232 return rs
233 }
234
235 type AdvertisersService struct {
236 s *Service
237
238 AdGroupAds *AdvertisersAdGroupAdsService
239
240 AdGroups *AdvertisersAdGroupsService
241
242 Assets *AdvertisersAssetsService
243
244 Campaigns *AdvertisersCampaignsService
245
246 Channels *AdvertisersChannelsService
247
248 Creatives *AdvertisersCreativesService
249
250 InsertionOrders *AdvertisersInsertionOrdersService
251
252 Invoices *AdvertisersInvoicesService
253
254 LineItems *AdvertisersLineItemsService
255
256 LocationLists *AdvertisersLocationListsService
257
258 NegativeKeywordLists *AdvertisersNegativeKeywordListsService
259
260 TargetingTypes *AdvertisersTargetingTypesService
261 }
262
263 func NewAdvertisersAdGroupAdsService(s *Service) *AdvertisersAdGroupAdsService {
264 rs := &AdvertisersAdGroupAdsService{s: s}
265 return rs
266 }
267
268 type AdvertisersAdGroupAdsService struct {
269 s *Service
270 }
271
272 func NewAdvertisersAdGroupsService(s *Service) *AdvertisersAdGroupsService {
273 rs := &AdvertisersAdGroupsService{s: s}
274 rs.TargetingTypes = NewAdvertisersAdGroupsTargetingTypesService(s)
275 return rs
276 }
277
278 type AdvertisersAdGroupsService struct {
279 s *Service
280
281 TargetingTypes *AdvertisersAdGroupsTargetingTypesService
282 }
283
284 func NewAdvertisersAdGroupsTargetingTypesService(s *Service) *AdvertisersAdGroupsTargetingTypesService {
285 rs := &AdvertisersAdGroupsTargetingTypesService{s: s}
286 rs.AssignedTargetingOptions = NewAdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsService(s)
287 return rs
288 }
289
290 type AdvertisersAdGroupsTargetingTypesService struct {
291 s *Service
292
293 AssignedTargetingOptions *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsService
294 }
295
296 func NewAdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsService {
297 rs := &AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsService{s: s}
298 return rs
299 }
300
301 type AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsService struct {
302 s *Service
303 }
304
305 func NewAdvertisersAssetsService(s *Service) *AdvertisersAssetsService {
306 rs := &AdvertisersAssetsService{s: s}
307 return rs
308 }
309
310 type AdvertisersAssetsService struct {
311 s *Service
312 }
313
314 func NewAdvertisersCampaignsService(s *Service) *AdvertisersCampaignsService {
315 rs := &AdvertisersCampaignsService{s: s}
316 rs.TargetingTypes = NewAdvertisersCampaignsTargetingTypesService(s)
317 return rs
318 }
319
320 type AdvertisersCampaignsService struct {
321 s *Service
322
323 TargetingTypes *AdvertisersCampaignsTargetingTypesService
324 }
325
326 func NewAdvertisersCampaignsTargetingTypesService(s *Service) *AdvertisersCampaignsTargetingTypesService {
327 rs := &AdvertisersCampaignsTargetingTypesService{s: s}
328 rs.AssignedTargetingOptions = NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s)
329 return rs
330 }
331
332 type AdvertisersCampaignsTargetingTypesService struct {
333 s *Service
334
335 AssignedTargetingOptions *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService
336 }
337
338 func NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService {
339 rs := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService{s: s}
340 return rs
341 }
342
343 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService struct {
344 s *Service
345 }
346
347 func NewAdvertisersChannelsService(s *Service) *AdvertisersChannelsService {
348 rs := &AdvertisersChannelsService{s: s}
349 rs.Sites = NewAdvertisersChannelsSitesService(s)
350 return rs
351 }
352
353 type AdvertisersChannelsService struct {
354 s *Service
355
356 Sites *AdvertisersChannelsSitesService
357 }
358
359 func NewAdvertisersChannelsSitesService(s *Service) *AdvertisersChannelsSitesService {
360 rs := &AdvertisersChannelsSitesService{s: s}
361 return rs
362 }
363
364 type AdvertisersChannelsSitesService struct {
365 s *Service
366 }
367
368 func NewAdvertisersCreativesService(s *Service) *AdvertisersCreativesService {
369 rs := &AdvertisersCreativesService{s: s}
370 return rs
371 }
372
373 type AdvertisersCreativesService struct {
374 s *Service
375 }
376
377 func NewAdvertisersInsertionOrdersService(s *Service) *AdvertisersInsertionOrdersService {
378 rs := &AdvertisersInsertionOrdersService{s: s}
379 rs.TargetingTypes = NewAdvertisersInsertionOrdersTargetingTypesService(s)
380 return rs
381 }
382
383 type AdvertisersInsertionOrdersService struct {
384 s *Service
385
386 TargetingTypes *AdvertisersInsertionOrdersTargetingTypesService
387 }
388
389 func NewAdvertisersInsertionOrdersTargetingTypesService(s *Service) *AdvertisersInsertionOrdersTargetingTypesService {
390 rs := &AdvertisersInsertionOrdersTargetingTypesService{s: s}
391 rs.AssignedTargetingOptions = NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s)
392 return rs
393 }
394
395 type AdvertisersInsertionOrdersTargetingTypesService struct {
396 s *Service
397
398 AssignedTargetingOptions *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService
399 }
400
401 func NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService {
402 rs := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService{s: s}
403 return rs
404 }
405
406 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService struct {
407 s *Service
408 }
409
410 func NewAdvertisersInvoicesService(s *Service) *AdvertisersInvoicesService {
411 rs := &AdvertisersInvoicesService{s: s}
412 return rs
413 }
414
415 type AdvertisersInvoicesService struct {
416 s *Service
417 }
418
419 func NewAdvertisersLineItemsService(s *Service) *AdvertisersLineItemsService {
420 rs := &AdvertisersLineItemsService{s: s}
421 rs.TargetingTypes = NewAdvertisersLineItemsTargetingTypesService(s)
422 return rs
423 }
424
425 type AdvertisersLineItemsService struct {
426 s *Service
427
428 TargetingTypes *AdvertisersLineItemsTargetingTypesService
429 }
430
431 func NewAdvertisersLineItemsTargetingTypesService(s *Service) *AdvertisersLineItemsTargetingTypesService {
432 rs := &AdvertisersLineItemsTargetingTypesService{s: s}
433 rs.AssignedTargetingOptions = NewAdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService(s)
434 return rs
435 }
436
437 type AdvertisersLineItemsTargetingTypesService struct {
438 s *Service
439
440 AssignedTargetingOptions *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService
441 }
442
443 func NewAdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService {
444 rs := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService{s: s}
445 return rs
446 }
447
448 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService struct {
449 s *Service
450 }
451
452 func NewAdvertisersLocationListsService(s *Service) *AdvertisersLocationListsService {
453 rs := &AdvertisersLocationListsService{s: s}
454 rs.AssignedLocations = NewAdvertisersLocationListsAssignedLocationsService(s)
455 return rs
456 }
457
458 type AdvertisersLocationListsService struct {
459 s *Service
460
461 AssignedLocations *AdvertisersLocationListsAssignedLocationsService
462 }
463
464 func NewAdvertisersLocationListsAssignedLocationsService(s *Service) *AdvertisersLocationListsAssignedLocationsService {
465 rs := &AdvertisersLocationListsAssignedLocationsService{s: s}
466 return rs
467 }
468
469 type AdvertisersLocationListsAssignedLocationsService struct {
470 s *Service
471 }
472
473 func NewAdvertisersNegativeKeywordListsService(s *Service) *AdvertisersNegativeKeywordListsService {
474 rs := &AdvertisersNegativeKeywordListsService{s: s}
475 rs.NegativeKeywords = NewAdvertisersNegativeKeywordListsNegativeKeywordsService(s)
476 return rs
477 }
478
479 type AdvertisersNegativeKeywordListsService struct {
480 s *Service
481
482 NegativeKeywords *AdvertisersNegativeKeywordListsNegativeKeywordsService
483 }
484
485 func NewAdvertisersNegativeKeywordListsNegativeKeywordsService(s *Service) *AdvertisersNegativeKeywordListsNegativeKeywordsService {
486 rs := &AdvertisersNegativeKeywordListsNegativeKeywordsService{s: s}
487 return rs
488 }
489
490 type AdvertisersNegativeKeywordListsNegativeKeywordsService struct {
491 s *Service
492 }
493
494 func NewAdvertisersTargetingTypesService(s *Service) *AdvertisersTargetingTypesService {
495 rs := &AdvertisersTargetingTypesService{s: s}
496 rs.AssignedTargetingOptions = NewAdvertisersTargetingTypesAssignedTargetingOptionsService(s)
497 return rs
498 }
499
500 type AdvertisersTargetingTypesService struct {
501 s *Service
502
503 AssignedTargetingOptions *AdvertisersTargetingTypesAssignedTargetingOptionsService
504 }
505
506 func NewAdvertisersTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersTargetingTypesAssignedTargetingOptionsService {
507 rs := &AdvertisersTargetingTypesAssignedTargetingOptionsService{s: s}
508 return rs
509 }
510
511 type AdvertisersTargetingTypesAssignedTargetingOptionsService struct {
512 s *Service
513 }
514
515 func NewCombinedAudiencesService(s *Service) *CombinedAudiencesService {
516 rs := &CombinedAudiencesService{s: s}
517 return rs
518 }
519
520 type CombinedAudiencesService struct {
521 s *Service
522 }
523
524 func NewCustomBiddingAlgorithmsService(s *Service) *CustomBiddingAlgorithmsService {
525 rs := &CustomBiddingAlgorithmsService{s: s}
526 rs.Rules = NewCustomBiddingAlgorithmsRulesService(s)
527 rs.Scripts = NewCustomBiddingAlgorithmsScriptsService(s)
528 return rs
529 }
530
531 type CustomBiddingAlgorithmsService struct {
532 s *Service
533
534 Rules *CustomBiddingAlgorithmsRulesService
535
536 Scripts *CustomBiddingAlgorithmsScriptsService
537 }
538
539 func NewCustomBiddingAlgorithmsRulesService(s *Service) *CustomBiddingAlgorithmsRulesService {
540 rs := &CustomBiddingAlgorithmsRulesService{s: s}
541 return rs
542 }
543
544 type CustomBiddingAlgorithmsRulesService struct {
545 s *Service
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 ActiveViewVideoViewabilityMetricConfig struct {
764
765 DisplayName string `json:"displayName,omitempty"`
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794 MinimumDuration string `json:"minimumDuration,omitempty"`
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809 MinimumQuartile string `json:"minimumQuartile,omitempty"`
810
811
812
813
814
815
816
817
818
819
820
821 MinimumViewability string `json:"minimumViewability,omitempty"`
822
823
824
825
826
827
828
829
830 MinimumVolume string `json:"minimumVolume,omitempty"`
831
832
833
834
835
836 ForceSendFields []string `json:"-"`
837
838
839
840
841 NullFields []string `json:"-"`
842 }
843
844 func (s *ActiveViewVideoViewabilityMetricConfig) MarshalJSON() ([]byte, error) {
845 type NoMethod ActiveViewVideoViewabilityMetricConfig
846 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
847 }
848
849
850 type AdGroup struct {
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867 AdGroupFormat string `json:"adGroupFormat,omitempty"`
868
869 AdGroupId int64 `json:"adGroupId,omitempty,string"`
870
871 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
872
873
874 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"`
875
876
877 DisplayName string `json:"displayName,omitempty"`
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896 EntityStatus string `json:"entityStatus,omitempty"`
897
898 LineItemId int64 `json:"lineItemId,omitempty,string"`
899
900 Name string `json:"name,omitempty"`
901
902 ProductFeedData *ProductFeedData `json:"productFeedData,omitempty"`
903
904
905
906 TargetingExpansion *TargetingExpansionConfig `json:"targetingExpansion,omitempty"`
907
908
909 googleapi.ServerResponse `json:"-"`
910
911
912
913
914
915 ForceSendFields []string `json:"-"`
916
917
918
919
920 NullFields []string `json:"-"`
921 }
922
923 func (s *AdGroup) MarshalJSON() ([]byte, error) {
924 type NoMethod AdGroup
925 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
926 }
927
928
929 type AdGroupAd struct {
930
931 AdGroupAdId int64 `json:"adGroupAdId,omitempty,string"`
932
933 AdGroupId int64 `json:"adGroupId,omitempty,string"`
934
935 AdUrls []*AdUrl `json:"adUrls,omitempty"`
936
937 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
938
939
940
941 AudioAd *AudioAd `json:"audioAd,omitempty"`
942
943
944
945 BumperAd *BumperAd `json:"bumperAd,omitempty"`
946
947
948 DisplayName string `json:"displayName,omitempty"`
949
950
951 DisplayVideoSourceAd *DisplayVideoSourceAd `json:"displayVideoSourceAd,omitempty"`
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967 EntityStatus string `json:"entityStatus,omitempty"`
968
969
970
971 InStreamAd *InStreamAd `json:"inStreamAd,omitempty"`
972
973
974 MastheadAd *MastheadAd `json:"mastheadAd,omitempty"`
975
976 Name string `json:"name,omitempty"`
977
978
979
980 NonSkippableAd *NonSkippableAd `json:"nonSkippableAd,omitempty"`
981
982
983
984 VideoDiscoverAd *VideoDiscoveryAd `json:"videoDiscoverAd,omitempty"`
985
986
987
988 VideoPerformanceAd *VideoPerformanceAd `json:"videoPerformanceAd,omitempty"`
989
990
991 googleapi.ServerResponse `json:"-"`
992
993
994
995
996
997 ForceSendFields []string `json:"-"`
998
999
1000
1001
1002 NullFields []string `json:"-"`
1003 }
1004
1005 func (s *AdGroupAd) MarshalJSON() ([]byte, error) {
1006 type NoMethod AdGroupAd
1007 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1008 }
1009
1010
1011
1012 type AdGroupAssignedTargetingOption struct {
1013
1014
1015 AdGroupId int64 `json:"adGroupId,omitempty,string"`
1016
1017 AssignedTargetingOption *AssignedTargetingOption `json:"assignedTargetingOption,omitempty"`
1018
1019
1020
1021
1022
1023 ForceSendFields []string `json:"-"`
1024
1025
1026
1027
1028 NullFields []string `json:"-"`
1029 }
1030
1031 func (s *AdGroupAssignedTargetingOption) MarshalJSON() ([]byte, error) {
1032 type NoMethod AdGroupAssignedTargetingOption
1033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1034 }
1035
1036
1037 type AdUrl struct {
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050 Type string `json:"type,omitempty"`
1051
1052 Url string `json:"url,omitempty"`
1053
1054
1055
1056
1057
1058 ForceSendFields []string `json:"-"`
1059
1060
1061
1062
1063 NullFields []string `json:"-"`
1064 }
1065
1066 func (s *AdUrl) MarshalJSON() ([]byte, error) {
1067 type NoMethod AdUrl
1068 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1069 }
1070
1071
1072 type Adloox struct {
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086 ExcludedAdlooxCategories []string `json:"excludedAdlooxCategories,omitempty"`
1087
1088
1089
1090
1091
1092 ForceSendFields []string `json:"-"`
1093
1094
1095
1096
1097 NullFields []string `json:"-"`
1098 }
1099
1100 func (s *Adloox) MarshalJSON() ([]byte, error) {
1101 type NoMethod Adloox
1102 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1103 }
1104
1105
1106 type Advertiser struct {
1107
1108
1109 AdServerConfig *AdvertiserAdServerConfig `json:"adServerConfig,omitempty"`
1110
1111
1112 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1113
1114
1115 BillingConfig *AdvertiserBillingConfig `json:"billingConfig,omitempty"`
1116
1117 CreativeConfig *AdvertiserCreativeConfig `json:"creativeConfig,omitempty"`
1118
1119 DataAccessConfig *AdvertiserDataAccessConfig `json:"dataAccessConfig,omitempty"`
1120
1121
1122 DisplayName string `json:"displayName,omitempty"`
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143 EntityStatus string `json:"entityStatus,omitempty"`
1144
1145 GeneralConfig *AdvertiserGeneralConfig `json:"generalConfig,omitempty"`
1146
1147
1148
1149 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"`
1150
1151 Name string `json:"name,omitempty"`
1152
1153
1154 PartnerId int64 `json:"partnerId,omitempty,string"`
1155
1156
1157
1158
1159
1160
1161 PrismaEnabled bool `json:"prismaEnabled,omitempty"`
1162
1163 ServingConfig *AdvertiserTargetingConfig `json:"servingConfig,omitempty"`
1164
1165
1166 UpdateTime string `json:"updateTime,omitempty"`
1167
1168
1169 googleapi.ServerResponse `json:"-"`
1170
1171
1172
1173
1174
1175 ForceSendFields []string `json:"-"`
1176
1177
1178
1179
1180 NullFields []string `json:"-"`
1181 }
1182
1183 func (s *Advertiser) MarshalJSON() ([]byte, error) {
1184 type NoMethod Advertiser
1185 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1186 }
1187
1188
1189 type AdvertiserAdServerConfig struct {
1190
1191
1192 CmHybridConfig *CmHybridConfig `json:"cmHybridConfig,omitempty"`
1193
1194
1195 ThirdPartyOnlyConfig *ThirdPartyOnlyConfig `json:"thirdPartyOnlyConfig,omitempty"`
1196
1197
1198
1199
1200
1201 ForceSendFields []string `json:"-"`
1202
1203
1204
1205
1206 NullFields []string `json:"-"`
1207 }
1208
1209 func (s *AdvertiserAdServerConfig) MarshalJSON() ([]byte, error) {
1210 type NoMethod AdvertiserAdServerConfig
1211 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1212 }
1213
1214
1215 type AdvertiserBillingConfig struct {
1216
1217
1218 BillingProfileId int64 `json:"billingProfileId,omitempty,string"`
1219
1220
1221
1222
1223
1224 ForceSendFields []string `json:"-"`
1225
1226
1227
1228
1229 NullFields []string `json:"-"`
1230 }
1231
1232 func (s *AdvertiserBillingConfig) MarshalJSON() ([]byte, error) {
1233 type NoMethod AdvertiserBillingConfig
1234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1235 }
1236
1237
1238 type AdvertiserCreativeConfig struct {
1239
1240
1241 DynamicCreativeEnabled bool `json:"dynamicCreativeEnabled,omitempty"`
1242
1243
1244
1245 IasClientId int64 `json:"iasClientId,omitempty,string"`
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264 ObaComplianceDisabled bool `json:"obaComplianceDisabled,omitempty"`
1265
1266
1267
1268
1269
1270 VideoCreativeDataSharingAuthorized bool `json:"videoCreativeDataSharingAuthorized,omitempty"`
1271
1272
1273
1274
1275
1276 ForceSendFields []string `json:"-"`
1277
1278
1279
1280
1281 NullFields []string `json:"-"`
1282 }
1283
1284 func (s *AdvertiserCreativeConfig) MarshalJSON() ([]byte, error) {
1285 type NoMethod AdvertiserCreativeConfig
1286 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1287 }
1288
1289
1290
1291 type AdvertiserDataAccessConfig struct {
1292
1293
1294 SdfConfig *AdvertiserSdfConfig `json:"sdfConfig,omitempty"`
1295
1296
1297
1298
1299
1300 ForceSendFields []string `json:"-"`
1301
1302
1303
1304
1305 NullFields []string `json:"-"`
1306 }
1307
1308 func (s *AdvertiserDataAccessConfig) MarshalJSON() ([]byte, error) {
1309 type NoMethod AdvertiserDataAccessConfig
1310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1311 }
1312
1313
1314 type AdvertiserGeneralConfig struct {
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329 CurrencyCode string `json:"currencyCode,omitempty"`
1330
1331
1332
1333
1334
1335 DomainUrl string `json:"domainUrl,omitempty"`
1336
1337
1338
1339
1340
1341
1342 TimeZone string `json:"timeZone,omitempty"`
1343
1344
1345
1346
1347
1348 ForceSendFields []string `json:"-"`
1349
1350
1351
1352
1353 NullFields []string `json:"-"`
1354 }
1355
1356 func (s *AdvertiserGeneralConfig) MarshalJSON() ([]byte, error) {
1357 type NoMethod AdvertiserGeneralConfig
1358 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1359 }
1360
1361
1362 type AdvertiserSdfConfig struct {
1363
1364
1365
1366
1367
1368 OverridePartnerSdfConfig bool `json:"overridePartnerSdfConfig,omitempty"`
1369
1370
1371
1372 SdfConfig *SdfConfig `json:"sdfConfig,omitempty"`
1373
1374
1375
1376
1377
1378 ForceSendFields []string `json:"-"`
1379
1380
1381
1382
1383 NullFields []string `json:"-"`
1384 }
1385
1386 func (s *AdvertiserSdfConfig) MarshalJSON() ([]byte, error) {
1387 type NoMethod AdvertiserSdfConfig
1388 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1389 }
1390
1391
1392
1393 type AdvertiserTargetingConfig struct {
1394
1395
1396
1397 ExemptTvFromViewabilityTargeting bool `json:"exemptTvFromViewabilityTargeting,omitempty"`
1398
1399
1400
1401
1402
1403
1404 ForceSendFields []string `json:"-"`
1405
1406
1407
1408
1409
1410 NullFields []string `json:"-"`
1411 }
1412
1413 func (s *AdvertiserTargetingConfig) MarshalJSON() ([]byte, error) {
1414 type NoMethod AdvertiserTargetingConfig
1415 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1416 }
1417
1418
1419
1420
1421 type AgeRangeAssignedTargetingOptionDetails struct {
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459 AgeRange string `json:"ageRange,omitempty"`
1460
1461
1462
1463
1464
1465 ForceSendFields []string `json:"-"`
1466
1467
1468
1469
1470 NullFields []string `json:"-"`
1471 }
1472
1473 func (s *AgeRangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
1474 type NoMethod AgeRangeAssignedTargetingOptionDetails
1475 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1476 }
1477
1478
1479
1480
1481 type AgeRangeTargetingOptionDetails struct {
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515 AgeRange string `json:"ageRange,omitempty"`
1516
1517
1518
1519
1520
1521 ForceSendFields []string `json:"-"`
1522
1523
1524
1525
1526 NullFields []string `json:"-"`
1527 }
1528
1529 func (s *AgeRangeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
1530 type NoMethod AgeRangeTargetingOptionDetails
1531 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1532 }
1533
1534
1535 type AlgorithmRules struct {
1536
1537 ImpressionSignalRuleset *AlgorithmRulesRuleset `json:"impressionSignalRuleset,omitempty"`
1538
1539
1540
1541
1542
1543 ForceSendFields []string `json:"-"`
1544
1545
1546
1547
1548 NullFields []string `json:"-"`
1549 }
1550
1551 func (s *AlgorithmRules) MarshalJSON() ([]byte, error) {
1552 type NoMethod AlgorithmRules
1553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1554 }
1555
1556
1557 type AlgorithmRulesComparisonValue struct {
1558
1559 BoolValue bool `json:"boolValue,omitempty"`
1560
1561 CreativeDimensionValue *Dimensions `json:"creativeDimensionValue,omitempty"`
1562
1563
1564 DayAndTimeValue *DayAndTime `json:"dayAndTimeValue,omitempty"`
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577 DeviceTypeValue string `json:"deviceTypeValue,omitempty"`
1578
1579 DoubleValue float64 `json:"doubleValue,omitempty"`
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597 EnvironmentValue string `json:"environmentValue,omitempty"`
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685 ExchangeValue string `json:"exchangeValue,omitempty"`
1686
1687 Int64Value int64 `json:"int64Value,omitempty,string"`
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697 OnScreenPositionValue string `json:"onScreenPositionValue,omitempty"`
1698
1699 StringValue string `json:"stringValue,omitempty"`
1700
1701
1702
1703
1704
1705 ForceSendFields []string `json:"-"`
1706
1707
1708
1709
1710 NullFields []string `json:"-"`
1711 }
1712
1713 func (s *AlgorithmRulesComparisonValue) MarshalJSON() ([]byte, error) {
1714 type NoMethod AlgorithmRulesComparisonValue
1715 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1716 }
1717
1718 func (s *AlgorithmRulesComparisonValue) UnmarshalJSON(data []byte) error {
1719 type NoMethod AlgorithmRulesComparisonValue
1720 var s1 struct {
1721 DoubleValue gensupport.JSONFloat64 `json:"doubleValue"`
1722 *NoMethod
1723 }
1724 s1.NoMethod = (*NoMethod)(s)
1725 if err := json.Unmarshal(data, &s1); err != nil {
1726 return err
1727 }
1728 s.DoubleValue = float64(s1.DoubleValue)
1729 return nil
1730 }
1731
1732
1733
1734
1735 type AlgorithmRulesRule struct {
1736
1737
1738 Conditions []*AlgorithmRulesRuleCondition `json:"conditions,omitempty"`
1739
1740
1741 DefaultReturnValue *AlgorithmRulesSignalValue `json:"defaultReturnValue,omitempty"`
1742
1743
1744
1745
1746
1747 ForceSendFields []string `json:"-"`
1748
1749
1750
1751
1752 NullFields []string `json:"-"`
1753 }
1754
1755 func (s *AlgorithmRulesRule) MarshalJSON() ([]byte, error) {
1756 type NoMethod AlgorithmRulesRule
1757 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1758 }
1759
1760
1761
1762 type AlgorithmRulesRuleCondition struct {
1763
1764
1765 ReturnValue *AlgorithmRulesSignalValue `json:"returnValue,omitempty"`
1766
1767
1768
1769 SignalComparisons []*AlgorithmRulesSignalComparison `json:"signalComparisons,omitempty"`
1770
1771
1772
1773
1774
1775 ForceSendFields []string `json:"-"`
1776
1777
1778
1779
1780 NullFields []string `json:"-"`
1781 }
1782
1783 func (s *AlgorithmRulesRuleCondition) MarshalJSON() ([]byte, error) {
1784 type NoMethod AlgorithmRulesRuleCondition
1785 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1786 }
1787
1788
1789
1790 type AlgorithmRulesRuleset struct {
1791
1792
1793
1794
1795
1796
1797
1798 AggregationType string `json:"aggregationType,omitempty"`
1799
1800 MaxValue float64 `json:"maxValue,omitempty"`
1801
1802 Rules []*AlgorithmRulesRule `json:"rules,omitempty"`
1803
1804
1805
1806
1807
1808 ForceSendFields []string `json:"-"`
1809
1810
1811
1812
1813 NullFields []string `json:"-"`
1814 }
1815
1816 func (s *AlgorithmRulesRuleset) MarshalJSON() ([]byte, error) {
1817 type NoMethod AlgorithmRulesRuleset
1818 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1819 }
1820
1821 func (s *AlgorithmRulesRuleset) UnmarshalJSON(data []byte) error {
1822 type NoMethod AlgorithmRulesRuleset
1823 var s1 struct {
1824 MaxValue gensupport.JSONFloat64 `json:"maxValue"`
1825 *NoMethod
1826 }
1827 s1.NoMethod = (*NoMethod)(s)
1828 if err := json.Unmarshal(data, &s1); err != nil {
1829 return err
1830 }
1831 s.MaxValue = float64(s1.MaxValue)
1832 return nil
1833 }
1834
1835
1836 type AlgorithmRulesSignal struct {
1837
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 ImpressionSignal string `json:"impressionSignal,omitempty"`
1865
1866
1867
1868
1869
1870 ForceSendFields []string `json:"-"`
1871
1872
1873
1874
1875 NullFields []string `json:"-"`
1876 }
1877
1878 func (s *AlgorithmRulesSignal) MarshalJSON() ([]byte, error) {
1879 type NoMethod AlgorithmRulesSignal
1880 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1881 }
1882
1883
1884
1885
1886
1887
1888 type AlgorithmRulesSignalComparison struct {
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902 ComparisonOperator string `json:"comparisonOperator,omitempty"`
1903
1904 ComparisonValue *AlgorithmRulesComparisonValue `json:"comparisonValue,omitempty"`
1905
1906 Signal *AlgorithmRulesSignal `json:"signal,omitempty"`
1907
1908
1909
1910
1911
1912 ForceSendFields []string `json:"-"`
1913
1914
1915
1916
1917 NullFields []string `json:"-"`
1918 }
1919
1920 func (s *AlgorithmRulesSignalComparison) MarshalJSON() ([]byte, error) {
1921 type NoMethod AlgorithmRulesSignalComparison
1922 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1923 }
1924
1925
1926
1927 type AlgorithmRulesSignalValue struct {
1928
1929 Number float64 `json:"number,omitempty"`
1930
1931
1932
1933
1934
1935 ForceSendFields []string `json:"-"`
1936
1937
1938
1939
1940 NullFields []string `json:"-"`
1941 }
1942
1943 func (s *AlgorithmRulesSignalValue) MarshalJSON() ([]byte, error) {
1944 type NoMethod AlgorithmRulesSignalValue
1945 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1946 }
1947
1948 func (s *AlgorithmRulesSignalValue) UnmarshalJSON(data []byte) error {
1949 type NoMethod AlgorithmRulesSignalValue
1950 var s1 struct {
1951 Number gensupport.JSONFloat64 `json:"number"`
1952 *NoMethod
1953 }
1954 s1.NoMethod = (*NoMethod)(s)
1955 if err := json.Unmarshal(data, &s1); err != nil {
1956 return err
1957 }
1958 s.Number = float64(s1.Number)
1959 return nil
1960 }
1961
1962
1963
1964
1965 type AppAssignedTargetingOptionDetails struct {
1966
1967
1968
1969 AppId string `json:"appId,omitempty"`
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991 AppPlatform string `json:"appPlatform,omitempty"`
1992
1993 DisplayName string `json:"displayName,omitempty"`
1994
1995 Negative bool `json:"negative,omitempty"`
1996
1997
1998
1999
2000
2001 ForceSendFields []string `json:"-"`
2002
2003
2004
2005
2006 NullFields []string `json:"-"`
2007 }
2008
2009 func (s *AppAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2010 type NoMethod AppAssignedTargetingOptionDetails
2011 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2012 }
2013
2014
2015
2016
2017
2018 type AppCategoryAssignedTargetingOptionDetails struct {
2019
2020 DisplayName string `json:"displayName,omitempty"`
2021
2022 Negative bool `json:"negative,omitempty"`
2023
2024
2025 TargetingOptionId string `json:"targetingOptionId,omitempty"`
2026
2027
2028
2029
2030
2031 ForceSendFields []string `json:"-"`
2032
2033
2034
2035
2036 NullFields []string `json:"-"`
2037 }
2038
2039 func (s *AppCategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2040 type NoMethod AppCategoryAssignedTargetingOptionDetails
2041 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2042 }
2043
2044
2045
2046
2047
2048
2049 type AppCategoryTargetingOptionDetails struct {
2050
2051 DisplayName string `json:"displayName,omitempty"`
2052
2053
2054
2055
2056
2057 ForceSendFields []string `json:"-"`
2058
2059
2060
2061
2062 NullFields []string `json:"-"`
2063 }
2064
2065 func (s *AppCategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2066 type NoMethod AppCategoryTargetingOptionDetails
2067 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2068 }
2069
2070
2071 type Asset struct {
2072
2073
2074 Content string `json:"content,omitempty"`
2075
2076
2077
2078
2079
2080
2081 MediaId int64 `json:"mediaId,omitempty,string"`
2082
2083
2084
2085
2086
2087 ForceSendFields []string `json:"-"`
2088
2089
2090
2091
2092 NullFields []string `json:"-"`
2093 }
2094
2095 func (s *Asset) MarshalJSON() ([]byte, error) {
2096 type NoMethod Asset
2097 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2098 }
2099
2100
2101 type AssetAssociation struct {
2102
2103 Asset *Asset `json:"asset,omitempty"`
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175 Role string `json:"role,omitempty"`
2176
2177
2178
2179
2180
2181 ForceSendFields []string `json:"-"`
2182
2183
2184
2185
2186 NullFields []string `json:"-"`
2187 }
2188
2189 func (s *AssetAssociation) MarshalJSON() ([]byte, error) {
2190 type NoMethod AssetAssociation
2191 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2192 }
2193
2194
2195
2196 type AssignedInventorySource struct {
2197
2198
2199
2200 AssignedInventorySourceId int64 `json:"assignedInventorySourceId,omitempty,string"`
2201
2202
2203 InventorySourceId string `json:"inventorySourceId,omitempty"`
2204
2205 Name string `json:"name,omitempty"`
2206
2207
2208 googleapi.ServerResponse `json:"-"`
2209
2210
2211
2212
2213
2214 ForceSendFields []string `json:"-"`
2215
2216
2217
2218
2219 NullFields []string `json:"-"`
2220 }
2221
2222 func (s *AssignedInventorySource) MarshalJSON() ([]byte, error) {
2223 type NoMethod AssignedInventorySource
2224 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2225 }
2226
2227
2228
2229 type AssignedLocation struct {
2230
2231
2232
2233 AssignedLocationId int64 `json:"assignedLocationId,omitempty,string"`
2234
2235 Name string `json:"name,omitempty"`
2236
2237
2238 TargetingOptionId string `json:"targetingOptionId,omitempty"`
2239
2240
2241 googleapi.ServerResponse `json:"-"`
2242
2243
2244
2245
2246
2247 ForceSendFields []string `json:"-"`
2248
2249
2250
2251
2252 NullFields []string `json:"-"`
2253 }
2254
2255 func (s *AssignedLocation) MarshalJSON() ([]byte, error) {
2256 type NoMethod AssignedLocation
2257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2258 }
2259
2260
2261
2262 type AssignedTargetingOption struct {
2263
2264
2265 AgeRangeDetails *AgeRangeAssignedTargetingOptionDetails `json:"ageRangeDetails,omitempty"`
2266
2267
2268 AppCategoryDetails *AppCategoryAssignedTargetingOptionDetails `json:"appCategoryDetails,omitempty"`
2269
2270
2271 AppDetails *AppAssignedTargetingOptionDetails `json:"appDetails,omitempty"`
2272
2273
2274
2275 AssignedTargetingOptionId string `json:"assignedTargetingOptionId,omitempty"`
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292 AssignedTargetingOptionIdAlias string `json:"assignedTargetingOptionIdAlias,omitempty"`
2293
2294
2295
2296 AudienceGroupDetails *AudienceGroupAssignedTargetingOptionDetails `json:"audienceGroupDetails,omitempty"`
2297
2298
2299 AudioContentTypeDetails *AudioContentTypeAssignedTargetingOptionDetails `json:"audioContentTypeDetails,omitempty"`
2300
2301
2302
2303
2304
2305
2306 AuthorizedSellerStatusDetails *AuthorizedSellerStatusAssignedTargetingOptionDetails `json:"authorizedSellerStatusDetails,omitempty"`
2307
2308
2309 BrowserDetails *BrowserAssignedTargetingOptionDetails `json:"browserDetails,omitempty"`
2310
2311
2312 BusinessChainDetails *BusinessChainAssignedTargetingOptionDetails `json:"businessChainDetails,omitempty"`
2313
2314
2315 CarrierAndIspDetails *CarrierAndIspAssignedTargetingOptionDetails `json:"carrierAndIspDetails,omitempty"`
2316
2317
2318
2319
2320 CategoryDetails *CategoryAssignedTargetingOptionDetails `json:"categoryDetails,omitempty"`
2321
2322
2323 ChannelDetails *ChannelAssignedTargetingOptionDetails `json:"channelDetails,omitempty"`
2324
2325
2326 ContentDurationDetails *ContentDurationAssignedTargetingOptionDetails `json:"contentDurationDetails,omitempty"`
2327
2328
2329 ContentGenreDetails *ContentGenreAssignedTargetingOptionDetails `json:"contentGenreDetails,omitempty"`
2330
2331
2332
2333 ContentInstreamPositionDetails *ContentInstreamPositionAssignedTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"`
2334
2335
2336
2337 ContentOutstreamPositionDetails *ContentOutstreamPositionAssignedTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"`
2338
2339
2340 ContentStreamTypeDetails *ContentStreamTypeAssignedTargetingOptionDetails `json:"contentStreamTypeDetails,omitempty"`
2341
2342
2343 DayAndTimeDetails *DayAndTimeAssignedTargetingOptionDetails `json:"dayAndTimeDetails,omitempty"`
2344
2345
2346 DeviceMakeModelDetails *DeviceMakeModelAssignedTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"`
2347
2348
2349 DeviceTypeDetails *DeviceTypeAssignedTargetingOptionDetails `json:"deviceTypeDetails,omitempty"`
2350
2351
2352
2353
2354
2355
2356
2357
2358 DigitalContentLabelExclusionDetails *DigitalContentLabelAssignedTargetingOptionDetails `json:"digitalContentLabelExclusionDetails,omitempty"`
2359
2360
2361 EnvironmentDetails *EnvironmentAssignedTargetingOptionDetails `json:"environmentDetails,omitempty"`
2362
2363
2364 ExchangeDetails *ExchangeAssignedTargetingOptionDetails `json:"exchangeDetails,omitempty"`
2365
2366
2367 GenderDetails *GenderAssignedTargetingOptionDetails `json:"genderDetails,omitempty"`
2368
2369
2370 GeoRegionDetails *GeoRegionAssignedTargetingOptionDetails `json:"geoRegionDetails,omitempty"`
2371
2372
2373 HouseholdIncomeDetails *HouseholdIncomeAssignedTargetingOptionDetails `json:"householdIncomeDetails,omitempty"`
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385 Inheritance string `json:"inheritance,omitempty"`
2386
2387
2388 InventorySourceDetails *InventorySourceAssignedTargetingOptionDetails `json:"inventorySourceDetails,omitempty"`
2389
2390
2391
2392 InventorySourceGroupDetails *InventorySourceGroupAssignedTargetingOptionDetails `json:"inventorySourceGroupDetails,omitempty"`
2393
2394
2395
2396
2397 KeywordDetails *KeywordAssignedTargetingOptionDetails `json:"keywordDetails,omitempty"`
2398
2399
2400 LanguageDetails *LanguageAssignedTargetingOptionDetails `json:"languageDetails,omitempty"`
2401
2402 Name string `json:"name,omitempty"`
2403
2404
2405
2406 NativeContentPositionDetails *NativeContentPositionAssignedTargetingOptionDetails `json:"nativeContentPositionDetails,omitempty"`
2407
2408
2409
2410 NegativeKeywordListDetails *NegativeKeywordListAssignedTargetingOptionDetails `json:"negativeKeywordListDetails,omitempty"`
2411
2412
2413 OmidDetails *OmidAssignedTargetingOptionDetails `json:"omidDetails,omitempty"`
2414
2415
2416 OnScreenPositionDetails *OnScreenPositionAssignedTargetingOptionDetails `json:"onScreenPositionDetails,omitempty"`
2417
2418
2419 OperatingSystemDetails *OperatingSystemAssignedTargetingOptionDetails `json:"operatingSystemDetails,omitempty"`
2420
2421
2422 ParentalStatusDetails *ParentalStatusAssignedTargetingOptionDetails `json:"parentalStatusDetails,omitempty"`
2423
2424
2425 PoiDetails *PoiAssignedTargetingOptionDetails `json:"poiDetails,omitempty"`
2426
2427
2428
2429 ProximityLocationListDetails *ProximityLocationListAssignedTargetingOptionDetails `json:"proximityLocationListDetails,omitempty"`
2430
2431
2432
2433 RegionalLocationListDetails *RegionalLocationListAssignedTargetingOptionDetails `json:"regionalLocationListDetails,omitempty"`
2434
2435
2436
2437
2438
2439
2440
2441 SensitiveCategoryExclusionDetails *SensitiveCategoryAssignedTargetingOptionDetails `json:"sensitiveCategoryExclusionDetails,omitempty"`
2442
2443
2444 SessionPositionDetails *SessionPositionAssignedTargetingOptionDetails `json:"sessionPositionDetails,omitempty"`
2445
2446
2447 SubExchangeDetails *SubExchangeAssignedTargetingOptionDetails `json:"subExchangeDetails,omitempty"`
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558 TargetingType string `json:"targetingType,omitempty"`
2559
2560
2561
2562 ThirdPartyVerifierDetails *ThirdPartyVerifierAssignedTargetingOptionDetails `json:"thirdPartyVerifierDetails,omitempty"`
2563
2564
2565 UrlDetails *UrlAssignedTargetingOptionDetails `json:"urlDetails,omitempty"`
2566
2567
2568
2569 UserRewardedContentDetails *UserRewardedContentAssignedTargetingOptionDetails `json:"userRewardedContentDetails,omitempty"`
2570
2571
2572 VideoPlayerSizeDetails *VideoPlayerSizeAssignedTargetingOptionDetails `json:"videoPlayerSizeDetails,omitempty"`
2573
2574
2575
2576 ViewabilityDetails *ViewabilityAssignedTargetingOptionDetails `json:"viewabilityDetails,omitempty"`
2577
2578
2579 YoutubeChannelDetails *YoutubeChannelAssignedTargetingOptionDetails `json:"youtubeChannelDetails,omitempty"`
2580
2581
2582 YoutubeVideoDetails *YoutubeVideoAssignedTargetingOptionDetails `json:"youtubeVideoDetails,omitempty"`
2583
2584
2585 googleapi.ServerResponse `json:"-"`
2586
2587
2588
2589
2590
2591 ForceSendFields []string `json:"-"`
2592
2593
2594
2595
2596 NullFields []string `json:"-"`
2597 }
2598
2599 func (s *AssignedTargetingOption) MarshalJSON() ([]byte, error) {
2600 type NoMethod AssignedTargetingOption
2601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2602 }
2603
2604
2605
2606 type AssignedUserRole struct {
2607
2608
2609 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2610
2611 AssignedUserRoleId string `json:"assignedUserRoleId,omitempty"`
2612
2613 PartnerId int64 `json:"partnerId,omitempty,string"`
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655 UserRole string `json:"userRole,omitempty"`
2656
2657
2658
2659
2660
2661 ForceSendFields []string `json:"-"`
2662
2663
2664
2665
2666 NullFields []string `json:"-"`
2667 }
2668
2669 func (s *AssignedUserRole) MarshalJSON() ([]byte, error) {
2670 type NoMethod AssignedUserRole
2671 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2672 }
2673
2674
2675
2676
2677
2678
2679
2680
2681 type AudienceGroupAssignedTargetingOptionDetails struct {
2682
2683
2684
2685
2686
2687 ExcludedFirstAndThirdPartyAudienceGroup *FirstAndThirdPartyAudienceGroup `json:"excludedFirstAndThirdPartyAudienceGroup,omitempty"`
2688
2689
2690
2691
2692
2693
2694 ExcludedGoogleAudienceGroup *GoogleAudienceGroup `json:"excludedGoogleAudienceGroup,omitempty"`
2695
2696
2697 IncludedCombinedAudienceGroup *CombinedAudienceGroup `json:"includedCombinedAudienceGroup,omitempty"`
2698
2699
2700 IncludedCustomListGroup *CustomListGroup `json:"includedCustomListGroup,omitempty"`
2701
2702
2703
2704
2705
2706
2707 IncludedFirstAndThirdPartyAudienceGroups []*FirstAndThirdPartyAudienceGroup `json:"includedFirstAndThirdPartyAudienceGroups,omitempty"`
2708
2709
2710 IncludedGoogleAudienceGroup *GoogleAudienceGroup `json:"includedGoogleAudienceGroup,omitempty"`
2711
2712
2713
2714
2715
2716
2717 ForceSendFields []string `json:"-"`
2718
2719
2720
2721
2722
2723 NullFields []string `json:"-"`
2724 }
2725
2726 func (s *AudienceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2727 type NoMethod AudienceGroupAssignedTargetingOptionDetails
2728 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2729 }
2730
2731
2732 type AudioAd struct {
2733
2734 DisplayUrl string `json:"displayUrl,omitempty"`
2735
2736
2737 FinalUrl string `json:"finalUrl,omitempty"`
2738
2739 TrackingUrl string `json:"trackingUrl,omitempty"`
2740
2741 Video *YoutubeVideoDetails `json:"video,omitempty"`
2742
2743
2744
2745
2746
2747 ForceSendFields []string `json:"-"`
2748
2749
2750
2751
2752 NullFields []string `json:"-"`
2753 }
2754
2755 func (s *AudioAd) MarshalJSON() ([]byte, error) {
2756 type NoMethod AudioAd
2757 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2758 }
2759
2760
2761
2762
2763
2764
2765
2766 type AudioContentTypeAssignedTargetingOptionDetails struct {
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777 AudioContentType string `json:"audioContentType,omitempty"`
2778
2779
2780
2781
2782
2783 ForceSendFields []string `json:"-"`
2784
2785
2786
2787
2788 NullFields []string `json:"-"`
2789 }
2790
2791 func (s *AudioContentTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2792 type NoMethod AudioContentTypeAssignedTargetingOptionDetails
2793 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2794 }
2795
2796
2797
2798
2799 type AudioContentTypeTargetingOptionDetails struct {
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810 AudioContentType string `json:"audioContentType,omitempty"`
2811
2812
2813
2814
2815
2816 ForceSendFields []string `json:"-"`
2817
2818
2819
2820
2821 NullFields []string `json:"-"`
2822 }
2823
2824 func (s *AudioContentTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2825 type NoMethod AudioContentTypeTargetingOptionDetails
2826 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2827 }
2828
2829
2830 type AudioVideoOffset struct {
2831
2832 Percentage int64 `json:"percentage,omitempty,string"`
2833
2834 Seconds int64 `json:"seconds,omitempty,string"`
2835
2836
2837
2838
2839
2840 ForceSendFields []string `json:"-"`
2841
2842
2843
2844
2845 NullFields []string `json:"-"`
2846 }
2847
2848 func (s *AudioVideoOffset) MarshalJSON() ([]byte, error) {
2849 type NoMethod AudioVideoOffset
2850 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2851 }
2852
2853
2854
2855 type AuditAdvertiserResponse struct {
2856
2857
2858
2859
2860
2861
2862
2863
2864 AdGroupCriteriaCount int64 `json:"adGroupCriteriaCount,omitempty,string"`
2865
2866
2867
2868
2869
2870
2871
2872
2873 CampaignCriteriaCount int64 `json:"campaignCriteriaCount,omitempty,string"`
2874
2875
2876 ChannelsCount int64 `json:"channelsCount,omitempty,string"`
2877
2878
2879
2880 NegativeKeywordListsCount int64 `json:"negativeKeywordListsCount,omitempty,string"`
2881
2882
2883
2884 NegativelyTargetedChannelsCount int64 `json:"negativelyTargetedChannelsCount,omitempty,string"`
2885
2886
2887
2888 UsedCampaignsCount int64 `json:"usedCampaignsCount,omitempty,string"`
2889
2890
2891
2892 UsedInsertionOrdersCount int64 `json:"usedInsertionOrdersCount,omitempty,string"`
2893
2894
2895
2896 UsedLineItemsCount int64 `json:"usedLineItemsCount,omitempty,string"`
2897
2898
2899 googleapi.ServerResponse `json:"-"`
2900
2901
2902
2903
2904
2905 ForceSendFields []string `json:"-"`
2906
2907
2908
2909
2910 NullFields []string `json:"-"`
2911 }
2912
2913 func (s *AuditAdvertiserResponse) MarshalJSON() ([]byte, error) {
2914 type NoMethod AuditAdvertiserResponse
2915 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2916 }
2917
2918
2919
2920
2921
2922
2923
2924 type AuthorizedSellerStatusAssignedTargetingOptionDetails struct {
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941 AuthorizedSellerStatus string `json:"authorizedSellerStatus,omitempty"`
2942
2943
2944 TargetingOptionId string `json:"targetingOptionId,omitempty"`
2945
2946
2947
2948
2949
2950 ForceSendFields []string `json:"-"`
2951
2952
2953
2954
2955 NullFields []string `json:"-"`
2956 }
2957
2958 func (s *AuthorizedSellerStatusAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2959 type NoMethod AuthorizedSellerStatusAssignedTargetingOptionDetails
2960 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2961 }
2962
2963
2964
2965
2966
2967 type AuthorizedSellerStatusTargetingOptionDetails struct {
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984 AuthorizedSellerStatus string `json:"authorizedSellerStatus,omitempty"`
2985
2986
2987
2988
2989
2990 ForceSendFields []string `json:"-"`
2991
2992
2993
2994
2995 NullFields []string `json:"-"`
2996 }
2997
2998 func (s *AuthorizedSellerStatusTargetingOptionDetails) MarshalJSON() ([]byte, error) {
2999 type NoMethod AuthorizedSellerStatusTargetingOptionDetails
3000 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3001 }
3002
3003
3004
3005 type BiddingStrategy struct {
3006
3007 FixedBid *FixedBidStrategy `json:"fixedBid,omitempty"`
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022 MaximizeSpendAutoBid *MaximizeSpendBidStrategy `json:"maximizeSpendAutoBid,omitempty"`
3023
3024
3025
3026 PerformanceGoalAutoBid *PerformanceGoalBidStrategy `json:"performanceGoalAutoBid,omitempty"`
3027
3028
3029
3030 YoutubeAndPartnersBid *YoutubeAndPartnersBiddingStrategy `json:"youtubeAndPartnersBid,omitempty"`
3031
3032
3033
3034
3035
3036 ForceSendFields []string `json:"-"`
3037
3038
3039
3040
3041 NullFields []string `json:"-"`
3042 }
3043
3044 func (s *BiddingStrategy) MarshalJSON() ([]byte, error) {
3045 type NoMethod BiddingStrategy
3046 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3047 }
3048
3049
3050
3051
3052 type BrowserAssignedTargetingOptionDetails struct {
3053
3054 DisplayName string `json:"displayName,omitempty"`
3055
3056
3057
3058 Negative bool `json:"negative,omitempty"`
3059
3060
3061 TargetingOptionId string `json:"targetingOptionId,omitempty"`
3062
3063
3064
3065
3066
3067 ForceSendFields []string `json:"-"`
3068
3069
3070
3071
3072 NullFields []string `json:"-"`
3073 }
3074
3075 func (s *BrowserAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3076 type NoMethod BrowserAssignedTargetingOptionDetails
3077 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3078 }
3079
3080
3081
3082
3083 type BrowserTargetingOptionDetails struct {
3084
3085 DisplayName string `json:"displayName,omitempty"`
3086
3087
3088
3089
3090
3091 ForceSendFields []string `json:"-"`
3092
3093
3094
3095
3096 NullFields []string `json:"-"`
3097 }
3098
3099 func (s *BrowserTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3100 type NoMethod BrowserTargetingOptionDetails
3101 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3102 }
3103
3104
3105 type BudgetSummary struct {
3106
3107
3108
3109 ExternalBudgetId string `json:"externalBudgetId,omitempty"`
3110
3111
3112
3113 PreTaxAmountMicros int64 `json:"preTaxAmountMicros,omitempty,string"`
3114
3115
3116
3117 PrismaCpeCode *PrismaCpeCode `json:"prismaCpeCode,omitempty"`
3118
3119
3120
3121 TaxAmountMicros int64 `json:"taxAmountMicros,omitempty,string"`
3122
3123
3124
3125 TotalAmountMicros int64 `json:"totalAmountMicros,omitempty,string"`
3126
3127
3128
3129
3130
3131 ForceSendFields []string `json:"-"`
3132
3133
3134
3135
3136 NullFields []string `json:"-"`
3137 }
3138
3139 func (s *BudgetSummary) MarshalJSON() ([]byte, error) {
3140 type NoMethod BudgetSummary
3141 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3142 }
3143
3144
3145
3146 type BulkEditAdvertiserAssignedTargetingOptionsRequest struct {
3147
3148
3149
3150
3151
3152 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"`
3153
3154
3155
3156
3157
3158 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"`
3159
3160
3161
3162
3163
3164 ForceSendFields []string `json:"-"`
3165
3166
3167
3168
3169 NullFields []string `json:"-"`
3170 }
3171
3172 func (s *BulkEditAdvertiserAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
3173 type NoMethod BulkEditAdvertiserAssignedTargetingOptionsRequest
3174 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3175 }
3176
3177 type BulkEditAdvertiserAssignedTargetingOptionsResponse struct {
3178
3179
3180 CreatedAssignedTargetingOptions []*AssignedTargetingOption `json:"createdAssignedTargetingOptions,omitempty"`
3181
3182
3183 googleapi.ServerResponse `json:"-"`
3184
3185
3186
3187
3188
3189
3190 ForceSendFields []string `json:"-"`
3191
3192
3193
3194
3195 NullFields []string `json:"-"`
3196 }
3197
3198 func (s *BulkEditAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3199 type NoMethod BulkEditAdvertiserAssignedTargetingOptionsResponse
3200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3201 }
3202
3203
3204
3205 type BulkEditAssignedInventorySourcesRequest struct {
3206
3207
3208
3209 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3210
3211
3212 CreatedAssignedInventorySources []*AssignedInventorySource `json:"createdAssignedInventorySources,omitempty"`
3213
3214
3215 DeletedAssignedInventorySources googleapi.Int64s `json:"deletedAssignedInventorySources,omitempty"`
3216
3217
3218 PartnerId int64 `json:"partnerId,omitempty,string"`
3219
3220
3221
3222
3223
3224 ForceSendFields []string `json:"-"`
3225
3226
3227
3228
3229 NullFields []string `json:"-"`
3230 }
3231
3232 func (s *BulkEditAssignedInventorySourcesRequest) MarshalJSON() ([]byte, error) {
3233 type NoMethod BulkEditAssignedInventorySourcesRequest
3234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3235 }
3236
3237
3238
3239 type BulkEditAssignedInventorySourcesResponse struct {
3240
3241
3242 AssignedInventorySources []*AssignedInventorySource `json:"assignedInventorySources,omitempty"`
3243
3244
3245 googleapi.ServerResponse `json:"-"`
3246
3247
3248
3249
3250
3251 ForceSendFields []string `json:"-"`
3252
3253
3254
3255
3256 NullFields []string `json:"-"`
3257 }
3258
3259 func (s *BulkEditAssignedInventorySourcesResponse) MarshalJSON() ([]byte, error) {
3260 type NoMethod BulkEditAssignedInventorySourcesResponse
3261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3262 }
3263
3264
3265
3266 type BulkEditAssignedLocationsRequest struct {
3267
3268
3269 CreatedAssignedLocations []*AssignedLocation `json:"createdAssignedLocations,omitempty"`
3270
3271
3272 DeletedAssignedLocations googleapi.Int64s `json:"deletedAssignedLocations,omitempty"`
3273
3274
3275
3276
3277
3278 ForceSendFields []string `json:"-"`
3279
3280
3281
3282
3283 NullFields []string `json:"-"`
3284 }
3285
3286 func (s *BulkEditAssignedLocationsRequest) MarshalJSON() ([]byte, error) {
3287 type NoMethod BulkEditAssignedLocationsRequest
3288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3289 }
3290
3291 type BulkEditAssignedLocationsResponse struct {
3292
3293
3294 AssignedLocations []*AssignedLocation `json:"assignedLocations,omitempty"`
3295
3296
3297 googleapi.ServerResponse `json:"-"`
3298
3299
3300
3301
3302
3303 ForceSendFields []string `json:"-"`
3304
3305
3306
3307
3308 NullFields []string `json:"-"`
3309 }
3310
3311 func (s *BulkEditAssignedLocationsResponse) MarshalJSON() ([]byte, error) {
3312 type NoMethod BulkEditAssignedLocationsResponse
3313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3314 }
3315
3316
3317
3318 type BulkEditAssignedTargetingOptionsRequest struct {
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"`
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"`
3377
3378
3379 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"`
3380
3381
3382
3383
3384
3385 ForceSendFields []string `json:"-"`
3386
3387
3388
3389
3390 NullFields []string `json:"-"`
3391 }
3392
3393 func (s *BulkEditAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
3394 type NoMethod BulkEditAssignedTargetingOptionsRequest
3395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3396 }
3397
3398 type BulkEditAssignedTargetingOptionsResponse struct {
3399
3400 Errors []*Status `json:"errors,omitempty"`
3401
3402 FailedLineItemIds googleapi.Int64s `json:"failedLineItemIds,omitempty"`
3403
3404
3405 UpdatedLineItemIds googleapi.Int64s `json:"updatedLineItemIds,omitempty"`
3406
3407
3408 googleapi.ServerResponse `json:"-"`
3409
3410
3411
3412
3413
3414 ForceSendFields []string `json:"-"`
3415
3416
3417
3418
3419 NullFields []string `json:"-"`
3420 }
3421
3422 func (s *BulkEditAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3423 type NoMethod BulkEditAssignedTargetingOptionsResponse
3424 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3425 }
3426
3427
3428
3429 type BulkEditAssignedUserRolesRequest struct {
3430
3431
3432 CreatedAssignedUserRoles []*AssignedUserRole `json:"createdAssignedUserRoles,omitempty"`
3433
3434
3435
3436 DeletedAssignedUserRoles []string `json:"deletedAssignedUserRoles,omitempty"`
3437
3438
3439
3440
3441
3442 ForceSendFields []string `json:"-"`
3443
3444
3445
3446
3447 NullFields []string `json:"-"`
3448 }
3449
3450 func (s *BulkEditAssignedUserRolesRequest) MarshalJSON() ([]byte, error) {
3451 type NoMethod BulkEditAssignedUserRolesRequest
3452 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3453 }
3454
3455 type BulkEditAssignedUserRolesResponse struct {
3456
3457
3458 CreatedAssignedUserRoles []*AssignedUserRole `json:"createdAssignedUserRoles,omitempty"`
3459
3460
3461 googleapi.ServerResponse `json:"-"`
3462
3463
3464
3465
3466
3467 ForceSendFields []string `json:"-"`
3468
3469
3470
3471
3472 NullFields []string `json:"-"`
3473 }
3474
3475 func (s *BulkEditAssignedUserRolesResponse) MarshalJSON() ([]byte, error) {
3476 type NoMethod BulkEditAssignedUserRolesResponse
3477 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3478 }
3479
3480
3481
3482 type BulkEditNegativeKeywordsRequest struct {
3483
3484
3485 CreatedNegativeKeywords []*NegativeKeyword `json:"createdNegativeKeywords,omitempty"`
3486
3487
3488 DeletedNegativeKeywords []string `json:"deletedNegativeKeywords,omitempty"`
3489
3490
3491
3492
3493
3494 ForceSendFields []string `json:"-"`
3495
3496
3497
3498
3499 NullFields []string `json:"-"`
3500 }
3501
3502 func (s *BulkEditNegativeKeywordsRequest) MarshalJSON() ([]byte, error) {
3503 type NoMethod BulkEditNegativeKeywordsRequest
3504 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3505 }
3506
3507
3508
3509 type BulkEditNegativeKeywordsResponse struct {
3510
3511
3512 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"`
3513
3514
3515 googleapi.ServerResponse `json:"-"`
3516
3517
3518
3519
3520
3521 ForceSendFields []string `json:"-"`
3522
3523
3524
3525
3526 NullFields []string `json:"-"`
3527 }
3528
3529 func (s *BulkEditNegativeKeywordsResponse) MarshalJSON() ([]byte, error) {
3530 type NoMethod BulkEditNegativeKeywordsResponse
3531 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3532 }
3533
3534
3535
3536 type BulkEditPartnerAssignedTargetingOptionsRequest struct {
3537
3538
3539
3540 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"`
3541
3542
3543
3544 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"`
3545
3546
3547
3548
3549
3550 ForceSendFields []string `json:"-"`
3551
3552
3553
3554
3555 NullFields []string `json:"-"`
3556 }
3557
3558 func (s *BulkEditPartnerAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
3559 type NoMethod BulkEditPartnerAssignedTargetingOptionsRequest
3560 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3561 }
3562
3563 type BulkEditPartnerAssignedTargetingOptionsResponse struct {
3564
3565
3566 CreatedAssignedTargetingOptions []*AssignedTargetingOption `json:"createdAssignedTargetingOptions,omitempty"`
3567
3568
3569 googleapi.ServerResponse `json:"-"`
3570
3571
3572
3573
3574
3575
3576 ForceSendFields []string `json:"-"`
3577
3578
3579
3580
3581 NullFields []string `json:"-"`
3582 }
3583
3584 func (s *BulkEditPartnerAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3585 type NoMethod BulkEditPartnerAssignedTargetingOptionsResponse
3586 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3587 }
3588
3589
3590 type BulkEditSitesRequest struct {
3591
3592 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3593
3594 CreatedSites []*Site `json:"createdSites,omitempty"`
3595
3596
3597 DeletedSites []string `json:"deletedSites,omitempty"`
3598
3599 PartnerId int64 `json:"partnerId,omitempty,string"`
3600
3601
3602
3603
3604
3605 ForceSendFields []string `json:"-"`
3606
3607
3608
3609
3610 NullFields []string `json:"-"`
3611 }
3612
3613 func (s *BulkEditSitesRequest) MarshalJSON() ([]byte, error) {
3614 type NoMethod BulkEditSitesRequest
3615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3616 }
3617
3618
3619 type BulkEditSitesResponse struct {
3620
3621
3622 Sites []*Site `json:"sites,omitempty"`
3623
3624
3625 googleapi.ServerResponse `json:"-"`
3626
3627
3628
3629
3630
3631 ForceSendFields []string `json:"-"`
3632
3633
3634
3635
3636 NullFields []string `json:"-"`
3637 }
3638
3639 func (s *BulkEditSitesResponse) MarshalJSON() ([]byte, error) {
3640 type NoMethod BulkEditSitesResponse
3641 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3642 }
3643
3644 type BulkListAdGroupAssignedTargetingOptionsResponse struct {
3645
3646
3647
3648 AdGroupAssignedTargetingOptions []*AdGroupAssignedTargetingOption `json:"adGroupAssignedTargetingOptions,omitempty"`
3649
3650
3651
3652
3653
3654 NextPageToken string `json:"nextPageToken,omitempty"`
3655
3656
3657 googleapi.ServerResponse `json:"-"`
3658
3659
3660
3661
3662
3663
3664 ForceSendFields []string `json:"-"`
3665
3666
3667
3668
3669 NullFields []string `json:"-"`
3670 }
3671
3672 func (s *BulkListAdGroupAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3673 type NoMethod BulkListAdGroupAssignedTargetingOptionsResponse
3674 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3675 }
3676
3677 type BulkListAdvertiserAssignedTargetingOptionsResponse struct {
3678
3679
3680 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
3681
3682
3683
3684
3685
3686 NextPageToken string `json:"nextPageToken,omitempty"`
3687
3688
3689 googleapi.ServerResponse `json:"-"`
3690
3691
3692
3693
3694
3695 ForceSendFields []string `json:"-"`
3696
3697
3698
3699
3700 NullFields []string `json:"-"`
3701 }
3702
3703 func (s *BulkListAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3704 type NoMethod BulkListAdvertiserAssignedTargetingOptionsResponse
3705 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3706 }
3707
3708 type BulkListAssignedTargetingOptionsResponse struct {
3709
3710
3711
3712 LineItemAssignedTargetingOptions []*LineItemAssignedTargetingOption `json:"lineItemAssignedTargetingOptions,omitempty"`
3713
3714
3715
3716
3717
3718 NextPageToken string `json:"nextPageToken,omitempty"`
3719
3720
3721 googleapi.ServerResponse `json:"-"`
3722
3723
3724
3725
3726
3727
3728 ForceSendFields []string `json:"-"`
3729
3730
3731
3732
3733
3734 NullFields []string `json:"-"`
3735 }
3736
3737 func (s *BulkListAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3738 type NoMethod BulkListAssignedTargetingOptionsResponse
3739 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3740 }
3741
3742 type BulkListCampaignAssignedTargetingOptionsResponse struct {
3743
3744
3745 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
3746
3747
3748
3749
3750
3751 NextPageToken string `json:"nextPageToken,omitempty"`
3752
3753
3754 googleapi.ServerResponse `json:"-"`
3755
3756
3757
3758
3759
3760 ForceSendFields []string `json:"-"`
3761
3762
3763
3764
3765 NullFields []string `json:"-"`
3766 }
3767
3768 func (s *BulkListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3769 type NoMethod BulkListCampaignAssignedTargetingOptionsResponse
3770 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3771 }
3772
3773 type BulkListInsertionOrderAssignedTargetingOptionsResponse struct {
3774
3775
3776 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
3777
3778
3779
3780
3781
3782 NextPageToken string `json:"nextPageToken,omitempty"`
3783
3784
3785 googleapi.ServerResponse `json:"-"`
3786
3787
3788
3789
3790
3791 ForceSendFields []string `json:"-"`
3792
3793
3794
3795
3796 NullFields []string `json:"-"`
3797 }
3798
3799 func (s *BulkListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
3800 type NoMethod BulkListInsertionOrderAssignedTargetingOptionsResponse
3801 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3802 }
3803
3804
3805
3806 type BulkUpdateLineItemsRequest struct {
3807
3808 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"`
3809
3810
3811
3812 TargetLineItem *LineItem `json:"targetLineItem,omitempty"`
3813
3814
3815 UpdateMask string `json:"updateMask,omitempty"`
3816
3817
3818
3819
3820
3821 ForceSendFields []string `json:"-"`
3822
3823
3824
3825
3826 NullFields []string `json:"-"`
3827 }
3828
3829 func (s *BulkUpdateLineItemsRequest) MarshalJSON() ([]byte, error) {
3830 type NoMethod BulkUpdateLineItemsRequest
3831 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3832 }
3833
3834
3835
3836 type BulkUpdateLineItemsResponse struct {
3837
3838 Errors []*Status `json:"errors,omitempty"`
3839
3840 FailedLineItemIds googleapi.Int64s `json:"failedLineItemIds,omitempty"`
3841
3842
3843
3844
3845 SkippedLineItemIds googleapi.Int64s `json:"skippedLineItemIds,omitempty"`
3846
3847 UpdatedLineItemIds googleapi.Int64s `json:"updatedLineItemIds,omitempty"`
3848
3849
3850 googleapi.ServerResponse `json:"-"`
3851
3852
3853
3854
3855
3856 ForceSendFields []string `json:"-"`
3857
3858
3859
3860
3861 NullFields []string `json:"-"`
3862 }
3863
3864 func (s *BulkUpdateLineItemsResponse) MarshalJSON() ([]byte, error) {
3865 type NoMethod BulkUpdateLineItemsResponse
3866 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3867 }
3868
3869
3870 type BumperAd struct {
3871
3872 CommonInStreamAttribute *CommonInStreamAttribute `json:"commonInStreamAttribute,omitempty"`
3873
3874
3875
3876
3877
3878 ForceSendFields []string `json:"-"`
3879
3880
3881
3882
3883 NullFields []string `json:"-"`
3884 }
3885
3886 func (s *BumperAd) MarshalJSON() ([]byte, error) {
3887 type NoMethod BumperAd
3888 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3889 }
3890
3891
3892
3893
3894
3895 type BusinessChainAssignedTargetingOptionDetails struct {
3896
3897
3898 DisplayName string `json:"displayName,omitempty"`
3899
3900
3901
3902
3903
3904
3905 ProximityRadiusAmount float64 `json:"proximityRadiusAmount,omitempty"`
3906
3907
3908
3909
3910
3911
3912
3913
3914 ProximityRadiusUnit string `json:"proximityRadiusUnit,omitempty"`
3915
3916
3917
3918 TargetingOptionId string `json:"targetingOptionId,omitempty"`
3919
3920
3921
3922
3923
3924 ForceSendFields []string `json:"-"`
3925
3926
3927
3928
3929 NullFields []string `json:"-"`
3930 }
3931
3932 func (s *BusinessChainAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
3933 type NoMethod BusinessChainAssignedTargetingOptionDetails
3934 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3935 }
3936
3937 func (s *BusinessChainAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error {
3938 type NoMethod BusinessChainAssignedTargetingOptionDetails
3939 var s1 struct {
3940 ProximityRadiusAmount gensupport.JSONFloat64 `json:"proximityRadiusAmount"`
3941 *NoMethod
3942 }
3943 s1.NoMethod = (*NoMethod)(s)
3944 if err := json.Unmarshal(data, &s1); err != nil {
3945 return err
3946 }
3947 s.ProximityRadiusAmount = float64(s1.ProximityRadiusAmount)
3948 return nil
3949 }
3950
3951
3952
3953 type BusinessChainSearchTerms struct {
3954
3955
3956 BusinessChainQuery string `json:"businessChainQuery,omitempty"`
3957
3958
3959 RegionQuery string `json:"regionQuery,omitempty"`
3960
3961
3962
3963
3964
3965 ForceSendFields []string `json:"-"`
3966
3967
3968
3969
3970 NullFields []string `json:"-"`
3971 }
3972
3973 func (s *BusinessChainSearchTerms) MarshalJSON() ([]byte, error) {
3974 type NoMethod BusinessChainSearchTerms
3975 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3976 }
3977
3978
3979
3980
3981 type BusinessChainTargetingOptionDetails struct {
3982
3983
3984 BusinessChain string `json:"businessChain,omitempty"`
3985
3986
3987 GeoRegion string `json:"geoRegion,omitempty"`
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027 GeoRegionType string `json:"geoRegionType,omitempty"`
4028
4029
4030
4031
4032
4033 ForceSendFields []string `json:"-"`
4034
4035
4036
4037
4038 NullFields []string `json:"-"`
4039 }
4040
4041 func (s *BusinessChainTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4042 type NoMethod BusinessChainTargetingOptionDetails
4043 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4044 }
4045
4046
4047 type Campaign struct {
4048
4049
4050 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
4051
4052
4053 CampaignBudgets []*CampaignBudget `json:"campaignBudgets,omitempty"`
4054
4055 CampaignFlight *CampaignFlight `json:"campaignFlight,omitempty"`
4056
4057 CampaignGoal *CampaignGoal `json:"campaignGoal,omitempty"`
4058
4059
4060 CampaignId int64 `json:"campaignId,omitempty,string"`
4061
4062
4063 DisplayName string `json:"displayName,omitempty"`
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083 EntityStatus string `json:"entityStatus,omitempty"`
4084
4085 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
4086
4087 Name string `json:"name,omitempty"`
4088
4089
4090 UpdateTime string `json:"updateTime,omitempty"`
4091
4092
4093 googleapi.ServerResponse `json:"-"`
4094
4095
4096
4097
4098
4099 ForceSendFields []string `json:"-"`
4100
4101
4102
4103
4104 NullFields []string `json:"-"`
4105 }
4106
4107 func (s *Campaign) MarshalJSON() ([]byte, error) {
4108 type NoMethod Campaign
4109 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4110 }
4111
4112
4113 type CampaignBudget struct {
4114
4115
4116
4117 BudgetAmountMicros int64 `json:"budgetAmountMicros,omitempty,string"`
4118
4119
4120
4121 BudgetId int64 `json:"budgetId,omitempty,string"`
4122
4123
4124
4125
4126
4127
4128
4129
4130 BudgetUnit string `json:"budgetUnit,omitempty"`
4131
4132
4133
4134
4135 DateRange *DateRange `json:"dateRange,omitempty"`
4136
4137
4138 DisplayName string `json:"displayName,omitempty"`
4139
4140
4141
4142
4143
4144 ExternalBudgetId string `json:"externalBudgetId,omitempty"`
4145
4146
4147
4148
4149
4150
4151
4152 ExternalBudgetSource string `json:"externalBudgetSource,omitempty"`
4153
4154
4155
4156
4157
4158 InvoiceGroupingId string `json:"invoiceGroupingId,omitempty"`
4159
4160
4161
4162 PrismaConfig *PrismaConfig `json:"prismaConfig,omitempty"`
4163
4164
4165
4166
4167
4168 ForceSendFields []string `json:"-"`
4169
4170
4171
4172
4173 NullFields []string `json:"-"`
4174 }
4175
4176 func (s *CampaignBudget) MarshalJSON() ([]byte, error) {
4177 type NoMethod CampaignBudget
4178 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4179 }
4180
4181
4182
4183 type CampaignFlight struct {
4184
4185
4186
4187
4188
4189
4190
4191
4192 PlannedDates *DateRange `json:"plannedDates,omitempty"`
4193
4194
4195
4196
4197
4198 PlannedSpendAmountMicros int64 `json:"plannedSpendAmountMicros,omitempty,string"`
4199
4200
4201
4202
4203
4204 ForceSendFields []string `json:"-"`
4205
4206
4207
4208
4209 NullFields []string `json:"-"`
4210 }
4211
4212 func (s *CampaignFlight) MarshalJSON() ([]byte, error) {
4213 type NoMethod CampaignFlight
4214 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4215 }
4216
4217
4218 type CampaignGoal struct {
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229 CampaignGoalType string `json:"campaignGoalType,omitempty"`
4230
4231
4232
4233
4234
4235 PerformanceGoal *PerformanceGoal `json:"performanceGoal,omitempty"`
4236
4237
4238
4239
4240
4241 ForceSendFields []string `json:"-"`
4242
4243
4244
4245
4246 NullFields []string `json:"-"`
4247 }
4248
4249 func (s *CampaignGoal) MarshalJSON() ([]byte, error) {
4250 type NoMethod CampaignGoal
4251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4252 }
4253
4254
4255
4256
4257
4258 type CarrierAndIspAssignedTargetingOptionDetails struct {
4259
4260 DisplayName string `json:"displayName,omitempty"`
4261
4262
4263
4264 Negative bool `json:"negative,omitempty"`
4265
4266
4267 TargetingOptionId string `json:"targetingOptionId,omitempty"`
4268
4269
4270
4271
4272
4273 ForceSendFields []string `json:"-"`
4274
4275
4276
4277
4278 NullFields []string `json:"-"`
4279 }
4280
4281 func (s *CarrierAndIspAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4282 type NoMethod CarrierAndIspAssignedTargetingOptionDetails
4283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4284 }
4285
4286
4287
4288
4289 type CarrierAndIspTargetingOptionDetails struct {
4290
4291 DisplayName string `json:"displayName,omitempty"`
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301 Type string `json:"type,omitempty"`
4302
4303
4304
4305
4306
4307 ForceSendFields []string `json:"-"`
4308
4309
4310
4311
4312 NullFields []string `json:"-"`
4313 }
4314
4315 func (s *CarrierAndIspTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4316 type NoMethod CarrierAndIspTargetingOptionDetails
4317 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4318 }
4319
4320
4321
4322
4323 type CategoryAssignedTargetingOptionDetails struct {
4324
4325 DisplayName string `json:"displayName,omitempty"`
4326
4327 Negative bool `json:"negative,omitempty"`
4328
4329
4330 TargetingOptionId string `json:"targetingOptionId,omitempty"`
4331
4332
4333
4334
4335
4336 ForceSendFields []string `json:"-"`
4337
4338
4339
4340
4341 NullFields []string `json:"-"`
4342 }
4343
4344 func (s *CategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4345 type NoMethod CategoryAssignedTargetingOptionDetails
4346 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4347 }
4348
4349
4350
4351
4352 type CategoryTargetingOptionDetails struct {
4353
4354 DisplayName string `json:"displayName,omitempty"`
4355
4356
4357
4358
4359
4360 ForceSendFields []string `json:"-"`
4361
4362
4363
4364
4365 NullFields []string `json:"-"`
4366 }
4367
4368 func (s *CategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4369 type NoMethod CategoryTargetingOptionDetails
4370 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4371 }
4372
4373
4374
4375 type Channel struct {
4376
4377 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
4378
4379
4380 ChannelId int64 `json:"channelId,omitempty,string"`
4381
4382
4383 DisplayName string `json:"displayName,omitempty"`
4384
4385 Name string `json:"name,omitempty"`
4386
4387
4388 NegativelyTargetedLineItemCount int64 `json:"negativelyTargetedLineItemCount,omitempty,string"`
4389
4390 PartnerId int64 `json:"partnerId,omitempty,string"`
4391
4392
4393 PositivelyTargetedLineItemCount int64 `json:"positivelyTargetedLineItemCount,omitempty,string"`
4394
4395
4396 googleapi.ServerResponse `json:"-"`
4397
4398
4399
4400
4401
4402 ForceSendFields []string `json:"-"`
4403
4404
4405
4406
4407 NullFields []string `json:"-"`
4408 }
4409
4410 func (s *Channel) MarshalJSON() ([]byte, error) {
4411 type NoMethod Channel
4412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4413 }
4414
4415
4416
4417
4418 type ChannelAssignedTargetingOptionDetails struct {
4419
4420
4421
4422
4423 ChannelId int64 `json:"channelId,omitempty,string"`
4424
4425
4426 Negative bool `json:"negative,omitempty"`
4427
4428
4429
4430
4431
4432 ForceSendFields []string `json:"-"`
4433
4434
4435
4436
4437 NullFields []string `json:"-"`
4438 }
4439
4440 func (s *ChannelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4441 type NoMethod ChannelAssignedTargetingOptionDetails
4442 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4443 }
4444
4445
4446
4447 type CmHybridConfig struct {
4448
4449
4450 CmAccountId int64 `json:"cmAccountId,omitempty,string"`
4451
4452
4453 CmAdvertiserIds googleapi.Int64s `json:"cmAdvertiserIds,omitempty"`
4454
4455
4456 CmFloodlightConfigId int64 `json:"cmFloodlightConfigId,omitempty,string"`
4457
4458
4459
4460
4461 CmFloodlightLinkingAuthorized bool `json:"cmFloodlightLinkingAuthorized,omitempty"`
4462
4463
4464
4465
4466
4467 CmSyncableSiteIds googleapi.Int64s `json:"cmSyncableSiteIds,omitempty"`
4468
4469 Dv360ToCmCostReportingEnabled bool `json:"dv360ToCmCostReportingEnabled,omitempty"`
4470
4471
4472 Dv360ToCmDataSharingEnabled bool `json:"dv360ToCmDataSharingEnabled,omitempty"`
4473
4474
4475
4476
4477
4478 ForceSendFields []string `json:"-"`
4479
4480
4481
4482
4483 NullFields []string `json:"-"`
4484 }
4485
4486 func (s *CmHybridConfig) MarshalJSON() ([]byte, error) {
4487 type NoMethod CmHybridConfig
4488 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4489 }
4490
4491
4492 type CmTrackingAd struct {
4493
4494 CmAdId int64 `json:"cmAdId,omitempty,string"`
4495
4496 CmCreativeId int64 `json:"cmCreativeId,omitempty,string"`
4497
4498 CmPlacementId int64 `json:"cmPlacementId,omitempty,string"`
4499
4500
4501
4502
4503
4504 ForceSendFields []string `json:"-"`
4505
4506
4507
4508
4509 NullFields []string `json:"-"`
4510 }
4511
4512 func (s *CmTrackingAd) MarshalJSON() ([]byte, error) {
4513 type NoMethod CmTrackingAd
4514 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4515 }
4516
4517
4518 type CombinedAudience struct {
4519
4520
4521 CombinedAudienceId int64 `json:"combinedAudienceId,omitempty,string"`
4522
4523 DisplayName string `json:"displayName,omitempty"`
4524
4525 Name string `json:"name,omitempty"`
4526
4527
4528 googleapi.ServerResponse `json:"-"`
4529
4530
4531
4532
4533
4534 ForceSendFields []string `json:"-"`
4535
4536
4537
4538
4539 NullFields []string `json:"-"`
4540 }
4541
4542 func (s *CombinedAudience) MarshalJSON() ([]byte, error) {
4543 type NoMethod CombinedAudience
4544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4545 }
4546
4547
4548
4549 type CombinedAudienceGroup struct {
4550
4551
4552
4553
4554 Settings []*CombinedAudienceTargetingSetting `json:"settings,omitempty"`
4555
4556
4557
4558
4559
4560 ForceSendFields []string `json:"-"`
4561
4562
4563
4564
4565 NullFields []string `json:"-"`
4566 }
4567
4568 func (s *CombinedAudienceGroup) MarshalJSON() ([]byte, error) {
4569 type NoMethod CombinedAudienceGroup
4570 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4571 }
4572
4573
4574
4575 type CombinedAudienceTargetingSetting struct {
4576
4577
4578 CombinedAudienceId int64 `json:"combinedAudienceId,omitempty,string"`
4579
4580
4581
4582
4583
4584 ForceSendFields []string `json:"-"`
4585
4586
4587
4588
4589 NullFields []string `json:"-"`
4590 }
4591
4592 func (s *CombinedAudienceTargetingSetting) MarshalJSON() ([]byte, error) {
4593 type NoMethod CombinedAudienceTargetingSetting
4594 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4595 }
4596
4597
4598
4599 type CommonInStreamAttribute struct {
4600
4601 ActionButtonLabel string `json:"actionButtonLabel,omitempty"`
4602
4603 ActionHeadline string `json:"actionHeadline,omitempty"`
4604
4605 CompanionBanner *ImageAsset `json:"companionBanner,omitempty"`
4606
4607 DisplayUrl string `json:"displayUrl,omitempty"`
4608
4609
4610 FinalUrl string `json:"finalUrl,omitempty"`
4611
4612 TrackingUrl string `json:"trackingUrl,omitempty"`
4613
4614 Video *YoutubeVideoDetails `json:"video,omitempty"`
4615
4616
4617
4618
4619
4620 ForceSendFields []string `json:"-"`
4621
4622
4623
4624
4625 NullFields []string `json:"-"`
4626 }
4627
4628 func (s *CommonInStreamAttribute) MarshalJSON() ([]byte, error) {
4629 type NoMethod CommonInStreamAttribute
4630 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4631 }
4632
4633
4634 type Consent struct {
4635
4636
4637
4638
4639
4640
4641
4642 AdPersonalization string `json:"adPersonalization,omitempty"`
4643
4644
4645
4646
4647
4648
4649
4650 AdUserData string `json:"adUserData,omitempty"`
4651
4652
4653
4654
4655
4656 ForceSendFields []string `json:"-"`
4657
4658
4659
4660
4661 NullFields []string `json:"-"`
4662 }
4663
4664 func (s *Consent) MarshalJSON() ([]byte, error) {
4665 type NoMethod Consent
4666 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4667 }
4668
4669
4670 type ContactInfo struct {
4671
4672
4673 CountryCode string `json:"countryCode,omitempty"`
4674
4675
4676 HashedEmails []string `json:"hashedEmails,omitempty"`
4677
4678
4679
4680
4681 HashedFirstName string `json:"hashedFirstName,omitempty"`
4682
4683
4684
4685
4686 HashedLastName string `json:"hashedLastName,omitempty"`
4687
4688
4689
4690 HashedPhoneNumbers []string `json:"hashedPhoneNumbers,omitempty"`
4691
4692
4693 ZipCodes []string `json:"zipCodes,omitempty"`
4694
4695
4696
4697
4698
4699 ForceSendFields []string `json:"-"`
4700
4701
4702
4703
4704 NullFields []string `json:"-"`
4705 }
4706
4707 func (s *ContactInfo) MarshalJSON() ([]byte, error) {
4708 type NoMethod ContactInfo
4709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4710 }
4711
4712
4713
4714 type ContactInfoList struct {
4715
4716
4717
4718
4719 Consent *Consent `json:"consent,omitempty"`
4720
4721
4722
4723 ContactInfos []*ContactInfo `json:"contactInfos,omitempty"`
4724
4725
4726
4727
4728
4729 ForceSendFields []string `json:"-"`
4730
4731
4732
4733
4734 NullFields []string `json:"-"`
4735 }
4736
4737 func (s *ContactInfoList) MarshalJSON() ([]byte, error) {
4738 type NoMethod ContactInfoList
4739 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4740 }
4741
4742
4743
4744
4745
4746
4747
4748 type ContentDurationAssignedTargetingOptionDetails struct {
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762 ContentDuration string `json:"contentDuration,omitempty"`
4763
4764
4765 TargetingOptionId string `json:"targetingOptionId,omitempty"`
4766
4767
4768
4769
4770
4771 ForceSendFields []string `json:"-"`
4772
4773
4774
4775
4776 NullFields []string `json:"-"`
4777 }
4778
4779 func (s *ContentDurationAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4780 type NoMethod ContentDurationAssignedTargetingOptionDetails
4781 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4782 }
4783
4784
4785
4786
4787 type ContentDurationTargetingOptionDetails struct {
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801 ContentDuration string `json:"contentDuration,omitempty"`
4802
4803
4804
4805
4806
4807 ForceSendFields []string `json:"-"`
4808
4809
4810
4811
4812 NullFields []string `json:"-"`
4813 }
4814
4815 func (s *ContentDurationTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4816 type NoMethod ContentDurationTargetingOptionDetails
4817 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4818 }
4819
4820
4821
4822
4823
4824
4825
4826 type ContentGenreAssignedTargetingOptionDetails struct {
4827
4828 DisplayName string `json:"displayName,omitempty"`
4829
4830 Negative bool `json:"negative,omitempty"`
4831
4832
4833 TargetingOptionId string `json:"targetingOptionId,omitempty"`
4834
4835
4836
4837
4838
4839 ForceSendFields []string `json:"-"`
4840
4841
4842
4843
4844 NullFields []string `json:"-"`
4845 }
4846
4847 func (s *ContentGenreAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4848 type NoMethod ContentGenreAssignedTargetingOptionDetails
4849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4850 }
4851
4852
4853
4854
4855 type ContentGenreTargetingOptionDetails struct {
4856
4857 DisplayName string `json:"displayName,omitempty"`
4858
4859
4860
4861
4862
4863 ForceSendFields []string `json:"-"`
4864
4865
4866
4867
4868 NullFields []string `json:"-"`
4869 }
4870
4871 func (s *ContentGenreTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4872 type NoMethod ContentGenreTargetingOptionDetails
4873 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4874 }
4875
4876
4877
4878
4879
4880 type ContentInstreamPositionAssignedTargetingOptionDetails struct {
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897 AdType string `json:"adType,omitempty"`
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912 ContentInstreamPosition string `json:"contentInstreamPosition,omitempty"`
4913
4914
4915
4916
4917
4918 ForceSendFields []string `json:"-"`
4919
4920
4921
4922
4923 NullFields []string `json:"-"`
4924 }
4925
4926 func (s *ContentInstreamPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4927 type NoMethod ContentInstreamPositionAssignedTargetingOptionDetails
4928 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4929 }
4930
4931
4932
4933
4934
4935 type ContentInstreamPositionTargetingOptionDetails struct {
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949 ContentInstreamPosition string `json:"contentInstreamPosition,omitempty"`
4950
4951
4952
4953
4954
4955 ForceSendFields []string `json:"-"`
4956
4957
4958
4959
4960 NullFields []string `json:"-"`
4961 }
4962
4963 func (s *ContentInstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
4964 type NoMethod ContentInstreamPositionTargetingOptionDetails
4965 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4966 }
4967
4968
4969
4970
4971
4972 type ContentOutstreamPositionAssignedTargetingOptionDetails struct {
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989 AdType string `json:"adType,omitempty"`
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007 ContentOutstreamPosition string `json:"contentOutstreamPosition,omitempty"`
5008
5009
5010
5011
5012
5013 ForceSendFields []string `json:"-"`
5014
5015
5016
5017
5018 NullFields []string `json:"-"`
5019 }
5020
5021 func (s *ContentOutstreamPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5022 type NoMethod ContentOutstreamPositionAssignedTargetingOptionDetails
5023 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5024 }
5025
5026
5027
5028
5029
5030 type ContentOutstreamPositionTargetingOptionDetails struct {
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048 ContentOutstreamPosition string `json:"contentOutstreamPosition,omitempty"`
5049
5050
5051
5052
5053
5054 ForceSendFields []string `json:"-"`
5055
5056
5057
5058
5059 NullFields []string `json:"-"`
5060 }
5061
5062 func (s *ContentOutstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5063 type NoMethod ContentOutstreamPositionTargetingOptionDetails
5064 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5065 }
5066
5067
5068
5069
5070
5071
5072
5073 type ContentStreamTypeAssignedTargetingOptionDetails struct {
5074
5075
5076
5077
5078
5079
5080
5081
5082 ContentStreamType string `json:"contentStreamType,omitempty"`
5083
5084
5085 TargetingOptionId string `json:"targetingOptionId,omitempty"`
5086
5087
5088
5089
5090
5091 ForceSendFields []string `json:"-"`
5092
5093
5094
5095
5096 NullFields []string `json:"-"`
5097 }
5098
5099 func (s *ContentStreamTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5100 type NoMethod ContentStreamTypeAssignedTargetingOptionDetails
5101 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5102 }
5103
5104
5105
5106
5107 type ContentStreamTypeTargetingOptionDetails struct {
5108
5109
5110
5111
5112
5113
5114
5115
5116 ContentStreamType string `json:"contentStreamType,omitempty"`
5117
5118
5119
5120
5121
5122 ForceSendFields []string `json:"-"`
5123
5124
5125
5126
5127 NullFields []string `json:"-"`
5128 }
5129
5130 func (s *ContentStreamTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
5131 type NoMethod ContentStreamTypeTargetingOptionDetails
5132 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5133 }
5134
5135
5136
5137
5138 type ConversionCountingConfig struct {
5139
5140
5141
5142
5143 FloodlightActivityConfigs []*TrackingFloodlightActivityConfig `json:"floodlightActivityConfigs,omitempty"`
5144
5145
5146
5147
5148 PostViewCountPercentageMillis int64 `json:"postViewCountPercentageMillis,omitempty,string"`
5149
5150
5151
5152
5153
5154 ForceSendFields []string `json:"-"`
5155
5156
5157
5158
5159 NullFields []string `json:"-"`
5160 }
5161
5162 func (s *ConversionCountingConfig) MarshalJSON() ([]byte, error) {
5163 type NoMethod ConversionCountingConfig
5164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5165 }
5166
5167
5168 type CounterEvent struct {
5169
5170 Name string `json:"name,omitempty"`
5171
5172
5173 ReportingName string `json:"reportingName,omitempty"`
5174
5175
5176
5177
5178
5179 ForceSendFields []string `json:"-"`
5180
5181
5182
5183
5184 NullFields []string `json:"-"`
5185 }
5186
5187 func (s *CounterEvent) MarshalJSON() ([]byte, error) {
5188 type NoMethod CounterEvent
5189 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5190 }
5191
5192
5193 type CreateAssetRequest struct {
5194
5195
5196 Filename string `json:"filename,omitempty"`
5197
5198
5199
5200
5201
5202 ForceSendFields []string `json:"-"`
5203
5204
5205
5206
5207 NullFields []string `json:"-"`
5208 }
5209
5210 func (s *CreateAssetRequest) MarshalJSON() ([]byte, error) {
5211 type NoMethod CreateAssetRequest
5212 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5213 }
5214
5215
5216 type CreateAssetResponse struct {
5217
5218 Asset *Asset `json:"asset,omitempty"`
5219
5220
5221 googleapi.ServerResponse `json:"-"`
5222
5223
5224
5225
5226
5227 ForceSendFields []string `json:"-"`
5228
5229
5230
5231
5232 NullFields []string `json:"-"`
5233 }
5234
5235 func (s *CreateAssetResponse) MarshalJSON() ([]byte, error) {
5236 type NoMethod CreateAssetResponse
5237 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5238 }
5239
5240
5241
5242 type CreateAssignedTargetingOptionsRequest struct {
5243
5244
5245 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356 TargetingType string `json:"targetingType,omitempty"`
5357
5358
5359
5360
5361
5362 ForceSendFields []string `json:"-"`
5363
5364
5365
5366
5367 NullFields []string `json:"-"`
5368 }
5369
5370 func (s *CreateAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
5371 type NoMethod CreateAssignedTargetingOptionsRequest
5372 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5373 }
5374
5375
5376
5377 type CreateSdfDownloadTaskRequest struct {
5378
5379 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5380
5381 IdFilter *IdFilter `json:"idFilter,omitempty"`
5382
5383 InventorySourceFilter *InventorySourceFilter `json:"inventorySourceFilter,omitempty"`
5384
5385
5386
5387 ParentEntityFilter *ParentEntityFilter `json:"parentEntityFilter,omitempty"`
5388
5389 PartnerId int64 `json:"partnerId,omitempty,string"`
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412 Version string `json:"version,omitempty"`
5413
5414
5415
5416
5417
5418 ForceSendFields []string `json:"-"`
5419
5420
5421
5422
5423 NullFields []string `json:"-"`
5424 }
5425
5426 func (s *CreateSdfDownloadTaskRequest) MarshalJSON() ([]byte, error) {
5427 type NoMethod CreateSdfDownloadTaskRequest
5428 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5429 }
5430
5431
5432 type Creative struct {
5433
5434
5435
5436
5437
5438
5439 AdditionalDimensions []*Dimensions `json:"additionalDimensions,omitempty"`
5440
5441
5442 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5443
5444
5445 AppendedTag string `json:"appendedTag,omitempty"`
5446
5447 Assets []*AssetAssociation `json:"assets,omitempty"`
5448
5449
5450
5451 CmPlacementId int64 `json:"cmPlacementId,omitempty,string"`
5452
5453
5454
5455
5456
5457 CmTrackingAd *CmTrackingAd `json:"cmTrackingAd,omitempty"`
5458
5459
5460
5461
5462
5463
5464
5465 CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
5466
5467
5468
5469
5470
5471
5472 CounterEvents []*CounterEvent `json:"counterEvents,omitempty"`
5473
5474
5475 CreateTime string `json:"createTime,omitempty"`
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487 CreativeAttributes []string `json:"creativeAttributes,omitempty"`
5488
5489
5490 CreativeId int64 `json:"creativeId,omitempty,string"`
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535 CreativeType string `json:"creativeType,omitempty"`
5536
5537
5538
5539
5540 Dimensions *Dimensions `json:"dimensions,omitempty"`
5541
5542
5543 DisplayName string `json:"displayName,omitempty"`
5544
5545 Dynamic bool `json:"dynamic,omitempty"`
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563 EntityStatus string `json:"entityStatus,omitempty"`
5564
5565
5566
5567
5568
5569
5570
5571 ExitEvents []*ExitEvent `json:"exitEvents,omitempty"`
5572
5573
5574
5575
5576
5577 ExpandOnHover bool `json:"expandOnHover,omitempty"`
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600 ExpandingDirection string `json:"expandingDirection,omitempty"`
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622 HostingSource string `json:"hostingSource,omitempty"`
5623
5624
5625
5626
5627
5628 Html5Video bool `json:"html5Video,omitempty"`
5629
5630
5631
5632 IasCampaignMonitoring bool `json:"iasCampaignMonitoring,omitempty"`
5633
5634
5635
5636 IntegrationCode string `json:"integrationCode,omitempty"`
5637
5638
5639
5640
5641
5642 JsTrackerUrl string `json:"jsTrackerUrl,omitempty"`
5643
5644
5645
5646 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"`
5647
5648
5649
5650 MediaDuration string `json:"mediaDuration,omitempty"`
5651
5652
5653
5654
5655
5656 Mp3Audio bool `json:"mp3Audio,omitempty"`
5657
5658 Name string `json:"name,omitempty"`
5659
5660
5661 Notes string `json:"notes,omitempty"`
5662
5663
5664 ObaIcon *ObaIcon `json:"obaIcon,omitempty"`
5665
5666
5667
5668
5669
5670 OggAudio bool `json:"oggAudio,omitempty"`
5671
5672
5673
5674 ProgressOffset *AudioVideoOffset `json:"progressOffset,omitempty"`
5675
5676
5677
5678
5679
5680 RequireHtml5 bool `json:"requireHtml5,omitempty"`
5681
5682
5683
5684
5685
5686
5687
5688 RequireMraid bool `json:"requireMraid,omitempty"`
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699 RequirePingForAttribution bool `json:"requirePingForAttribution,omitempty"`
5700
5701
5702 ReviewStatus *ReviewStatusInfo `json:"reviewStatus,omitempty"`
5703
5704
5705
5706 SkipOffset *AudioVideoOffset `json:"skipOffset,omitempty"`
5707
5708
5709 Skippable bool `json:"skippable,omitempty"`
5710
5711
5712
5713
5714
5715 ThirdPartyTag string `json:"thirdPartyTag,omitempty"`
5716
5717
5718
5719
5720 ThirdPartyUrls []*ThirdPartyUrl `json:"thirdPartyUrls,omitempty"`
5721
5722
5723
5724
5725
5726 TimerEvents []*TimerEvent `json:"timerEvents,omitempty"`
5727
5728
5729
5730
5731
5732
5733
5734 TrackerUrls []string `json:"trackerUrls,omitempty"`
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744 Transcodes []*Transcode `json:"transcodes,omitempty"`
5745
5746
5747
5748
5749
5750 UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
5751
5752
5753 UpdateTime string `json:"updateTime,omitempty"`
5754
5755
5756
5757
5758
5759 VastTagUrl string `json:"vastTagUrl,omitempty"`
5760
5761
5762
5763
5764
5765 Vpaid bool `json:"vpaid,omitempty"`
5766
5767
5768 googleapi.ServerResponse `json:"-"`
5769
5770
5771
5772
5773
5774 ForceSendFields []string `json:"-"`
5775
5776
5777
5778
5779 NullFields []string `json:"-"`
5780 }
5781
5782 func (s *Creative) MarshalJSON() ([]byte, error) {
5783 type NoMethod Creative
5784 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5785 }
5786
5787
5788
5789 type CreativeConfig struct {
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836 CreativeType string `json:"creativeType,omitempty"`
5837
5838
5839 DisplayCreativeConfig *InventorySourceDisplayCreativeConfig `json:"displayCreativeConfig,omitempty"`
5840
5841
5842 VideoCreativeConfig *InventorySourceVideoCreativeConfig `json:"videoCreativeConfig,omitempty"`
5843
5844
5845
5846
5847
5848 ForceSendFields []string `json:"-"`
5849
5850
5851
5852
5853 NullFields []string `json:"-"`
5854 }
5855
5856 func (s *CreativeConfig) MarshalJSON() ([]byte, error) {
5857 type NoMethod CreativeConfig
5858 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5859 }
5860
5861
5862 type CustomBiddingAlgorithm struct {
5863
5864
5865 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5866
5867
5868 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883 CustomBiddingAlgorithmType string `json:"customBiddingAlgorithmType,omitempty"`
5884
5885
5886 DisplayName string `json:"displayName,omitempty"`
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904 EntityStatus string `json:"entityStatus,omitempty"`
5905
5906
5907
5908
5909
5910
5911
5912
5913 ModelDetails []*CustomBiddingModelDetails `json:"modelDetails,omitempty"`
5914
5915 Name string `json:"name,omitempty"`
5916
5917
5918 PartnerId int64 `json:"partnerId,omitempty,string"`
5919
5920
5921
5922
5923
5924
5925
5926
5927 SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
5928
5929
5930 googleapi.ServerResponse `json:"-"`
5931
5932
5933
5934
5935
5936 ForceSendFields []string `json:"-"`
5937
5938
5939
5940
5941 NullFields []string `json:"-"`
5942 }
5943
5944 func (s *CustomBiddingAlgorithm) MarshalJSON() ([]byte, error) {
5945 type NoMethod CustomBiddingAlgorithm
5946 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5947 }
5948
5949
5950 type CustomBiddingAlgorithmRules struct {
5951
5952
5953 Active bool `json:"active,omitempty"`
5954
5955 CreateTime string `json:"createTime,omitempty"`
5956
5957
5958 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
5959
5960
5961 CustomBiddingAlgorithmRulesId int64 `json:"customBiddingAlgorithmRulesId,omitempty,string"`
5962
5963
5964 Error *CustomBiddingAlgorithmRulesError `json:"error,omitempty"`
5965
5966 Name string `json:"name,omitempty"`
5967
5968
5969 Rules *CustomBiddingAlgorithmRulesRef `json:"rules,omitempty"`
5970
5971
5972
5973
5974
5975
5976
5977
5978 State string `json:"state,omitempty"`
5979
5980
5981 googleapi.ServerResponse `json:"-"`
5982
5983
5984
5985
5986
5987 ForceSendFields []string `json:"-"`
5988
5989
5990
5991
5992 NullFields []string `json:"-"`
5993 }
5994
5995 func (s *CustomBiddingAlgorithmRules) MarshalJSON() ([]byte, error) {
5996 type NoMethod CustomBiddingAlgorithmRules
5997 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5998 }
5999
6000
6001
6002 type CustomBiddingAlgorithmRulesError struct {
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012 ErrorCode string `json:"errorCode,omitempty"`
6013
6014
6015
6016
6017
6018 ForceSendFields []string `json:"-"`
6019
6020
6021
6022
6023 NullFields []string `json:"-"`
6024 }
6025
6026 func (s *CustomBiddingAlgorithmRulesError) MarshalJSON() ([]byte, error) {
6027 type NoMethod CustomBiddingAlgorithmRulesError
6028 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6029 }
6030
6031
6032
6033
6034 type CustomBiddingAlgorithmRulesRef struct {
6035
6036
6037
6038
6039 ResourceName string `json:"resourceName,omitempty"`
6040
6041
6042 googleapi.ServerResponse `json:"-"`
6043
6044
6045
6046
6047
6048 ForceSendFields []string `json:"-"`
6049
6050
6051
6052
6053 NullFields []string `json:"-"`
6054 }
6055
6056 func (s *CustomBiddingAlgorithmRulesRef) MarshalJSON() ([]byte, error) {
6057 type NoMethod CustomBiddingAlgorithmRulesRef
6058 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6059 }
6060
6061
6062
6063 type CustomBiddingModelDetails struct {
6064
6065 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082 ReadinessState string `json:"readinessState,omitempty"`
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098 SuspensionState string `json:"suspensionState,omitempty"`
6099
6100
6101
6102
6103
6104 ForceSendFields []string `json:"-"`
6105
6106
6107
6108
6109 NullFields []string `json:"-"`
6110 }
6111
6112 func (s *CustomBiddingModelDetails) MarshalJSON() ([]byte, error) {
6113 type NoMethod CustomBiddingModelDetails
6114 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6115 }
6116
6117
6118 type CustomBiddingScript struct {
6119
6120
6121 Active bool `json:"active,omitempty"`
6122
6123 CreateTime string `json:"createTime,omitempty"`
6124
6125
6126 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
6127
6128
6129 CustomBiddingScriptId int64 `json:"customBiddingScriptId,omitempty,string"`
6130
6131
6132 Errors []*ScriptError `json:"errors,omitempty"`
6133
6134 Name string `json:"name,omitempty"`
6135
6136 Script *CustomBiddingScriptRef `json:"script,omitempty"`
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146 State string `json:"state,omitempty"`
6147
6148
6149 googleapi.ServerResponse `json:"-"`
6150
6151
6152
6153
6154
6155 ForceSendFields []string `json:"-"`
6156
6157
6158
6159
6160 NullFields []string `json:"-"`
6161 }
6162
6163 func (s *CustomBiddingScript) MarshalJSON() ([]byte, error) {
6164 type NoMethod CustomBiddingScript
6165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6166 }
6167
6168
6169
6170 type CustomBiddingScriptRef struct {
6171
6172
6173
6174
6175 ResourceName string `json:"resourceName,omitempty"`
6176
6177
6178 googleapi.ServerResponse `json:"-"`
6179
6180
6181
6182
6183
6184 ForceSendFields []string `json:"-"`
6185
6186
6187
6188
6189 NullFields []string `json:"-"`
6190 }
6191
6192 func (s *CustomBiddingScriptRef) MarshalJSON() ([]byte, error) {
6193 type NoMethod CustomBiddingScriptRef
6194 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6195 }
6196
6197
6198 type CustomLabel struct {
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208 Key string `json:"key,omitempty"`
6209
6210 Value string `json:"value,omitempty"`
6211
6212
6213
6214
6215
6216 ForceSendFields []string `json:"-"`
6217
6218
6219
6220
6221 NullFields []string `json:"-"`
6222 }
6223
6224 func (s *CustomLabel) MarshalJSON() ([]byte, error) {
6225 type NoMethod CustomLabel
6226 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6227 }
6228
6229
6230
6231 type CustomList struct {
6232
6233
6234 CustomListId int64 `json:"customListId,omitempty,string"`
6235
6236 DisplayName string `json:"displayName,omitempty"`
6237
6238 Name string `json:"name,omitempty"`
6239
6240
6241 googleapi.ServerResponse `json:"-"`
6242
6243
6244
6245
6246
6247 ForceSendFields []string `json:"-"`
6248
6249
6250
6251
6252 NullFields []string `json:"-"`
6253 }
6254
6255 func (s *CustomList) MarshalJSON() ([]byte, error) {
6256 type NoMethod CustomList
6257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6258 }
6259
6260
6261
6262 type CustomListGroup struct {
6263
6264
6265 Settings []*CustomListTargetingSetting `json:"settings,omitempty"`
6266
6267
6268
6269
6270
6271 ForceSendFields []string `json:"-"`
6272
6273
6274
6275
6276 NullFields []string `json:"-"`
6277 }
6278
6279 func (s *CustomListGroup) MarshalJSON() ([]byte, error) {
6280 type NoMethod CustomListGroup
6281 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6282 }
6283
6284
6285 type CustomListTargetingSetting struct {
6286
6287
6288 CustomListId int64 `json:"customListId,omitempty,string"`
6289
6290
6291
6292
6293
6294 ForceSendFields []string `json:"-"`
6295
6296
6297
6298
6299 NullFields []string `json:"-"`
6300 }
6301
6302 func (s *CustomListTargetingSetting) MarshalJSON() ([]byte, error) {
6303 type NoMethod CustomListTargetingSetting
6304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6305 }
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316 type Date struct {
6317
6318
6319
6320 Day int64 `json:"day,omitempty"`
6321
6322
6323 Month int64 `json:"month,omitempty"`
6324
6325
6326 Year int64 `json:"year,omitempty"`
6327
6328
6329
6330
6331
6332 ForceSendFields []string `json:"-"`
6333
6334
6335
6336
6337 NullFields []string `json:"-"`
6338 }
6339
6340 func (s *Date) MarshalJSON() ([]byte, error) {
6341 type NoMethod Date
6342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6343 }
6344
6345
6346 type DateRange struct {
6347
6348
6349 EndDate *Date `json:"endDate,omitempty"`
6350
6351
6352 StartDate *Date `json:"startDate,omitempty"`
6353
6354
6355
6356
6357
6358 ForceSendFields []string `json:"-"`
6359
6360
6361
6362
6363 NullFields []string `json:"-"`
6364 }
6365
6366 func (s *DateRange) MarshalJSON() ([]byte, error) {
6367 type NoMethod DateRange
6368 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6369 }
6370
6371
6372
6373 type DayAndTime struct {
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385 DayOfWeek string `json:"dayOfWeek,omitempty"`
6386
6387 HourOfDay int64 `json:"hourOfDay,omitempty"`
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398 TimeZoneResolution string `json:"timeZoneResolution,omitempty"`
6399
6400
6401
6402
6403
6404 ForceSendFields []string `json:"-"`
6405
6406
6407
6408
6409 NullFields []string `json:"-"`
6410 }
6411
6412 func (s *DayAndTime) MarshalJSON() ([]byte, error) {
6413 type NoMethod DayAndTime
6414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6415 }
6416
6417
6418
6419
6420
6421 type DayAndTimeAssignedTargetingOptionDetails struct {
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434 DayOfWeek string `json:"dayOfWeek,omitempty"`
6435
6436
6437 EndHour int64 `json:"endHour,omitempty"`
6438
6439
6440 StartHour int64 `json:"startHour,omitempty"`
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451 TimeZoneResolution string `json:"timeZoneResolution,omitempty"`
6452
6453
6454
6455
6456
6457 ForceSendFields []string `json:"-"`
6458
6459
6460
6461
6462 NullFields []string `json:"-"`
6463 }
6464
6465 func (s *DayAndTimeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6466 type NoMethod DayAndTimeAssignedTargetingOptionDetails
6467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6468 }
6469
6470
6471
6472 type DeleteAssignedTargetingOptionsRequest struct {
6473
6474
6475 AssignedTargetingOptionIds []string `json:"assignedTargetingOptionIds,omitempty"`
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586 TargetingType string `json:"targetingType,omitempty"`
6587
6588
6589
6590
6591
6592 ForceSendFields []string `json:"-"`
6593
6594
6595
6596
6597 NullFields []string `json:"-"`
6598 }
6599
6600 func (s *DeleteAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
6601 type NoMethod DeleteAssignedTargetingOptionsRequest
6602 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6603 }
6604
6605
6606
6607
6608
6609 type DeviceMakeModelAssignedTargetingOptionDetails struct {
6610
6611 DisplayName string `json:"displayName,omitempty"`
6612
6613 Negative bool `json:"negative,omitempty"`
6614
6615
6616 TargetingOptionId string `json:"targetingOptionId,omitempty"`
6617
6618
6619
6620
6621
6622 ForceSendFields []string `json:"-"`
6623
6624
6625
6626
6627 NullFields []string `json:"-"`
6628 }
6629
6630 func (s *DeviceMakeModelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6631 type NoMethod DeviceMakeModelAssignedTargetingOptionDetails
6632 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6633 }
6634
6635
6636
6637
6638 type DeviceMakeModelTargetingOptionDetails struct {
6639
6640 DisplayName string `json:"displayName,omitempty"`
6641
6642
6643
6644
6645
6646 ForceSendFields []string `json:"-"`
6647
6648
6649
6650
6651 NullFields []string `json:"-"`
6652 }
6653
6654 func (s *DeviceMakeModelTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6655 type NoMethod DeviceMakeModelTargetingOptionDetails
6656 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6657 }
6658
6659
6660
6661
6662 type DeviceTypeAssignedTargetingOptionDetails struct {
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673 DeviceType string `json:"deviceType,omitempty"`
6674
6675
6676
6677
6678
6679
6680
6681 YoutubeAndPartnersBidMultiplier float64 `json:"youtubeAndPartnersBidMultiplier,omitempty"`
6682
6683
6684
6685
6686
6687 ForceSendFields []string `json:"-"`
6688
6689
6690
6691
6692 NullFields []string `json:"-"`
6693 }
6694
6695 func (s *DeviceTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6696 type NoMethod DeviceTypeAssignedTargetingOptionDetails
6697 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6698 }
6699
6700 func (s *DeviceTypeAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error {
6701 type NoMethod DeviceTypeAssignedTargetingOptionDetails
6702 var s1 struct {
6703 YoutubeAndPartnersBidMultiplier gensupport.JSONFloat64 `json:"youtubeAndPartnersBidMultiplier"`
6704 *NoMethod
6705 }
6706 s1.NoMethod = (*NoMethod)(s)
6707 if err := json.Unmarshal(data, &s1); err != nil {
6708 return err
6709 }
6710 s.YoutubeAndPartnersBidMultiplier = float64(s1.YoutubeAndPartnersBidMultiplier)
6711 return nil
6712 }
6713
6714
6715
6716
6717 type DeviceTypeTargetingOptionDetails struct {
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728 DeviceType string `json:"deviceType,omitempty"`
6729
6730
6731
6732
6733
6734 ForceSendFields []string `json:"-"`
6735
6736
6737
6738
6739 NullFields []string `json:"-"`
6740 }
6741
6742 func (s *DeviceTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6743 type NoMethod DeviceTypeTargetingOptionDetails
6744 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6745 }
6746
6747
6748
6749
6750
6751 type DigitalContentLabelAssignedTargetingOptionDetails struct {
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769 ExcludedContentRatingTier string `json:"excludedContentRatingTier,omitempty"`
6770
6771
6772
6773
6774
6775 ForceSendFields []string `json:"-"`
6776
6777
6778
6779
6780 NullFields []string `json:"-"`
6781 }
6782
6783 func (s *DigitalContentLabelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6784 type NoMethod DigitalContentLabelAssignedTargetingOptionDetails
6785 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6786 }
6787
6788
6789
6790
6791
6792 type DigitalContentLabelTargetingOptionDetails struct {
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810 ContentRatingTier string `json:"contentRatingTier,omitempty"`
6811
6812
6813
6814
6815
6816 ForceSendFields []string `json:"-"`
6817
6818
6819
6820
6821 NullFields []string `json:"-"`
6822 }
6823
6824 func (s *DigitalContentLabelTargetingOptionDetails) MarshalJSON() ([]byte, error) {
6825 type NoMethod DigitalContentLabelTargetingOptionDetails
6826 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6827 }
6828
6829
6830 type Dimensions struct {
6831
6832 HeightPixels int64 `json:"heightPixels,omitempty"`
6833
6834 WidthPixels int64 `json:"widthPixels,omitempty"`
6835
6836
6837
6838
6839
6840 ForceSendFields []string `json:"-"`
6841
6842
6843
6844
6845 NullFields []string `json:"-"`
6846 }
6847
6848 func (s *Dimensions) MarshalJSON() ([]byte, error) {
6849 type NoMethod Dimensions
6850 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6851 }
6852
6853
6854 type DisplayVideoSourceAd struct {
6855
6856 CreativeId int64 `json:"creativeId,omitempty,string"`
6857
6858
6859
6860
6861
6862 ForceSendFields []string `json:"-"`
6863
6864
6865
6866
6867 NullFields []string `json:"-"`
6868 }
6869
6870 func (s *DisplayVideoSourceAd) MarshalJSON() ([]byte, error) {
6871 type NoMethod DisplayVideoSourceAd
6872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6873 }
6874
6875
6876 type DoubleVerify struct {
6877
6878 AppStarRating *DoubleVerifyAppStarRating `json:"appStarRating,omitempty"`
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890 AvoidedAgeRatings []string `json:"avoidedAgeRatings,omitempty"`
6891
6892 BrandSafetyCategories *DoubleVerifyBrandSafetyCategories `json:"brandSafetyCategories,omitempty"`
6893
6894
6895
6896
6897 CustomSegmentId int64 `json:"customSegmentId,omitempty,string"`
6898
6899
6900 DisplayViewability *DoubleVerifyDisplayViewability `json:"displayViewability,omitempty"`
6901
6902 FraudInvalidTraffic *DoubleVerifyFraudInvalidTraffic `json:"fraudInvalidTraffic,omitempty"`
6903
6904
6905 VideoViewability *DoubleVerifyVideoViewability `json:"videoViewability,omitempty"`
6906
6907
6908
6909
6910
6911 ForceSendFields []string `json:"-"`
6912
6913
6914
6915
6916 NullFields []string `json:"-"`
6917 }
6918
6919 func (s *DoubleVerify) MarshalJSON() ([]byte, error) {
6920 type NoMethod DoubleVerify
6921 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6922 }
6923
6924
6925 type DoubleVerifyAppStarRating struct {
6926
6927
6928 AvoidInsufficientStarRating bool `json:"avoidInsufficientStarRating,omitempty"`
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941 AvoidedStarRating string `json:"avoidedStarRating,omitempty"`
6942
6943
6944
6945
6946
6947 ForceSendFields []string `json:"-"`
6948
6949
6950
6951
6952 NullFields []string `json:"-"`
6953 }
6954
6955 func (s *DoubleVerifyAppStarRating) MarshalJSON() ([]byte, error) {
6956 type NoMethod DoubleVerifyAppStarRating
6957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6958 }
6959
6960
6961 type DoubleVerifyBrandSafetyCategories struct {
6962
6963 AvoidUnknownBrandSafetyCategory bool `json:"avoidUnknownBrandSafetyCategory,omitempty"`
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978 AvoidedHighSeverityCategories []string `json:"avoidedHighSeverityCategories,omitempty"`
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006 AvoidedMediumSeverityCategories []string `json:"avoidedMediumSeverityCategories,omitempty"`
7007
7008
7009
7010
7011
7012
7013 ForceSendFields []string `json:"-"`
7014
7015
7016
7017
7018 NullFields []string `json:"-"`
7019 }
7020
7021 func (s *DoubleVerifyBrandSafetyCategories) MarshalJSON() ([]byte, error) {
7022 type NoMethod DoubleVerifyBrandSafetyCategories
7023 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7024 }
7025
7026
7027
7028 type DoubleVerifyDisplayViewability struct {
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052 Iab string `json:"iab,omitempty"`
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065 ViewableDuring string `json:"viewableDuring,omitempty"`
7066
7067
7068
7069
7070
7071 ForceSendFields []string `json:"-"`
7072
7073
7074
7075
7076 NullFields []string `json:"-"`
7077 }
7078
7079 func (s *DoubleVerifyDisplayViewability) MarshalJSON() ([]byte, error) {
7080 type NoMethod DoubleVerifyDisplayViewability
7081 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7082 }
7083
7084
7085
7086 type DoubleVerifyFraudInvalidTraffic struct {
7087
7088 AvoidInsufficientOption bool `json:"avoidInsufficientOption,omitempty"`
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102 AvoidedFraudOption string `json:"avoidedFraudOption,omitempty"`
7103
7104
7105
7106
7107
7108 ForceSendFields []string `json:"-"`
7109
7110
7111
7112
7113 NullFields []string `json:"-"`
7114 }
7115
7116 func (s *DoubleVerifyFraudInvalidTraffic) MarshalJSON() ([]byte, error) {
7117 type NoMethod DoubleVerifyFraudInvalidTraffic
7118 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7119 }
7120
7121
7122
7123 type DoubleVerifyVideoViewability struct {
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134 PlayerImpressionRate string `json:"playerImpressionRate,omitempty"`
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158 VideoIab string `json:"videoIab,omitempty"`
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176 VideoViewableRate string `json:"videoViewableRate,omitempty"`
7177
7178
7179
7180
7181
7182 ForceSendFields []string `json:"-"`
7183
7184
7185
7186
7187 NullFields []string `json:"-"`
7188 }
7189
7190 func (s *DoubleVerifyVideoViewability) MarshalJSON() ([]byte, error) {
7191 type NoMethod DoubleVerifyVideoViewability
7192 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7193 }
7194
7195
7196
7197 type DuplicateLineItemRequest struct {
7198
7199
7200 TargetDisplayName string `json:"targetDisplayName,omitempty"`
7201
7202
7203
7204
7205
7206 ForceSendFields []string `json:"-"`
7207
7208
7209
7210
7211 NullFields []string `json:"-"`
7212 }
7213
7214 func (s *DuplicateLineItemRequest) MarshalJSON() ([]byte, error) {
7215 type NoMethod DuplicateLineItemRequest
7216 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7217 }
7218
7219 type DuplicateLineItemResponse struct {
7220
7221 DuplicateLineItemId int64 `json:"duplicateLineItemId,omitempty,string"`
7222
7223
7224 googleapi.ServerResponse `json:"-"`
7225
7226
7227
7228
7229
7230 ForceSendFields []string `json:"-"`
7231
7232
7233
7234
7235 NullFields []string `json:"-"`
7236 }
7237
7238 func (s *DuplicateLineItemResponse) MarshalJSON() ([]byte, error) {
7239 type NoMethod DuplicateLineItemResponse
7240 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7241 }
7242
7243
7244
7245 type EditCustomerMatchMembersRequest struct {
7246
7247
7248 AddedContactInfoList *ContactInfoList `json:"addedContactInfoList,omitempty"`
7249
7250
7251 AddedMobileDeviceIdList *MobileDeviceIdList `json:"addedMobileDeviceIdList,omitempty"`
7252
7253
7254 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7255
7256
7257 RemovedContactInfoList *ContactInfoList `json:"removedContactInfoList,omitempty"`
7258
7259
7260 RemovedMobileDeviceIdList *MobileDeviceIdList `json:"removedMobileDeviceIdList,omitempty"`
7261
7262
7263
7264
7265
7266 ForceSendFields []string `json:"-"`
7267
7268
7269
7270
7271 NullFields []string `json:"-"`
7272 }
7273
7274 func (s *EditCustomerMatchMembersRequest) MarshalJSON() ([]byte, error) {
7275 type NoMethod EditCustomerMatchMembersRequest
7276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7277 }
7278
7279
7280
7281 type EditCustomerMatchMembersResponse struct {
7282
7283
7284 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"`
7285
7286
7287 googleapi.ServerResponse `json:"-"`
7288
7289
7290
7291
7292
7293 ForceSendFields []string `json:"-"`
7294
7295
7296
7297
7298 NullFields []string `json:"-"`
7299 }
7300
7301 func (s *EditCustomerMatchMembersResponse) MarshalJSON() ([]byte, error) {
7302 type NoMethod EditCustomerMatchMembersResponse
7303 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7304 }
7305
7306
7307
7308 type EditGuaranteedOrderReadAccessorsRequest struct {
7309
7310
7311 AddedAdvertisers googleapi.Int64s `json:"addedAdvertisers,omitempty"`
7312
7313 PartnerId int64 `json:"partnerId,omitempty,string"`
7314
7315
7316
7317 ReadAccessInherited bool `json:"readAccessInherited,omitempty"`
7318
7319
7320 RemovedAdvertisers googleapi.Int64s `json:"removedAdvertisers,omitempty"`
7321
7322
7323
7324
7325
7326 ForceSendFields []string `json:"-"`
7327
7328
7329
7330
7331 NullFields []string `json:"-"`
7332 }
7333
7334 func (s *EditGuaranteedOrderReadAccessorsRequest) MarshalJSON() ([]byte, error) {
7335 type NoMethod EditGuaranteedOrderReadAccessorsRequest
7336 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7337 }
7338
7339 type EditGuaranteedOrderReadAccessorsResponse struct {
7340
7341
7342 ReadAccessInherited bool `json:"readAccessInherited,omitempty"`
7343
7344
7345 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"`
7346
7347
7348 googleapi.ServerResponse `json:"-"`
7349
7350
7351
7352
7353
7354 ForceSendFields []string `json:"-"`
7355
7356
7357
7358
7359 NullFields []string `json:"-"`
7360 }
7361
7362 func (s *EditGuaranteedOrderReadAccessorsResponse) MarshalJSON() ([]byte, error) {
7363 type NoMethod EditGuaranteedOrderReadAccessorsResponse
7364 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7365 }
7366
7367
7368
7369 type EditInventorySourceReadWriteAccessorsRequest struct {
7370
7371
7372
7373 AdvertisersUpdate *EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate `json:"advertisersUpdate,omitempty"`
7374
7375
7376
7377 AssignPartner bool `json:"assignPartner,omitempty"`
7378
7379
7380 PartnerId int64 `json:"partnerId,omitempty,string"`
7381
7382
7383
7384
7385
7386 ForceSendFields []string `json:"-"`
7387
7388
7389
7390
7391 NullFields []string `json:"-"`
7392 }
7393
7394 func (s *EditInventorySourceReadWriteAccessorsRequest) MarshalJSON() ([]byte, error) {
7395 type NoMethod EditInventorySourceReadWriteAccessorsRequest
7396 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7397 }
7398
7399
7400
7401 type EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate struct {
7402
7403 AddedAdvertisers googleapi.Int64s `json:"addedAdvertisers,omitempty"`
7404
7405 RemovedAdvertisers googleapi.Int64s `json:"removedAdvertisers,omitempty"`
7406
7407
7408
7409
7410
7411 ForceSendFields []string `json:"-"`
7412
7413
7414
7415
7416 NullFields []string `json:"-"`
7417 }
7418
7419 func (s *EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate) MarshalJSON() ([]byte, error) {
7420 type NoMethod EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate
7421 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7422 }
7423
7424
7425
7426
7427
7428 type Empty struct {
7429
7430 googleapi.ServerResponse `json:"-"`
7431 }
7432
7433
7434
7435
7436 type EnvironmentAssignedTargetingOptionDetails struct {
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454 Environment string `json:"environment,omitempty"`
7455
7456
7457
7458
7459
7460 ForceSendFields []string `json:"-"`
7461
7462
7463
7464
7465 NullFields []string `json:"-"`
7466 }
7467
7468 func (s *EnvironmentAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
7469 type NoMethod EnvironmentAssignedTargetingOptionDetails
7470 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7471 }
7472
7473
7474
7475
7476 type EnvironmentTargetingOptionDetails struct {
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494 Environment string `json:"environment,omitempty"`
7495
7496
7497
7498
7499
7500 ForceSendFields []string `json:"-"`
7501
7502
7503
7504
7505 NullFields []string `json:"-"`
7506 }
7507
7508 func (s *EnvironmentTargetingOptionDetails) MarshalJSON() ([]byte, error) {
7509 type NoMethod EnvironmentTargetingOptionDetails
7510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7511 }
7512
7513
7514
7515
7516 type ExchangeAssignedTargetingOptionDetails struct {
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604 Exchange string `json:"exchange,omitempty"`
7605
7606
7607
7608
7609
7610 ForceSendFields []string `json:"-"`
7611
7612
7613
7614
7615 NullFields []string `json:"-"`
7616 }
7617
7618 func (s *ExchangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
7619 type NoMethod ExchangeAssignedTargetingOptionDetails
7620 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7621 }
7622
7623
7624
7625 type ExchangeConfig struct {
7626
7627
7628 EnabledExchanges []*ExchangeConfigEnabledExchange `json:"enabledExchanges,omitempty"`
7629
7630
7631
7632
7633
7634 ForceSendFields []string `json:"-"`
7635
7636
7637
7638
7639 NullFields []string `json:"-"`
7640 }
7641
7642 func (s *ExchangeConfig) MarshalJSON() ([]byte, error) {
7643 type NoMethod ExchangeConfig
7644 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7645 }
7646
7647
7648 type ExchangeConfigEnabledExchange struct {
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736 Exchange string `json:"exchange,omitempty"`
7737
7738
7739 GoogleAdManagerAgencyId string `json:"googleAdManagerAgencyId,omitempty"`
7740
7741
7742 GoogleAdManagerBuyerNetworkId string `json:"googleAdManagerBuyerNetworkId,omitempty"`
7743
7744 SeatId string `json:"seatId,omitempty"`
7745
7746
7747
7748
7749
7750 ForceSendFields []string `json:"-"`
7751
7752
7753
7754
7755 NullFields []string `json:"-"`
7756 }
7757
7758 func (s *ExchangeConfigEnabledExchange) MarshalJSON() ([]byte, error) {
7759 type NoMethod ExchangeConfigEnabledExchange
7760 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7761 }
7762
7763
7764 type ExchangeReviewStatus struct {
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
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852 Exchange string `json:"exchange,omitempty"`
7853
7854
7855
7856
7857
7858
7859
7860
7861 Status string `json:"status,omitempty"`
7862
7863
7864
7865
7866
7867 ForceSendFields []string `json:"-"`
7868
7869
7870
7871
7872 NullFields []string `json:"-"`
7873 }
7874
7875 func (s *ExchangeReviewStatus) MarshalJSON() ([]byte, error) {
7876 type NoMethod ExchangeReviewStatus
7877 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7878 }
7879
7880
7881
7882
7883 type ExchangeTargetingOptionDetails struct {
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
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 Exchange string `json:"exchange,omitempty"`
7972
7973
7974
7975
7976
7977 ForceSendFields []string `json:"-"`
7978
7979
7980
7981
7982 NullFields []string `json:"-"`
7983 }
7984
7985 func (s *ExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
7986 type NoMethod ExchangeTargetingOptionDetails
7987 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7988 }
7989
7990
7991 type ExitEvent struct {
7992
7993
7994
7995 Name string `json:"name,omitempty"`
7996
7997
7998 ReportingName string `json:"reportingName,omitempty"`
7999
8000
8001
8002
8003
8004
8005
8006
8007 Type string `json:"type,omitempty"`
8008
8009
8010 Url string `json:"url,omitempty"`
8011
8012
8013
8014
8015
8016 ForceSendFields []string `json:"-"`
8017
8018
8019
8020
8021 NullFields []string `json:"-"`
8022 }
8023
8024 func (s *ExitEvent) MarshalJSON() ([]byte, error) {
8025 type NoMethod ExitEvent
8026 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8027 }
8028
8029
8030
8031
8032
8033 type FirstAndThirdPartyAudience struct {
8034
8035
8036
8037
8038
8039 ActiveDisplayAudienceSize int64 `json:"activeDisplayAudienceSize,omitempty,string"`
8040
8041
8042 AppId string `json:"appId,omitempty"`
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054 AudienceSource string `json:"audienceSource,omitempty"`
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074 AudienceType string `json:"audienceType,omitempty"`
8075
8076
8077
8078 ContactInfoList *ContactInfoList `json:"contactInfoList,omitempty"`
8079
8080
8081 Description string `json:"description,omitempty"`
8082
8083
8084
8085
8086 DisplayAudienceSize int64 `json:"displayAudienceSize,omitempty,string"`
8087
8088
8089
8090
8091
8092 DisplayDesktopAudienceSize int64 `json:"displayDesktopAudienceSize,omitempty,string"`
8093
8094
8095
8096
8097
8098 DisplayMobileAppAudienceSize int64 `json:"displayMobileAppAudienceSize,omitempty,string"`
8099
8100
8101
8102
8103
8104 DisplayMobileWebAudienceSize int64 `json:"displayMobileWebAudienceSize,omitempty,string"`
8105
8106 DisplayName string `json:"displayName,omitempty"`
8107
8108
8109 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"`
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120 FirstAndThirdPartyAudienceType string `json:"firstAndThirdPartyAudienceType,omitempty"`
8121
8122
8123
8124
8125
8126 GmailAudienceSize int64 `json:"gmailAudienceSize,omitempty,string"`
8127
8128
8129
8130
8131
8132
8133 MembershipDurationDays int64 `json:"membershipDurationDays,omitempty,string"`
8134
8135
8136
8137 MobileDeviceIdList *MobileDeviceIdList `json:"mobileDeviceIdList,omitempty"`
8138
8139 Name string `json:"name,omitempty"`
8140
8141
8142
8143
8144
8145 YoutubeAudienceSize int64 `json:"youtubeAudienceSize,omitempty,string"`
8146
8147
8148 googleapi.ServerResponse `json:"-"`
8149
8150
8151
8152
8153
8154 ForceSendFields []string `json:"-"`
8155
8156
8157
8158
8159 NullFields []string `json:"-"`
8160 }
8161
8162 func (s *FirstAndThirdPartyAudience) MarshalJSON() ([]byte, error) {
8163 type NoMethod FirstAndThirdPartyAudience
8164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8165 }
8166
8167
8168
8169
8170 type FirstAndThirdPartyAudienceGroup struct {
8171
8172
8173
8174 Settings []*FirstAndThirdPartyAudienceTargetingSetting `json:"settings,omitempty"`
8175
8176
8177
8178
8179
8180 ForceSendFields []string `json:"-"`
8181
8182
8183
8184
8185 NullFields []string `json:"-"`
8186 }
8187
8188 func (s *FirstAndThirdPartyAudienceGroup) MarshalJSON() ([]byte, error) {
8189 type NoMethod FirstAndThirdPartyAudienceGroup
8190 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8191 }
8192
8193
8194
8195 type FirstAndThirdPartyAudienceTargetingSetting struct {
8196
8197
8198
8199 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"`
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
8229
8230
8231
8232
8233
8234
8235
8236
8237 Recency string `json:"recency,omitempty"`
8238
8239
8240
8241
8242
8243 ForceSendFields []string `json:"-"`
8244
8245
8246
8247
8248 NullFields []string `json:"-"`
8249 }
8250
8251 func (s *FirstAndThirdPartyAudienceTargetingSetting) MarshalJSON() ([]byte, error) {
8252 type NoMethod FirstAndThirdPartyAudienceTargetingSetting
8253 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8254 }
8255
8256
8257 type FixedBidStrategy struct {
8258
8259
8260
8261
8262
8263
8264 BidAmountMicros int64 `json:"bidAmountMicros,omitempty,string"`
8265
8266
8267
8268
8269
8270 ForceSendFields []string `json:"-"`
8271
8272
8273
8274
8275 NullFields []string `json:"-"`
8276 }
8277
8278 func (s *FixedBidStrategy) MarshalJSON() ([]byte, error) {
8279 type NoMethod FixedBidStrategy
8280 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8281 }
8282
8283
8284 type FloodlightActivity struct {
8285
8286
8287
8288 AdvertiserIds googleapi.Int64s `json:"advertiserIds,omitempty"`
8289
8290 DisplayName string `json:"displayName,omitempty"`
8291
8292
8293 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8294
8295
8296 FloodlightGroupId int64 `json:"floodlightGroupId,omitempty,string"`
8297
8298 Name string `json:"name,omitempty"`
8299
8300
8301
8302
8303
8304 RemarketingConfigs []*RemarketingConfig `json:"remarketingConfigs,omitempty"`
8305
8306
8307
8308
8309
8310
8311
8312 ServingStatus string `json:"servingStatus,omitempty"`
8313
8314 SslRequired bool `json:"sslRequired,omitempty"`
8315
8316
8317 googleapi.ServerResponse `json:"-"`
8318
8319
8320
8321
8322
8323 ForceSendFields []string `json:"-"`
8324
8325
8326
8327
8328 NullFields []string `json:"-"`
8329 }
8330
8331 func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
8332 type NoMethod FloodlightActivity
8333 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8334 }
8335
8336
8337 type FloodlightGroup struct {
8338
8339
8340 ActiveViewConfig *ActiveViewVideoViewabilityMetricConfig `json:"activeViewConfig,omitempty"`
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355 CustomVariables googleapi.RawMessage `json:"customVariables,omitempty"`
8356
8357 DisplayName string `json:"displayName,omitempty"`
8358
8359
8360 FloodlightGroupId int64 `json:"floodlightGroupId,omitempty,string"`
8361
8362
8363
8364 LookbackWindow *LookbackWindow `json:"lookbackWindow,omitempty"`
8365
8366 Name string `json:"name,omitempty"`
8367
8368
8369
8370
8371
8372
8373
8374
8375 WebTagType string `json:"webTagType,omitempty"`
8376
8377
8378 googleapi.ServerResponse `json:"-"`
8379
8380
8381
8382
8383
8384 ForceSendFields []string `json:"-"`
8385
8386
8387
8388
8389 NullFields []string `json:"-"`
8390 }
8391
8392 func (s *FloodlightGroup) MarshalJSON() ([]byte, error) {
8393 type NoMethod FloodlightGroup
8394 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8395 }
8396
8397
8398
8399 type FrequencyCap struct {
8400
8401
8402
8403 MaxImpressions int64 `json:"maxImpressions,omitempty"`
8404
8405
8406
8407
8408 MaxViews int64 `json:"maxViews,omitempty"`
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426 TimeUnit string `json:"timeUnit,omitempty"`
8427
8428
8429
8430
8431
8432
8433
8434 TimeUnitCount int64 `json:"timeUnitCount,omitempty"`
8435
8436
8437 Unlimited bool `json:"unlimited,omitempty"`
8438
8439
8440
8441
8442
8443 ForceSendFields []string `json:"-"`
8444
8445
8446
8447
8448 NullFields []string `json:"-"`
8449 }
8450
8451 func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
8452 type NoMethod FrequencyCap
8453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8454 }
8455
8456
8457
8458
8459 type GenderAssignedTargetingOptionDetails struct {
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469 Gender string `json:"gender,omitempty"`
8470
8471
8472
8473
8474
8475 ForceSendFields []string `json:"-"`
8476
8477
8478
8479
8480 NullFields []string `json:"-"`
8481 }
8482
8483 func (s *GenderAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
8484 type NoMethod GenderAssignedTargetingOptionDetails
8485 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8486 }
8487
8488
8489
8490
8491 type GenderTargetingOptionDetails struct {
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501 Gender string `json:"gender,omitempty"`
8502
8503
8504
8505
8506
8507 ForceSendFields []string `json:"-"`
8508
8509
8510
8511
8512 NullFields []string `json:"-"`
8513 }
8514
8515 func (s *GenderTargetingOptionDetails) MarshalJSON() ([]byte, error) {
8516 type NoMethod GenderTargetingOptionDetails
8517 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8518 }
8519
8520
8521
8522 type GenerateDefaultLineItemRequest struct {
8523
8524
8525 DisplayName string `json:"displayName,omitempty"`
8526
8527
8528 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"`
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599 LineItemType string `json:"lineItemType,omitempty"`
8600
8601
8602
8603 MobileApp *MobileApp `json:"mobileApp,omitempty"`
8604
8605
8606
8607
8608
8609 ForceSendFields []string `json:"-"`
8610
8611
8612
8613
8614 NullFields []string `json:"-"`
8615 }
8616
8617 func (s *GenerateDefaultLineItemRequest) MarshalJSON() ([]byte, error) {
8618 type NoMethod GenerateDefaultLineItemRequest
8619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8620 }
8621
8622
8623
8624
8625 type GeoRegionAssignedTargetingOptionDetails struct {
8626
8627
8628 DisplayName string `json:"displayName,omitempty"`
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668 GeoRegionType string `json:"geoRegionType,omitempty"`
8669
8670 Negative bool `json:"negative,omitempty"`
8671
8672
8673 TargetingOptionId string `json:"targetingOptionId,omitempty"`
8674
8675
8676
8677
8678
8679 ForceSendFields []string `json:"-"`
8680
8681
8682
8683
8684 NullFields []string `json:"-"`
8685 }
8686
8687 func (s *GeoRegionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
8688 type NoMethod GeoRegionAssignedTargetingOptionDetails
8689 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8690 }
8691
8692
8693 type GeoRegionSearchTerms struct {
8694
8695
8696 GeoRegionQuery string `json:"geoRegionQuery,omitempty"`
8697
8698
8699
8700
8701
8702 ForceSendFields []string `json:"-"`
8703
8704
8705
8706
8707 NullFields []string `json:"-"`
8708 }
8709
8710 func (s *GeoRegionSearchTerms) MarshalJSON() ([]byte, error) {
8711 type NoMethod GeoRegionSearchTerms
8712 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8713 }
8714
8715
8716
8717
8718 type GeoRegionTargetingOptionDetails struct {
8719
8720
8721 DisplayName string `json:"displayName,omitempty"`
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761 GeoRegionType string `json:"geoRegionType,omitempty"`
8762
8763
8764
8765
8766
8767 ForceSendFields []string `json:"-"`
8768
8769
8770
8771
8772 NullFields []string `json:"-"`
8773 }
8774
8775 func (s *GeoRegionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
8776 type NoMethod GeoRegionTargetingOptionDetails
8777 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8778 }
8779
8780
8781
8782 type GoogleAudience struct {
8783
8784 DisplayName string `json:"displayName,omitempty"`
8785
8786
8787 GoogleAudienceId int64 `json:"googleAudienceId,omitempty,string"`
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802 GoogleAudienceType string `json:"googleAudienceType,omitempty"`
8803
8804 Name string `json:"name,omitempty"`
8805
8806
8807 googleapi.ServerResponse `json:"-"`
8808
8809
8810
8811
8812
8813 ForceSendFields []string `json:"-"`
8814
8815
8816
8817
8818 NullFields []string `json:"-"`
8819 }
8820
8821 func (s *GoogleAudience) MarshalJSON() ([]byte, error) {
8822 type NoMethod GoogleAudience
8823 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8824 }
8825
8826
8827
8828 type GoogleAudienceGroup struct {
8829
8830
8831 Settings []*GoogleAudienceTargetingSetting `json:"settings,omitempty"`
8832
8833
8834
8835
8836
8837 ForceSendFields []string `json:"-"`
8838
8839
8840
8841
8842 NullFields []string `json:"-"`
8843 }
8844
8845 func (s *GoogleAudienceGroup) MarshalJSON() ([]byte, error) {
8846 type NoMethod GoogleAudienceGroup
8847 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8848 }
8849
8850
8851
8852 type GoogleAudienceTargetingSetting struct {
8853
8854
8855 GoogleAudienceId int64 `json:"googleAudienceId,omitempty,string"`
8856
8857
8858
8859
8860
8861 ForceSendFields []string `json:"-"`
8862
8863
8864
8865
8866 NullFields []string `json:"-"`
8867 }
8868
8869 func (s *GoogleAudienceTargetingSetting) MarshalJSON() ([]byte, error) {
8870 type NoMethod GoogleAudienceTargetingSetting
8871 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8872 }
8873
8874
8875 type GoogleBytestreamMedia struct {
8876
8877 ResourceName string `json:"resourceName,omitempty"`
8878
8879
8880 googleapi.ServerResponse `json:"-"`
8881
8882
8883
8884
8885
8886 ForceSendFields []string `json:"-"`
8887
8888
8889
8890
8891 NullFields []string `json:"-"`
8892 }
8893
8894 func (s *GoogleBytestreamMedia) MarshalJSON() ([]byte, error) {
8895 type NoMethod GoogleBytestreamMedia
8896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8897 }
8898
8899
8900
8901
8902 type GuaranteedOrder struct {
8903
8904
8905
8906
8907 DefaultAdvertiserId int64 `json:"defaultAdvertiserId,omitempty,string"`
8908
8909
8910
8911 DefaultCampaignId int64 `json:"defaultCampaignId,omitempty,string"`
8912
8913
8914 DisplayName string `json:"displayName,omitempty"`
8915
8916
8917
8918
8919
8920
8921
8922
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 Exchange string `json:"exchange,omitempty"`
9004
9005
9006
9007 GuaranteedOrderId string `json:"guaranteedOrderId,omitempty"`
9008
9009
9010
9011
9012 LegacyGuaranteedOrderId string `json:"legacyGuaranteedOrderId,omitempty"`
9013
9014 Name string `json:"name,omitempty"`
9015
9016
9017 PublisherName string `json:"publisherName,omitempty"`
9018
9019
9020
9021 ReadAccessInherited bool `json:"readAccessInherited,omitempty"`
9022
9023
9024
9025
9026
9027 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"`
9028
9029
9030
9031 ReadWriteAdvertiserId int64 `json:"readWriteAdvertiserId,omitempty,string"`
9032
9033
9034 ReadWritePartnerId int64 `json:"readWritePartnerId,omitempty,string"`
9035
9036 Status *GuaranteedOrderStatus `json:"status,omitempty"`
9037
9038
9039 UpdateTime string `json:"updateTime,omitempty"`
9040
9041
9042 googleapi.ServerResponse `json:"-"`
9043
9044
9045
9046
9047
9048 ForceSendFields []string `json:"-"`
9049
9050
9051
9052
9053 NullFields []string `json:"-"`
9054 }
9055
9056 func (s *GuaranteedOrder) MarshalJSON() ([]byte, error) {
9057 type NoMethod GuaranteedOrder
9058 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9059 }
9060
9061
9062 type GuaranteedOrderStatus struct {
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075 ConfigStatus string `json:"configStatus,omitempty"`
9076
9077
9078
9079 EntityPauseReason string `json:"entityPauseReason,omitempty"`
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097 EntityStatus string `json:"entityStatus,omitempty"`
9098
9099
9100
9101
9102
9103 ForceSendFields []string `json:"-"`
9104
9105
9106
9107
9108 NullFields []string `json:"-"`
9109 }
9110
9111 func (s *GuaranteedOrderStatus) MarshalJSON() ([]byte, error) {
9112 type NoMethod GuaranteedOrderStatus
9113 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9114 }
9115
9116
9117
9118
9119
9120 type HouseholdIncomeAssignedTargetingOptionDetails struct {
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141 HouseholdIncome string `json:"householdIncome,omitempty"`
9142
9143
9144
9145
9146
9147 ForceSendFields []string `json:"-"`
9148
9149
9150
9151
9152 NullFields []string `json:"-"`
9153 }
9154
9155 func (s *HouseholdIncomeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
9156 type NoMethod HouseholdIncomeAssignedTargetingOptionDetails
9157 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9158 }
9159
9160
9161
9162
9163 type HouseholdIncomeTargetingOptionDetails struct {
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184 HouseholdIncome string `json:"householdIncome,omitempty"`
9185
9186
9187
9188
9189
9190 ForceSendFields []string `json:"-"`
9191
9192
9193
9194
9195 NullFields []string `json:"-"`
9196 }
9197
9198 func (s *HouseholdIncomeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
9199 type NoMethod HouseholdIncomeTargetingOptionDetails
9200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9201 }
9202
9203
9204 type IdFilter struct {
9205
9206
9207 AdGroupAdIds googleapi.Int64s `json:"adGroupAdIds,omitempty"`
9208
9209
9210 AdGroupIds googleapi.Int64s `json:"adGroupIds,omitempty"`
9211
9212
9213 CampaignIds googleapi.Int64s `json:"campaignIds,omitempty"`
9214
9215
9216 InsertionOrderIds googleapi.Int64s `json:"insertionOrderIds,omitempty"`
9217
9218
9219 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"`
9220
9221
9222 MediaProductIds googleapi.Int64s `json:"mediaProductIds,omitempty"`
9223
9224
9225
9226
9227
9228 ForceSendFields []string `json:"-"`
9229
9230
9231
9232
9233 NullFields []string `json:"-"`
9234 }
9235
9236 func (s *IdFilter) MarshalJSON() ([]byte, error) {
9237 type NoMethod IdFilter
9238 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9239 }
9240
9241
9242 type ImageAsset struct {
9243
9244 FileSize int64 `json:"fileSize,omitempty,string"`
9245
9246 FullSize *Dimensions `json:"fullSize,omitempty"`
9247
9248 MimeType string `json:"mimeType,omitempty"`
9249
9250
9251
9252
9253
9254 ForceSendFields []string `json:"-"`
9255
9256
9257
9258
9259 NullFields []string `json:"-"`
9260 }
9261
9262 func (s *ImageAsset) MarshalJSON() ([]byte, error) {
9263 type NoMethod ImageAsset
9264 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9265 }
9266
9267
9268 type InStreamAd struct {
9269
9270 CommonInStreamAttribute *CommonInStreamAttribute `json:"commonInStreamAttribute,omitempty"`
9271
9272
9273 CustomParameters map[string]string `json:"customParameters,omitempty"`
9274
9275
9276
9277
9278
9279 ForceSendFields []string `json:"-"`
9280
9281
9282
9283
9284 NullFields []string `json:"-"`
9285 }
9286
9287 func (s *InStreamAd) MarshalJSON() ([]byte, error) {
9288 type NoMethod InStreamAd
9289 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9290 }
9291
9292
9293 type InsertionOrder struct {
9294
9295
9296 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9297
9298
9299 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"`
9300
9301 Budget *InsertionOrderBudget `json:"budget,omitempty"`
9302
9303
9304 CampaignId int64 `json:"campaignId,omitempty,string"`
9305
9306
9307 DisplayName string `json:"displayName,omitempty"`
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330 EntityStatus string `json:"entityStatus,omitempty"`
9331
9332
9333 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
9334
9335
9336 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"`
9337
9338
9339
9340
9341
9342
9343
9344
9345 InsertionOrderType string `json:"insertionOrderType,omitempty"`
9346
9347 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"`
9348
9349
9350
9351 Kpi *Kpi `json:"kpi,omitempty"`
9352
9353 Name string `json:"name,omitempty"`
9354
9355 Pacing *Pacing `json:"pacing,omitempty"`
9356
9357
9358
9359 PartnerCosts []*PartnerCost `json:"partnerCosts,omitempty"`
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375 ReservationType string `json:"reservationType,omitempty"`
9376
9377
9378 UpdateTime string `json:"updateTime,omitempty"`
9379
9380
9381 googleapi.ServerResponse `json:"-"`
9382
9383
9384
9385
9386
9387 ForceSendFields []string `json:"-"`
9388
9389
9390
9391
9392 NullFields []string `json:"-"`
9393 }
9394
9395 func (s *InsertionOrder) MarshalJSON() ([]byte, error) {
9396 type NoMethod InsertionOrder
9397 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9398 }
9399
9400
9401
9402 type InsertionOrderBudget struct {
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419 AutomationType string `json:"automationType,omitempty"`
9420
9421
9422
9423 BudgetSegments []*InsertionOrderBudgetSegment `json:"budgetSegments,omitempty"`
9424
9425
9426
9427
9428
9429
9430
9431
9432 BudgetUnit string `json:"budgetUnit,omitempty"`
9433
9434
9435
9436
9437
9438 ForceSendFields []string `json:"-"`
9439
9440
9441
9442
9443 NullFields []string `json:"-"`
9444 }
9445
9446 func (s *InsertionOrderBudget) MarshalJSON() ([]byte, error) {
9447 type NoMethod InsertionOrderBudget
9448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9449 }
9450
9451
9452
9453 type InsertionOrderBudgetSegment struct {
9454
9455
9456
9457
9458 BudgetAmountMicros int64 `json:"budgetAmountMicros,omitempty,string"`
9459
9460
9461 CampaignBudgetId int64 `json:"campaignBudgetId,omitempty,string"`
9462
9463
9464
9465
9466
9467
9468 DateRange *DateRange `json:"dateRange,omitempty"`
9469
9470
9471
9472 Description string `json:"description,omitempty"`
9473
9474
9475
9476
9477
9478 ForceSendFields []string `json:"-"`
9479
9480
9481
9482
9483 NullFields []string `json:"-"`
9484 }
9485
9486 func (s *InsertionOrderBudgetSegment) MarshalJSON() ([]byte, error) {
9487 type NoMethod InsertionOrderBudgetSegment
9488 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9489 }
9490
9491
9492 type IntegralAdScience struct {
9493
9494
9495 CustomSegmentId googleapi.Int64s `json:"customSegmentId,omitempty"`
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506 DisplayViewability string `json:"displayViewability,omitempty"`
9507
9508 ExcludeUnrateable bool `json:"excludeUnrateable,omitempty"`
9509
9510
9511
9512
9513
9514
9515
9516 ExcludedAdFraudRisk string `json:"excludedAdFraudRisk,omitempty"`
9517
9518
9519
9520
9521
9522
9523
9524 ExcludedAdultRisk string `json:"excludedAdultRisk,omitempty"`
9525
9526
9527
9528
9529
9530
9531
9532 ExcludedAlcoholRisk string `json:"excludedAlcoholRisk,omitempty"`
9533
9534
9535
9536
9537
9538
9539
9540 ExcludedDrugsRisk string `json:"excludedDrugsRisk,omitempty"`
9541
9542
9543
9544
9545
9546
9547
9548 ExcludedGamblingRisk string `json:"excludedGamblingRisk,omitempty"`
9549
9550
9551
9552
9553
9554
9555
9556 ExcludedHateSpeechRisk string `json:"excludedHateSpeechRisk,omitempty"`
9557
9558
9559
9560
9561
9562
9563
9564
9565 ExcludedIllegalDownloadsRisk string `json:"excludedIllegalDownloadsRisk,omitempty"`
9566
9567
9568
9569
9570
9571
9572
9573
9574 ExcludedOffensiveLanguageRisk string `json:"excludedOffensiveLanguageRisk,omitempty"`
9575
9576
9577
9578
9579
9580
9581
9582 ExcludedViolenceRisk string `json:"excludedViolenceRisk,omitempty"`
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596 TraqScoreOption string `json:"traqScoreOption,omitempty"`
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607 VideoViewability string `json:"videoViewability,omitempty"`
9608
9609
9610
9611
9612
9613 ForceSendFields []string `json:"-"`
9614
9615
9616
9617
9618 NullFields []string `json:"-"`
9619 }
9620
9621 func (s *IntegralAdScience) MarshalJSON() ([]byte, error) {
9622 type NoMethod IntegralAdScience
9623 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9624 }
9625
9626
9627 type IntegrationDetails struct {
9628
9629
9630 Details string `json:"details,omitempty"`
9631
9632
9633
9634
9635 IntegrationCode string `json:"integrationCode,omitempty"`
9636
9637
9638
9639
9640
9641 ForceSendFields []string `json:"-"`
9642
9643
9644
9645
9646 NullFields []string `json:"-"`
9647 }
9648
9649 func (s *IntegrationDetails) MarshalJSON() ([]byte, error) {
9650 type NoMethod IntegrationDetails
9651 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9652 }
9653
9654
9655 type InventorySource struct {
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666 Commitment string `json:"commitment,omitempty"`
9667
9668
9669 CreativeConfigs []*CreativeConfig `json:"creativeConfigs,omitempty"`
9670
9671
9672
9673 DealId string `json:"dealId,omitempty"`
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686 DeliveryMethod string `json:"deliveryMethod,omitempty"`
9687
9688
9689 DisplayName string `json:"displayName,omitempty"`
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
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777 Exchange string `json:"exchange,omitempty"`
9778
9779
9780
9781 GuaranteedOrderId string `json:"guaranteedOrderId,omitempty"`
9782
9783
9784 InventorySourceId int64 `json:"inventorySourceId,omitempty,string"`
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814 InventorySourceProductType string `json:"inventorySourceProductType,omitempty"`
9815
9816
9817
9818
9819
9820
9821
9822 InventorySourceType string `json:"inventorySourceType,omitempty"`
9823
9824 Name string `json:"name,omitempty"`
9825
9826 PublisherName string `json:"publisherName,omitempty"`
9827
9828 RateDetails *RateDetails `json:"rateDetails,omitempty"`
9829
9830
9831 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"`
9832
9833
9834
9835 ReadPartnerIds googleapi.Int64s `json:"readPartnerIds,omitempty"`
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845 ReadWriteAccessors *InventorySourceAccessors `json:"readWriteAccessors,omitempty"`
9846
9847 Status *InventorySourceStatus `json:"status,omitempty"`
9848
9849
9850 TimeRange *TimeRange `json:"timeRange,omitempty"`
9851
9852
9853 UpdateTime string `json:"updateTime,omitempty"`
9854
9855
9856 googleapi.ServerResponse `json:"-"`
9857
9858
9859
9860
9861
9862 ForceSendFields []string `json:"-"`
9863
9864
9865
9866
9867 NullFields []string `json:"-"`
9868 }
9869
9870 func (s *InventorySource) MarshalJSON() ([]byte, error) {
9871 type NoMethod InventorySource
9872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9873 }
9874
9875
9876
9877 type InventorySourceAccessors struct {
9878
9879
9880 Advertisers *InventorySourceAccessorsAdvertiserAccessors `json:"advertisers,omitempty"`
9881
9882 Partner *InventorySourceAccessorsPartnerAccessor `json:"partner,omitempty"`
9883
9884
9885 googleapi.ServerResponse `json:"-"`
9886
9887
9888
9889
9890
9891 ForceSendFields []string `json:"-"`
9892
9893
9894
9895
9896 NullFields []string `json:"-"`
9897 }
9898
9899 func (s *InventorySourceAccessors) MarshalJSON() ([]byte, error) {
9900 type NoMethod InventorySourceAccessors
9901 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9902 }
9903
9904
9905
9906 type InventorySourceAccessorsAdvertiserAccessors struct {
9907
9908 AdvertiserIds googleapi.Int64s `json:"advertiserIds,omitempty"`
9909
9910
9911
9912
9913
9914 ForceSendFields []string `json:"-"`
9915
9916
9917
9918
9919 NullFields []string `json:"-"`
9920 }
9921
9922 func (s *InventorySourceAccessorsAdvertiserAccessors) MarshalJSON() ([]byte, error) {
9923 type NoMethod InventorySourceAccessorsAdvertiserAccessors
9924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9925 }
9926
9927
9928
9929 type InventorySourceAccessorsPartnerAccessor struct {
9930
9931 PartnerId int64 `json:"partnerId,omitempty,string"`
9932
9933
9934
9935
9936
9937 ForceSendFields []string `json:"-"`
9938
9939
9940
9941
9942 NullFields []string `json:"-"`
9943 }
9944
9945 func (s *InventorySourceAccessorsPartnerAccessor) MarshalJSON() ([]byte, error) {
9946 type NoMethod InventorySourceAccessorsPartnerAccessor
9947 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9948 }
9949
9950
9951
9952
9953
9954 type InventorySourceAssignedTargetingOptionDetails struct {
9955
9956
9957 InventorySourceId int64 `json:"inventorySourceId,omitempty,string"`
9958
9959
9960
9961
9962
9963 ForceSendFields []string `json:"-"`
9964
9965
9966
9967
9968 NullFields []string `json:"-"`
9969 }
9970
9971 func (s *InventorySourceAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
9972 type NoMethod InventorySourceAssignedTargetingOptionDetails
9973 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9974 }
9975
9976
9977
9978 type InventorySourceDisplayCreativeConfig struct {
9979
9980
9981 CreativeSize *Dimensions `json:"creativeSize,omitempty"`
9982
9983
9984
9985
9986
9987 ForceSendFields []string `json:"-"`
9988
9989
9990
9991
9992 NullFields []string `json:"-"`
9993 }
9994
9995 func (s *InventorySourceDisplayCreativeConfig) MarshalJSON() ([]byte, error) {
9996 type NoMethod InventorySourceDisplayCreativeConfig
9997 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9998 }
9999
10000
10001
10002 type InventorySourceFilter struct {
10003
10004
10005
10006
10007 InventorySourceIds googleapi.Int64s `json:"inventorySourceIds,omitempty"`
10008
10009
10010
10011
10012
10013 ForceSendFields []string `json:"-"`
10014
10015
10016
10017
10018 NullFields []string `json:"-"`
10019 }
10020
10021 func (s *InventorySourceFilter) MarshalJSON() ([]byte, error) {
10022 type NoMethod InventorySourceFilter
10023 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10024 }
10025
10026
10027 type InventorySourceGroup struct {
10028
10029
10030 DisplayName string `json:"displayName,omitempty"`
10031
10032
10033 InventorySourceGroupId int64 `json:"inventorySourceGroupId,omitempty,string"`
10034
10035 Name string `json:"name,omitempty"`
10036
10037
10038 googleapi.ServerResponse `json:"-"`
10039
10040
10041
10042
10043
10044 ForceSendFields []string `json:"-"`
10045
10046
10047
10048
10049 NullFields []string `json:"-"`
10050 }
10051
10052 func (s *InventorySourceGroup) MarshalJSON() ([]byte, error) {
10053 type NoMethod InventorySourceGroup
10054 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10055 }
10056
10057
10058
10059
10060
10061 type InventorySourceGroupAssignedTargetingOptionDetails struct {
10062
10063
10064
10065 InventorySourceGroupId int64 `json:"inventorySourceGroupId,omitempty,string"`
10066
10067
10068
10069
10070
10071 ForceSendFields []string `json:"-"`
10072
10073
10074
10075
10076 NullFields []string `json:"-"`
10077 }
10078
10079 func (s *InventorySourceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
10080 type NoMethod InventorySourceGroupAssignedTargetingOptionDetails
10081 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10082 }
10083
10084
10085 type InventorySourceStatus struct {
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101 ConfigStatus string `json:"configStatus,omitempty"`
10102
10103
10104
10105 EntityPauseReason string `json:"entityPauseReason,omitempty"`
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123 EntityStatus string `json:"entityStatus,omitempty"`
10124
10125
10126
10127 SellerPauseReason string `json:"sellerPauseReason,omitempty"`
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146 SellerStatus string `json:"sellerStatus,omitempty"`
10147
10148
10149
10150
10151
10152 ForceSendFields []string `json:"-"`
10153
10154
10155
10156
10157 NullFields []string `json:"-"`
10158 }
10159
10160 func (s *InventorySourceStatus) MarshalJSON() ([]byte, error) {
10161 type NoMethod InventorySourceStatus
10162 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10163 }
10164
10165
10166 type InventorySourceVideoCreativeConfig struct {
10167
10168
10169 Duration string `json:"duration,omitempty"`
10170
10171
10172
10173
10174
10175 ForceSendFields []string `json:"-"`
10176
10177
10178
10179
10180 NullFields []string `json:"-"`
10181 }
10182
10183 func (s *InventorySourceVideoCreativeConfig) MarshalJSON() ([]byte, error) {
10184 type NoMethod InventorySourceVideoCreativeConfig
10185 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10186 }
10187
10188
10189 type Invoice struct {
10190
10191
10192
10193 BudgetInvoiceGroupingId string `json:"budgetInvoiceGroupingId,omitempty"`
10194
10195
10196
10197
10198 BudgetSummaries []*BudgetSummary `json:"budgetSummaries,omitempty"`
10199
10200
10201
10202 CorrectedInvoiceId string `json:"correctedInvoiceId,omitempty"`
10203
10204 CurrencyCode string `json:"currencyCode,omitempty"`
10205
10206 DisplayName string `json:"displayName,omitempty"`
10207
10208 DueDate *Date `json:"dueDate,omitempty"`
10209
10210 InvoiceId string `json:"invoiceId,omitempty"`
10211
10212
10213
10214
10215
10216
10217 InvoiceType string `json:"invoiceType,omitempty"`
10218
10219 IssueDate *Date `json:"issueDate,omitempty"`
10220
10221 Name string `json:"name,omitempty"`
10222
10223
10224
10225 NonBudgetMicros int64 `json:"nonBudgetMicros,omitempty,string"`
10226
10227
10228 PaymentsAccountId string `json:"paymentsAccountId,omitempty"`
10229
10230
10231 PaymentsProfileId string `json:"paymentsProfileId,omitempty"`
10232
10233
10234
10235
10236
10237
10238
10239
10240 PdfUrl string `json:"pdfUrl,omitempty"`
10241
10242 PurchaseOrderNumber string `json:"purchaseOrderNumber,omitempty"`
10243
10244
10245
10246
10247
10248 ReplacedInvoiceIds []string `json:"replacedInvoiceIds,omitempty"`
10249
10250
10251 ServiceDateRange *DateRange `json:"serviceDateRange,omitempty"`
10252
10253
10254
10255 SubtotalAmountMicros int64 `json:"subtotalAmountMicros,omitempty,string"`
10256
10257
10258
10259 TotalAmountMicros int64 `json:"totalAmountMicros,omitempty,string"`
10260
10261
10262
10263 TotalTaxAmountMicros int64 `json:"totalTaxAmountMicros,omitempty,string"`
10264
10265
10266
10267
10268
10269 ForceSendFields []string `json:"-"`
10270
10271
10272
10273
10274 NullFields []string `json:"-"`
10275 }
10276
10277 func (s *Invoice) MarshalJSON() ([]byte, error) {
10278 type NoMethod Invoice
10279 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10280 }
10281
10282
10283
10284
10285 type KeywordAssignedTargetingOptionDetails struct {
10286
10287
10288
10289
10290 Keyword string `json:"keyword,omitempty"`
10291
10292 Negative bool `json:"negative,omitempty"`
10293
10294
10295
10296
10297
10298 ForceSendFields []string `json:"-"`
10299
10300
10301
10302
10303 NullFields []string `json:"-"`
10304 }
10305
10306 func (s *KeywordAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
10307 type NoMethod KeywordAssignedTargetingOptionDetails
10308 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10309 }
10310
10311
10312
10313 type Kpi struct {
10314
10315
10316
10317 KpiAlgorithmId int64 `json:"kpiAlgorithmId,omitempty,string"`
10318
10319
10320
10321
10322 KpiAmountMicros int64 `json:"kpiAmountMicros,omitempty,string"`
10323
10324
10325
10326
10327
10328
10329 KpiPercentageMicros int64 `json:"kpiPercentageMicros,omitempty,string"`
10330
10331
10332
10333 KpiString string `json:"kpiString,omitempty"`
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370 KpiType string `json:"kpiType,omitempty"`
10371
10372
10373
10374
10375
10376 ForceSendFields []string `json:"-"`
10377
10378
10379
10380
10381 NullFields []string `json:"-"`
10382 }
10383
10384 func (s *Kpi) MarshalJSON() ([]byte, error) {
10385 type NoMethod Kpi
10386 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10387 }
10388
10389
10390
10391
10392 type LanguageAssignedTargetingOptionDetails struct {
10393
10394 DisplayName string `json:"displayName,omitempty"`
10395
10396
10397
10398 Negative bool `json:"negative,omitempty"`
10399
10400
10401 TargetingOptionId string `json:"targetingOptionId,omitempty"`
10402
10403
10404
10405
10406
10407 ForceSendFields []string `json:"-"`
10408
10409
10410
10411
10412 NullFields []string `json:"-"`
10413 }
10414
10415 func (s *LanguageAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
10416 type NoMethod LanguageAssignedTargetingOptionDetails
10417 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10418 }
10419
10420
10421
10422
10423 type LanguageTargetingOptionDetails struct {
10424
10425 DisplayName string `json:"displayName,omitempty"`
10426
10427
10428
10429
10430
10431 ForceSendFields []string `json:"-"`
10432
10433
10434
10435
10436 NullFields []string `json:"-"`
10437 }
10438
10439 func (s *LanguageTargetingOptionDetails) MarshalJSON() ([]byte, error) {
10440 type NoMethod LanguageTargetingOptionDetails
10441 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10442 }
10443
10444
10445 type LineItem struct {
10446
10447
10448 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10449
10450 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"`
10451
10452 Budget *LineItemBudget `json:"budget,omitempty"`
10453
10454
10455 CampaignId int64 `json:"campaignId,omitempty,string"`
10456
10457 ConversionCounting *ConversionCountingConfig `json:"conversionCounting,omitempty"`
10458
10459 CreativeIds googleapi.Int64s `json:"creativeIds,omitempty"`
10460
10461
10462 DisplayName string `json:"displayName,omitempty"`
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485 EntityStatus string `json:"entityStatus,omitempty"`
10486
10487
10488 ExcludeNewExchanges bool `json:"excludeNewExchanges,omitempty"`
10489
10490 Flight *LineItemFlight `json:"flight,omitempty"`
10491
10492
10493
10494 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
10495
10496
10497 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"`
10498
10499 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"`
10500
10501
10502 LineItemId int64 `json:"lineItemId,omitempty,string"`
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573 LineItemType string `json:"lineItemType,omitempty"`
10574
10575
10576
10577 MobileApp *MobileApp `json:"mobileApp,omitempty"`
10578
10579 Name string `json:"name,omitempty"`
10580
10581 Pacing *Pacing `json:"pacing,omitempty"`
10582
10583
10584
10585 PartnerCosts []*PartnerCost `json:"partnerCosts,omitempty"`
10586
10587
10588 PartnerRevenueModel *PartnerRevenueModel `json:"partnerRevenueModel,omitempty"`
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604 ReservationType string `json:"reservationType,omitempty"`
10605
10606
10607
10608
10609 TargetingExpansion *TargetingExpansionConfig `json:"targetingExpansion,omitempty"`
10610
10611
10612 UpdateTime string `json:"updateTime,omitempty"`
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640 WarningMessages []string `json:"warningMessages,omitempty"`
10641
10642
10643 YoutubeAndPartnersSettings *YoutubeAndPartnersSettings `json:"youtubeAndPartnersSettings,omitempty"`
10644
10645
10646 googleapi.ServerResponse `json:"-"`
10647
10648
10649
10650
10651
10652 ForceSendFields []string `json:"-"`
10653
10654
10655
10656
10657 NullFields []string `json:"-"`
10658 }
10659
10660 func (s *LineItem) MarshalJSON() ([]byte, error) {
10661 type NoMethod LineItem
10662 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10663 }
10664
10665
10666
10667 type LineItemAssignedTargetingOption struct {
10668
10669 AssignedTargetingOption *AssignedTargetingOption `json:"assignedTargetingOption,omitempty"`
10670
10671
10672 LineItemId int64 `json:"lineItemId,omitempty,string"`
10673
10674
10675
10676
10677
10678 ForceSendFields []string `json:"-"`
10679
10680
10681
10682
10683 NullFields []string `json:"-"`
10684 }
10685
10686 func (s *LineItemAssignedTargetingOption) MarshalJSON() ([]byte, error) {
10687 type NoMethod LineItemAssignedTargetingOption
10688 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10689 }
10690
10691
10692 type LineItemBudget struct {
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706 BudgetAllocationType string `json:"budgetAllocationType,omitempty"`
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716 BudgetUnit string `json:"budgetUnit,omitempty"`
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727 MaxAmount int64 `json:"maxAmount,omitempty,string"`
10728
10729
10730
10731
10732
10733 ForceSendFields []string `json:"-"`
10734
10735
10736
10737
10738 NullFields []string `json:"-"`
10739 }
10740
10741 func (s *LineItemBudget) MarshalJSON() ([]byte, error) {
10742 type NoMethod LineItemBudget
10743 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10744 }
10745
10746
10747 type LineItemFlight struct {
10748
10749
10750
10751
10752
10753
10754
10755 DateRange *DateRange `json:"dateRange,omitempty"`
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765 FlightDateType string `json:"flightDateType,omitempty"`
10766
10767
10768
10769
10770
10771 ForceSendFields []string `json:"-"`
10772
10773
10774
10775
10776 NullFields []string `json:"-"`
10777 }
10778
10779 func (s *LineItemFlight) MarshalJSON() ([]byte, error) {
10780 type NoMethod LineItemFlight
10781 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10782 }
10783
10784 type ListAdGroupAdsResponse struct {
10785
10786 AdGroupAds []*AdGroupAd `json:"adGroupAds,omitempty"`
10787
10788
10789
10790 NextPageToken string `json:"nextPageToken,omitempty"`
10791
10792
10793 googleapi.ServerResponse `json:"-"`
10794
10795
10796
10797
10798
10799 ForceSendFields []string `json:"-"`
10800
10801
10802
10803
10804 NullFields []string `json:"-"`
10805 }
10806
10807 func (s *ListAdGroupAdsResponse) MarshalJSON() ([]byte, error) {
10808 type NoMethod ListAdGroupAdsResponse
10809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10810 }
10811
10812
10813
10814 type ListAdGroupAssignedTargetingOptionsResponse struct {
10815
10816
10817 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
10818
10819
10820
10821
10822
10823 NextPageToken string `json:"nextPageToken,omitempty"`
10824
10825
10826 googleapi.ServerResponse `json:"-"`
10827
10828
10829
10830
10831
10832 ForceSendFields []string `json:"-"`
10833
10834
10835
10836
10837 NullFields []string `json:"-"`
10838 }
10839
10840 func (s *ListAdGroupAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
10841 type NoMethod ListAdGroupAssignedTargetingOptionsResponse
10842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10843 }
10844
10845 type ListAdGroupsResponse struct {
10846
10847 AdGroups []*AdGroup `json:"adGroups,omitempty"`
10848
10849
10850
10851 NextPageToken string `json:"nextPageToken,omitempty"`
10852
10853
10854 googleapi.ServerResponse `json:"-"`
10855
10856
10857
10858
10859
10860 ForceSendFields []string `json:"-"`
10861
10862
10863
10864
10865 NullFields []string `json:"-"`
10866 }
10867
10868 func (s *ListAdGroupsResponse) MarshalJSON() ([]byte, error) {
10869 type NoMethod ListAdGroupsResponse
10870 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10871 }
10872
10873
10874
10875 type ListAdvertiserAssignedTargetingOptionsResponse struct {
10876
10877
10878 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
10879
10880
10881
10882
10883
10884 NextPageToken string `json:"nextPageToken,omitempty"`
10885
10886
10887 googleapi.ServerResponse `json:"-"`
10888
10889
10890
10891
10892
10893 ForceSendFields []string `json:"-"`
10894
10895
10896
10897
10898 NullFields []string `json:"-"`
10899 }
10900
10901 func (s *ListAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
10902 type NoMethod ListAdvertiserAssignedTargetingOptionsResponse
10903 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10904 }
10905
10906 type ListAdvertisersResponse struct {
10907
10908 Advertisers []*Advertiser `json:"advertisers,omitempty"`
10909
10910
10911
10912 NextPageToken string `json:"nextPageToken,omitempty"`
10913
10914
10915 googleapi.ServerResponse `json:"-"`
10916
10917
10918
10919
10920
10921 ForceSendFields []string `json:"-"`
10922
10923
10924
10925
10926 NullFields []string `json:"-"`
10927 }
10928
10929 func (s *ListAdvertisersResponse) MarshalJSON() ([]byte, error) {
10930 type NoMethod ListAdvertisersResponse
10931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10932 }
10933
10934
10935
10936 type ListAssignedInventorySourcesResponse struct {
10937
10938
10939 AssignedInventorySources []*AssignedInventorySource `json:"assignedInventorySources,omitempty"`
10940
10941
10942
10943 NextPageToken string `json:"nextPageToken,omitempty"`
10944
10945
10946 googleapi.ServerResponse `json:"-"`
10947
10948
10949
10950
10951
10952 ForceSendFields []string `json:"-"`
10953
10954
10955
10956
10957 NullFields []string `json:"-"`
10958 }
10959
10960 func (s *ListAssignedInventorySourcesResponse) MarshalJSON() ([]byte, error) {
10961 type NoMethod ListAssignedInventorySourcesResponse
10962 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10963 }
10964
10965
10966
10967 type ListAssignedLocationsResponse struct {
10968
10969
10970 AssignedLocations []*AssignedLocation `json:"assignedLocations,omitempty"`
10971
10972
10973
10974 NextPageToken string `json:"nextPageToken,omitempty"`
10975
10976
10977 googleapi.ServerResponse `json:"-"`
10978
10979
10980
10981
10982
10983 ForceSendFields []string `json:"-"`
10984
10985
10986
10987
10988 NullFields []string `json:"-"`
10989 }
10990
10991 func (s *ListAssignedLocationsResponse) MarshalJSON() ([]byte, error) {
10992 type NoMethod ListAssignedLocationsResponse
10993 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10994 }
10995
10996
10997
10998 type ListCampaignAssignedTargetingOptionsResponse struct {
10999
11000
11001 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
11002
11003
11004
11005
11006
11007 NextPageToken string `json:"nextPageToken,omitempty"`
11008
11009
11010 googleapi.ServerResponse `json:"-"`
11011
11012
11013
11014
11015
11016 ForceSendFields []string `json:"-"`
11017
11018
11019
11020
11021 NullFields []string `json:"-"`
11022 }
11023
11024 func (s *ListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
11025 type NoMethod ListCampaignAssignedTargetingOptionsResponse
11026 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11027 }
11028
11029 type ListCampaignsResponse struct {
11030
11031 Campaigns []*Campaign `json:"campaigns,omitempty"`
11032
11033
11034
11035 NextPageToken string `json:"nextPageToken,omitempty"`
11036
11037
11038 googleapi.ServerResponse `json:"-"`
11039
11040
11041
11042
11043
11044 ForceSendFields []string `json:"-"`
11045
11046
11047
11048
11049 NullFields []string `json:"-"`
11050 }
11051
11052 func (s *ListCampaignsResponse) MarshalJSON() ([]byte, error) {
11053 type NoMethod ListCampaignsResponse
11054 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11055 }
11056
11057 type ListChannelsResponse struct {
11058
11059 Channels []*Channel `json:"channels,omitempty"`
11060
11061
11062
11063 NextPageToken string `json:"nextPageToken,omitempty"`
11064
11065
11066 googleapi.ServerResponse `json:"-"`
11067
11068
11069
11070
11071
11072 ForceSendFields []string `json:"-"`
11073
11074
11075
11076
11077 NullFields []string `json:"-"`
11078 }
11079
11080 func (s *ListChannelsResponse) MarshalJSON() ([]byte, error) {
11081 type NoMethod ListChannelsResponse
11082 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11083 }
11084
11085 type ListCombinedAudiencesResponse struct {
11086
11087
11088 CombinedAudiences []*CombinedAudience `json:"combinedAudiences,omitempty"`
11089
11090
11091
11092 NextPageToken string `json:"nextPageToken,omitempty"`
11093
11094
11095 googleapi.ServerResponse `json:"-"`
11096
11097
11098
11099
11100
11101 ForceSendFields []string `json:"-"`
11102
11103
11104
11105
11106 NullFields []string `json:"-"`
11107 }
11108
11109 func (s *ListCombinedAudiencesResponse) MarshalJSON() ([]byte, error) {
11110 type NoMethod ListCombinedAudiencesResponse
11111 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11112 }
11113
11114 type ListCreativesResponse struct {
11115
11116 Creatives []*Creative `json:"creatives,omitempty"`
11117
11118
11119
11120
11121 NextPageToken string `json:"nextPageToken,omitempty"`
11122
11123
11124 googleapi.ServerResponse `json:"-"`
11125
11126
11127
11128
11129
11130 ForceSendFields []string `json:"-"`
11131
11132
11133
11134
11135 NullFields []string `json:"-"`
11136 }
11137
11138 func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) {
11139 type NoMethod ListCreativesResponse
11140 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11141 }
11142
11143 type ListCustomBiddingAlgorithmRulesResponse struct {
11144
11145
11146 CustomBiddingRules []*CustomBiddingAlgorithmRules `json:"customBiddingRules,omitempty"`
11147
11148
11149
11150
11151 NextPageToken string `json:"nextPageToken,omitempty"`
11152
11153
11154 googleapi.ServerResponse `json:"-"`
11155
11156
11157
11158
11159
11160 ForceSendFields []string `json:"-"`
11161
11162
11163
11164
11165 NullFields []string `json:"-"`
11166 }
11167
11168 func (s *ListCustomBiddingAlgorithmRulesResponse) MarshalJSON() ([]byte, error) {
11169 type NoMethod ListCustomBiddingAlgorithmRulesResponse
11170 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11171 }
11172
11173 type ListCustomBiddingAlgorithmsResponse struct {
11174
11175
11176 CustomBiddingAlgorithms []*CustomBiddingAlgorithm `json:"customBiddingAlgorithms,omitempty"`
11177
11178
11179
11180
11181 NextPageToken string `json:"nextPageToken,omitempty"`
11182
11183
11184 googleapi.ServerResponse `json:"-"`
11185
11186
11187
11188
11189
11190 ForceSendFields []string `json:"-"`
11191
11192
11193
11194
11195 NullFields []string `json:"-"`
11196 }
11197
11198 func (s *ListCustomBiddingAlgorithmsResponse) MarshalJSON() ([]byte, error) {
11199 type NoMethod ListCustomBiddingAlgorithmsResponse
11200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11201 }
11202
11203 type ListCustomBiddingScriptsResponse struct {
11204
11205
11206 CustomBiddingScripts []*CustomBiddingScript `json:"customBiddingScripts,omitempty"`
11207
11208
11209
11210
11211 NextPageToken string `json:"nextPageToken,omitempty"`
11212
11213
11214 googleapi.ServerResponse `json:"-"`
11215
11216
11217
11218
11219
11220 ForceSendFields []string `json:"-"`
11221
11222
11223
11224
11225 NullFields []string `json:"-"`
11226 }
11227
11228 func (s *ListCustomBiddingScriptsResponse) MarshalJSON() ([]byte, error) {
11229 type NoMethod ListCustomBiddingScriptsResponse
11230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11231 }
11232
11233 type ListCustomListsResponse struct {
11234
11235 CustomLists []*CustomList `json:"customLists,omitempty"`
11236
11237
11238
11239 NextPageToken string `json:"nextPageToken,omitempty"`
11240
11241
11242 googleapi.ServerResponse `json:"-"`
11243
11244
11245
11246
11247
11248 ForceSendFields []string `json:"-"`
11249
11250
11251
11252
11253 NullFields []string `json:"-"`
11254 }
11255
11256 func (s *ListCustomListsResponse) MarshalJSON() ([]byte, error) {
11257 type NoMethod ListCustomListsResponse
11258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11259 }
11260
11261 type ListFirstAndThirdPartyAudiencesResponse struct {
11262
11263
11264
11265 FirstAndThirdPartyAudiences []*FirstAndThirdPartyAudience `json:"firstAndThirdPartyAudiences,omitempty"`
11266
11267
11268
11269
11270 NextPageToken string `json:"nextPageToken,omitempty"`
11271
11272
11273 googleapi.ServerResponse `json:"-"`
11274
11275
11276
11277
11278
11279 ForceSendFields []string `json:"-"`
11280
11281
11282
11283
11284 NullFields []string `json:"-"`
11285 }
11286
11287 func (s *ListFirstAndThirdPartyAudiencesResponse) MarshalJSON() ([]byte, error) {
11288 type NoMethod ListFirstAndThirdPartyAudiencesResponse
11289 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11290 }
11291
11292 type ListFloodlightActivitiesResponse struct {
11293
11294
11295 FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
11296
11297
11298
11299 NextPageToken string `json:"nextPageToken,omitempty"`
11300
11301
11302 googleapi.ServerResponse `json:"-"`
11303
11304
11305
11306
11307
11308 ForceSendFields []string `json:"-"`
11309
11310
11311
11312
11313 NullFields []string `json:"-"`
11314 }
11315
11316 func (s *ListFloodlightActivitiesResponse) MarshalJSON() ([]byte, error) {
11317 type NoMethod ListFloodlightActivitiesResponse
11318 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11319 }
11320
11321 type ListGoogleAudiencesResponse struct {
11322
11323
11324 GoogleAudiences []*GoogleAudience `json:"googleAudiences,omitempty"`
11325
11326
11327
11328 NextPageToken string `json:"nextPageToken,omitempty"`
11329
11330
11331 googleapi.ServerResponse `json:"-"`
11332
11333
11334
11335
11336
11337 ForceSendFields []string `json:"-"`
11338
11339
11340
11341
11342 NullFields []string `json:"-"`
11343 }
11344
11345 func (s *ListGoogleAudiencesResponse) MarshalJSON() ([]byte, error) {
11346 type NoMethod ListGoogleAudiencesResponse
11347 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11348 }
11349
11350 type ListGuaranteedOrdersResponse struct {
11351
11352
11353 GuaranteedOrders []*GuaranteedOrder `json:"guaranteedOrders,omitempty"`
11354
11355
11356
11357 NextPageToken string `json:"nextPageToken,omitempty"`
11358
11359
11360 googleapi.ServerResponse `json:"-"`
11361
11362
11363
11364
11365
11366 ForceSendFields []string `json:"-"`
11367
11368
11369
11370
11371 NullFields []string `json:"-"`
11372 }
11373
11374 func (s *ListGuaranteedOrdersResponse) MarshalJSON() ([]byte, error) {
11375 type NoMethod ListGuaranteedOrdersResponse
11376 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11377 }
11378
11379 type ListInsertionOrderAssignedTargetingOptionsResponse struct {
11380
11381
11382 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
11383
11384
11385
11386
11387
11388 NextPageToken string `json:"nextPageToken,omitempty"`
11389
11390
11391 googleapi.ServerResponse `json:"-"`
11392
11393
11394
11395
11396
11397 ForceSendFields []string `json:"-"`
11398
11399
11400
11401
11402 NullFields []string `json:"-"`
11403 }
11404
11405 func (s *ListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
11406 type NoMethod ListInsertionOrderAssignedTargetingOptionsResponse
11407 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11408 }
11409
11410 type ListInsertionOrdersResponse struct {
11411
11412
11413 InsertionOrders []*InsertionOrder `json:"insertionOrders,omitempty"`
11414
11415
11416
11417 NextPageToken string `json:"nextPageToken,omitempty"`
11418
11419
11420 googleapi.ServerResponse `json:"-"`
11421
11422
11423
11424
11425
11426 ForceSendFields []string `json:"-"`
11427
11428
11429
11430
11431 NullFields []string `json:"-"`
11432 }
11433
11434 func (s *ListInsertionOrdersResponse) MarshalJSON() ([]byte, error) {
11435 type NoMethod ListInsertionOrdersResponse
11436 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11437 }
11438
11439
11440
11441 type ListInventorySourceGroupsResponse struct {
11442
11443
11444 InventorySourceGroups []*InventorySourceGroup `json:"inventorySourceGroups,omitempty"`
11445
11446
11447
11448 NextPageToken string `json:"nextPageToken,omitempty"`
11449
11450
11451 googleapi.ServerResponse `json:"-"`
11452
11453
11454
11455
11456
11457 ForceSendFields []string `json:"-"`
11458
11459
11460
11461
11462 NullFields []string `json:"-"`
11463 }
11464
11465 func (s *ListInventorySourceGroupsResponse) MarshalJSON() ([]byte, error) {
11466 type NoMethod ListInventorySourceGroupsResponse
11467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11468 }
11469
11470 type ListInventorySourcesResponse struct {
11471
11472
11473 InventorySources []*InventorySource `json:"inventorySources,omitempty"`
11474
11475
11476
11477 NextPageToken string `json:"nextPageToken,omitempty"`
11478
11479
11480 googleapi.ServerResponse `json:"-"`
11481
11482
11483
11484
11485
11486 ForceSendFields []string `json:"-"`
11487
11488
11489
11490
11491 NullFields []string `json:"-"`
11492 }
11493
11494 func (s *ListInventorySourcesResponse) MarshalJSON() ([]byte, error) {
11495 type NoMethod ListInventorySourcesResponse
11496 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11497 }
11498
11499 type ListInvoicesResponse struct {
11500
11501 Invoices []*Invoice `json:"invoices,omitempty"`
11502
11503
11504
11505
11506 NextPageToken string `json:"nextPageToken,omitempty"`
11507
11508
11509 googleapi.ServerResponse `json:"-"`
11510
11511
11512
11513
11514
11515 ForceSendFields []string `json:"-"`
11516
11517
11518
11519
11520 NullFields []string `json:"-"`
11521 }
11522
11523 func (s *ListInvoicesResponse) MarshalJSON() ([]byte, error) {
11524 type NoMethod ListInvoicesResponse
11525 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11526 }
11527
11528
11529
11530 type ListLineItemAssignedTargetingOptionsResponse struct {
11531
11532
11533 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
11534
11535
11536
11537
11538
11539 NextPageToken string `json:"nextPageToken,omitempty"`
11540
11541
11542 googleapi.ServerResponse `json:"-"`
11543
11544
11545
11546
11547
11548 ForceSendFields []string `json:"-"`
11549
11550
11551
11552
11553 NullFields []string `json:"-"`
11554 }
11555
11556 func (s *ListLineItemAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
11557 type NoMethod ListLineItemAssignedTargetingOptionsResponse
11558 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11559 }
11560
11561 type ListLineItemsResponse struct {
11562
11563 LineItems []*LineItem `json:"lineItems,omitempty"`
11564
11565
11566
11567 NextPageToken string `json:"nextPageToken,omitempty"`
11568
11569
11570 googleapi.ServerResponse `json:"-"`
11571
11572
11573
11574
11575
11576 ForceSendFields []string `json:"-"`
11577
11578
11579
11580
11581 NullFields []string `json:"-"`
11582 }
11583
11584 func (s *ListLineItemsResponse) MarshalJSON() ([]byte, error) {
11585 type NoMethod ListLineItemsResponse
11586 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11587 }
11588
11589 type ListLocationListsResponse struct {
11590
11591
11592 LocationLists []*LocationList `json:"locationLists,omitempty"`
11593
11594
11595
11596 NextPageToken string `json:"nextPageToken,omitempty"`
11597
11598
11599 googleapi.ServerResponse `json:"-"`
11600
11601
11602
11603
11604
11605 ForceSendFields []string `json:"-"`
11606
11607
11608
11609
11610 NullFields []string `json:"-"`
11611 }
11612
11613 func (s *ListLocationListsResponse) MarshalJSON() ([]byte, error) {
11614 type NoMethod ListLocationListsResponse
11615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11616 }
11617
11618
11619
11620 type ListNegativeKeywordListsResponse struct {
11621
11622
11623 NegativeKeywordLists []*NegativeKeywordList `json:"negativeKeywordLists,omitempty"`
11624
11625
11626
11627 NextPageToken string `json:"nextPageToken,omitempty"`
11628
11629
11630 googleapi.ServerResponse `json:"-"`
11631
11632
11633
11634
11635
11636 ForceSendFields []string `json:"-"`
11637
11638
11639
11640
11641 NullFields []string `json:"-"`
11642 }
11643
11644 func (s *ListNegativeKeywordListsResponse) MarshalJSON() ([]byte, error) {
11645 type NoMethod ListNegativeKeywordListsResponse
11646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11647 }
11648
11649
11650
11651 type ListNegativeKeywordsResponse struct {
11652
11653
11654 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"`
11655
11656
11657
11658 NextPageToken string `json:"nextPageToken,omitempty"`
11659
11660
11661 googleapi.ServerResponse `json:"-"`
11662
11663
11664
11665
11666
11667 ForceSendFields []string `json:"-"`
11668
11669
11670
11671
11672 NullFields []string `json:"-"`
11673 }
11674
11675 func (s *ListNegativeKeywordsResponse) MarshalJSON() ([]byte, error) {
11676 type NoMethod ListNegativeKeywordsResponse
11677 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11678 }
11679
11680 type ListPartnerAssignedTargetingOptionsResponse struct {
11681
11682
11683 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"`
11684
11685
11686
11687
11688
11689 NextPageToken string `json:"nextPageToken,omitempty"`
11690
11691
11692 googleapi.ServerResponse `json:"-"`
11693
11694
11695
11696
11697
11698 ForceSendFields []string `json:"-"`
11699
11700
11701
11702
11703 NullFields []string `json:"-"`
11704 }
11705
11706 func (s *ListPartnerAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
11707 type NoMethod ListPartnerAssignedTargetingOptionsResponse
11708 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11709 }
11710
11711 type ListPartnersResponse struct {
11712
11713
11714
11715 NextPageToken string `json:"nextPageToken,omitempty"`
11716
11717 Partners []*Partner `json:"partners,omitempty"`
11718
11719
11720 googleapi.ServerResponse `json:"-"`
11721
11722
11723
11724
11725
11726 ForceSendFields []string `json:"-"`
11727
11728
11729
11730
11731 NullFields []string `json:"-"`
11732 }
11733
11734 func (s *ListPartnersResponse) MarshalJSON() ([]byte, error) {
11735 type NoMethod ListPartnersResponse
11736 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11737 }
11738
11739
11740 type ListSitesResponse struct {
11741
11742
11743
11744 NextPageToken string `json:"nextPageToken,omitempty"`
11745
11746 Sites []*Site `json:"sites,omitempty"`
11747
11748
11749 googleapi.ServerResponse `json:"-"`
11750
11751
11752
11753
11754
11755 ForceSendFields []string `json:"-"`
11756
11757
11758
11759
11760 NullFields []string `json:"-"`
11761 }
11762
11763 func (s *ListSitesResponse) MarshalJSON() ([]byte, error) {
11764 type NoMethod ListSitesResponse
11765 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11766 }
11767
11768
11769 type ListTargetingOptionsResponse struct {
11770
11771
11772
11773 NextPageToken string `json:"nextPageToken,omitempty"`
11774
11775
11776 TargetingOptions []*TargetingOption `json:"targetingOptions,omitempty"`
11777
11778
11779 googleapi.ServerResponse `json:"-"`
11780
11781
11782
11783
11784
11785 ForceSendFields []string `json:"-"`
11786
11787
11788
11789
11790 NullFields []string `json:"-"`
11791 }
11792
11793 func (s *ListTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
11794 type NoMethod ListTargetingOptionsResponse
11795 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11796 }
11797
11798 type ListUsersResponse struct {
11799
11800
11801
11802
11803 NextPageToken string `json:"nextPageToken,omitempty"`
11804
11805 Users []*User `json:"users,omitempty"`
11806
11807
11808 googleapi.ServerResponse `json:"-"`
11809
11810
11811
11812
11813
11814 ForceSendFields []string `json:"-"`
11815
11816
11817
11818
11819 NullFields []string `json:"-"`
11820 }
11821
11822 func (s *ListUsersResponse) MarshalJSON() ([]byte, error) {
11823 type NoMethod ListUsersResponse
11824 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11825 }
11826
11827
11828 type LocationList struct {
11829
11830
11831 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11832
11833
11834 DisplayName string `json:"displayName,omitempty"`
11835
11836
11837 LocationListId int64 `json:"locationListId,omitempty,string"`
11838
11839
11840
11841
11842
11843
11844
11845
11846 LocationType string `json:"locationType,omitempty"`
11847
11848 Name string `json:"name,omitempty"`
11849
11850
11851 googleapi.ServerResponse `json:"-"`
11852
11853
11854
11855
11856
11857 ForceSendFields []string `json:"-"`
11858
11859
11860
11861
11862 NullFields []string `json:"-"`
11863 }
11864
11865 func (s *LocationList) MarshalJSON() ([]byte, error) {
11866 type NoMethod LocationList
11867 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11868 }
11869
11870
11871
11872 type LookbackWindow struct {
11873
11874
11875 ClickDays int64 `json:"clickDays,omitempty"`
11876
11877
11878 ImpressionDays int64 `json:"impressionDays,omitempty"`
11879
11880
11881
11882
11883
11884 ForceSendFields []string `json:"-"`
11885
11886
11887
11888
11889 NullFields []string `json:"-"`
11890 }
11891
11892 func (s *LookbackWindow) MarshalJSON() ([]byte, error) {
11893 type NoMethod LookbackWindow
11894 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11895 }
11896
11897 type LookupInvoiceCurrencyResponse struct {
11898
11899 CurrencyCode string `json:"currencyCode,omitempty"`
11900
11901
11902 googleapi.ServerResponse `json:"-"`
11903
11904
11905
11906
11907
11908 ForceSendFields []string `json:"-"`
11909
11910
11911
11912
11913 NullFields []string `json:"-"`
11914 }
11915
11916 func (s *LookupInvoiceCurrencyResponse) MarshalJSON() ([]byte, error) {
11917 type NoMethod LookupInvoiceCurrencyResponse
11918 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11919 }
11920
11921
11922 type MastheadAd struct {
11923
11924 AutoplayVideoDuration string `json:"autoplayVideoDuration,omitempty"`
11925
11926
11927 AutoplayVideoStartMillisecond int64 `json:"autoplayVideoStartMillisecond,omitempty,string"`
11928
11929 CallToActionButtonLabel string `json:"callToActionButtonLabel,omitempty"`
11930
11931 CallToActionFinalUrl string `json:"callToActionFinalUrl,omitempty"`
11932
11933 CallToActionTrackingUrl string `json:"callToActionTrackingUrl,omitempty"`
11934
11935
11936 CompanionYoutubeVideos []*YoutubeVideoDetails `json:"companionYoutubeVideos,omitempty"`
11937
11938 Description string `json:"description,omitempty"`
11939
11940 Headline string `json:"headline,omitempty"`
11941
11942
11943 ShowChannelArt bool `json:"showChannelArt,omitempty"`
11944
11945 Video *YoutubeVideoDetails `json:"video,omitempty"`
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955 VideoAspectRatio string `json:"videoAspectRatio,omitempty"`
11956
11957
11958
11959
11960
11961 ForceSendFields []string `json:"-"`
11962
11963
11964
11965
11966 NullFields []string `json:"-"`
11967 }
11968
11969 func (s *MastheadAd) MarshalJSON() ([]byte, error) {
11970 type NoMethod MastheadAd
11971 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11972 }
11973
11974
11975
11976 type MaximizeSpendBidStrategy struct {
11977
11978
11979
11980 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
11981
11982
11983
11984
11985 MaxAverageCpmBidAmountMicros int64 `json:"maxAverageCpmBidAmountMicros,omitempty,string"`
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004 PerformanceGoalType string `json:"performanceGoalType,omitempty"`
12005
12006 RaiseBidForDeals bool `json:"raiseBidForDeals,omitempty"`
12007
12008
12009
12010
12011
12012 ForceSendFields []string `json:"-"`
12013
12014
12015
12016
12017 NullFields []string `json:"-"`
12018 }
12019
12020 func (s *MaximizeSpendBidStrategy) MarshalJSON() ([]byte, error) {
12021 type NoMethod MaximizeSpendBidStrategy
12022 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12023 }
12024
12025
12026 type MeasurementConfig struct {
12027
12028 Dv360ToCmCostReportingEnabled bool `json:"dv360ToCmCostReportingEnabled,omitempty"`
12029
12030
12031 Dv360ToCmDataSharingEnabled bool `json:"dv360ToCmDataSharingEnabled,omitempty"`
12032
12033
12034
12035
12036
12037 ForceSendFields []string `json:"-"`
12038
12039
12040
12041
12042 NullFields []string `json:"-"`
12043 }
12044
12045 func (s *MeasurementConfig) MarshalJSON() ([]byte, error) {
12046 type NoMethod MeasurementConfig
12047 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12048 }
12049
12050
12051 type MobileApp struct {
12052
12053
12054
12055
12056 AppId string `json:"appId,omitempty"`
12057
12058 DisplayName string `json:"displayName,omitempty"`
12059
12060
12061
12062
12063
12064
12065 Platform string `json:"platform,omitempty"`
12066
12067 Publisher string `json:"publisher,omitempty"`
12068
12069
12070
12071
12072
12073 ForceSendFields []string `json:"-"`
12074
12075
12076
12077
12078 NullFields []string `json:"-"`
12079 }
12080
12081 func (s *MobileApp) MarshalJSON() ([]byte, error) {
12082 type NoMethod MobileApp
12083 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12084 }
12085
12086
12087
12088 type MobileDeviceIdList struct {
12089
12090
12091
12092
12093 Consent *Consent `json:"consent,omitempty"`
12094
12095
12096
12097 MobileDeviceIds []string `json:"mobileDeviceIds,omitempty"`
12098
12099
12100
12101
12102
12103 ForceSendFields []string `json:"-"`
12104
12105
12106
12107
12108 NullFields []string `json:"-"`
12109 }
12110
12111 func (s *MobileDeviceIdList) MarshalJSON() ([]byte, error) {
12112 type NoMethod MobileDeviceIdList
12113 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12114 }
12115
12116
12117 type Money struct {
12118
12119 CurrencyCode string `json:"currencyCode,omitempty"`
12120
12121
12122
12123
12124
12125 Nanos int64 `json:"nanos,omitempty"`
12126
12127
12128 Units int64 `json:"units,omitempty,string"`
12129
12130
12131
12132
12133
12134 ForceSendFields []string `json:"-"`
12135
12136
12137
12138
12139 NullFields []string `json:"-"`
12140 }
12141
12142 func (s *Money) MarshalJSON() ([]byte, error) {
12143 type NoMethod Money
12144 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12145 }
12146
12147
12148
12149
12150
12151
12152
12153 type NativeContentPositionAssignedTargetingOptionDetails struct {
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173 ContentPosition string `json:"contentPosition,omitempty"`
12174
12175
12176
12177
12178
12179 ForceSendFields []string `json:"-"`
12180
12181
12182
12183
12184 NullFields []string `json:"-"`
12185 }
12186
12187 func (s *NativeContentPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12188 type NoMethod NativeContentPositionAssignedTargetingOptionDetails
12189 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12190 }
12191
12192
12193
12194
12195
12196 type NativeContentPositionTargetingOptionDetails struct {
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216 ContentPosition string `json:"contentPosition,omitempty"`
12217
12218
12219
12220
12221
12222 ForceSendFields []string `json:"-"`
12223
12224
12225
12226
12227 NullFields []string `json:"-"`
12228 }
12229
12230 func (s *NativeContentPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12231 type NoMethod NativeContentPositionTargetingOptionDetails
12232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12233 }
12234
12235
12236
12237 type NegativeKeyword struct {
12238
12239
12240
12241
12242
12243
12244 KeywordValue string `json:"keywordValue,omitempty"`
12245
12246 Name string `json:"name,omitempty"`
12247
12248
12249 googleapi.ServerResponse `json:"-"`
12250
12251
12252
12253
12254
12255 ForceSendFields []string `json:"-"`
12256
12257
12258
12259
12260 NullFields []string `json:"-"`
12261 }
12262
12263 func (s *NegativeKeyword) MarshalJSON() ([]byte, error) {
12264 type NoMethod NegativeKeyword
12265 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12266 }
12267
12268
12269 type NegativeKeywordList struct {
12270
12271
12272 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12273
12274
12275 DisplayName string `json:"displayName,omitempty"`
12276
12277 Name string `json:"name,omitempty"`
12278
12279
12280 NegativeKeywordListId int64 `json:"negativeKeywordListId,omitempty,string"`
12281
12282
12283 TargetedLineItemCount int64 `json:"targetedLineItemCount,omitempty,string"`
12284
12285
12286 googleapi.ServerResponse `json:"-"`
12287
12288
12289
12290
12291
12292 ForceSendFields []string `json:"-"`
12293
12294
12295
12296
12297 NullFields []string `json:"-"`
12298 }
12299
12300 func (s *NegativeKeywordList) MarshalJSON() ([]byte, error) {
12301 type NoMethod NegativeKeywordList
12302 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12303 }
12304
12305
12306
12307
12308
12309 type NegativeKeywordListAssignedTargetingOptionDetails struct {
12310
12311
12312
12313 NegativeKeywordListId int64 `json:"negativeKeywordListId,omitempty,string"`
12314
12315
12316
12317
12318
12319 ForceSendFields []string `json:"-"`
12320
12321
12322
12323
12324 NullFields []string `json:"-"`
12325 }
12326
12327 func (s *NegativeKeywordListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12328 type NoMethod NegativeKeywordListAssignedTargetingOptionDetails
12329 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12330 }
12331
12332
12333 type NonSkippableAd struct {
12334
12335 CommonInStreamAttribute *CommonInStreamAttribute `json:"commonInStreamAttribute,omitempty"`
12336
12337
12338 CustomParameters map[string]string `json:"customParameters,omitempty"`
12339
12340
12341
12342
12343
12344 ForceSendFields []string `json:"-"`
12345
12346
12347
12348
12349 NullFields []string `json:"-"`
12350 }
12351
12352 func (s *NonSkippableAd) MarshalJSON() ([]byte, error) {
12353 type NoMethod NonSkippableAd
12354 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12355 }
12356
12357
12358 type ObaIcon struct {
12359
12360
12361
12362 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
12363
12364 Dimensions *Dimensions `json:"dimensions,omitempty"`
12365
12366
12367
12368 LandingPageUrl string `json:"landingPageUrl,omitempty"`
12369
12370
12371
12372
12373
12374
12375
12376
12377 Position string `json:"position,omitempty"`
12378
12379 Program string `json:"program,omitempty"`
12380
12381 ResourceMimeType string `json:"resourceMimeType,omitempty"`
12382
12383 ResourceUrl string `json:"resourceUrl,omitempty"`
12384
12385
12386
12387 ViewTrackingUrl string `json:"viewTrackingUrl,omitempty"`
12388
12389
12390
12391
12392
12393 ForceSendFields []string `json:"-"`
12394
12395
12396
12397
12398 NullFields []string `json:"-"`
12399 }
12400
12401 func (s *ObaIcon) MarshalJSON() ([]byte, error) {
12402 type NoMethod ObaIcon
12403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12404 }
12405
12406
12407
12408
12409 type OmidAssignedTargetingOptionDetails struct {
12410
12411
12412
12413
12414
12415
12416
12417 Omid string `json:"omid,omitempty"`
12418
12419
12420
12421
12422
12423 ForceSendFields []string `json:"-"`
12424
12425
12426
12427
12428 NullFields []string `json:"-"`
12429 }
12430
12431 func (s *OmidAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12432 type NoMethod OmidAssignedTargetingOptionDetails
12433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12434 }
12435
12436
12437
12438
12439 type OmidTargetingOptionDetails struct {
12440
12441
12442
12443
12444
12445
12446
12447 Omid string `json:"omid,omitempty"`
12448
12449
12450
12451
12452
12453 ForceSendFields []string `json:"-"`
12454
12455
12456
12457
12458 NullFields []string `json:"-"`
12459 }
12460
12461 func (s *OmidTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12462 type NoMethod OmidTargetingOptionDetails
12463 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12464 }
12465
12466
12467
12468
12469 type OnScreenPositionAssignedTargetingOptionDetails struct {
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486 AdType string `json:"adType,omitempty"`
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496 OnScreenPosition string `json:"onScreenPosition,omitempty"`
12497
12498
12499 TargetingOptionId string `json:"targetingOptionId,omitempty"`
12500
12501
12502
12503
12504
12505 ForceSendFields []string `json:"-"`
12506
12507
12508
12509
12510 NullFields []string `json:"-"`
12511 }
12512
12513 func (s *OnScreenPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12514 type NoMethod OnScreenPositionAssignedTargetingOptionDetails
12515 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12516 }
12517
12518
12519
12520
12521
12522 type OnScreenPositionTargetingOptionDetails struct {
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532 OnScreenPosition string `json:"onScreenPosition,omitempty"`
12533
12534
12535
12536
12537
12538 ForceSendFields []string `json:"-"`
12539
12540
12541
12542
12543 NullFields []string `json:"-"`
12544 }
12545
12546 func (s *OnScreenPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12547 type NoMethod OnScreenPositionTargetingOptionDetails
12548 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12549 }
12550
12551
12552
12553
12554
12555 type OperatingSystemAssignedTargetingOptionDetails struct {
12556
12557 DisplayName string `json:"displayName,omitempty"`
12558
12559 Negative bool `json:"negative,omitempty"`
12560
12561
12562
12563 TargetingOptionId string `json:"targetingOptionId,omitempty"`
12564
12565
12566
12567
12568
12569 ForceSendFields []string `json:"-"`
12570
12571
12572
12573
12574 NullFields []string `json:"-"`
12575 }
12576
12577 func (s *OperatingSystemAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12578 type NoMethod OperatingSystemAssignedTargetingOptionDetails
12579 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12580 }
12581
12582
12583
12584
12585 type OperatingSystemTargetingOptionDetails struct {
12586
12587 DisplayName string `json:"displayName,omitempty"`
12588
12589
12590
12591
12592
12593 ForceSendFields []string `json:"-"`
12594
12595
12596
12597
12598 NullFields []string `json:"-"`
12599 }
12600
12601 func (s *OperatingSystemTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12602 type NoMethod OperatingSystemTargetingOptionDetails
12603 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12604 }
12605
12606
12607
12608 type Operation struct {
12609
12610
12611
12612 Done bool `json:"done,omitempty"`
12613
12614 Error *Status `json:"error,omitempty"`
12615
12616
12617
12618
12619 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
12620
12621
12622
12623 Name string `json:"name,omitempty"`
12624
12625
12626
12627
12628
12629
12630
12631 Response googleapi.RawMessage `json:"response,omitempty"`
12632
12633
12634 googleapi.ServerResponse `json:"-"`
12635
12636
12637
12638
12639
12640 ForceSendFields []string `json:"-"`
12641
12642
12643
12644
12645 NullFields []string `json:"-"`
12646 }
12647
12648 func (s *Operation) MarshalJSON() ([]byte, error) {
12649 type NoMethod Operation
12650 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12651 }
12652
12653
12654 type Pacing struct {
12655
12656
12657 DailyMaxImpressions int64 `json:"dailyMaxImpressions,omitempty,string"`
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668 DailyMaxMicros int64 `json:"dailyMaxMicros,omitempty,string"`
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680 PacingPeriod string `json:"pacingPeriod,omitempty"`
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694 PacingType string `json:"pacingType,omitempty"`
12695
12696
12697
12698
12699
12700 ForceSendFields []string `json:"-"`
12701
12702
12703
12704
12705 NullFields []string `json:"-"`
12706 }
12707
12708 func (s *Pacing) MarshalJSON() ([]byte, error) {
12709 type NoMethod Pacing
12710 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12711 }
12712
12713
12714
12715 type ParentEntityFilter struct {
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727 FileType []string `json:"fileType,omitempty"`
12728
12729
12730
12731 FilterIds googleapi.Int64s `json:"filterIds,omitempty"`
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759 FilterType string `json:"filterType,omitempty"`
12760
12761
12762
12763
12764
12765 ForceSendFields []string `json:"-"`
12766
12767
12768
12769
12770 NullFields []string `json:"-"`
12771 }
12772
12773 func (s *ParentEntityFilter) MarshalJSON() ([]byte, error) {
12774 type NoMethod ParentEntityFilter
12775 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12776 }
12777
12778
12779
12780
12781
12782 type ParentalStatusAssignedTargetingOptionDetails struct {
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793 ParentalStatus string `json:"parentalStatus,omitempty"`
12794
12795
12796
12797
12798
12799 ForceSendFields []string `json:"-"`
12800
12801
12802
12803
12804 NullFields []string `json:"-"`
12805 }
12806
12807 func (s *ParentalStatusAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12808 type NoMethod ParentalStatusAssignedTargetingOptionDetails
12809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12810 }
12811
12812
12813
12814
12815 type ParentalStatusTargetingOptionDetails struct {
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826 ParentalStatus string `json:"parentalStatus,omitempty"`
12827
12828
12829
12830
12831
12832 ForceSendFields []string `json:"-"`
12833
12834
12835
12836
12837 NullFields []string `json:"-"`
12838 }
12839
12840 func (s *ParentalStatusTargetingOptionDetails) MarshalJSON() ([]byte, error) {
12841 type NoMethod ParentalStatusTargetingOptionDetails
12842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12843 }
12844
12845
12846 type Partner struct {
12847
12848 AdServerConfig *PartnerAdServerConfig `json:"adServerConfig,omitempty"`
12849
12850 BillingConfig *PartnerBillingConfig `json:"billingConfig,omitempty"`
12851
12852 DataAccessConfig *PartnerDataAccessConfig `json:"dataAccessConfig,omitempty"`
12853
12854
12855 DisplayName string `json:"displayName,omitempty"`
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871 EntityStatus string `json:"entityStatus,omitempty"`
12872
12873
12874 ExchangeConfig *ExchangeConfig `json:"exchangeConfig,omitempty"`
12875
12876 GeneralConfig *PartnerGeneralConfig `json:"generalConfig,omitempty"`
12877
12878 Name string `json:"name,omitempty"`
12879
12880
12881 PartnerId int64 `json:"partnerId,omitempty,string"`
12882
12883
12884 UpdateTime string `json:"updateTime,omitempty"`
12885
12886
12887 googleapi.ServerResponse `json:"-"`
12888
12889
12890
12891
12892
12893 ForceSendFields []string `json:"-"`
12894
12895
12896
12897
12898 NullFields []string `json:"-"`
12899 }
12900
12901 func (s *Partner) MarshalJSON() ([]byte, error) {
12902 type NoMethod Partner
12903 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12904 }
12905
12906
12907 type PartnerAdServerConfig struct {
12908
12909 MeasurementConfig *MeasurementConfig `json:"measurementConfig,omitempty"`
12910
12911
12912
12913
12914
12915 ForceSendFields []string `json:"-"`
12916
12917
12918
12919
12920 NullFields []string `json:"-"`
12921 }
12922
12923 func (s *PartnerAdServerConfig) MarshalJSON() ([]byte, error) {
12924 type NoMethod PartnerAdServerConfig
12925 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12926 }
12927
12928
12929 type PartnerBillingConfig struct {
12930
12931 BillingProfileId int64 `json:"billingProfileId,omitempty,string"`
12932
12933
12934
12935
12936
12937 ForceSendFields []string `json:"-"`
12938
12939
12940
12941
12942 NullFields []string `json:"-"`
12943 }
12944
12945 func (s *PartnerBillingConfig) MarshalJSON() ([]byte, error) {
12946 type NoMethod PartnerBillingConfig
12947 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12948 }
12949
12950
12951
12952
12953
12954
12955
12956 type PartnerCost struct {
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024 CostType string `json:"costType,omitempty"`
13025
13026
13027
13028
13029 FeeAmount int64 `json:"feeAmount,omitempty,string"`
13030
13031
13032
13033 FeePercentageMillis int64 `json:"feePercentageMillis,omitempty,string"`
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048 FeeType string `json:"feeType,omitempty"`
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060 InvoiceType string `json:"invoiceType,omitempty"`
13061
13062
13063
13064
13065
13066 ForceSendFields []string `json:"-"`
13067
13068
13069
13070
13071 NullFields []string `json:"-"`
13072 }
13073
13074 func (s *PartnerCost) MarshalJSON() ([]byte, error) {
13075 type NoMethod PartnerCost
13076 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13077 }
13078
13079
13080
13081 type PartnerDataAccessConfig struct {
13082
13083
13084 SdfConfig *SdfConfig `json:"sdfConfig,omitempty"`
13085
13086
13087
13088
13089
13090 ForceSendFields []string `json:"-"`
13091
13092
13093
13094
13095 NullFields []string `json:"-"`
13096 }
13097
13098 func (s *PartnerDataAccessConfig) MarshalJSON() ([]byte, error) {
13099 type NoMethod PartnerDataAccessConfig
13100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13101 }
13102
13103
13104 type PartnerGeneralConfig struct {
13105
13106 CurrencyCode string `json:"currencyCode,omitempty"`
13107
13108
13109
13110 TimeZone string `json:"timeZone,omitempty"`
13111
13112
13113
13114
13115
13116 ForceSendFields []string `json:"-"`
13117
13118
13119
13120
13121 NullFields []string `json:"-"`
13122 }
13123
13124 func (s *PartnerGeneralConfig) MarshalJSON() ([]byte, error) {
13125 type NoMethod PartnerGeneralConfig
13126 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13127 }
13128
13129
13130
13131 type PartnerRevenueModel struct {
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143 MarkupAmount int64 `json:"markupAmount,omitempty,string"`
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156 MarkupType string `json:"markupType,omitempty"`
13157
13158
13159
13160
13161
13162 ForceSendFields []string `json:"-"`
13163
13164
13165
13166
13167 NullFields []string `json:"-"`
13168 }
13169
13170 func (s *PartnerRevenueModel) MarshalJSON() ([]byte, error) {
13171 type NoMethod PartnerRevenueModel
13172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13173 }
13174
13175
13176 type PerformanceGoal struct {
13177
13178
13179
13180
13181
13182
13183 PerformanceGoalAmountMicros int64 `json:"performanceGoalAmountMicros,omitempty,string"`
13184
13185
13186
13187
13188
13189
13190
13191 PerformanceGoalPercentageMicros int64 `json:"performanceGoalPercentageMicros,omitempty,string"`
13192
13193
13194
13195
13196 PerformanceGoalString string `json:"performanceGoalString,omitempty"`
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231 PerformanceGoalType string `json:"performanceGoalType,omitempty"`
13232
13233
13234
13235
13236
13237 ForceSendFields []string `json:"-"`
13238
13239
13240
13241
13242 NullFields []string `json:"-"`
13243 }
13244
13245 func (s *PerformanceGoal) MarshalJSON() ([]byte, error) {
13246 type NoMethod PerformanceGoal
13247 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13248 }
13249
13250
13251
13252 type PerformanceGoalBidStrategy struct {
13253
13254
13255
13256 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"`
13257
13258
13259
13260
13261
13262
13263 MaxAverageCpmBidAmountMicros int64 `json:"maxAverageCpmBidAmountMicros,omitempty,string"`
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283 PerformanceGoalAmountMicros int64 `json:"performanceGoalAmountMicros,omitempty,string"`
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304 PerformanceGoalType string `json:"performanceGoalType,omitempty"`
13305
13306
13307
13308
13309
13310 ForceSendFields []string `json:"-"`
13311
13312
13313
13314
13315 NullFields []string `json:"-"`
13316 }
13317
13318 func (s *PerformanceGoalBidStrategy) MarshalJSON() ([]byte, error) {
13319 type NoMethod PerformanceGoalBidStrategy
13320 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13321 }
13322
13323
13324
13325
13326 type PoiAssignedTargetingOptionDetails struct {
13327
13328
13329 DisplayName string `json:"displayName,omitempty"`
13330
13331 Latitude float64 `json:"latitude,omitempty"`
13332
13333 Longitude float64 `json:"longitude,omitempty"`
13334
13335
13336
13337
13338 ProximityRadiusAmount float64 `json:"proximityRadiusAmount,omitempty"`
13339
13340
13341
13342
13343
13344
13345
13346
13347 ProximityRadiusUnit string `json:"proximityRadiusUnit,omitempty"`
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359 TargetingOptionId string `json:"targetingOptionId,omitempty"`
13360
13361
13362
13363
13364
13365 ForceSendFields []string `json:"-"`
13366
13367
13368
13369
13370 NullFields []string `json:"-"`
13371 }
13372
13373 func (s *PoiAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13374 type NoMethod PoiAssignedTargetingOptionDetails
13375 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13376 }
13377
13378 func (s *PoiAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error {
13379 type NoMethod PoiAssignedTargetingOptionDetails
13380 var s1 struct {
13381 Latitude gensupport.JSONFloat64 `json:"latitude"`
13382 Longitude gensupport.JSONFloat64 `json:"longitude"`
13383 ProximityRadiusAmount gensupport.JSONFloat64 `json:"proximityRadiusAmount"`
13384 *NoMethod
13385 }
13386 s1.NoMethod = (*NoMethod)(s)
13387 if err := json.Unmarshal(data, &s1); err != nil {
13388 return err
13389 }
13390 s.Latitude = float64(s1.Latitude)
13391 s.Longitude = float64(s1.Longitude)
13392 s.ProximityRadiusAmount = float64(s1.ProximityRadiusAmount)
13393 return nil
13394 }
13395
13396
13397 type PoiSearchTerms struct {
13398
13399
13400
13401 PoiQuery string `json:"poiQuery,omitempty"`
13402
13403
13404
13405
13406
13407 ForceSendFields []string `json:"-"`
13408
13409
13410
13411
13412 NullFields []string `json:"-"`
13413 }
13414
13415 func (s *PoiSearchTerms) MarshalJSON() ([]byte, error) {
13416 type NoMethod PoiSearchTerms
13417 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13418 }
13419
13420
13421
13422
13423 type PoiTargetingOptionDetails struct {
13424
13425
13426 DisplayName string `json:"displayName,omitempty"`
13427
13428 Latitude float64 `json:"latitude,omitempty"`
13429
13430 Longitude float64 `json:"longitude,omitempty"`
13431
13432
13433
13434
13435
13436 ForceSendFields []string `json:"-"`
13437
13438
13439
13440
13441 NullFields []string `json:"-"`
13442 }
13443
13444 func (s *PoiTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13445 type NoMethod PoiTargetingOptionDetails
13446 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13447 }
13448
13449 func (s *PoiTargetingOptionDetails) UnmarshalJSON(data []byte) error {
13450 type NoMethod PoiTargetingOptionDetails
13451 var s1 struct {
13452 Latitude gensupport.JSONFloat64 `json:"latitude"`
13453 Longitude gensupport.JSONFloat64 `json:"longitude"`
13454 *NoMethod
13455 }
13456 s1.NoMethod = (*NoMethod)(s)
13457 if err := json.Unmarshal(data, &s1); err != nil {
13458 return err
13459 }
13460 s.Latitude = float64(s1.Latitude)
13461 s.Longitude = float64(s1.Longitude)
13462 return nil
13463 }
13464
13465
13466 type PrismaConfig struct {
13467
13468
13469 PrismaCpeCode *PrismaCpeCode `json:"prismaCpeCode,omitempty"`
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481 PrismaType string `json:"prismaType,omitempty"`
13482
13483 Supplier string `json:"supplier,omitempty"`
13484
13485
13486
13487
13488
13489 ForceSendFields []string `json:"-"`
13490
13491
13492
13493
13494 NullFields []string `json:"-"`
13495 }
13496
13497 func (s *PrismaConfig) MarshalJSON() ([]byte, error) {
13498 type NoMethod PrismaConfig
13499 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13500 }
13501
13502
13503
13504 type PrismaCpeCode struct {
13505
13506 PrismaClientCode string `json:"prismaClientCode,omitempty"`
13507
13508 PrismaEstimateCode string `json:"prismaEstimateCode,omitempty"`
13509
13510 PrismaProductCode string `json:"prismaProductCode,omitempty"`
13511
13512
13513
13514
13515
13516 ForceSendFields []string `json:"-"`
13517
13518
13519
13520
13521 NullFields []string `json:"-"`
13522 }
13523
13524 func (s *PrismaCpeCode) MarshalJSON() ([]byte, error) {
13525 type NoMethod PrismaCpeCode
13526 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13527 }
13528
13529
13530 type ProductFeedData struct {
13531
13532 IsFeedDisabled bool `json:"isFeedDisabled,omitempty"`
13533
13534 ProductMatchDimensions []*ProductMatchDimension `json:"productMatchDimensions,omitempty"`
13535
13536
13537
13538
13539
13540
13541
13542 ProductMatchType string `json:"productMatchType,omitempty"`
13543
13544
13545
13546
13547
13548 ForceSendFields []string `json:"-"`
13549
13550
13551
13552
13553 NullFields []string `json:"-"`
13554 }
13555
13556 func (s *ProductFeedData) MarshalJSON() ([]byte, error) {
13557 type NoMethod ProductFeedData
13558 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13559 }
13560
13561
13562 type ProductMatchDimension struct {
13563
13564 CustomLabel *CustomLabel `json:"customLabel,omitempty"`
13565
13566
13567 ProductOfferId string `json:"productOfferId,omitempty"`
13568
13569
13570
13571
13572
13573 ForceSendFields []string `json:"-"`
13574
13575
13576
13577
13578 NullFields []string `json:"-"`
13579 }
13580
13581 func (s *ProductMatchDimension) MarshalJSON() ([]byte, error) {
13582 type NoMethod ProductMatchDimension
13583 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13584 }
13585
13586
13587
13588
13589
13590 type ProximityLocationListAssignedTargetingOptionDetails struct {
13591
13592
13593
13594 ProximityLocationListId int64 `json:"proximityLocationListId,omitempty,string"`
13595
13596
13597
13598
13599 ProximityRadius float64 `json:"proximityRadius,omitempty"`
13600
13601
13602
13603
13604
13605
13606
13607
13608 ProximityRadiusUnit string `json:"proximityRadiusUnit,omitempty"`
13609
13610
13611
13612
13613
13614 ForceSendFields []string `json:"-"`
13615
13616
13617
13618
13619 NullFields []string `json:"-"`
13620 }
13621
13622 func (s *ProximityLocationListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13623 type NoMethod ProximityLocationListAssignedTargetingOptionDetails
13624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13625 }
13626
13627 func (s *ProximityLocationListAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error {
13628 type NoMethod ProximityLocationListAssignedTargetingOptionDetails
13629 var s1 struct {
13630 ProximityRadius gensupport.JSONFloat64 `json:"proximityRadius"`
13631 *NoMethod
13632 }
13633 s1.NoMethod = (*NoMethod)(s)
13634 if err := json.Unmarshal(data, &s1); err != nil {
13635 return err
13636 }
13637 s.ProximityRadius = float64(s1.ProximityRadius)
13638 return nil
13639 }
13640
13641
13642 type PublisherReviewStatus struct {
13643
13644 PublisherName string `json:"publisherName,omitempty"`
13645
13646
13647
13648
13649
13650
13651
13652
13653 Status string `json:"status,omitempty"`
13654
13655
13656
13657
13658
13659 ForceSendFields []string `json:"-"`
13660
13661
13662
13663
13664 NullFields []string `json:"-"`
13665 }
13666
13667 func (s *PublisherReviewStatus) MarshalJSON() ([]byte, error) {
13668 type NoMethod PublisherReviewStatus
13669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13670 }
13671
13672
13673 type RateDetails struct {
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686 InventorySourceRateType string `json:"inventorySourceRateType,omitempty"`
13687
13688
13689
13690 MinimumSpend *Money `json:"minimumSpend,omitempty"`
13691
13692 Rate *Money `json:"rate,omitempty"`
13693
13694
13695 UnitsPurchased int64 `json:"unitsPurchased,omitempty,string"`
13696
13697
13698
13699
13700
13701 ForceSendFields []string `json:"-"`
13702
13703
13704
13705
13706 NullFields []string `json:"-"`
13707 }
13708
13709 func (s *RateDetails) MarshalJSON() ([]byte, error) {
13710 type NoMethod RateDetails
13711 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13712 }
13713
13714
13715
13716
13717
13718 type RegionalLocationListAssignedTargetingOptionDetails struct {
13719
13720 Negative bool `json:"negative,omitempty"`
13721
13722
13723
13724 RegionalLocationListId int64 `json:"regionalLocationListId,omitempty,string"`
13725
13726
13727
13728
13729
13730 ForceSendFields []string `json:"-"`
13731
13732
13733
13734
13735 NullFields []string `json:"-"`
13736 }
13737
13738 func (s *RegionalLocationListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
13739 type NoMethod RegionalLocationListAssignedTargetingOptionDetails
13740 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13741 }
13742
13743
13744
13745 type RemarketingConfig struct {
13746
13747 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13748
13749
13750 RemarketingEnabled bool `json:"remarketingEnabled,omitempty"`
13751
13752
13753
13754
13755
13756 ForceSendFields []string `json:"-"`
13757
13758
13759
13760
13761 NullFields []string `json:"-"`
13762 }
13763
13764 func (s *RemarketingConfig) MarshalJSON() ([]byte, error) {
13765 type NoMethod RemarketingConfig
13766 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13767 }
13768
13769
13770
13771 type ReplaceNegativeKeywordsRequest struct {
13772
13773
13774
13775 NewNegativeKeywords []*NegativeKeyword `json:"newNegativeKeywords,omitempty"`
13776
13777
13778
13779
13780
13781 ForceSendFields []string `json:"-"`
13782
13783
13784
13785
13786 NullFields []string `json:"-"`
13787 }
13788
13789 func (s *ReplaceNegativeKeywordsRequest) MarshalJSON() ([]byte, error) {
13790 type NoMethod ReplaceNegativeKeywordsRequest
13791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13792 }
13793
13794
13795
13796 type ReplaceNegativeKeywordsResponse struct {
13797
13798
13799 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"`
13800
13801
13802 googleapi.ServerResponse `json:"-"`
13803
13804
13805
13806
13807
13808 ForceSendFields []string `json:"-"`
13809
13810
13811
13812
13813 NullFields []string `json:"-"`
13814 }
13815
13816 func (s *ReplaceNegativeKeywordsResponse) MarshalJSON() ([]byte, error) {
13817 type NoMethod ReplaceNegativeKeywordsResponse
13818 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13819 }
13820
13821
13822 type ReplaceSitesRequest struct {
13823
13824 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13825
13826
13827 NewSites []*Site `json:"newSites,omitempty"`
13828
13829 PartnerId int64 `json:"partnerId,omitempty,string"`
13830
13831
13832
13833
13834
13835 ForceSendFields []string `json:"-"`
13836
13837
13838
13839
13840 NullFields []string `json:"-"`
13841 }
13842
13843 func (s *ReplaceSitesRequest) MarshalJSON() ([]byte, error) {
13844 type NoMethod ReplaceSitesRequest
13845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13846 }
13847
13848
13849 type ReplaceSitesResponse struct {
13850
13851 Sites []*Site `json:"sites,omitempty"`
13852
13853
13854 googleapi.ServerResponse `json:"-"`
13855
13856
13857
13858
13859
13860 ForceSendFields []string `json:"-"`
13861
13862
13863
13864
13865 NullFields []string `json:"-"`
13866 }
13867
13868 func (s *ReplaceSitesResponse) MarshalJSON() ([]byte, error) {
13869 type NoMethod ReplaceSitesResponse
13870 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13871 }
13872
13873
13874 type ReviewStatusInfo struct {
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891 ApprovalStatus string `json:"approvalStatus,omitempty"`
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901 ContentAndPolicyReviewStatus string `json:"contentAndPolicyReviewStatus,omitempty"`
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911 CreativeAndLandingPageReviewStatus string `json:"creativeAndLandingPageReviewStatus,omitempty"`
13912
13913 ExchangeReviewStatuses []*ExchangeReviewStatus `json:"exchangeReviewStatuses,omitempty"`
13914
13915 PublisherReviewStatuses []*PublisherReviewStatus `json:"publisherReviewStatuses,omitempty"`
13916
13917
13918
13919
13920
13921 ForceSendFields []string `json:"-"`
13922
13923
13924
13925
13926 NullFields []string `json:"-"`
13927 }
13928
13929 func (s *ReviewStatusInfo) MarshalJSON() ([]byte, error) {
13930 type NoMethod ReviewStatusInfo
13931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13932 }
13933
13934
13935 type ScriptError struct {
13936
13937 Column int64 `json:"column,omitempty,string"`
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947 ErrorCode string `json:"errorCode,omitempty"`
13948
13949 ErrorMessage string `json:"errorMessage,omitempty"`
13950
13951 Line int64 `json:"line,omitempty,string"`
13952
13953
13954
13955
13956
13957 ForceSendFields []string `json:"-"`
13958
13959
13960
13961
13962 NullFields []string `json:"-"`
13963 }
13964
13965 func (s *ScriptError) MarshalJSON() ([]byte, error) {
13966 type NoMethod ScriptError
13967 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
13968 }
13969
13970
13971 type SdfConfig struct {
13972
13973
13974 AdminEmail string `json:"adminEmail,omitempty"`
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994 Version string `json:"version,omitempty"`
13995
13996
13997
13998
13999
14000 ForceSendFields []string `json:"-"`
14001
14002
14003
14004
14005 NullFields []string `json:"-"`
14006 }
14007
14008 func (s *SdfConfig) MarshalJSON() ([]byte, error) {
14009 type NoMethod SdfConfig
14010 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14011 }
14012
14013
14014
14015 type SdfDownloadTask struct {
14016
14017
14018
14019
14020
14021 ResourceName string `json:"resourceName,omitempty"`
14022
14023
14024
14025
14026
14027 ForceSendFields []string `json:"-"`
14028
14029
14030
14031
14032 NullFields []string `json:"-"`
14033 }
14034
14035 func (s *SdfDownloadTask) MarshalJSON() ([]byte, error) {
14036 type NoMethod SdfDownloadTask
14037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14038 }
14039
14040
14041
14042 type SdfDownloadTaskMetadata struct {
14043
14044 CreateTime string `json:"createTime,omitempty"`
14045
14046 EndTime string `json:"endTime,omitempty"`
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066 Version string `json:"version,omitempty"`
14067
14068
14069
14070
14071
14072 ForceSendFields []string `json:"-"`
14073
14074
14075
14076
14077 NullFields []string `json:"-"`
14078 }
14079
14080 func (s *SdfDownloadTaskMetadata) MarshalJSON() ([]byte, error) {
14081 type NoMethod SdfDownloadTaskMetadata
14082 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14083 }
14084
14085
14086 type SearchTargetingOptionsRequest struct {
14087
14088
14089 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
14090
14091
14092 BusinessChainSearchTerms *BusinessChainSearchTerms `json:"businessChainSearchTerms,omitempty"`
14093
14094
14095 GeoRegionSearchTerms *GeoRegionSearchTerms `json:"geoRegionSearchTerms,omitempty"`
14096
14097
14098
14099 PageSize int64 `json:"pageSize,omitempty"`
14100
14101
14102
14103
14104 PageToken string `json:"pageToken,omitempty"`
14105
14106
14107 PoiSearchTerms *PoiSearchTerms `json:"poiSearchTerms,omitempty"`
14108
14109
14110
14111
14112
14113 ForceSendFields []string `json:"-"`
14114
14115
14116
14117
14118 NullFields []string `json:"-"`
14119 }
14120
14121 func (s *SearchTargetingOptionsRequest) MarshalJSON() ([]byte, error) {
14122 type NoMethod SearchTargetingOptionsRequest
14123 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14124 }
14125
14126
14127 type SearchTargetingOptionsResponse struct {
14128
14129
14130
14131 NextPageToken string `json:"nextPageToken,omitempty"`
14132
14133
14134 TargetingOptions []*TargetingOption `json:"targetingOptions,omitempty"`
14135
14136
14137 googleapi.ServerResponse `json:"-"`
14138
14139
14140
14141
14142
14143 ForceSendFields []string `json:"-"`
14144
14145
14146
14147
14148 NullFields []string `json:"-"`
14149 }
14150
14151 func (s *SearchTargetingOptionsResponse) MarshalJSON() ([]byte, error) {
14152 type NoMethod SearchTargetingOptionsResponse
14153 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14154 }
14155
14156
14157
14158
14159
14160 type SensitiveCategoryAssignedTargetingOptionDetails struct {
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217 ExcludedSensitiveCategory string `json:"excludedSensitiveCategory,omitempty"`
14218
14219
14220
14221
14222
14223 ForceSendFields []string `json:"-"`
14224
14225
14226
14227
14228 NullFields []string `json:"-"`
14229 }
14230
14231 func (s *SensitiveCategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14232 type NoMethod SensitiveCategoryAssignedTargetingOptionDetails
14233 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14234 }
14235
14236
14237
14238
14239
14240 type SensitiveCategoryTargetingOptionDetails struct {
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297 SensitiveCategory string `json:"sensitiveCategory,omitempty"`
14298
14299
14300
14301
14302
14303 ForceSendFields []string `json:"-"`
14304
14305
14306
14307
14308 NullFields []string `json:"-"`
14309 }
14310
14311 func (s *SensitiveCategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14312 type NoMethod SensitiveCategoryTargetingOptionDetails
14313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14314 }
14315
14316
14317
14318
14319
14320 type SessionPositionAssignedTargetingOptionDetails struct {
14321
14322
14323
14324
14325
14326
14327 SessionPosition string `json:"sessionPosition,omitempty"`
14328
14329
14330
14331
14332
14333 ForceSendFields []string `json:"-"`
14334
14335
14336
14337
14338 NullFields []string `json:"-"`
14339 }
14340
14341 func (s *SessionPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14342 type NoMethod SessionPositionAssignedTargetingOptionDetails
14343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14344 }
14345
14346
14347 type Site struct {
14348
14349 Name string `json:"name,omitempty"`
14350
14351
14352 UrlOrAppId string `json:"urlOrAppId,omitempty"`
14353
14354
14355 googleapi.ServerResponse `json:"-"`
14356
14357
14358
14359
14360
14361 ForceSendFields []string `json:"-"`
14362
14363
14364
14365
14366 NullFields []string `json:"-"`
14367 }
14368
14369 func (s *Site) MarshalJSON() ([]byte, error) {
14370 type NoMethod Site
14371 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14372 }
14373
14374
14375
14376
14377
14378
14379
14380 type Status struct {
14381
14382 Code int64 `json:"code,omitempty"`
14383
14384
14385 Details []googleapi.RawMessage `json:"details,omitempty"`
14386
14387
14388
14389 Message string `json:"message,omitempty"`
14390
14391
14392
14393
14394
14395 ForceSendFields []string `json:"-"`
14396
14397
14398
14399
14400 NullFields []string `json:"-"`
14401 }
14402
14403 func (s *Status) MarshalJSON() ([]byte, error) {
14404 type NoMethod Status
14405 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14406 }
14407
14408
14409
14410
14411
14412 type SubExchangeAssignedTargetingOptionDetails struct {
14413
14414
14415 TargetingOptionId string `json:"targetingOptionId,omitempty"`
14416
14417
14418
14419
14420
14421 ForceSendFields []string `json:"-"`
14422
14423
14424
14425
14426 NullFields []string `json:"-"`
14427 }
14428
14429 func (s *SubExchangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14430 type NoMethod SubExchangeAssignedTargetingOptionDetails
14431 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14432 }
14433
14434
14435
14436
14437 type SubExchangeTargetingOptionDetails struct {
14438
14439 DisplayName string `json:"displayName,omitempty"`
14440
14441
14442
14443
14444
14445 ForceSendFields []string `json:"-"`
14446
14447
14448
14449
14450 NullFields []string `json:"-"`
14451 }
14452
14453 func (s *SubExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14454 type NoMethod SubExchangeTargetingOptionDetails
14455 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14456 }
14457
14458
14459
14460 type TargetFrequency struct {
14461
14462
14463
14464 TargetCount int64 `json:"targetCount,omitempty,string"`
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482 TimeUnit string `json:"timeUnit,omitempty"`
14483
14484
14485
14486 TimeUnitCount int64 `json:"timeUnitCount,omitempty"`
14487
14488
14489
14490
14491
14492 ForceSendFields []string `json:"-"`
14493
14494
14495
14496
14497 NullFields []string `json:"-"`
14498 }
14499
14500 func (s *TargetFrequency) MarshalJSON() ([]byte, error) {
14501 type NoMethod TargetFrequency
14502 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14503 }
14504
14505
14506
14507
14508 type TargetingExpansionConfig struct {
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520 AudienceExpansionLevel string `json:"audienceExpansionLevel,omitempty"`
14521
14522
14523
14524 AudienceExpansionSeedListExcluded bool `json:"audienceExpansionSeedListExcluded,omitempty"`
14525
14526
14527 EnableOptimizedTargeting bool `json:"enableOptimizedTargeting,omitempty"`
14528
14529
14530
14531
14532
14533 ForceSendFields []string `json:"-"`
14534
14535
14536
14537
14538 NullFields []string `json:"-"`
14539 }
14540
14541 func (s *TargetingExpansionConfig) MarshalJSON() ([]byte, error) {
14542 type NoMethod TargetingExpansionConfig
14543 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14544 }
14545
14546
14547
14548 type TargetingOption struct {
14549
14550 AgeRangeDetails *AgeRangeTargetingOptionDetails `json:"ageRangeDetails,omitempty"`
14551
14552 AppCategoryDetails *AppCategoryTargetingOptionDetails `json:"appCategoryDetails,omitempty"`
14553
14554 AudioContentTypeDetails *AudioContentTypeTargetingOptionDetails `json:"audioContentTypeDetails,omitempty"`
14555
14556 AuthorizedSellerStatusDetails *AuthorizedSellerStatusTargetingOptionDetails `json:"authorizedSellerStatusDetails,omitempty"`
14557
14558 BrowserDetails *BrowserTargetingOptionDetails `json:"browserDetails,omitempty"`
14559
14560 BusinessChainDetails *BusinessChainTargetingOptionDetails `json:"businessChainDetails,omitempty"`
14561
14562 CarrierAndIspDetails *CarrierAndIspTargetingOptionDetails `json:"carrierAndIspDetails,omitempty"`
14563
14564 CategoryDetails *CategoryTargetingOptionDetails `json:"categoryDetails,omitempty"`
14565
14566 ContentDurationDetails *ContentDurationTargetingOptionDetails `json:"contentDurationDetails,omitempty"`
14567
14568 ContentGenreDetails *ContentGenreTargetingOptionDetails `json:"contentGenreDetails,omitempty"`
14569
14570 ContentInstreamPositionDetails *ContentInstreamPositionTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"`
14571
14572 ContentOutstreamPositionDetails *ContentOutstreamPositionTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"`
14573
14574 ContentStreamTypeDetails *ContentStreamTypeTargetingOptionDetails `json:"contentStreamTypeDetails,omitempty"`
14575
14576 DeviceMakeModelDetails *DeviceMakeModelTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"`
14577
14578 DeviceTypeDetails *DeviceTypeTargetingOptionDetails `json:"deviceTypeDetails,omitempty"`
14579
14580 DigitalContentLabelDetails *DigitalContentLabelTargetingOptionDetails `json:"digitalContentLabelDetails,omitempty"`
14581
14582 EnvironmentDetails *EnvironmentTargetingOptionDetails `json:"environmentDetails,omitempty"`
14583
14584 ExchangeDetails *ExchangeTargetingOptionDetails `json:"exchangeDetails,omitempty"`
14585
14586 GenderDetails *GenderTargetingOptionDetails `json:"genderDetails,omitempty"`
14587
14588 GeoRegionDetails *GeoRegionTargetingOptionDetails `json:"geoRegionDetails,omitempty"`
14589
14590 HouseholdIncomeDetails *HouseholdIncomeTargetingOptionDetails `json:"householdIncomeDetails,omitempty"`
14591
14592 LanguageDetails *LanguageTargetingOptionDetails `json:"languageDetails,omitempty"`
14593
14594 Name string `json:"name,omitempty"`
14595
14596 NativeContentPositionDetails *NativeContentPositionTargetingOptionDetails `json:"nativeContentPositionDetails,omitempty"`
14597
14598 OmidDetails *OmidTargetingOptionDetails `json:"omidDetails,omitempty"`
14599
14600 OnScreenPositionDetails *OnScreenPositionTargetingOptionDetails `json:"onScreenPositionDetails,omitempty"`
14601
14602 OperatingSystemDetails *OperatingSystemTargetingOptionDetails `json:"operatingSystemDetails,omitempty"`
14603
14604 ParentalStatusDetails *ParentalStatusTargetingOptionDetails `json:"parentalStatusDetails,omitempty"`
14605
14606 PoiDetails *PoiTargetingOptionDetails `json:"poiDetails,omitempty"`
14607
14608 SensitiveCategoryDetails *SensitiveCategoryTargetingOptionDetails `json:"sensitiveCategoryDetails,omitempty"`
14609
14610 SubExchangeDetails *SubExchangeTargetingOptionDetails `json:"subExchangeDetails,omitempty"`
14611
14612
14613 TargetingOptionId string `json:"targetingOptionId,omitempty"`
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
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
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723 TargetingType string `json:"targetingType,omitempty"`
14724
14725 UserRewardedContentDetails *UserRewardedContentTargetingOptionDetails `json:"userRewardedContentDetails,omitempty"`
14726
14727 VideoPlayerSizeDetails *VideoPlayerSizeTargetingOptionDetails `json:"videoPlayerSizeDetails,omitempty"`
14728
14729 ViewabilityDetails *ViewabilityTargetingOptionDetails `json:"viewabilityDetails,omitempty"`
14730
14731
14732 googleapi.ServerResponse `json:"-"`
14733
14734
14735
14736
14737
14738 ForceSendFields []string `json:"-"`
14739
14740
14741
14742
14743 NullFields []string `json:"-"`
14744 }
14745
14746 func (s *TargetingOption) MarshalJSON() ([]byte, error) {
14747 type NoMethod TargetingOption
14748 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14749 }
14750
14751
14752
14753 type ThirdPartyMeasurementConfigs struct {
14754
14755
14756
14757 BrandLiftVendorConfigs []*ThirdPartyVendorConfig `json:"brandLiftVendorConfigs,omitempty"`
14758
14759
14760
14761
14762 BrandSafetyVendorConfigs []*ThirdPartyVendorConfig `json:"brandSafetyVendorConfigs,omitempty"`
14763
14764
14765
14766 ReachVendorConfigs []*ThirdPartyVendorConfig `json:"reachVendorConfigs,omitempty"`
14767
14768
14769
14770
14771
14772 ViewabilityVendorConfigs []*ThirdPartyVendorConfig `json:"viewabilityVendorConfigs,omitempty"`
14773
14774
14775
14776
14777
14778 ForceSendFields []string `json:"-"`
14779
14780
14781
14782
14783 NullFields []string `json:"-"`
14784 }
14785
14786 func (s *ThirdPartyMeasurementConfigs) MarshalJSON() ([]byte, error) {
14787 type NoMethod ThirdPartyMeasurementConfigs
14788 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14789 }
14790
14791
14792
14793 type ThirdPartyOnlyConfig struct {
14794
14795
14796 PixelOrderIdReportingEnabled bool `json:"pixelOrderIdReportingEnabled,omitempty"`
14797
14798
14799
14800
14801
14802 ForceSendFields []string `json:"-"`
14803
14804
14805
14806
14807 NullFields []string `json:"-"`
14808 }
14809
14810 func (s *ThirdPartyOnlyConfig) MarshalJSON() ([]byte, error) {
14811 type NoMethod ThirdPartyOnlyConfig
14812 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14813 }
14814
14815
14816
14817 type ThirdPartyUrl struct {
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854 Type string `json:"type,omitempty"`
14855
14856
14857
14858 Url string `json:"url,omitempty"`
14859
14860
14861
14862
14863
14864 ForceSendFields []string `json:"-"`
14865
14866
14867
14868
14869 NullFields []string `json:"-"`
14870 }
14871
14872 func (s *ThirdPartyUrl) MarshalJSON() ([]byte, error) {
14873 type NoMethod ThirdPartyUrl
14874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14875 }
14876
14877
14878
14879 type ThirdPartyVendorConfig struct {
14880
14881
14882 PlacementId string `json:"placementId,omitempty"`
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897 Vendor string `json:"vendor,omitempty"`
14898
14899
14900
14901
14902
14903 ForceSendFields []string `json:"-"`
14904
14905
14906
14907
14908 NullFields []string `json:"-"`
14909 }
14910
14911 func (s *ThirdPartyVendorConfig) MarshalJSON() ([]byte, error) {
14912 type NoMethod ThirdPartyVendorConfig
14913 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14914 }
14915
14916
14917
14918
14919
14920 type ThirdPartyVerifierAssignedTargetingOptionDetails struct {
14921
14922 Adloox *Adloox `json:"adloox,omitempty"`
14923
14924 DoubleVerify *DoubleVerify `json:"doubleVerify,omitempty"`
14925
14926 IntegralAdScience *IntegralAdScience `json:"integralAdScience,omitempty"`
14927
14928
14929
14930
14931
14932 ForceSendFields []string `json:"-"`
14933
14934
14935
14936
14937 NullFields []string `json:"-"`
14938 }
14939
14940 func (s *ThirdPartyVerifierAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
14941 type NoMethod ThirdPartyVerifierAssignedTargetingOptionDetails
14942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14943 }
14944
14945
14946 type TimeRange struct {
14947
14948 EndTime string `json:"endTime,omitempty"`
14949
14950 StartTime string `json:"startTime,omitempty"`
14951
14952
14953
14954
14955
14956 ForceSendFields []string `json:"-"`
14957
14958
14959
14960
14961 NullFields []string `json:"-"`
14962 }
14963
14964 func (s *TimeRange) MarshalJSON() ([]byte, error) {
14965 type NoMethod TimeRange
14966 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14967 }
14968
14969
14970 type TimerEvent struct {
14971
14972 Name string `json:"name,omitempty"`
14973
14974
14975 ReportingName string `json:"reportingName,omitempty"`
14976
14977
14978
14979
14980
14981 ForceSendFields []string `json:"-"`
14982
14983
14984
14985
14986 NullFields []string `json:"-"`
14987 }
14988
14989 func (s *TimerEvent) MarshalJSON() ([]byte, error) {
14990 type NoMethod TimerEvent
14991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
14992 }
14993
14994
14995
14996 type TrackingFloodlightActivityConfig struct {
14997
14998 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
14999
15000
15001
15002 PostClickLookbackWindowDays int64 `json:"postClickLookbackWindowDays,omitempty"`
15003
15004
15005
15006 PostViewLookbackWindowDays int64 `json:"postViewLookbackWindowDays,omitempty"`
15007
15008
15009
15010
15011
15012 ForceSendFields []string `json:"-"`
15013
15014
15015
15016
15017 NullFields []string `json:"-"`
15018 }
15019
15020 func (s *TrackingFloodlightActivityConfig) MarshalJSON() ([]byte, error) {
15021 type NoMethod TrackingFloodlightActivityConfig
15022 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15023 }
15024
15025
15026 type Transcode struct {
15027
15028
15029 AudioBitRateKbps int64 `json:"audioBitRateKbps,omitempty,string"`
15030
15031
15032 AudioSampleRateHz int64 `json:"audioSampleRateHz,omitempty,string"`
15033
15034
15035 BitRateKbps int64 `json:"bitRateKbps,omitempty,string"`
15036
15037 Dimensions *Dimensions `json:"dimensions,omitempty"`
15038
15039 FileSizeBytes int64 `json:"fileSizeBytes,omitempty,string"`
15040
15041 FrameRate float64 `json:"frameRate,omitempty"`
15042
15043 MimeType string `json:"mimeType,omitempty"`
15044
15045 Name string `json:"name,omitempty"`
15046
15047 Transcoded bool `json:"transcoded,omitempty"`
15048
15049
15050
15051
15052
15053 ForceSendFields []string `json:"-"`
15054
15055
15056
15057
15058 NullFields []string `json:"-"`
15059 }
15060
15061 func (s *Transcode) MarshalJSON() ([]byte, error) {
15062 type NoMethod Transcode
15063 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15064 }
15065
15066 func (s *Transcode) UnmarshalJSON(data []byte) error {
15067 type NoMethod Transcode
15068 var s1 struct {
15069 FrameRate gensupport.JSONFloat64 `json:"frameRate"`
15070 *NoMethod
15071 }
15072 s1.NoMethod = (*NoMethod)(s)
15073 if err := json.Unmarshal(data, &s1); err != nil {
15074 return err
15075 }
15076 s.FrameRate = float64(s1.FrameRate)
15077 return nil
15078 }
15079
15080
15081
15082 type UniversalAdId struct {
15083
15084 Id string `json:"id,omitempty"`
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099 Registry string `json:"registry,omitempty"`
15100
15101
15102
15103
15104
15105 ForceSendFields []string `json:"-"`
15106
15107
15108
15109
15110 NullFields []string `json:"-"`
15111 }
15112
15113 func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
15114 type NoMethod UniversalAdId
15115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15116 }
15117
15118
15119
15120
15121 type UrlAssignedTargetingOptionDetails struct {
15122
15123 Negative bool `json:"negative,omitempty"`
15124
15125
15126
15127
15128 Url string `json:"url,omitempty"`
15129
15130
15131
15132
15133
15134 ForceSendFields []string `json:"-"`
15135
15136
15137
15138
15139 NullFields []string `json:"-"`
15140 }
15141
15142 func (s *UrlAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15143 type NoMethod UrlAssignedTargetingOptionDetails
15144 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15145 }
15146
15147
15148 type User struct {
15149
15150
15151 AssignedUserRoles []*AssignedUserRole `json:"assignedUserRoles,omitempty"`
15152
15153
15154 DisplayName string `json:"displayName,omitempty"`
15155
15156 Email string `json:"email,omitempty"`
15157
15158
15159 LastLoginTime string `json:"lastLoginTime,omitempty"`
15160
15161 Name string `json:"name,omitempty"`
15162
15163 UserId int64 `json:"userId,omitempty,string"`
15164
15165
15166 googleapi.ServerResponse `json:"-"`
15167
15168
15169
15170
15171
15172 ForceSendFields []string `json:"-"`
15173
15174
15175
15176
15177 NullFields []string `json:"-"`
15178 }
15179
15180 func (s *User) MarshalJSON() ([]byte, error) {
15181 type NoMethod User
15182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15183 }
15184
15185
15186
15187
15188
15189 type UserRewardedContentAssignedTargetingOptionDetails struct {
15190
15191
15192 TargetingOptionId string `json:"targetingOptionId,omitempty"`
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203 UserRewardedContent string `json:"userRewardedContent,omitempty"`
15204
15205
15206
15207
15208
15209 ForceSendFields []string `json:"-"`
15210
15211
15212
15213
15214 NullFields []string `json:"-"`
15215 }
15216
15217 func (s *UserRewardedContentAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15218 type NoMethod UserRewardedContentAssignedTargetingOptionDetails
15219 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15220 }
15221
15222
15223
15224
15225
15226 type UserRewardedContentTargetingOptionDetails struct {
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237 UserRewardedContent string `json:"userRewardedContent,omitempty"`
15238
15239
15240
15241
15242
15243 ForceSendFields []string `json:"-"`
15244
15245
15246
15247
15248 NullFields []string `json:"-"`
15249 }
15250
15251 func (s *UserRewardedContentTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15252 type NoMethod UserRewardedContentTargetingOptionDetails
15253 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15254 }
15255
15256
15257 type VideoAdSequenceSettings struct {
15258
15259
15260
15261
15262
15263
15264
15265 MinimumDuration string `json:"minimumDuration,omitempty"`
15266
15267 Steps []*VideoAdSequenceStep `json:"steps,omitempty"`
15268
15269
15270
15271
15272
15273 ForceSendFields []string `json:"-"`
15274
15275
15276
15277
15278 NullFields []string `json:"-"`
15279 }
15280
15281 func (s *VideoAdSequenceSettings) MarshalJSON() ([]byte, error) {
15282 type NoMethod VideoAdSequenceSettings
15283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15284 }
15285
15286
15287 type VideoAdSequenceStep struct {
15288
15289 AdGroupId int64 `json:"adGroupId,omitempty,string"`
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301 InteractionType string `json:"interactionType,omitempty"`
15302
15303
15304 PreviousStepId int64 `json:"previousStepId,omitempty,string"`
15305
15306 StepId int64 `json:"stepId,omitempty,string"`
15307
15308
15309
15310
15311
15312 ForceSendFields []string `json:"-"`
15313
15314
15315
15316
15317 NullFields []string `json:"-"`
15318 }
15319
15320 func (s *VideoAdSequenceStep) MarshalJSON() ([]byte, error) {
15321 type NoMethod VideoAdSequenceStep
15322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15323 }
15324
15325
15326 type VideoDiscoveryAd struct {
15327
15328 Description1 string `json:"description1,omitempty"`
15329
15330 Description2 string `json:"description2,omitempty"`
15331
15332 Headline string `json:"headline,omitempty"`
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342 Thumbnail string `json:"thumbnail,omitempty"`
15343
15344 Video *YoutubeVideoDetails `json:"video,omitempty"`
15345
15346
15347
15348
15349
15350 ForceSendFields []string `json:"-"`
15351
15352
15353
15354
15355 NullFields []string `json:"-"`
15356 }
15357
15358 func (s *VideoDiscoveryAd) MarshalJSON() ([]byte, error) {
15359 type NoMethod VideoDiscoveryAd
15360 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15361 }
15362
15363
15364 type VideoPerformanceAd struct {
15365
15366
15367 ActionButtonLabels []string `json:"actionButtonLabels,omitempty"`
15368
15369 CompanionBanners []*ImageAsset `json:"companionBanners,omitempty"`
15370
15371
15372 CustomParameters map[string]string `json:"customParameters,omitempty"`
15373
15374 Descriptions []string `json:"descriptions,omitempty"`
15375
15376 DisplayUrlBreadcrumb1 string `json:"displayUrlBreadcrumb1,omitempty"`
15377
15378 DisplayUrlBreadcrumb2 string `json:"displayUrlBreadcrumb2,omitempty"`
15379
15380 Domain string `json:"domain,omitempty"`
15381
15382
15383 FinalUrl string `json:"finalUrl,omitempty"`
15384
15385 Headlines []string `json:"headlines,omitempty"`
15386
15387
15388 LongHeadlines []string `json:"longHeadlines,omitempty"`
15389
15390 TrackingUrl string `json:"trackingUrl,omitempty"`
15391
15392 Videos []*YoutubeVideoDetails `json:"videos,omitempty"`
15393
15394
15395
15396
15397
15398 ForceSendFields []string `json:"-"`
15399
15400
15401
15402
15403 NullFields []string `json:"-"`
15404 }
15405
15406 func (s *VideoPerformanceAd) MarshalJSON() ([]byte, error) {
15407 type NoMethod VideoPerformanceAd
15408 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15409 }
15410
15411
15412
15413
15414
15415
15416 type VideoPlayerSizeAssignedTargetingOptionDetails struct {
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432 VideoPlayerSize string `json:"videoPlayerSize,omitempty"`
15433
15434
15435
15436
15437
15438 ForceSendFields []string `json:"-"`
15439
15440
15441
15442
15443 NullFields []string `json:"-"`
15444 }
15445
15446 func (s *VideoPlayerSizeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15447 type NoMethod VideoPlayerSizeAssignedTargetingOptionDetails
15448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15449 }
15450
15451
15452
15453
15454 type VideoPlayerSizeTargetingOptionDetails struct {
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470 VideoPlayerSize string `json:"videoPlayerSize,omitempty"`
15471
15472
15473
15474
15475
15476 ForceSendFields []string `json:"-"`
15477
15478
15479
15480
15481 NullFields []string `json:"-"`
15482 }
15483
15484 func (s *VideoPlayerSizeTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15485 type NoMethod VideoPlayerSizeTargetingOptionDetails
15486 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15487 }
15488
15489
15490
15491
15492
15493 type ViewabilityAssignedTargetingOptionDetails struct {
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518 Viewability string `json:"viewability,omitempty"`
15519
15520
15521
15522
15523
15524 ForceSendFields []string `json:"-"`
15525
15526
15527
15528
15529 NullFields []string `json:"-"`
15530 }
15531
15532 func (s *ViewabilityAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15533 type NoMethod ViewabilityAssignedTargetingOptionDetails
15534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15535 }
15536
15537
15538
15539
15540 type ViewabilityTargetingOptionDetails struct {
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565 Viewability string `json:"viewability,omitempty"`
15566
15567
15568
15569
15570
15571 ForceSendFields []string `json:"-"`
15572
15573
15574
15575
15576 NullFields []string `json:"-"`
15577 }
15578
15579 func (s *ViewabilityTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15580 type NoMethod ViewabilityTargetingOptionDetails
15581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15582 }
15583
15584
15585
15586 type YoutubeAndPartnersBiddingStrategy struct {
15587
15588
15589
15590
15591
15592
15593
15594
15595 AdGroupEffectiveTargetCpaSource string `json:"adGroupEffectiveTargetCpaSource,omitempty"`
15596
15597
15598 AdGroupEffectiveTargetCpaValue int64 `json:"adGroupEffectiveTargetCpaValue,omitempty,string"`
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628 Type string `json:"type,omitempty"`
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643 Value int64 `json:"value,omitempty,string"`
15644
15645
15646
15647
15648
15649
15650 ForceSendFields []string `json:"-"`
15651
15652
15653
15654
15655 NullFields []string `json:"-"`
15656 }
15657
15658 func (s *YoutubeAndPartnersBiddingStrategy) MarshalJSON() ([]byte, error) {
15659 type NoMethod YoutubeAndPartnersBiddingStrategy
15660 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15661 }
15662
15663
15664
15665 type YoutubeAndPartnersInventorySourceConfig struct {
15666
15667
15668 IncludeGoogleTv bool `json:"includeGoogleTv,omitempty"`
15669
15670
15671 IncludeYoutube bool `json:"includeYoutube,omitempty"`
15672
15673
15674
15675 IncludeYoutubeVideoPartners bool `json:"includeYoutubeVideoPartners,omitempty"`
15676
15677
15678
15679
15680
15681 ForceSendFields []string `json:"-"`
15682
15683
15684
15685
15686 NullFields []string `json:"-"`
15687 }
15688
15689 func (s *YoutubeAndPartnersInventorySourceConfig) MarshalJSON() ([]byte, error) {
15690 type NoMethod YoutubeAndPartnersInventorySourceConfig
15691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15692 }
15693
15694
15695 type YoutubeAndPartnersSettings struct {
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712 ContentCategory string `json:"contentCategory,omitempty"`
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731 EffectiveContentCategory string `json:"effectiveContentCategory,omitempty"`
15732
15733
15734 InventorySourceSettings *YoutubeAndPartnersInventorySourceConfig `json:"inventorySourceSettings,omitempty"`
15735
15736 LeadFormId int64 `json:"leadFormId,omitempty,string"`
15737
15738
15739 LinkedMerchantId int64 `json:"linkedMerchantId,omitempty,string"`
15740
15741
15742 RelatedVideoIds []string `json:"relatedVideoIds,omitempty"`
15743
15744
15745 TargetFrequency *TargetFrequency `json:"targetFrequency,omitempty"`
15746
15747
15748 ThirdPartyMeasurementConfigs *ThirdPartyMeasurementConfigs `json:"thirdPartyMeasurementConfigs,omitempty"`
15749
15750 VideoAdSequenceSettings *VideoAdSequenceSettings `json:"videoAdSequenceSettings,omitempty"`
15751
15752
15753
15754 ViewFrequencyCap *FrequencyCap `json:"viewFrequencyCap,omitempty"`
15755
15756
15757
15758
15759
15760 ForceSendFields []string `json:"-"`
15761
15762
15763
15764
15765 NullFields []string `json:"-"`
15766 }
15767
15768 func (s *YoutubeAndPartnersSettings) MarshalJSON() ([]byte, error) {
15769 type NoMethod YoutubeAndPartnersSettings
15770 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15771 }
15772
15773
15774
15775
15776
15777 type YoutubeChannelAssignedTargetingOptionDetails struct {
15778
15779
15780 ChannelId string `json:"channelId,omitempty"`
15781
15782 Negative bool `json:"negative,omitempty"`
15783
15784
15785
15786
15787
15788 ForceSendFields []string `json:"-"`
15789
15790
15791
15792
15793 NullFields []string `json:"-"`
15794 }
15795
15796 func (s *YoutubeChannelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15797 type NoMethod YoutubeChannelAssignedTargetingOptionDetails
15798 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15799 }
15800
15801
15802
15803
15804
15805 type YoutubeVideoAssignedTargetingOptionDetails struct {
15806
15807 Negative bool `json:"negative,omitempty"`
15808
15809 VideoId string `json:"videoId,omitempty"`
15810
15811
15812
15813
15814
15815 ForceSendFields []string `json:"-"`
15816
15817
15818
15819
15820 NullFields []string `json:"-"`
15821 }
15822
15823 func (s *YoutubeVideoAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) {
15824 type NoMethod YoutubeVideoAssignedTargetingOptionDetails
15825 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15826 }
15827
15828
15829 type YoutubeVideoDetails struct {
15830
15831 Id string `json:"id,omitempty"`
15832
15833
15834
15835
15836
15837
15838 UnavailableReason string `json:"unavailableReason,omitempty"`
15839
15840
15841
15842
15843
15844 ForceSendFields []string `json:"-"`
15845
15846
15847
15848
15849 NullFields []string `json:"-"`
15850 }
15851
15852 func (s *YoutubeVideoDetails) MarshalJSON() ([]byte, error) {
15853 type NoMethod YoutubeVideoDetails
15854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
15855 }
15856
15857 type AdvertisersAuditCall struct {
15858 s *Service
15859 advertiserId int64
15860 urlParams_ gensupport.URLParams
15861 ifNoneMatch_ string
15862 ctx_ context.Context
15863 header_ http.Header
15864 }
15865
15866
15867
15868
15869
15870
15871
15872 func (r *AdvertisersService) Audit(advertiserId int64) *AdvertisersAuditCall {
15873 c := &AdvertisersAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15874 c.advertiserId = advertiserId
15875 return c
15876 }
15877
15878
15879
15880
15881
15882
15883 func (c *AdvertisersAuditCall) ReadMask(readMask string) *AdvertisersAuditCall {
15884 c.urlParams_.Set("readMask", readMask)
15885 return c
15886 }
15887
15888
15889
15890
15891 func (c *AdvertisersAuditCall) Fields(s ...googleapi.Field) *AdvertisersAuditCall {
15892 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15893 return c
15894 }
15895
15896
15897
15898
15899 func (c *AdvertisersAuditCall) IfNoneMatch(entityTag string) *AdvertisersAuditCall {
15900 c.ifNoneMatch_ = entityTag
15901 return c
15902 }
15903
15904
15905 func (c *AdvertisersAuditCall) Context(ctx context.Context) *AdvertisersAuditCall {
15906 c.ctx_ = ctx
15907 return c
15908 }
15909
15910
15911
15912 func (c *AdvertisersAuditCall) Header() http.Header {
15913 if c.header_ == nil {
15914 c.header_ = make(http.Header)
15915 }
15916 return c.header_
15917 }
15918
15919 func (c *AdvertisersAuditCall) doRequest(alt string) (*http.Response, error) {
15920 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15921 if c.ifNoneMatch_ != "" {
15922 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15923 }
15924 var body io.Reader = nil
15925 c.urlParams_.Set("alt", alt)
15926 c.urlParams_.Set("prettyPrint", "false")
15927 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}:audit")
15928 urls += "?" + c.urlParams_.Encode()
15929 req, err := http.NewRequest("GET", urls, body)
15930 if err != nil {
15931 return nil, err
15932 }
15933 req.Header = reqHeaders
15934 googleapi.Expand(req.URL, map[string]string{
15935 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
15936 })
15937 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15938 }
15939
15940
15941
15942
15943
15944
15945
15946 func (c *AdvertisersAuditCall) Do(opts ...googleapi.CallOption) (*AuditAdvertiserResponse, error) {
15947 gensupport.SetOptions(c.urlParams_, opts...)
15948 res, err := c.doRequest("json")
15949 if res != nil && res.StatusCode == http.StatusNotModified {
15950 if res.Body != nil {
15951 res.Body.Close()
15952 }
15953 return nil, gensupport.WrapError(&googleapi.Error{
15954 Code: res.StatusCode,
15955 Header: res.Header,
15956 })
15957 }
15958 if err != nil {
15959 return nil, err
15960 }
15961 defer googleapi.CloseBody(res)
15962 if err := googleapi.CheckResponse(res); err != nil {
15963 return nil, gensupport.WrapError(err)
15964 }
15965 ret := &AuditAdvertiserResponse{
15966 ServerResponse: googleapi.ServerResponse{
15967 Header: res.Header,
15968 HTTPStatusCode: res.StatusCode,
15969 },
15970 }
15971 target := &ret
15972 if err := gensupport.DecodeResponse(target, res); err != nil {
15973 return nil, err
15974 }
15975 return ret, nil
15976 }
15977
15978 type AdvertisersCreateCall struct {
15979 s *Service
15980 advertiser *Advertiser
15981 urlParams_ gensupport.URLParams
15982 ctx_ context.Context
15983 header_ http.Header
15984 }
15985
15986
15987
15988
15989
15990
15991 func (r *AdvertisersService) Create(advertiser *Advertiser) *AdvertisersCreateCall {
15992 c := &AdvertisersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15993 c.advertiser = advertiser
15994 return c
15995 }
15996
15997
15998
15999
16000 func (c *AdvertisersCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreateCall {
16001 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16002 return c
16003 }
16004
16005
16006 func (c *AdvertisersCreateCall) Context(ctx context.Context) *AdvertisersCreateCall {
16007 c.ctx_ = ctx
16008 return c
16009 }
16010
16011
16012
16013 func (c *AdvertisersCreateCall) Header() http.Header {
16014 if c.header_ == nil {
16015 c.header_ = make(http.Header)
16016 }
16017 return c.header_
16018 }
16019
16020 func (c *AdvertisersCreateCall) doRequest(alt string) (*http.Response, error) {
16021 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16022 var body io.Reader = nil
16023 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
16024 if err != nil {
16025 return nil, err
16026 }
16027 c.urlParams_.Set("alt", alt)
16028 c.urlParams_.Set("prettyPrint", "false")
16029 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers")
16030 urls += "?" + c.urlParams_.Encode()
16031 req, err := http.NewRequest("POST", urls, body)
16032 if err != nil {
16033 return nil, err
16034 }
16035 req.Header = reqHeaders
16036 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16037 }
16038
16039
16040
16041
16042
16043
16044 func (c *AdvertisersCreateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
16045 gensupport.SetOptions(c.urlParams_, opts...)
16046 res, err := c.doRequest("json")
16047 if res != nil && res.StatusCode == http.StatusNotModified {
16048 if res.Body != nil {
16049 res.Body.Close()
16050 }
16051 return nil, gensupport.WrapError(&googleapi.Error{
16052 Code: res.StatusCode,
16053 Header: res.Header,
16054 })
16055 }
16056 if err != nil {
16057 return nil, err
16058 }
16059 defer googleapi.CloseBody(res)
16060 if err := googleapi.CheckResponse(res); err != nil {
16061 return nil, gensupport.WrapError(err)
16062 }
16063 ret := &Advertiser{
16064 ServerResponse: googleapi.ServerResponse{
16065 Header: res.Header,
16066 HTTPStatusCode: res.StatusCode,
16067 },
16068 }
16069 target := &ret
16070 if err := gensupport.DecodeResponse(target, res); err != nil {
16071 return nil, err
16072 }
16073 return ret, nil
16074 }
16075
16076 type AdvertisersDeleteCall struct {
16077 s *Service
16078 advertiserId int64
16079 urlParams_ gensupport.URLParams
16080 ctx_ context.Context
16081 header_ http.Header
16082 }
16083
16084
16085
16086
16087
16088
16089 func (r *AdvertisersService) Delete(advertiserId int64) *AdvertisersDeleteCall {
16090 c := &AdvertisersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16091 c.advertiserId = advertiserId
16092 return c
16093 }
16094
16095
16096
16097
16098 func (c *AdvertisersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersDeleteCall {
16099 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16100 return c
16101 }
16102
16103
16104 func (c *AdvertisersDeleteCall) Context(ctx context.Context) *AdvertisersDeleteCall {
16105 c.ctx_ = ctx
16106 return c
16107 }
16108
16109
16110
16111 func (c *AdvertisersDeleteCall) Header() http.Header {
16112 if c.header_ == nil {
16113 c.header_ = make(http.Header)
16114 }
16115 return c.header_
16116 }
16117
16118 func (c *AdvertisersDeleteCall) doRequest(alt string) (*http.Response, error) {
16119 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16120 var body io.Reader = nil
16121 c.urlParams_.Set("alt", alt)
16122 c.urlParams_.Set("prettyPrint", "false")
16123 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}")
16124 urls += "?" + c.urlParams_.Encode()
16125 req, err := http.NewRequest("DELETE", urls, body)
16126 if err != nil {
16127 return nil, err
16128 }
16129 req.Header = reqHeaders
16130 googleapi.Expand(req.URL, map[string]string{
16131 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16132 })
16133 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16134 }
16135
16136
16137
16138
16139
16140
16141 func (c *AdvertisersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
16142 gensupport.SetOptions(c.urlParams_, opts...)
16143 res, err := c.doRequest("json")
16144 if res != nil && res.StatusCode == http.StatusNotModified {
16145 if res.Body != nil {
16146 res.Body.Close()
16147 }
16148 return nil, gensupport.WrapError(&googleapi.Error{
16149 Code: res.StatusCode,
16150 Header: res.Header,
16151 })
16152 }
16153 if err != nil {
16154 return nil, err
16155 }
16156 defer googleapi.CloseBody(res)
16157 if err := googleapi.CheckResponse(res); err != nil {
16158 return nil, gensupport.WrapError(err)
16159 }
16160 ret := &Empty{
16161 ServerResponse: googleapi.ServerResponse{
16162 Header: res.Header,
16163 HTTPStatusCode: res.StatusCode,
16164 },
16165 }
16166 target := &ret
16167 if err := gensupport.DecodeResponse(target, res); err != nil {
16168 return nil, err
16169 }
16170 return ret, nil
16171 }
16172
16173 type AdvertisersEditAssignedTargetingOptionsCall struct {
16174 s *Service
16175 advertiserId int64
16176 bulkeditadvertiserassignedtargetingoptionsrequest *BulkEditAdvertiserAssignedTargetingOptionsRequest
16177 urlParams_ gensupport.URLParams
16178 ctx_ context.Context
16179 header_ http.Header
16180 }
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190 func (r *AdvertisersService) EditAssignedTargetingOptions(advertiserId int64, bulkeditadvertiserassignedtargetingoptionsrequest *BulkEditAdvertiserAssignedTargetingOptionsRequest) *AdvertisersEditAssignedTargetingOptionsCall {
16191 c := &AdvertisersEditAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16192 c.advertiserId = advertiserId
16193 c.bulkeditadvertiserassignedtargetingoptionsrequest = bulkeditadvertiserassignedtargetingoptionsrequest
16194 return c
16195 }
16196
16197
16198
16199
16200 func (c *AdvertisersEditAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersEditAssignedTargetingOptionsCall {
16201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16202 return c
16203 }
16204
16205
16206 func (c *AdvertisersEditAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersEditAssignedTargetingOptionsCall {
16207 c.ctx_ = ctx
16208 return c
16209 }
16210
16211
16212
16213 func (c *AdvertisersEditAssignedTargetingOptionsCall) Header() http.Header {
16214 if c.header_ == nil {
16215 c.header_ = make(http.Header)
16216 }
16217 return c.header_
16218 }
16219
16220 func (c *AdvertisersEditAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
16221 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16222 var body io.Reader = nil
16223 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditadvertiserassignedtargetingoptionsrequest)
16224 if err != nil {
16225 return nil, err
16226 }
16227 c.urlParams_.Set("alt", alt)
16228 c.urlParams_.Set("prettyPrint", "false")
16229 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}:editAssignedTargetingOptions")
16230 urls += "?" + c.urlParams_.Encode()
16231 req, err := http.NewRequest("POST", urls, body)
16232 if err != nil {
16233 return nil, err
16234 }
16235 req.Header = reqHeaders
16236 googleapi.Expand(req.URL, map[string]string{
16237 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16238 })
16239 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16240 }
16241
16242
16243
16244
16245
16246
16247
16248 func (c *AdvertisersEditAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditAdvertiserAssignedTargetingOptionsResponse, error) {
16249 gensupport.SetOptions(c.urlParams_, opts...)
16250 res, err := c.doRequest("json")
16251 if res != nil && res.StatusCode == http.StatusNotModified {
16252 if res.Body != nil {
16253 res.Body.Close()
16254 }
16255 return nil, gensupport.WrapError(&googleapi.Error{
16256 Code: res.StatusCode,
16257 Header: res.Header,
16258 })
16259 }
16260 if err != nil {
16261 return nil, err
16262 }
16263 defer googleapi.CloseBody(res)
16264 if err := googleapi.CheckResponse(res); err != nil {
16265 return nil, gensupport.WrapError(err)
16266 }
16267 ret := &BulkEditAdvertiserAssignedTargetingOptionsResponse{
16268 ServerResponse: googleapi.ServerResponse{
16269 Header: res.Header,
16270 HTTPStatusCode: res.StatusCode,
16271 },
16272 }
16273 target := &ret
16274 if err := gensupport.DecodeResponse(target, res); err != nil {
16275 return nil, err
16276 }
16277 return ret, nil
16278 }
16279
16280 type AdvertisersGetCall struct {
16281 s *Service
16282 advertiserId int64
16283 urlParams_ gensupport.URLParams
16284 ifNoneMatch_ string
16285 ctx_ context.Context
16286 header_ http.Header
16287 }
16288
16289
16290
16291
16292 func (r *AdvertisersService) Get(advertiserId int64) *AdvertisersGetCall {
16293 c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16294 c.advertiserId = advertiserId
16295 return c
16296 }
16297
16298
16299
16300
16301 func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
16302 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16303 return c
16304 }
16305
16306
16307
16308
16309 func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
16310 c.ifNoneMatch_ = entityTag
16311 return c
16312 }
16313
16314
16315 func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
16316 c.ctx_ = ctx
16317 return c
16318 }
16319
16320
16321
16322 func (c *AdvertisersGetCall) Header() http.Header {
16323 if c.header_ == nil {
16324 c.header_ = make(http.Header)
16325 }
16326 return c.header_
16327 }
16328
16329 func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
16330 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16331 if c.ifNoneMatch_ != "" {
16332 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16333 }
16334 var body io.Reader = nil
16335 c.urlParams_.Set("alt", alt)
16336 c.urlParams_.Set("prettyPrint", "false")
16337 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}")
16338 urls += "?" + c.urlParams_.Encode()
16339 req, err := http.NewRequest("GET", urls, body)
16340 if err != nil {
16341 return nil, err
16342 }
16343 req.Header = reqHeaders
16344 googleapi.Expand(req.URL, map[string]string{
16345 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16346 })
16347 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16348 }
16349
16350
16351
16352
16353
16354
16355 func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
16356 gensupport.SetOptions(c.urlParams_, opts...)
16357 res, err := c.doRequest("json")
16358 if res != nil && res.StatusCode == http.StatusNotModified {
16359 if res.Body != nil {
16360 res.Body.Close()
16361 }
16362 return nil, gensupport.WrapError(&googleapi.Error{
16363 Code: res.StatusCode,
16364 Header: res.Header,
16365 })
16366 }
16367 if err != nil {
16368 return nil, err
16369 }
16370 defer googleapi.CloseBody(res)
16371 if err := googleapi.CheckResponse(res); err != nil {
16372 return nil, gensupport.WrapError(err)
16373 }
16374 ret := &Advertiser{
16375 ServerResponse: googleapi.ServerResponse{
16376 Header: res.Header,
16377 HTTPStatusCode: res.StatusCode,
16378 },
16379 }
16380 target := &ret
16381 if err := gensupport.DecodeResponse(target, res); err != nil {
16382 return nil, err
16383 }
16384 return ret, nil
16385 }
16386
16387 type AdvertisersListCall struct {
16388 s *Service
16389 urlParams_ gensupport.URLParams
16390 ifNoneMatch_ string
16391 ctx_ context.Context
16392 header_ http.Header
16393 }
16394
16395
16396
16397
16398 func (r *AdvertisersService) List() *AdvertisersListCall {
16399 c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16400 return c
16401 }
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419 func (c *AdvertisersListCall) Filter(filter string) *AdvertisersListCall {
16420 c.urlParams_.Set("filter", filter)
16421 return c
16422 }
16423
16424
16425
16426
16427
16428
16429 func (c *AdvertisersListCall) OrderBy(orderBy string) *AdvertisersListCall {
16430 c.urlParams_.Set("orderBy", orderBy)
16431 return c
16432 }
16433
16434
16435
16436 func (c *AdvertisersListCall) PageSize(pageSize int64) *AdvertisersListCall {
16437 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16438 return c
16439 }
16440
16441
16442
16443
16444
16445 func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
16446 c.urlParams_.Set("pageToken", pageToken)
16447 return c
16448 }
16449
16450
16451
16452
16453 func (c *AdvertisersListCall) PartnerId(partnerId int64) *AdvertisersListCall {
16454 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
16455 return c
16456 }
16457
16458
16459
16460
16461 func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
16462 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16463 return c
16464 }
16465
16466
16467
16468
16469 func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
16470 c.ifNoneMatch_ = entityTag
16471 return c
16472 }
16473
16474
16475 func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
16476 c.ctx_ = ctx
16477 return c
16478 }
16479
16480
16481
16482 func (c *AdvertisersListCall) Header() http.Header {
16483 if c.header_ == nil {
16484 c.header_ = make(http.Header)
16485 }
16486 return c.header_
16487 }
16488
16489 func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
16490 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16491 if c.ifNoneMatch_ != "" {
16492 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16493 }
16494 var body io.Reader = nil
16495 c.urlParams_.Set("alt", alt)
16496 c.urlParams_.Set("prettyPrint", "false")
16497 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers")
16498 urls += "?" + c.urlParams_.Encode()
16499 req, err := http.NewRequest("GET", urls, body)
16500 if err != nil {
16501 return nil, err
16502 }
16503 req.Header = reqHeaders
16504 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16505 }
16506
16507
16508
16509
16510
16511
16512
16513 func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*ListAdvertisersResponse, error) {
16514 gensupport.SetOptions(c.urlParams_, opts...)
16515 res, err := c.doRequest("json")
16516 if res != nil && res.StatusCode == http.StatusNotModified {
16517 if res.Body != nil {
16518 res.Body.Close()
16519 }
16520 return nil, gensupport.WrapError(&googleapi.Error{
16521 Code: res.StatusCode,
16522 Header: res.Header,
16523 })
16524 }
16525 if err != nil {
16526 return nil, err
16527 }
16528 defer googleapi.CloseBody(res)
16529 if err := googleapi.CheckResponse(res); err != nil {
16530 return nil, gensupport.WrapError(err)
16531 }
16532 ret := &ListAdvertisersResponse{
16533 ServerResponse: googleapi.ServerResponse{
16534 Header: res.Header,
16535 HTTPStatusCode: res.StatusCode,
16536 },
16537 }
16538 target := &ret
16539 if err := gensupport.DecodeResponse(target, res); err != nil {
16540 return nil, err
16541 }
16542 return ret, nil
16543 }
16544
16545
16546
16547
16548 func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*ListAdvertisersResponse) error) error {
16549 c.ctx_ = ctx
16550 defer c.PageToken(c.urlParams_.Get("pageToken"))
16551 for {
16552 x, err := c.Do()
16553 if err != nil {
16554 return err
16555 }
16556 if err := f(x); err != nil {
16557 return err
16558 }
16559 if x.NextPageToken == "" {
16560 return nil
16561 }
16562 c.PageToken(x.NextPageToken)
16563 }
16564 }
16565
16566 type AdvertisersListAssignedTargetingOptionsCall struct {
16567 s *Service
16568 advertiserId int64
16569 urlParams_ gensupport.URLParams
16570 ifNoneMatch_ string
16571 ctx_ context.Context
16572 header_ http.Header
16573 }
16574
16575
16576
16577
16578
16579 func (r *AdvertisersService) ListAssignedTargetingOptions(advertiserId int64) *AdvertisersListAssignedTargetingOptionsCall {
16580 c := &AdvertisersListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16581 c.advertiserId = advertiserId
16582 return c
16583 }
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595 func (c *AdvertisersListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersListAssignedTargetingOptionsCall {
16596 c.urlParams_.Set("filter", filter)
16597 return c
16598 }
16599
16600
16601
16602
16603
16604 func (c *AdvertisersListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersListAssignedTargetingOptionsCall {
16605 c.urlParams_.Set("orderBy", orderBy)
16606 return c
16607 }
16608
16609
16610
16611
16612
16613 func (c *AdvertisersListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersListAssignedTargetingOptionsCall {
16614 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16615 return c
16616 }
16617
16618
16619
16620
16621
16622
16623 func (c *AdvertisersListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersListAssignedTargetingOptionsCall {
16624 c.urlParams_.Set("pageToken", pageToken)
16625 return c
16626 }
16627
16628
16629
16630
16631 func (c *AdvertisersListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersListAssignedTargetingOptionsCall {
16632 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16633 return c
16634 }
16635
16636
16637
16638
16639 func (c *AdvertisersListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersListAssignedTargetingOptionsCall {
16640 c.ifNoneMatch_ = entityTag
16641 return c
16642 }
16643
16644
16645 func (c *AdvertisersListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersListAssignedTargetingOptionsCall {
16646 c.ctx_ = ctx
16647 return c
16648 }
16649
16650
16651
16652 func (c *AdvertisersListAssignedTargetingOptionsCall) Header() http.Header {
16653 if c.header_ == nil {
16654 c.header_ = make(http.Header)
16655 }
16656 return c.header_
16657 }
16658
16659 func (c *AdvertisersListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
16660 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16661 if c.ifNoneMatch_ != "" {
16662 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16663 }
16664 var body io.Reader = nil
16665 c.urlParams_.Set("alt", alt)
16666 c.urlParams_.Set("prettyPrint", "false")
16667 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}:listAssignedTargetingOptions")
16668 urls += "?" + c.urlParams_.Encode()
16669 req, err := http.NewRequest("GET", urls, body)
16670 if err != nil {
16671 return nil, err
16672 }
16673 req.Header = reqHeaders
16674 googleapi.Expand(req.URL, map[string]string{
16675 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16676 })
16677 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16678 }
16679
16680
16681
16682
16683
16684
16685
16686 func (c *AdvertisersListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListAdvertiserAssignedTargetingOptionsResponse, error) {
16687 gensupport.SetOptions(c.urlParams_, opts...)
16688 res, err := c.doRequest("json")
16689 if res != nil && res.StatusCode == http.StatusNotModified {
16690 if res.Body != nil {
16691 res.Body.Close()
16692 }
16693 return nil, gensupport.WrapError(&googleapi.Error{
16694 Code: res.StatusCode,
16695 Header: res.Header,
16696 })
16697 }
16698 if err != nil {
16699 return nil, err
16700 }
16701 defer googleapi.CloseBody(res)
16702 if err := googleapi.CheckResponse(res); err != nil {
16703 return nil, gensupport.WrapError(err)
16704 }
16705 ret := &BulkListAdvertiserAssignedTargetingOptionsResponse{
16706 ServerResponse: googleapi.ServerResponse{
16707 Header: res.Header,
16708 HTTPStatusCode: res.StatusCode,
16709 },
16710 }
16711 target := &ret
16712 if err := gensupport.DecodeResponse(target, res); err != nil {
16713 return nil, err
16714 }
16715 return ret, nil
16716 }
16717
16718
16719
16720
16721 func (c *AdvertisersListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListAdvertiserAssignedTargetingOptionsResponse) error) error {
16722 c.ctx_ = ctx
16723 defer c.PageToken(c.urlParams_.Get("pageToken"))
16724 for {
16725 x, err := c.Do()
16726 if err != nil {
16727 return err
16728 }
16729 if err := f(x); err != nil {
16730 return err
16731 }
16732 if x.NextPageToken == "" {
16733 return nil
16734 }
16735 c.PageToken(x.NextPageToken)
16736 }
16737 }
16738
16739 type AdvertisersPatchCall struct {
16740 s *Service
16741 advertiserId int64
16742 advertiser *Advertiser
16743 urlParams_ gensupport.URLParams
16744 ctx_ context.Context
16745 header_ http.Header
16746 }
16747
16748
16749
16750
16751
16752
16753 func (r *AdvertisersService) Patch(advertiserId int64, advertiser *Advertiser) *AdvertisersPatchCall {
16754 c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16755 c.advertiserId = advertiserId
16756 c.advertiser = advertiser
16757 return c
16758 }
16759
16760
16761
16762 func (c *AdvertisersPatchCall) UpdateMask(updateMask string) *AdvertisersPatchCall {
16763 c.urlParams_.Set("updateMask", updateMask)
16764 return c
16765 }
16766
16767
16768
16769
16770 func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
16771 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16772 return c
16773 }
16774
16775
16776 func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
16777 c.ctx_ = ctx
16778 return c
16779 }
16780
16781
16782
16783 func (c *AdvertisersPatchCall) Header() http.Header {
16784 if c.header_ == nil {
16785 c.header_ = make(http.Header)
16786 }
16787 return c.header_
16788 }
16789
16790 func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
16791 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16792 var body io.Reader = nil
16793 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
16794 if err != nil {
16795 return nil, err
16796 }
16797 c.urlParams_.Set("alt", alt)
16798 c.urlParams_.Set("prettyPrint", "false")
16799 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}")
16800 urls += "?" + c.urlParams_.Encode()
16801 req, err := http.NewRequest("PATCH", urls, body)
16802 if err != nil {
16803 return nil, err
16804 }
16805 req.Header = reqHeaders
16806 googleapi.Expand(req.URL, map[string]string{
16807 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16808 })
16809 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16810 }
16811
16812
16813
16814
16815
16816
16817 func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
16818 gensupport.SetOptions(c.urlParams_, opts...)
16819 res, err := c.doRequest("json")
16820 if res != nil && res.StatusCode == http.StatusNotModified {
16821 if res.Body != nil {
16822 res.Body.Close()
16823 }
16824 return nil, gensupport.WrapError(&googleapi.Error{
16825 Code: res.StatusCode,
16826 Header: res.Header,
16827 })
16828 }
16829 if err != nil {
16830 return nil, err
16831 }
16832 defer googleapi.CloseBody(res)
16833 if err := googleapi.CheckResponse(res); err != nil {
16834 return nil, gensupport.WrapError(err)
16835 }
16836 ret := &Advertiser{
16837 ServerResponse: googleapi.ServerResponse{
16838 Header: res.Header,
16839 HTTPStatusCode: res.StatusCode,
16840 },
16841 }
16842 target := &ret
16843 if err := gensupport.DecodeResponse(target, res); err != nil {
16844 return nil, err
16845 }
16846 return ret, nil
16847 }
16848
16849 type AdvertisersAdGroupAdsGetCall struct {
16850 s *Service
16851 advertiserId int64
16852 adGroupAdId int64
16853 urlParams_ gensupport.URLParams
16854 ifNoneMatch_ string
16855 ctx_ context.Context
16856 header_ http.Header
16857 }
16858
16859
16860
16861
16862
16863 func (r *AdvertisersAdGroupAdsService) Get(advertiserId int64, adGroupAdId int64) *AdvertisersAdGroupAdsGetCall {
16864 c := &AdvertisersAdGroupAdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16865 c.advertiserId = advertiserId
16866 c.adGroupAdId = adGroupAdId
16867 return c
16868 }
16869
16870
16871
16872
16873 func (c *AdvertisersAdGroupAdsGetCall) Fields(s ...googleapi.Field) *AdvertisersAdGroupAdsGetCall {
16874 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16875 return c
16876 }
16877
16878
16879
16880
16881 func (c *AdvertisersAdGroupAdsGetCall) IfNoneMatch(entityTag string) *AdvertisersAdGroupAdsGetCall {
16882 c.ifNoneMatch_ = entityTag
16883 return c
16884 }
16885
16886
16887 func (c *AdvertisersAdGroupAdsGetCall) Context(ctx context.Context) *AdvertisersAdGroupAdsGetCall {
16888 c.ctx_ = ctx
16889 return c
16890 }
16891
16892
16893
16894 func (c *AdvertisersAdGroupAdsGetCall) Header() http.Header {
16895 if c.header_ == nil {
16896 c.header_ = make(http.Header)
16897 }
16898 return c.header_
16899 }
16900
16901 func (c *AdvertisersAdGroupAdsGetCall) doRequest(alt string) (*http.Response, error) {
16902 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16903 if c.ifNoneMatch_ != "" {
16904 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16905 }
16906 var body io.Reader = nil
16907 c.urlParams_.Set("alt", alt)
16908 c.urlParams_.Set("prettyPrint", "false")
16909 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/adGroupAds/{+adGroupAdId}")
16910 urls += "?" + c.urlParams_.Encode()
16911 req, err := http.NewRequest("GET", urls, body)
16912 if err != nil {
16913 return nil, err
16914 }
16915 req.Header = reqHeaders
16916 googleapi.Expand(req.URL, map[string]string{
16917 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
16918 "adGroupAdId": strconv.FormatInt(c.adGroupAdId, 10),
16919 })
16920 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16921 }
16922
16923
16924
16925
16926
16927
16928 func (c *AdvertisersAdGroupAdsGetCall) Do(opts ...googleapi.CallOption) (*AdGroupAd, error) {
16929 gensupport.SetOptions(c.urlParams_, opts...)
16930 res, err := c.doRequest("json")
16931 if res != nil && res.StatusCode == http.StatusNotModified {
16932 if res.Body != nil {
16933 res.Body.Close()
16934 }
16935 return nil, gensupport.WrapError(&googleapi.Error{
16936 Code: res.StatusCode,
16937 Header: res.Header,
16938 })
16939 }
16940 if err != nil {
16941 return nil, err
16942 }
16943 defer googleapi.CloseBody(res)
16944 if err := googleapi.CheckResponse(res); err != nil {
16945 return nil, gensupport.WrapError(err)
16946 }
16947 ret := &AdGroupAd{
16948 ServerResponse: googleapi.ServerResponse{
16949 Header: res.Header,
16950 HTTPStatusCode: res.StatusCode,
16951 },
16952 }
16953 target := &ret
16954 if err := gensupport.DecodeResponse(target, res); err != nil {
16955 return nil, err
16956 }
16957 return ret, nil
16958 }
16959
16960 type AdvertisersAdGroupAdsListCall struct {
16961 s *Service
16962 advertiserId int64
16963 urlParams_ gensupport.URLParams
16964 ifNoneMatch_ string
16965 ctx_ context.Context
16966 header_ http.Header
16967 }
16968
16969
16970
16971
16972 func (r *AdvertisersAdGroupAdsService) List(advertiserId int64) *AdvertisersAdGroupAdsListCall {
16973 c := &AdvertisersAdGroupAdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16974 c.advertiserId = advertiserId
16975 return c
16976 }
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992 func (c *AdvertisersAdGroupAdsListCall) Filter(filter string) *AdvertisersAdGroupAdsListCall {
16993 c.urlParams_.Set("filter", filter)
16994 return c
16995 }
16996
16997
16998
16999
17000
17001
17002 func (c *AdvertisersAdGroupAdsListCall) OrderBy(orderBy string) *AdvertisersAdGroupAdsListCall {
17003 c.urlParams_.Set("orderBy", orderBy)
17004 return c
17005 }
17006
17007
17008
17009
17010 func (c *AdvertisersAdGroupAdsListCall) PageSize(pageSize int64) *AdvertisersAdGroupAdsListCall {
17011 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17012 return c
17013 }
17014
17015
17016
17017
17018
17019 func (c *AdvertisersAdGroupAdsListCall) PageToken(pageToken string) *AdvertisersAdGroupAdsListCall {
17020 c.urlParams_.Set("pageToken", pageToken)
17021 return c
17022 }
17023
17024
17025
17026
17027 func (c *AdvertisersAdGroupAdsListCall) Fields(s ...googleapi.Field) *AdvertisersAdGroupAdsListCall {
17028 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17029 return c
17030 }
17031
17032
17033
17034
17035 func (c *AdvertisersAdGroupAdsListCall) IfNoneMatch(entityTag string) *AdvertisersAdGroupAdsListCall {
17036 c.ifNoneMatch_ = entityTag
17037 return c
17038 }
17039
17040
17041 func (c *AdvertisersAdGroupAdsListCall) Context(ctx context.Context) *AdvertisersAdGroupAdsListCall {
17042 c.ctx_ = ctx
17043 return c
17044 }
17045
17046
17047
17048 func (c *AdvertisersAdGroupAdsListCall) Header() http.Header {
17049 if c.header_ == nil {
17050 c.header_ = make(http.Header)
17051 }
17052 return c.header_
17053 }
17054
17055 func (c *AdvertisersAdGroupAdsListCall) doRequest(alt string) (*http.Response, error) {
17056 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17057 if c.ifNoneMatch_ != "" {
17058 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17059 }
17060 var body io.Reader = nil
17061 c.urlParams_.Set("alt", alt)
17062 c.urlParams_.Set("prettyPrint", "false")
17063 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/adGroupAds")
17064 urls += "?" + c.urlParams_.Encode()
17065 req, err := http.NewRequest("GET", urls, body)
17066 if err != nil {
17067 return nil, err
17068 }
17069 req.Header = reqHeaders
17070 googleapi.Expand(req.URL, map[string]string{
17071 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17072 })
17073 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17074 }
17075
17076
17077
17078
17079
17080
17081
17082 func (c *AdvertisersAdGroupAdsListCall) Do(opts ...googleapi.CallOption) (*ListAdGroupAdsResponse, error) {
17083 gensupport.SetOptions(c.urlParams_, opts...)
17084 res, err := c.doRequest("json")
17085 if res != nil && res.StatusCode == http.StatusNotModified {
17086 if res.Body != nil {
17087 res.Body.Close()
17088 }
17089 return nil, gensupport.WrapError(&googleapi.Error{
17090 Code: res.StatusCode,
17091 Header: res.Header,
17092 })
17093 }
17094 if err != nil {
17095 return nil, err
17096 }
17097 defer googleapi.CloseBody(res)
17098 if err := googleapi.CheckResponse(res); err != nil {
17099 return nil, gensupport.WrapError(err)
17100 }
17101 ret := &ListAdGroupAdsResponse{
17102 ServerResponse: googleapi.ServerResponse{
17103 Header: res.Header,
17104 HTTPStatusCode: res.StatusCode,
17105 },
17106 }
17107 target := &ret
17108 if err := gensupport.DecodeResponse(target, res); err != nil {
17109 return nil, err
17110 }
17111 return ret, nil
17112 }
17113
17114
17115
17116
17117 func (c *AdvertisersAdGroupAdsListCall) Pages(ctx context.Context, f func(*ListAdGroupAdsResponse) error) error {
17118 c.ctx_ = ctx
17119 defer c.PageToken(c.urlParams_.Get("pageToken"))
17120 for {
17121 x, err := c.Do()
17122 if err != nil {
17123 return err
17124 }
17125 if err := f(x); err != nil {
17126 return err
17127 }
17128 if x.NextPageToken == "" {
17129 return nil
17130 }
17131 c.PageToken(x.NextPageToken)
17132 }
17133 }
17134
17135 type AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall struct {
17136 s *Service
17137 advertiserId int64
17138 urlParams_ gensupport.URLParams
17139 ifNoneMatch_ string
17140 ctx_ context.Context
17141 header_ http.Header
17142 }
17143
17144
17145
17146
17147
17148
17149 func (r *AdvertisersAdGroupsService) BulkListAdGroupAssignedTargetingOptions(advertiserId int64) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17150 c := &AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17151 c.advertiserId = advertiserId
17152 return c
17153 }
17154
17155
17156
17157 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) AdGroupIds(adGroupIds ...int64) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17158 var adGroupIds_ []string
17159 for _, v := range adGroupIds {
17160 adGroupIds_ = append(adGroupIds_, fmt.Sprint(v))
17161 }
17162 c.urlParams_.SetMulti("adGroupIds", adGroupIds_)
17163 return c
17164 }
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17178 c.urlParams_.Set("filter", filter)
17179 return c
17180 }
17181
17182
17183
17184
17185
17186
17187 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17188 c.urlParams_.Set("orderBy", orderBy)
17189 return c
17190 }
17191
17192
17193
17194
17195
17196 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17197 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17198 return c
17199 }
17200
17201
17202
17203
17204
17205
17206 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17207 c.urlParams_.Set("pageToken", pageToken)
17208 return c
17209 }
17210
17211
17212
17213
17214 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17215 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17216 return c
17217 }
17218
17219
17220
17221
17222 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17223 c.ifNoneMatch_ = entityTag
17224 return c
17225 }
17226
17227
17228 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall {
17229 c.ctx_ = ctx
17230 return c
17231 }
17232
17233
17234
17235 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Header() http.Header {
17236 if c.header_ == nil {
17237 c.header_ = make(http.Header)
17238 }
17239 return c.header_
17240 }
17241
17242 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
17243 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17244 if c.ifNoneMatch_ != "" {
17245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17246 }
17247 var body io.Reader = nil
17248 c.urlParams_.Set("alt", alt)
17249 c.urlParams_.Set("prettyPrint", "false")
17250 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/adGroups:bulkListAdGroupAssignedTargetingOptions")
17251 urls += "?" + c.urlParams_.Encode()
17252 req, err := http.NewRequest("GET", urls, body)
17253 if err != nil {
17254 return nil, err
17255 }
17256 req.Header = reqHeaders
17257 googleapi.Expand(req.URL, map[string]string{
17258 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17259 })
17260 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17261 }
17262
17263
17264
17265
17266
17267
17268
17269 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListAdGroupAssignedTargetingOptionsResponse, error) {
17270 gensupport.SetOptions(c.urlParams_, opts...)
17271 res, err := c.doRequest("json")
17272 if res != nil && res.StatusCode == http.StatusNotModified {
17273 if res.Body != nil {
17274 res.Body.Close()
17275 }
17276 return nil, gensupport.WrapError(&googleapi.Error{
17277 Code: res.StatusCode,
17278 Header: res.Header,
17279 })
17280 }
17281 if err != nil {
17282 return nil, err
17283 }
17284 defer googleapi.CloseBody(res)
17285 if err := googleapi.CheckResponse(res); err != nil {
17286 return nil, gensupport.WrapError(err)
17287 }
17288 ret := &BulkListAdGroupAssignedTargetingOptionsResponse{
17289 ServerResponse: googleapi.ServerResponse{
17290 Header: res.Header,
17291 HTTPStatusCode: res.StatusCode,
17292 },
17293 }
17294 target := &ret
17295 if err := gensupport.DecodeResponse(target, res); err != nil {
17296 return nil, err
17297 }
17298 return ret, nil
17299 }
17300
17301
17302
17303
17304 func (c *AdvertisersAdGroupsBulkListAdGroupAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListAdGroupAssignedTargetingOptionsResponse) error) error {
17305 c.ctx_ = ctx
17306 defer c.PageToken(c.urlParams_.Get("pageToken"))
17307 for {
17308 x, err := c.Do()
17309 if err != nil {
17310 return err
17311 }
17312 if err := f(x); err != nil {
17313 return err
17314 }
17315 if x.NextPageToken == "" {
17316 return nil
17317 }
17318 c.PageToken(x.NextPageToken)
17319 }
17320 }
17321
17322 type AdvertisersAdGroupsGetCall struct {
17323 s *Service
17324 advertiserId int64
17325 adGroupId int64
17326 urlParams_ gensupport.URLParams
17327 ifNoneMatch_ string
17328 ctx_ context.Context
17329 header_ http.Header
17330 }
17331
17332
17333
17334
17335
17336 func (r *AdvertisersAdGroupsService) Get(advertiserId int64, adGroupId int64) *AdvertisersAdGroupsGetCall {
17337 c := &AdvertisersAdGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17338 c.advertiserId = advertiserId
17339 c.adGroupId = adGroupId
17340 return c
17341 }
17342
17343
17344
17345
17346 func (c *AdvertisersAdGroupsGetCall) Fields(s ...googleapi.Field) *AdvertisersAdGroupsGetCall {
17347 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17348 return c
17349 }
17350
17351
17352
17353
17354 func (c *AdvertisersAdGroupsGetCall) IfNoneMatch(entityTag string) *AdvertisersAdGroupsGetCall {
17355 c.ifNoneMatch_ = entityTag
17356 return c
17357 }
17358
17359
17360 func (c *AdvertisersAdGroupsGetCall) Context(ctx context.Context) *AdvertisersAdGroupsGetCall {
17361 c.ctx_ = ctx
17362 return c
17363 }
17364
17365
17366
17367 func (c *AdvertisersAdGroupsGetCall) Header() http.Header {
17368 if c.header_ == nil {
17369 c.header_ = make(http.Header)
17370 }
17371 return c.header_
17372 }
17373
17374 func (c *AdvertisersAdGroupsGetCall) doRequest(alt string) (*http.Response, error) {
17375 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17376 if c.ifNoneMatch_ != "" {
17377 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17378 }
17379 var body io.Reader = nil
17380 c.urlParams_.Set("alt", alt)
17381 c.urlParams_.Set("prettyPrint", "false")
17382 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/adGroups/{+adGroupId}")
17383 urls += "?" + c.urlParams_.Encode()
17384 req, err := http.NewRequest("GET", urls, body)
17385 if err != nil {
17386 return nil, err
17387 }
17388 req.Header = reqHeaders
17389 googleapi.Expand(req.URL, map[string]string{
17390 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17391 "adGroupId": strconv.FormatInt(c.adGroupId, 10),
17392 })
17393 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17394 }
17395
17396
17397
17398
17399
17400
17401 func (c *AdvertisersAdGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdGroup, error) {
17402 gensupport.SetOptions(c.urlParams_, opts...)
17403 res, err := c.doRequest("json")
17404 if res != nil && res.StatusCode == http.StatusNotModified {
17405 if res.Body != nil {
17406 res.Body.Close()
17407 }
17408 return nil, gensupport.WrapError(&googleapi.Error{
17409 Code: res.StatusCode,
17410 Header: res.Header,
17411 })
17412 }
17413 if err != nil {
17414 return nil, err
17415 }
17416 defer googleapi.CloseBody(res)
17417 if err := googleapi.CheckResponse(res); err != nil {
17418 return nil, gensupport.WrapError(err)
17419 }
17420 ret := &AdGroup{
17421 ServerResponse: googleapi.ServerResponse{
17422 Header: res.Header,
17423 HTTPStatusCode: res.StatusCode,
17424 },
17425 }
17426 target := &ret
17427 if err := gensupport.DecodeResponse(target, res); err != nil {
17428 return nil, err
17429 }
17430 return ret, nil
17431 }
17432
17433 type AdvertisersAdGroupsListCall struct {
17434 s *Service
17435 advertiserId int64
17436 urlParams_ gensupport.URLParams
17437 ifNoneMatch_ string
17438 ctx_ context.Context
17439 header_ http.Header
17440 }
17441
17442
17443
17444
17445 func (r *AdvertisersAdGroupsService) List(advertiserId int64) *AdvertisersAdGroupsListCall {
17446 c := &AdvertisersAdGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17447 c.advertiserId = advertiserId
17448 return c
17449 }
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465 func (c *AdvertisersAdGroupsListCall) Filter(filter string) *AdvertisersAdGroupsListCall {
17466 c.urlParams_.Set("filter", filter)
17467 return c
17468 }
17469
17470
17471
17472
17473
17474
17475 func (c *AdvertisersAdGroupsListCall) OrderBy(orderBy string) *AdvertisersAdGroupsListCall {
17476 c.urlParams_.Set("orderBy", orderBy)
17477 return c
17478 }
17479
17480
17481
17482
17483 func (c *AdvertisersAdGroupsListCall) PageSize(pageSize int64) *AdvertisersAdGroupsListCall {
17484 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17485 return c
17486 }
17487
17488
17489
17490
17491
17492 func (c *AdvertisersAdGroupsListCall) PageToken(pageToken string) *AdvertisersAdGroupsListCall {
17493 c.urlParams_.Set("pageToken", pageToken)
17494 return c
17495 }
17496
17497
17498
17499
17500 func (c *AdvertisersAdGroupsListCall) Fields(s ...googleapi.Field) *AdvertisersAdGroupsListCall {
17501 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17502 return c
17503 }
17504
17505
17506
17507
17508 func (c *AdvertisersAdGroupsListCall) IfNoneMatch(entityTag string) *AdvertisersAdGroupsListCall {
17509 c.ifNoneMatch_ = entityTag
17510 return c
17511 }
17512
17513
17514 func (c *AdvertisersAdGroupsListCall) Context(ctx context.Context) *AdvertisersAdGroupsListCall {
17515 c.ctx_ = ctx
17516 return c
17517 }
17518
17519
17520
17521 func (c *AdvertisersAdGroupsListCall) Header() http.Header {
17522 if c.header_ == nil {
17523 c.header_ = make(http.Header)
17524 }
17525 return c.header_
17526 }
17527
17528 func (c *AdvertisersAdGroupsListCall) doRequest(alt string) (*http.Response, error) {
17529 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17530 if c.ifNoneMatch_ != "" {
17531 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17532 }
17533 var body io.Reader = nil
17534 c.urlParams_.Set("alt", alt)
17535 c.urlParams_.Set("prettyPrint", "false")
17536 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/adGroups")
17537 urls += "?" + c.urlParams_.Encode()
17538 req, err := http.NewRequest("GET", urls, body)
17539 if err != nil {
17540 return nil, err
17541 }
17542 req.Header = reqHeaders
17543 googleapi.Expand(req.URL, map[string]string{
17544 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17545 })
17546 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17547 }
17548
17549
17550
17551
17552
17553
17554
17555 func (c *AdvertisersAdGroupsListCall) Do(opts ...googleapi.CallOption) (*ListAdGroupsResponse, error) {
17556 gensupport.SetOptions(c.urlParams_, opts...)
17557 res, err := c.doRequest("json")
17558 if res != nil && res.StatusCode == http.StatusNotModified {
17559 if res.Body != nil {
17560 res.Body.Close()
17561 }
17562 return nil, gensupport.WrapError(&googleapi.Error{
17563 Code: res.StatusCode,
17564 Header: res.Header,
17565 })
17566 }
17567 if err != nil {
17568 return nil, err
17569 }
17570 defer googleapi.CloseBody(res)
17571 if err := googleapi.CheckResponse(res); err != nil {
17572 return nil, gensupport.WrapError(err)
17573 }
17574 ret := &ListAdGroupsResponse{
17575 ServerResponse: googleapi.ServerResponse{
17576 Header: res.Header,
17577 HTTPStatusCode: res.StatusCode,
17578 },
17579 }
17580 target := &ret
17581 if err := gensupport.DecodeResponse(target, res); err != nil {
17582 return nil, err
17583 }
17584 return ret, nil
17585 }
17586
17587
17588
17589
17590 func (c *AdvertisersAdGroupsListCall) Pages(ctx context.Context, f func(*ListAdGroupsResponse) error) error {
17591 c.ctx_ = ctx
17592 defer c.PageToken(c.urlParams_.Get("pageToken"))
17593 for {
17594 x, err := c.Do()
17595 if err != nil {
17596 return err
17597 }
17598 if err := f(x); err != nil {
17599 return err
17600 }
17601 if x.NextPageToken == "" {
17602 return nil
17603 }
17604 c.PageToken(x.NextPageToken)
17605 }
17606 }
17607
17608 type AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall struct {
17609 s *Service
17610 advertiserId int64
17611 adGroupId int64
17612 targetingType string
17613 assignedTargetingOptionId string
17614 urlParams_ gensupport.URLParams
17615 ifNoneMatch_ string
17616 ctx_ context.Context
17617 header_ http.Header
17618 }
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637 func (r *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, adGroupId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall {
17638 c := &AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17639 c.advertiserId = advertiserId
17640 c.adGroupId = adGroupId
17641 c.targetingType = targetingType
17642 c.assignedTargetingOptionId = assignedTargetingOptionId
17643 return c
17644 }
17645
17646
17647
17648
17649 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall {
17650 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17651 return c
17652 }
17653
17654
17655
17656
17657 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall {
17658 c.ifNoneMatch_ = entityTag
17659 return c
17660 }
17661
17662
17663 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall {
17664 c.ctx_ = ctx
17665 return c
17666 }
17667
17668
17669
17670 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
17671 if c.header_ == nil {
17672 c.header_ = make(http.Header)
17673 }
17674 return c.header_
17675 }
17676
17677 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
17678 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17679 if c.ifNoneMatch_ != "" {
17680 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17681 }
17682 var body io.Reader = nil
17683 c.urlParams_.Set("alt", alt)
17684 c.urlParams_.Set("prettyPrint", "false")
17685 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/adGroups/{+adGroupId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
17686 urls += "?" + c.urlParams_.Encode()
17687 req, err := http.NewRequest("GET", urls, body)
17688 if err != nil {
17689 return nil, err
17690 }
17691 req.Header = reqHeaders
17692 googleapi.Expand(req.URL, map[string]string{
17693 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17694 "adGroupId": strconv.FormatInt(c.adGroupId, 10),
17695 "targetingType": c.targetingType,
17696 "assignedTargetingOptionId": c.assignedTargetingOptionId,
17697 })
17698 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17699 }
17700
17701
17702
17703
17704
17705
17706
17707 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
17708 gensupport.SetOptions(c.urlParams_, opts...)
17709 res, err := c.doRequest("json")
17710 if res != nil && res.StatusCode == http.StatusNotModified {
17711 if res.Body != nil {
17712 res.Body.Close()
17713 }
17714 return nil, gensupport.WrapError(&googleapi.Error{
17715 Code: res.StatusCode,
17716 Header: res.Header,
17717 })
17718 }
17719 if err != nil {
17720 return nil, err
17721 }
17722 defer googleapi.CloseBody(res)
17723 if err := googleapi.CheckResponse(res); err != nil {
17724 return nil, gensupport.WrapError(err)
17725 }
17726 ret := &AssignedTargetingOption{
17727 ServerResponse: googleapi.ServerResponse{
17728 Header: res.Header,
17729 HTTPStatusCode: res.StatusCode,
17730 },
17731 }
17732 target := &ret
17733 if err := gensupport.DecodeResponse(target, res); err != nil {
17734 return nil, err
17735 }
17736 return ret, nil
17737 }
17738
17739 type AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall struct {
17740 s *Service
17741 advertiserId int64
17742 adGroupId int64
17743 targetingType string
17744 urlParams_ gensupport.URLParams
17745 ifNoneMatch_ string
17746 ctx_ context.Context
17747 header_ http.Header
17748 }
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763 func (r *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, adGroupId int64, targetingType string) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
17764 c := &AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17765 c.advertiserId = advertiserId
17766 c.adGroupId = adGroupId
17767 c.targetingType = targetingType
17768 return c
17769 }
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
17782 c.urlParams_.Set("filter", filter)
17783 return c
17784 }
17785
17786
17787
17788
17789
17790
17791 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
17792 c.urlParams_.Set("orderBy", orderBy)
17793 return c
17794 }
17795
17796
17797
17798
17799 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
17800 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17801 return c
17802 }
17803
17804
17805
17806
17807
17808
17809 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
17810 c.urlParams_.Set("pageToken", pageToken)
17811 return c
17812 }
17813
17814
17815
17816
17817 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
17818 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17819 return c
17820 }
17821
17822
17823
17824
17825 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
17826 c.ifNoneMatch_ = entityTag
17827 return c
17828 }
17829
17830
17831 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall {
17832 c.ctx_ = ctx
17833 return c
17834 }
17835
17836
17837
17838 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
17839 if c.header_ == nil {
17840 c.header_ = make(http.Header)
17841 }
17842 return c.header_
17843 }
17844
17845 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
17846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17847 if c.ifNoneMatch_ != "" {
17848 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17849 }
17850 var body io.Reader = nil
17851 c.urlParams_.Set("alt", alt)
17852 c.urlParams_.Set("prettyPrint", "false")
17853 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/adGroups/{+adGroupId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
17854 urls += "?" + c.urlParams_.Encode()
17855 req, err := http.NewRequest("GET", urls, body)
17856 if err != nil {
17857 return nil, err
17858 }
17859 req.Header = reqHeaders
17860 googleapi.Expand(req.URL, map[string]string{
17861 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
17862 "adGroupId": strconv.FormatInt(c.adGroupId, 10),
17863 "targetingType": c.targetingType,
17864 })
17865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17866 }
17867
17868
17869
17870
17871
17872
17873
17874 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListAdGroupAssignedTargetingOptionsResponse, error) {
17875 gensupport.SetOptions(c.urlParams_, opts...)
17876 res, err := c.doRequest("json")
17877 if res != nil && res.StatusCode == http.StatusNotModified {
17878 if res.Body != nil {
17879 res.Body.Close()
17880 }
17881 return nil, gensupport.WrapError(&googleapi.Error{
17882 Code: res.StatusCode,
17883 Header: res.Header,
17884 })
17885 }
17886 if err != nil {
17887 return nil, err
17888 }
17889 defer googleapi.CloseBody(res)
17890 if err := googleapi.CheckResponse(res); err != nil {
17891 return nil, gensupport.WrapError(err)
17892 }
17893 ret := &ListAdGroupAssignedTargetingOptionsResponse{
17894 ServerResponse: googleapi.ServerResponse{
17895 Header: res.Header,
17896 HTTPStatusCode: res.StatusCode,
17897 },
17898 }
17899 target := &ret
17900 if err := gensupport.DecodeResponse(target, res); err != nil {
17901 return nil, err
17902 }
17903 return ret, nil
17904 }
17905
17906
17907
17908
17909 func (c *AdvertisersAdGroupsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListAdGroupAssignedTargetingOptionsResponse) error) error {
17910 c.ctx_ = ctx
17911 defer c.PageToken(c.urlParams_.Get("pageToken"))
17912 for {
17913 x, err := c.Do()
17914 if err != nil {
17915 return err
17916 }
17917 if err := f(x); err != nil {
17918 return err
17919 }
17920 if x.NextPageToken == "" {
17921 return nil
17922 }
17923 c.PageToken(x.NextPageToken)
17924 }
17925 }
17926
17927 type AdvertisersAssetsUploadCall struct {
17928 s *Service
17929 advertiserId int64
17930 createassetrequest *CreateAssetRequest
17931 urlParams_ gensupport.URLParams
17932 mediaInfo_ *gensupport.MediaInfo
17933 ctx_ context.Context
17934 header_ http.Header
17935 }
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946 func (r *AdvertisersAssetsService) Upload(advertiserId int64, createassetrequest *CreateAssetRequest) *AdvertisersAssetsUploadCall {
17947 c := &AdvertisersAssetsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17948 c.advertiserId = advertiserId
17949 c.createassetrequest = createassetrequest
17950 return c
17951 }
17952
17953
17954
17955
17956
17957
17958
17959
17960 func (c *AdvertisersAssetsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *AdvertisersAssetsUploadCall {
17961 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
17962 return c
17963 }
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974 func (c *AdvertisersAssetsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *AdvertisersAssetsUploadCall {
17975 c.ctx_ = ctx
17976 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
17977 return c
17978 }
17979
17980
17981
17982
17983
17984 func (c *AdvertisersAssetsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *AdvertisersAssetsUploadCall {
17985 c.mediaInfo_.SetProgressUpdater(pu)
17986 return c
17987 }
17988
17989
17990
17991
17992 func (c *AdvertisersAssetsUploadCall) Fields(s ...googleapi.Field) *AdvertisersAssetsUploadCall {
17993 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17994 return c
17995 }
17996
17997
17998
17999
18000 func (c *AdvertisersAssetsUploadCall) Context(ctx context.Context) *AdvertisersAssetsUploadCall {
18001 c.ctx_ = ctx
18002 return c
18003 }
18004
18005
18006
18007 func (c *AdvertisersAssetsUploadCall) Header() http.Header {
18008 if c.header_ == nil {
18009 c.header_ = make(http.Header)
18010 }
18011 return c.header_
18012 }
18013
18014 func (c *AdvertisersAssetsUploadCall) 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.createassetrequest)
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, "v3/advertisers/{+advertiserId}/assets")
18024 if c.mediaInfo_ != nil {
18025 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v3/advertisers/{+advertiserId}/assets")
18026 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
18027 }
18028 if body == nil {
18029 body = new(bytes.Buffer)
18030 reqHeaders.Set("Content-Type", "application/json")
18031 }
18032 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
18033 defer cleanup()
18034 urls += "?" + c.urlParams_.Encode()
18035 req, err := http.NewRequest("POST", urls, body)
18036 if err != nil {
18037 return nil, err
18038 }
18039 req.Header = reqHeaders
18040 req.GetBody = getBody
18041 googleapi.Expand(req.URL, map[string]string{
18042 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18043 })
18044 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18045 }
18046
18047
18048
18049
18050
18051
18052
18053 func (c *AdvertisersAssetsUploadCall) Do(opts ...googleapi.CallOption) (*CreateAssetResponse, error) {
18054 gensupport.SetOptions(c.urlParams_, opts...)
18055 res, err := c.doRequest("json")
18056 if res != nil && res.StatusCode == http.StatusNotModified {
18057 if res.Body != nil {
18058 res.Body.Close()
18059 }
18060 return nil, gensupport.WrapError(&googleapi.Error{
18061 Code: res.StatusCode,
18062 Header: res.Header,
18063 })
18064 }
18065 if err != nil {
18066 return nil, err
18067 }
18068 defer googleapi.CloseBody(res)
18069 if err := googleapi.CheckResponse(res); err != nil {
18070 return nil, gensupport.WrapError(err)
18071 }
18072 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
18073 if rx != nil {
18074 rx.Client = c.s.client
18075 rx.UserAgent = c.s.userAgent()
18076 ctx := c.ctx_
18077 if ctx == nil {
18078 ctx = context.TODO()
18079 }
18080 res, err = rx.Upload(ctx)
18081 if err != nil {
18082 return nil, err
18083 }
18084 defer res.Body.Close()
18085 if err := googleapi.CheckResponse(res); err != nil {
18086 return nil, gensupport.WrapError(err)
18087 }
18088 }
18089 ret := &CreateAssetResponse{
18090 ServerResponse: googleapi.ServerResponse{
18091 Header: res.Header,
18092 HTTPStatusCode: res.StatusCode,
18093 },
18094 }
18095 target := &ret
18096 if err := gensupport.DecodeResponse(target, res); err != nil {
18097 return nil, err
18098 }
18099 return ret, nil
18100 }
18101
18102 type AdvertisersCampaignsCreateCall struct {
18103 s *Service
18104 advertiserId int64
18105 campaign *Campaign
18106 urlParams_ gensupport.URLParams
18107 ctx_ context.Context
18108 header_ http.Header
18109 }
18110
18111
18112
18113
18114
18115
18116 func (r *AdvertisersCampaignsService) Create(advertiserId int64, campaign *Campaign) *AdvertisersCampaignsCreateCall {
18117 c := &AdvertisersCampaignsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18118 c.advertiserId = advertiserId
18119 c.campaign = campaign
18120 return c
18121 }
18122
18123
18124
18125
18126 func (c *AdvertisersCampaignsCreateCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsCreateCall {
18127 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18128 return c
18129 }
18130
18131
18132 func (c *AdvertisersCampaignsCreateCall) Context(ctx context.Context) *AdvertisersCampaignsCreateCall {
18133 c.ctx_ = ctx
18134 return c
18135 }
18136
18137
18138
18139 func (c *AdvertisersCampaignsCreateCall) Header() http.Header {
18140 if c.header_ == nil {
18141 c.header_ = make(http.Header)
18142 }
18143 return c.header_
18144 }
18145
18146 func (c *AdvertisersCampaignsCreateCall) doRequest(alt string) (*http.Response, error) {
18147 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18148 var body io.Reader = nil
18149 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
18150 if err != nil {
18151 return nil, err
18152 }
18153 c.urlParams_.Set("alt", alt)
18154 c.urlParams_.Set("prettyPrint", "false")
18155 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/campaigns")
18156 urls += "?" + c.urlParams_.Encode()
18157 req, err := http.NewRequest("POST", urls, body)
18158 if err != nil {
18159 return nil, err
18160 }
18161 req.Header = reqHeaders
18162 googleapi.Expand(req.URL, map[string]string{
18163 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18164 })
18165 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18166 }
18167
18168
18169
18170
18171
18172
18173 func (c *AdvertisersCampaignsCreateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
18174 gensupport.SetOptions(c.urlParams_, opts...)
18175 res, err := c.doRequest("json")
18176 if res != nil && res.StatusCode == http.StatusNotModified {
18177 if res.Body != nil {
18178 res.Body.Close()
18179 }
18180 return nil, gensupport.WrapError(&googleapi.Error{
18181 Code: res.StatusCode,
18182 Header: res.Header,
18183 })
18184 }
18185 if err != nil {
18186 return nil, err
18187 }
18188 defer googleapi.CloseBody(res)
18189 if err := googleapi.CheckResponse(res); err != nil {
18190 return nil, gensupport.WrapError(err)
18191 }
18192 ret := &Campaign{
18193 ServerResponse: googleapi.ServerResponse{
18194 Header: res.Header,
18195 HTTPStatusCode: res.StatusCode,
18196 },
18197 }
18198 target := &ret
18199 if err := gensupport.DecodeResponse(target, res); err != nil {
18200 return nil, err
18201 }
18202 return ret, nil
18203 }
18204
18205 type AdvertisersCampaignsDeleteCall struct {
18206 s *Service
18207 advertiserId int64
18208 campaignId int64
18209 urlParams_ gensupport.URLParams
18210 ctx_ context.Context
18211 header_ http.Header
18212 }
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223 func (r *AdvertisersCampaignsService) Delete(advertiserId int64, campaignId int64) *AdvertisersCampaignsDeleteCall {
18224 c := &AdvertisersCampaignsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18225 c.advertiserId = advertiserId
18226 c.campaignId = campaignId
18227 return c
18228 }
18229
18230
18231
18232
18233 func (c *AdvertisersCampaignsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsDeleteCall {
18234 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18235 return c
18236 }
18237
18238
18239 func (c *AdvertisersCampaignsDeleteCall) Context(ctx context.Context) *AdvertisersCampaignsDeleteCall {
18240 c.ctx_ = ctx
18241 return c
18242 }
18243
18244
18245
18246 func (c *AdvertisersCampaignsDeleteCall) Header() http.Header {
18247 if c.header_ == nil {
18248 c.header_ = make(http.Header)
18249 }
18250 return c.header_
18251 }
18252
18253 func (c *AdvertisersCampaignsDeleteCall) doRequest(alt string) (*http.Response, error) {
18254 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18255 var body io.Reader = nil
18256 c.urlParams_.Set("alt", alt)
18257 c.urlParams_.Set("prettyPrint", "false")
18258 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/campaigns/{+campaignId}")
18259 urls += "?" + c.urlParams_.Encode()
18260 req, err := http.NewRequest("DELETE", urls, body)
18261 if err != nil {
18262 return nil, err
18263 }
18264 req.Header = reqHeaders
18265 googleapi.Expand(req.URL, map[string]string{
18266 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18267 "campaignId": strconv.FormatInt(c.campaignId, 10),
18268 })
18269 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18270 }
18271
18272
18273
18274
18275
18276
18277 func (c *AdvertisersCampaignsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
18278 gensupport.SetOptions(c.urlParams_, opts...)
18279 res, err := c.doRequest("json")
18280 if res != nil && res.StatusCode == http.StatusNotModified {
18281 if res.Body != nil {
18282 res.Body.Close()
18283 }
18284 return nil, gensupport.WrapError(&googleapi.Error{
18285 Code: res.StatusCode,
18286 Header: res.Header,
18287 })
18288 }
18289 if err != nil {
18290 return nil, err
18291 }
18292 defer googleapi.CloseBody(res)
18293 if err := googleapi.CheckResponse(res); err != nil {
18294 return nil, gensupport.WrapError(err)
18295 }
18296 ret := &Empty{
18297 ServerResponse: googleapi.ServerResponse{
18298 Header: res.Header,
18299 HTTPStatusCode: res.StatusCode,
18300 },
18301 }
18302 target := &ret
18303 if err := gensupport.DecodeResponse(target, res); err != nil {
18304 return nil, err
18305 }
18306 return ret, nil
18307 }
18308
18309 type AdvertisersCampaignsGetCall struct {
18310 s *Service
18311 advertiserId int64
18312 campaignId int64
18313 urlParams_ gensupport.URLParams
18314 ifNoneMatch_ string
18315 ctx_ context.Context
18316 header_ http.Header
18317 }
18318
18319
18320
18321
18322
18323 func (r *AdvertisersCampaignsService) Get(advertiserId int64, campaignId int64) *AdvertisersCampaignsGetCall {
18324 c := &AdvertisersCampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18325 c.advertiserId = advertiserId
18326 c.campaignId = campaignId
18327 return c
18328 }
18329
18330
18331
18332
18333 func (c *AdvertisersCampaignsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsGetCall {
18334 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18335 return c
18336 }
18337
18338
18339
18340
18341 func (c *AdvertisersCampaignsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsGetCall {
18342 c.ifNoneMatch_ = entityTag
18343 return c
18344 }
18345
18346
18347 func (c *AdvertisersCampaignsGetCall) Context(ctx context.Context) *AdvertisersCampaignsGetCall {
18348 c.ctx_ = ctx
18349 return c
18350 }
18351
18352
18353
18354 func (c *AdvertisersCampaignsGetCall) Header() http.Header {
18355 if c.header_ == nil {
18356 c.header_ = make(http.Header)
18357 }
18358 return c.header_
18359 }
18360
18361 func (c *AdvertisersCampaignsGetCall) doRequest(alt string) (*http.Response, error) {
18362 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18363 if c.ifNoneMatch_ != "" {
18364 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18365 }
18366 var body io.Reader = nil
18367 c.urlParams_.Set("alt", alt)
18368 c.urlParams_.Set("prettyPrint", "false")
18369 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/campaigns/{+campaignId}")
18370 urls += "?" + c.urlParams_.Encode()
18371 req, err := http.NewRequest("GET", urls, body)
18372 if err != nil {
18373 return nil, err
18374 }
18375 req.Header = reqHeaders
18376 googleapi.Expand(req.URL, map[string]string{
18377 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18378 "campaignId": strconv.FormatInt(c.campaignId, 10),
18379 })
18380 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18381 }
18382
18383
18384
18385
18386
18387
18388 func (c *AdvertisersCampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
18389 gensupport.SetOptions(c.urlParams_, opts...)
18390 res, err := c.doRequest("json")
18391 if res != nil && res.StatusCode == http.StatusNotModified {
18392 if res.Body != nil {
18393 res.Body.Close()
18394 }
18395 return nil, gensupport.WrapError(&googleapi.Error{
18396 Code: res.StatusCode,
18397 Header: res.Header,
18398 })
18399 }
18400 if err != nil {
18401 return nil, err
18402 }
18403 defer googleapi.CloseBody(res)
18404 if err := googleapi.CheckResponse(res); err != nil {
18405 return nil, gensupport.WrapError(err)
18406 }
18407 ret := &Campaign{
18408 ServerResponse: googleapi.ServerResponse{
18409 Header: res.Header,
18410 HTTPStatusCode: res.StatusCode,
18411 },
18412 }
18413 target := &ret
18414 if err := gensupport.DecodeResponse(target, res); err != nil {
18415 return nil, err
18416 }
18417 return ret, nil
18418 }
18419
18420 type AdvertisersCampaignsListCall struct {
18421 s *Service
18422 advertiserId int64
18423 urlParams_ gensupport.URLParams
18424 ifNoneMatch_ string
18425 ctx_ context.Context
18426 header_ http.Header
18427 }
18428
18429
18430
18431
18432
18433
18434 func (r *AdvertisersCampaignsService) List(advertiserId int64) *AdvertisersCampaignsListCall {
18435 c := &AdvertisersCampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18436 c.advertiserId = advertiserId
18437 return c
18438 }
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458 func (c *AdvertisersCampaignsListCall) Filter(filter string) *AdvertisersCampaignsListCall {
18459 c.urlParams_.Set("filter", filter)
18460 return c
18461 }
18462
18463
18464
18465
18466
18467
18468 func (c *AdvertisersCampaignsListCall) OrderBy(orderBy string) *AdvertisersCampaignsListCall {
18469 c.urlParams_.Set("orderBy", orderBy)
18470 return c
18471 }
18472
18473
18474
18475 func (c *AdvertisersCampaignsListCall) PageSize(pageSize int64) *AdvertisersCampaignsListCall {
18476 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18477 return c
18478 }
18479
18480
18481
18482
18483
18484 func (c *AdvertisersCampaignsListCall) PageToken(pageToken string) *AdvertisersCampaignsListCall {
18485 c.urlParams_.Set("pageToken", pageToken)
18486 return c
18487 }
18488
18489
18490
18491
18492 func (c *AdvertisersCampaignsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsListCall {
18493 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18494 return c
18495 }
18496
18497
18498
18499
18500 func (c *AdvertisersCampaignsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsListCall {
18501 c.ifNoneMatch_ = entityTag
18502 return c
18503 }
18504
18505
18506 func (c *AdvertisersCampaignsListCall) Context(ctx context.Context) *AdvertisersCampaignsListCall {
18507 c.ctx_ = ctx
18508 return c
18509 }
18510
18511
18512
18513 func (c *AdvertisersCampaignsListCall) Header() http.Header {
18514 if c.header_ == nil {
18515 c.header_ = make(http.Header)
18516 }
18517 return c.header_
18518 }
18519
18520 func (c *AdvertisersCampaignsListCall) doRequest(alt string) (*http.Response, error) {
18521 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18522 if c.ifNoneMatch_ != "" {
18523 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18524 }
18525 var body io.Reader = nil
18526 c.urlParams_.Set("alt", alt)
18527 c.urlParams_.Set("prettyPrint", "false")
18528 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/campaigns")
18529 urls += "?" + c.urlParams_.Encode()
18530 req, err := http.NewRequest("GET", urls, body)
18531 if err != nil {
18532 return nil, err
18533 }
18534 req.Header = reqHeaders
18535 googleapi.Expand(req.URL, map[string]string{
18536 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18537 })
18538 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18539 }
18540
18541
18542
18543
18544
18545
18546
18547 func (c *AdvertisersCampaignsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignsResponse, error) {
18548 gensupport.SetOptions(c.urlParams_, opts...)
18549 res, err := c.doRequest("json")
18550 if res != nil && res.StatusCode == http.StatusNotModified {
18551 if res.Body != nil {
18552 res.Body.Close()
18553 }
18554 return nil, gensupport.WrapError(&googleapi.Error{
18555 Code: res.StatusCode,
18556 Header: res.Header,
18557 })
18558 }
18559 if err != nil {
18560 return nil, err
18561 }
18562 defer googleapi.CloseBody(res)
18563 if err := googleapi.CheckResponse(res); err != nil {
18564 return nil, gensupport.WrapError(err)
18565 }
18566 ret := &ListCampaignsResponse{
18567 ServerResponse: googleapi.ServerResponse{
18568 Header: res.Header,
18569 HTTPStatusCode: res.StatusCode,
18570 },
18571 }
18572 target := &ret
18573 if err := gensupport.DecodeResponse(target, res); err != nil {
18574 return nil, err
18575 }
18576 return ret, nil
18577 }
18578
18579
18580
18581
18582 func (c *AdvertisersCampaignsListCall) Pages(ctx context.Context, f func(*ListCampaignsResponse) error) error {
18583 c.ctx_ = ctx
18584 defer c.PageToken(c.urlParams_.Get("pageToken"))
18585 for {
18586 x, err := c.Do()
18587 if err != nil {
18588 return err
18589 }
18590 if err := f(x); err != nil {
18591 return err
18592 }
18593 if x.NextPageToken == "" {
18594 return nil
18595 }
18596 c.PageToken(x.NextPageToken)
18597 }
18598 }
18599
18600 type AdvertisersCampaignsListAssignedTargetingOptionsCall struct {
18601 s *Service
18602 advertiserId int64
18603 campaignId int64
18604 urlParams_ gensupport.URLParams
18605 ifNoneMatch_ string
18606 ctx_ context.Context
18607 header_ http.Header
18608 }
18609
18610
18611
18612
18613
18614
18615 func (r *AdvertisersCampaignsService) ListAssignedTargetingOptions(advertiserId int64, campaignId int64) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
18616 c := &AdvertisersCampaignsListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18617 c.advertiserId = advertiserId
18618 c.campaignId = campaignId
18619 return c
18620 }
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
18637 c.urlParams_.Set("filter", filter)
18638 return c
18639 }
18640
18641
18642
18643
18644
18645 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
18646 c.urlParams_.Set("orderBy", orderBy)
18647 return c
18648 }
18649
18650
18651
18652
18653
18654 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
18655 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18656 return c
18657 }
18658
18659
18660
18661
18662
18663
18664 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
18665 c.urlParams_.Set("pageToken", pageToken)
18666 return c
18667 }
18668
18669
18670
18671
18672 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
18673 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18674 return c
18675 }
18676
18677
18678
18679
18680 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
18681 c.ifNoneMatch_ = entityTag
18682 return c
18683 }
18684
18685
18686 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersCampaignsListAssignedTargetingOptionsCall {
18687 c.ctx_ = ctx
18688 return c
18689 }
18690
18691
18692
18693 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Header() http.Header {
18694 if c.header_ == nil {
18695 c.header_ = make(http.Header)
18696 }
18697 return c.header_
18698 }
18699
18700 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
18701 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18702 if c.ifNoneMatch_ != "" {
18703 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18704 }
18705 var body io.Reader = nil
18706 c.urlParams_.Set("alt", alt)
18707 c.urlParams_.Set("prettyPrint", "false")
18708 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/campaigns/{+campaignId}:listAssignedTargetingOptions")
18709 urls += "?" + c.urlParams_.Encode()
18710 req, err := http.NewRequest("GET", urls, body)
18711 if err != nil {
18712 return nil, err
18713 }
18714 req.Header = reqHeaders
18715 googleapi.Expand(req.URL, map[string]string{
18716 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18717 "campaignId": strconv.FormatInt(c.campaignId, 10),
18718 })
18719 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18720 }
18721
18722
18723
18724
18725
18726
18727
18728 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListCampaignAssignedTargetingOptionsResponse, error) {
18729 gensupport.SetOptions(c.urlParams_, opts...)
18730 res, err := c.doRequest("json")
18731 if res != nil && res.StatusCode == http.StatusNotModified {
18732 if res.Body != nil {
18733 res.Body.Close()
18734 }
18735 return nil, gensupport.WrapError(&googleapi.Error{
18736 Code: res.StatusCode,
18737 Header: res.Header,
18738 })
18739 }
18740 if err != nil {
18741 return nil, err
18742 }
18743 defer googleapi.CloseBody(res)
18744 if err := googleapi.CheckResponse(res); err != nil {
18745 return nil, gensupport.WrapError(err)
18746 }
18747 ret := &BulkListCampaignAssignedTargetingOptionsResponse{
18748 ServerResponse: googleapi.ServerResponse{
18749 Header: res.Header,
18750 HTTPStatusCode: res.StatusCode,
18751 },
18752 }
18753 target := &ret
18754 if err := gensupport.DecodeResponse(target, res); err != nil {
18755 return nil, err
18756 }
18757 return ret, nil
18758 }
18759
18760
18761
18762
18763 func (c *AdvertisersCampaignsListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListCampaignAssignedTargetingOptionsResponse) error) error {
18764 c.ctx_ = ctx
18765 defer c.PageToken(c.urlParams_.Get("pageToken"))
18766 for {
18767 x, err := c.Do()
18768 if err != nil {
18769 return err
18770 }
18771 if err := f(x); err != nil {
18772 return err
18773 }
18774 if x.NextPageToken == "" {
18775 return nil
18776 }
18777 c.PageToken(x.NextPageToken)
18778 }
18779 }
18780
18781 type AdvertisersCampaignsPatchCall struct {
18782 s *Service
18783 advertiserId int64
18784 campaignId int64
18785 campaign *Campaign
18786 urlParams_ gensupport.URLParams
18787 ctx_ context.Context
18788 header_ http.Header
18789 }
18790
18791
18792
18793
18794
18795
18796
18797
18798 func (r *AdvertisersCampaignsService) Patch(advertiserId int64, campaignId int64, campaign *Campaign) *AdvertisersCampaignsPatchCall {
18799 c := &AdvertisersCampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18800 c.advertiserId = advertiserId
18801 c.campaignId = campaignId
18802 c.campaign = campaign
18803 return c
18804 }
18805
18806
18807
18808 func (c *AdvertisersCampaignsPatchCall) UpdateMask(updateMask string) *AdvertisersCampaignsPatchCall {
18809 c.urlParams_.Set("updateMask", updateMask)
18810 return c
18811 }
18812
18813
18814
18815
18816 func (c *AdvertisersCampaignsPatchCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsPatchCall {
18817 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18818 return c
18819 }
18820
18821
18822 func (c *AdvertisersCampaignsPatchCall) Context(ctx context.Context) *AdvertisersCampaignsPatchCall {
18823 c.ctx_ = ctx
18824 return c
18825 }
18826
18827
18828
18829 func (c *AdvertisersCampaignsPatchCall) Header() http.Header {
18830 if c.header_ == nil {
18831 c.header_ = make(http.Header)
18832 }
18833 return c.header_
18834 }
18835
18836 func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
18837 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18838 var body io.Reader = nil
18839 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
18840 if err != nil {
18841 return nil, err
18842 }
18843 c.urlParams_.Set("alt", alt)
18844 c.urlParams_.Set("prettyPrint", "false")
18845 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/campaigns/{+campaignId}")
18846 urls += "?" + c.urlParams_.Encode()
18847 req, err := http.NewRequest("PATCH", urls, body)
18848 if err != nil {
18849 return nil, err
18850 }
18851 req.Header = reqHeaders
18852 googleapi.Expand(req.URL, map[string]string{
18853 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18854 "campaignId": strconv.FormatInt(c.campaignId, 10),
18855 })
18856 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18857 }
18858
18859
18860
18861
18862
18863
18864 func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
18865 gensupport.SetOptions(c.urlParams_, opts...)
18866 res, err := c.doRequest("json")
18867 if res != nil && res.StatusCode == http.StatusNotModified {
18868 if res.Body != nil {
18869 res.Body.Close()
18870 }
18871 return nil, gensupport.WrapError(&googleapi.Error{
18872 Code: res.StatusCode,
18873 Header: res.Header,
18874 })
18875 }
18876 if err != nil {
18877 return nil, err
18878 }
18879 defer googleapi.CloseBody(res)
18880 if err := googleapi.CheckResponse(res); err != nil {
18881 return nil, gensupport.WrapError(err)
18882 }
18883 ret := &Campaign{
18884 ServerResponse: googleapi.ServerResponse{
18885 Header: res.Header,
18886 HTTPStatusCode: res.StatusCode,
18887 },
18888 }
18889 target := &ret
18890 if err := gensupport.DecodeResponse(target, res); err != nil {
18891 return nil, err
18892 }
18893 return ret, nil
18894 }
18895
18896 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall struct {
18897 s *Service
18898 advertiserId int64
18899 campaignId int64
18900 targetingType string
18901 assignedTargetingOptionId string
18902 urlParams_ gensupport.URLParams
18903 ifNoneMatch_ string
18904 ctx_ context.Context
18905 header_ http.Header
18906 }
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930 func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, campaignId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall {
18931 c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18932 c.advertiserId = advertiserId
18933 c.campaignId = campaignId
18934 c.targetingType = targetingType
18935 c.assignedTargetingOptionId = assignedTargetingOptionId
18936 return c
18937 }
18938
18939
18940
18941
18942 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall {
18943 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18944 return c
18945 }
18946
18947
18948
18949
18950 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall {
18951 c.ifNoneMatch_ = entityTag
18952 return c
18953 }
18954
18955
18956 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall {
18957 c.ctx_ = ctx
18958 return c
18959 }
18960
18961
18962
18963 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
18964 if c.header_ == nil {
18965 c.header_ = make(http.Header)
18966 }
18967 return c.header_
18968 }
18969
18970 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
18971 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18972 if c.ifNoneMatch_ != "" {
18973 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18974 }
18975 var body io.Reader = nil
18976 c.urlParams_.Set("alt", alt)
18977 c.urlParams_.Set("prettyPrint", "false")
18978 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
18979 urls += "?" + c.urlParams_.Encode()
18980 req, err := http.NewRequest("GET", urls, body)
18981 if err != nil {
18982 return nil, err
18983 }
18984 req.Header = reqHeaders
18985 googleapi.Expand(req.URL, map[string]string{
18986 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
18987 "campaignId": strconv.FormatInt(c.campaignId, 10),
18988 "targetingType": c.targetingType,
18989 "assignedTargetingOptionId": c.assignedTargetingOptionId,
18990 })
18991 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18992 }
18993
18994
18995
18996
18997
18998
18999
19000 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
19001 gensupport.SetOptions(c.urlParams_, opts...)
19002 res, err := c.doRequest("json")
19003 if res != nil && res.StatusCode == http.StatusNotModified {
19004 if res.Body != nil {
19005 res.Body.Close()
19006 }
19007 return nil, gensupport.WrapError(&googleapi.Error{
19008 Code: res.StatusCode,
19009 Header: res.Header,
19010 })
19011 }
19012 if err != nil {
19013 return nil, err
19014 }
19015 defer googleapi.CloseBody(res)
19016 if err := googleapi.CheckResponse(res); err != nil {
19017 return nil, gensupport.WrapError(err)
19018 }
19019 ret := &AssignedTargetingOption{
19020 ServerResponse: googleapi.ServerResponse{
19021 Header: res.Header,
19022 HTTPStatusCode: res.StatusCode,
19023 },
19024 }
19025 target := &ret
19026 if err := gensupport.DecodeResponse(target, res); err != nil {
19027 return nil, err
19028 }
19029 return ret, nil
19030 }
19031
19032 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall struct {
19033 s *Service
19034 advertiserId int64
19035 campaignId int64
19036 targetingType string
19037 urlParams_ gensupport.URLParams
19038 ifNoneMatch_ string
19039 ctx_ context.Context
19040 header_ http.Header
19041 }
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062 func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, campaignId int64, targetingType string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
19063 c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19064 c.advertiserId = advertiserId
19065 c.campaignId = campaignId
19066 c.targetingType = targetingType
19067 return c
19068 }
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
19084 c.urlParams_.Set("filter", filter)
19085 return c
19086 }
19087
19088
19089
19090
19091
19092
19093 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
19094 c.urlParams_.Set("orderBy", orderBy)
19095 return c
19096 }
19097
19098
19099
19100
19101 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
19102 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19103 return c
19104 }
19105
19106
19107
19108
19109
19110
19111 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
19112 c.urlParams_.Set("pageToken", pageToken)
19113 return c
19114 }
19115
19116
19117
19118
19119 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
19120 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19121 return c
19122 }
19123
19124
19125
19126
19127 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
19128 c.ifNoneMatch_ = entityTag
19129 return c
19130 }
19131
19132
19133 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall {
19134 c.ctx_ = ctx
19135 return c
19136 }
19137
19138
19139
19140 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
19141 if c.header_ == nil {
19142 c.header_ = make(http.Header)
19143 }
19144 return c.header_
19145 }
19146
19147 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
19148 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19149 if c.ifNoneMatch_ != "" {
19150 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19151 }
19152 var body io.Reader = nil
19153 c.urlParams_.Set("alt", alt)
19154 c.urlParams_.Set("prettyPrint", "false")
19155 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
19156 urls += "?" + c.urlParams_.Encode()
19157 req, err := http.NewRequest("GET", urls, body)
19158 if err != nil {
19159 return nil, err
19160 }
19161 req.Header = reqHeaders
19162 googleapi.Expand(req.URL, map[string]string{
19163 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19164 "campaignId": strconv.FormatInt(c.campaignId, 10),
19165 "targetingType": c.targetingType,
19166 })
19167 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19168 }
19169
19170
19171
19172
19173
19174
19175
19176 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignAssignedTargetingOptionsResponse, error) {
19177 gensupport.SetOptions(c.urlParams_, opts...)
19178 res, err := c.doRequest("json")
19179 if res != nil && res.StatusCode == http.StatusNotModified {
19180 if res.Body != nil {
19181 res.Body.Close()
19182 }
19183 return nil, gensupport.WrapError(&googleapi.Error{
19184 Code: res.StatusCode,
19185 Header: res.Header,
19186 })
19187 }
19188 if err != nil {
19189 return nil, err
19190 }
19191 defer googleapi.CloseBody(res)
19192 if err := googleapi.CheckResponse(res); err != nil {
19193 return nil, gensupport.WrapError(err)
19194 }
19195 ret := &ListCampaignAssignedTargetingOptionsResponse{
19196 ServerResponse: googleapi.ServerResponse{
19197 Header: res.Header,
19198 HTTPStatusCode: res.StatusCode,
19199 },
19200 }
19201 target := &ret
19202 if err := gensupport.DecodeResponse(target, res); err != nil {
19203 return nil, err
19204 }
19205 return ret, nil
19206 }
19207
19208
19209
19210
19211 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListCampaignAssignedTargetingOptionsResponse) error) error {
19212 c.ctx_ = ctx
19213 defer c.PageToken(c.urlParams_.Get("pageToken"))
19214 for {
19215 x, err := c.Do()
19216 if err != nil {
19217 return err
19218 }
19219 if err := f(x); err != nil {
19220 return err
19221 }
19222 if x.NextPageToken == "" {
19223 return nil
19224 }
19225 c.PageToken(x.NextPageToken)
19226 }
19227 }
19228
19229 type AdvertisersChannelsCreateCall struct {
19230 s *Service
19231 advertiserId int64
19232 channel *Channel
19233 urlParams_ gensupport.URLParams
19234 ctx_ context.Context
19235 header_ http.Header
19236 }
19237
19238
19239
19240
19241
19242 func (r *AdvertisersChannelsService) Create(advertiserId int64, channel *Channel) *AdvertisersChannelsCreateCall {
19243 c := &AdvertisersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19244 c.advertiserId = advertiserId
19245 c.channel = channel
19246 return c
19247 }
19248
19249
19250
19251 func (c *AdvertisersChannelsCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsCreateCall {
19252 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
19253 return c
19254 }
19255
19256
19257
19258
19259 func (c *AdvertisersChannelsCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsCreateCall {
19260 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19261 return c
19262 }
19263
19264
19265 func (c *AdvertisersChannelsCreateCall) Context(ctx context.Context) *AdvertisersChannelsCreateCall {
19266 c.ctx_ = ctx
19267 return c
19268 }
19269
19270
19271
19272 func (c *AdvertisersChannelsCreateCall) Header() http.Header {
19273 if c.header_ == nil {
19274 c.header_ = make(http.Header)
19275 }
19276 return c.header_
19277 }
19278
19279 func (c *AdvertisersChannelsCreateCall) doRequest(alt string) (*http.Response, error) {
19280 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19281 var body io.Reader = nil
19282 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
19283 if err != nil {
19284 return nil, err
19285 }
19286 c.urlParams_.Set("alt", alt)
19287 c.urlParams_.Set("prettyPrint", "false")
19288 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/channels")
19289 urls += "?" + c.urlParams_.Encode()
19290 req, err := http.NewRequest("POST", urls, body)
19291 if err != nil {
19292 return nil, err
19293 }
19294 req.Header = reqHeaders
19295 googleapi.Expand(req.URL, map[string]string{
19296 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19297 })
19298 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19299 }
19300
19301
19302
19303
19304
19305
19306 func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
19307 gensupport.SetOptions(c.urlParams_, opts...)
19308 res, err := c.doRequest("json")
19309 if res != nil && res.StatusCode == http.StatusNotModified {
19310 if res.Body != nil {
19311 res.Body.Close()
19312 }
19313 return nil, gensupport.WrapError(&googleapi.Error{
19314 Code: res.StatusCode,
19315 Header: res.Header,
19316 })
19317 }
19318 if err != nil {
19319 return nil, err
19320 }
19321 defer googleapi.CloseBody(res)
19322 if err := googleapi.CheckResponse(res); err != nil {
19323 return nil, gensupport.WrapError(err)
19324 }
19325 ret := &Channel{
19326 ServerResponse: googleapi.ServerResponse{
19327 Header: res.Header,
19328 HTTPStatusCode: res.StatusCode,
19329 },
19330 }
19331 target := &ret
19332 if err := gensupport.DecodeResponse(target, res); err != nil {
19333 return nil, err
19334 }
19335 return ret, nil
19336 }
19337
19338 type AdvertisersChannelsGetCall struct {
19339 s *Service
19340 advertiserId int64
19341 channelId int64
19342 urlParams_ gensupport.URLParams
19343 ifNoneMatch_ string
19344 ctx_ context.Context
19345 header_ http.Header
19346 }
19347
19348
19349
19350
19351
19352 func (r *AdvertisersChannelsService) Get(advertiserId int64, channelId int64) *AdvertisersChannelsGetCall {
19353 c := &AdvertisersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19354 c.advertiserId = advertiserId
19355 c.channelId = channelId
19356 return c
19357 }
19358
19359
19360
19361 func (c *AdvertisersChannelsGetCall) PartnerId(partnerId int64) *AdvertisersChannelsGetCall {
19362 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
19363 return c
19364 }
19365
19366
19367
19368
19369 func (c *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersChannelsGetCall {
19370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19371 return c
19372 }
19373
19374
19375
19376
19377 func (c *AdvertisersChannelsGetCall) IfNoneMatch(entityTag string) *AdvertisersChannelsGetCall {
19378 c.ifNoneMatch_ = entityTag
19379 return c
19380 }
19381
19382
19383 func (c *AdvertisersChannelsGetCall) Context(ctx context.Context) *AdvertisersChannelsGetCall {
19384 c.ctx_ = ctx
19385 return c
19386 }
19387
19388
19389
19390 func (c *AdvertisersChannelsGetCall) Header() http.Header {
19391 if c.header_ == nil {
19392 c.header_ = make(http.Header)
19393 }
19394 return c.header_
19395 }
19396
19397 func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, error) {
19398 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19399 if c.ifNoneMatch_ != "" {
19400 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19401 }
19402 var body io.Reader = nil
19403 c.urlParams_.Set("alt", alt)
19404 c.urlParams_.Set("prettyPrint", "false")
19405 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/channels/{+channelId}")
19406 urls += "?" + c.urlParams_.Encode()
19407 req, err := http.NewRequest("GET", urls, body)
19408 if err != nil {
19409 return nil, err
19410 }
19411 req.Header = reqHeaders
19412 googleapi.Expand(req.URL, map[string]string{
19413 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19414 "channelId": strconv.FormatInt(c.channelId, 10),
19415 })
19416 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19417 }
19418
19419
19420
19421
19422
19423
19424 func (c *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
19425 gensupport.SetOptions(c.urlParams_, opts...)
19426 res, err := c.doRequest("json")
19427 if res != nil && res.StatusCode == http.StatusNotModified {
19428 if res.Body != nil {
19429 res.Body.Close()
19430 }
19431 return nil, gensupport.WrapError(&googleapi.Error{
19432 Code: res.StatusCode,
19433 Header: res.Header,
19434 })
19435 }
19436 if err != nil {
19437 return nil, err
19438 }
19439 defer googleapi.CloseBody(res)
19440 if err := googleapi.CheckResponse(res); err != nil {
19441 return nil, gensupport.WrapError(err)
19442 }
19443 ret := &Channel{
19444 ServerResponse: googleapi.ServerResponse{
19445 Header: res.Header,
19446 HTTPStatusCode: res.StatusCode,
19447 },
19448 }
19449 target := &ret
19450 if err := gensupport.DecodeResponse(target, res); err != nil {
19451 return nil, err
19452 }
19453 return ret, nil
19454 }
19455
19456 type AdvertisersChannelsListCall struct {
19457 s *Service
19458 advertiserId int64
19459 urlParams_ gensupport.URLParams
19460 ifNoneMatch_ string
19461 ctx_ context.Context
19462 header_ http.Header
19463 }
19464
19465
19466
19467
19468 func (r *AdvertisersChannelsService) List(advertiserId int64) *AdvertisersChannelsListCall {
19469 c := &AdvertisersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19470 c.advertiserId = advertiserId
19471 return c
19472 }
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482 func (c *AdvertisersChannelsListCall) Filter(filter string) *AdvertisersChannelsListCall {
19483 c.urlParams_.Set("filter", filter)
19484 return c
19485 }
19486
19487
19488
19489
19490
19491
19492 func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChannelsListCall {
19493 c.urlParams_.Set("orderBy", orderBy)
19494 return c
19495 }
19496
19497
19498
19499
19500 func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall {
19501 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19502 return c
19503 }
19504
19505
19506
19507
19508
19509 func (c *AdvertisersChannelsListCall) PageToken(pageToken string) *AdvertisersChannelsListCall {
19510 c.urlParams_.Set("pageToken", pageToken)
19511 return c
19512 }
19513
19514
19515
19516 func (c *AdvertisersChannelsListCall) PartnerId(partnerId int64) *AdvertisersChannelsListCall {
19517 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
19518 return c
19519 }
19520
19521
19522
19523
19524 func (c *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsListCall {
19525 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19526 return c
19527 }
19528
19529
19530
19531
19532 func (c *AdvertisersChannelsListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsListCall {
19533 c.ifNoneMatch_ = entityTag
19534 return c
19535 }
19536
19537
19538 func (c *AdvertisersChannelsListCall) Context(ctx context.Context) *AdvertisersChannelsListCall {
19539 c.ctx_ = ctx
19540 return c
19541 }
19542
19543
19544
19545 func (c *AdvertisersChannelsListCall) Header() http.Header {
19546 if c.header_ == nil {
19547 c.header_ = make(http.Header)
19548 }
19549 return c.header_
19550 }
19551
19552 func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, error) {
19553 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19554 if c.ifNoneMatch_ != "" {
19555 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19556 }
19557 var body io.Reader = nil
19558 c.urlParams_.Set("alt", alt)
19559 c.urlParams_.Set("prettyPrint", "false")
19560 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/channels")
19561 urls += "?" + c.urlParams_.Encode()
19562 req, err := http.NewRequest("GET", urls, body)
19563 if err != nil {
19564 return nil, err
19565 }
19566 req.Header = reqHeaders
19567 googleapi.Expand(req.URL, map[string]string{
19568 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19569 })
19570 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19571 }
19572
19573
19574
19575
19576
19577
19578
19579 func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) {
19580 gensupport.SetOptions(c.urlParams_, opts...)
19581 res, err := c.doRequest("json")
19582 if res != nil && res.StatusCode == http.StatusNotModified {
19583 if res.Body != nil {
19584 res.Body.Close()
19585 }
19586 return nil, gensupport.WrapError(&googleapi.Error{
19587 Code: res.StatusCode,
19588 Header: res.Header,
19589 })
19590 }
19591 if err != nil {
19592 return nil, err
19593 }
19594 defer googleapi.CloseBody(res)
19595 if err := googleapi.CheckResponse(res); err != nil {
19596 return nil, gensupport.WrapError(err)
19597 }
19598 ret := &ListChannelsResponse{
19599 ServerResponse: googleapi.ServerResponse{
19600 Header: res.Header,
19601 HTTPStatusCode: res.StatusCode,
19602 },
19603 }
19604 target := &ret
19605 if err := gensupport.DecodeResponse(target, res); err != nil {
19606 return nil, err
19607 }
19608 return ret, nil
19609 }
19610
19611
19612
19613
19614 func (c *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error {
19615 c.ctx_ = ctx
19616 defer c.PageToken(c.urlParams_.Get("pageToken"))
19617 for {
19618 x, err := c.Do()
19619 if err != nil {
19620 return err
19621 }
19622 if err := f(x); err != nil {
19623 return err
19624 }
19625 if x.NextPageToken == "" {
19626 return nil
19627 }
19628 c.PageToken(x.NextPageToken)
19629 }
19630 }
19631
19632 type AdvertisersChannelsPatchCall struct {
19633 s *Service
19634 advertiserId int64
19635 channelId int64
19636 channel *Channel
19637 urlParams_ gensupport.URLParams
19638 ctx_ context.Context
19639 header_ http.Header
19640 }
19641
19642
19643
19644
19645
19646
19647 func (r *AdvertisersChannelsService) Patch(advertiserId int64, channelId int64, channel *Channel) *AdvertisersChannelsPatchCall {
19648 c := &AdvertisersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19649 c.advertiserId = advertiserId
19650 c.channelId = channelId
19651 c.channel = channel
19652 return c
19653 }
19654
19655
19656
19657 func (c *AdvertisersChannelsPatchCall) PartnerId(partnerId int64) *AdvertisersChannelsPatchCall {
19658 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
19659 return c
19660 }
19661
19662
19663
19664 func (c *AdvertisersChannelsPatchCall) UpdateMask(updateMask string) *AdvertisersChannelsPatchCall {
19665 c.urlParams_.Set("updateMask", updateMask)
19666 return c
19667 }
19668
19669
19670
19671
19672 func (c *AdvertisersChannelsPatchCall) Fields(s ...googleapi.Field) *AdvertisersChannelsPatchCall {
19673 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19674 return c
19675 }
19676
19677
19678 func (c *AdvertisersChannelsPatchCall) Context(ctx context.Context) *AdvertisersChannelsPatchCall {
19679 c.ctx_ = ctx
19680 return c
19681 }
19682
19683
19684
19685 func (c *AdvertisersChannelsPatchCall) Header() http.Header {
19686 if c.header_ == nil {
19687 c.header_ = make(http.Header)
19688 }
19689 return c.header_
19690 }
19691
19692 func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, error) {
19693 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19694 var body io.Reader = nil
19695 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
19696 if err != nil {
19697 return nil, err
19698 }
19699 c.urlParams_.Set("alt", alt)
19700 c.urlParams_.Set("prettyPrint", "false")
19701 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/channels/{channelId}")
19702 urls += "?" + c.urlParams_.Encode()
19703 req, err := http.NewRequest("PATCH", urls, body)
19704 if err != nil {
19705 return nil, err
19706 }
19707 req.Header = reqHeaders
19708 googleapi.Expand(req.URL, map[string]string{
19709 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19710 "channelId": strconv.FormatInt(c.channelId, 10),
19711 })
19712 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19713 }
19714
19715
19716
19717
19718
19719
19720 func (c *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
19721 gensupport.SetOptions(c.urlParams_, opts...)
19722 res, err := c.doRequest("json")
19723 if res != nil && res.StatusCode == http.StatusNotModified {
19724 if res.Body != nil {
19725 res.Body.Close()
19726 }
19727 return nil, gensupport.WrapError(&googleapi.Error{
19728 Code: res.StatusCode,
19729 Header: res.Header,
19730 })
19731 }
19732 if err != nil {
19733 return nil, err
19734 }
19735 defer googleapi.CloseBody(res)
19736 if err := googleapi.CheckResponse(res); err != nil {
19737 return nil, gensupport.WrapError(err)
19738 }
19739 ret := &Channel{
19740 ServerResponse: googleapi.ServerResponse{
19741 Header: res.Header,
19742 HTTPStatusCode: res.StatusCode,
19743 },
19744 }
19745 target := &ret
19746 if err := gensupport.DecodeResponse(target, res); err != nil {
19747 return nil, err
19748 }
19749 return ret, nil
19750 }
19751
19752 type AdvertisersChannelsSitesBulkEditCall struct {
19753 s *Service
19754 advertiserId int64
19755 channelId int64
19756 bulkeditsitesrequest *BulkEditSitesRequest
19757 urlParams_ gensupport.URLParams
19758 ctx_ context.Context
19759 header_ http.Header
19760 }
19761
19762
19763
19764
19765
19766
19767
19768 func (r *AdvertisersChannelsSitesService) BulkEdit(advertiserId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *AdvertisersChannelsSitesBulkEditCall {
19769 c := &AdvertisersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19770 c.advertiserId = advertiserId
19771 c.channelId = channelId
19772 c.bulkeditsitesrequest = bulkeditsitesrequest
19773 return c
19774 }
19775
19776
19777
19778
19779 func (c *AdvertisersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesBulkEditCall {
19780 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19781 return c
19782 }
19783
19784
19785 func (c *AdvertisersChannelsSitesBulkEditCall) Context(ctx context.Context) *AdvertisersChannelsSitesBulkEditCall {
19786 c.ctx_ = ctx
19787 return c
19788 }
19789
19790
19791
19792 func (c *AdvertisersChannelsSitesBulkEditCall) Header() http.Header {
19793 if c.header_ == nil {
19794 c.header_ = make(http.Header)
19795 }
19796 return c.header_
19797 }
19798
19799 func (c *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) {
19800 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19801 var body io.Reader = nil
19802 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditsitesrequest)
19803 if err != nil {
19804 return nil, err
19805 }
19806 c.urlParams_.Set("alt", alt)
19807 c.urlParams_.Set("prettyPrint", "false")
19808 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit")
19809 urls += "?" + c.urlParams_.Encode()
19810 req, err := http.NewRequest("POST", urls, body)
19811 if err != nil {
19812 return nil, err
19813 }
19814 req.Header = reqHeaders
19815 googleapi.Expand(req.URL, map[string]string{
19816 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19817 "channelId": strconv.FormatInt(c.channelId, 10),
19818 })
19819 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19820 }
19821
19822
19823
19824
19825
19826
19827
19828 func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) {
19829 gensupport.SetOptions(c.urlParams_, opts...)
19830 res, err := c.doRequest("json")
19831 if res != nil && res.StatusCode == http.StatusNotModified {
19832 if res.Body != nil {
19833 res.Body.Close()
19834 }
19835 return nil, gensupport.WrapError(&googleapi.Error{
19836 Code: res.StatusCode,
19837 Header: res.Header,
19838 })
19839 }
19840 if err != nil {
19841 return nil, err
19842 }
19843 defer googleapi.CloseBody(res)
19844 if err := googleapi.CheckResponse(res); err != nil {
19845 return nil, gensupport.WrapError(err)
19846 }
19847 ret := &BulkEditSitesResponse{
19848 ServerResponse: googleapi.ServerResponse{
19849 Header: res.Header,
19850 HTTPStatusCode: res.StatusCode,
19851 },
19852 }
19853 target := &ret
19854 if err := gensupport.DecodeResponse(target, res); err != nil {
19855 return nil, err
19856 }
19857 return ret, nil
19858 }
19859
19860 type AdvertisersChannelsSitesCreateCall struct {
19861 s *Service
19862 advertiserId int64
19863 channelId int64
19864 site *Site
19865 urlParams_ gensupport.URLParams
19866 ctx_ context.Context
19867 header_ http.Header
19868 }
19869
19870
19871
19872
19873
19874 func (r *AdvertisersChannelsSitesService) Create(advertiserId int64, channelId int64, site *Site) *AdvertisersChannelsSitesCreateCall {
19875 c := &AdvertisersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19876 c.advertiserId = advertiserId
19877 c.channelId = channelId
19878 c.site = site
19879 return c
19880 }
19881
19882
19883
19884 func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesCreateCall {
19885 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
19886 return c
19887 }
19888
19889
19890
19891
19892 func (c *AdvertisersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesCreateCall {
19893 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19894 return c
19895 }
19896
19897
19898 func (c *AdvertisersChannelsSitesCreateCall) Context(ctx context.Context) *AdvertisersChannelsSitesCreateCall {
19899 c.ctx_ = ctx
19900 return c
19901 }
19902
19903
19904
19905 func (c *AdvertisersChannelsSitesCreateCall) Header() http.Header {
19906 if c.header_ == nil {
19907 c.header_ = make(http.Header)
19908 }
19909 return c.header_
19910 }
19911
19912 func (c *AdvertisersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) {
19913 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19914 var body io.Reader = nil
19915 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
19916 if err != nil {
19917 return nil, err
19918 }
19919 c.urlParams_.Set("alt", alt)
19920 c.urlParams_.Set("prettyPrint", "false")
19921 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/channels/{+channelId}/sites")
19922 urls += "?" + c.urlParams_.Encode()
19923 req, err := http.NewRequest("POST", urls, body)
19924 if err != nil {
19925 return nil, err
19926 }
19927 req.Header = reqHeaders
19928 googleapi.Expand(req.URL, map[string]string{
19929 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
19930 "channelId": strconv.FormatInt(c.channelId, 10),
19931 })
19932 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19933 }
19934
19935
19936
19937
19938
19939
19940 func (c *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
19941 gensupport.SetOptions(c.urlParams_, opts...)
19942 res, err := c.doRequest("json")
19943 if res != nil && res.StatusCode == http.StatusNotModified {
19944 if res.Body != nil {
19945 res.Body.Close()
19946 }
19947 return nil, gensupport.WrapError(&googleapi.Error{
19948 Code: res.StatusCode,
19949 Header: res.Header,
19950 })
19951 }
19952 if err != nil {
19953 return nil, err
19954 }
19955 defer googleapi.CloseBody(res)
19956 if err := googleapi.CheckResponse(res); err != nil {
19957 return nil, gensupport.WrapError(err)
19958 }
19959 ret := &Site{
19960 ServerResponse: googleapi.ServerResponse{
19961 Header: res.Header,
19962 HTTPStatusCode: res.StatusCode,
19963 },
19964 }
19965 target := &ret
19966 if err := gensupport.DecodeResponse(target, res); err != nil {
19967 return nil, err
19968 }
19969 return ret, nil
19970 }
19971
19972 type AdvertisersChannelsSitesDeleteCall struct {
19973 s *Service
19974 advertiserId int64
19975 channelId int64
19976 urlOrAppId string
19977 urlParams_ gensupport.URLParams
19978 ctx_ context.Context
19979 header_ http.Header
19980 }
19981
19982
19983
19984
19985
19986
19987 func (r *AdvertisersChannelsSitesService) Delete(advertiserId int64, channelId int64, urlOrAppId string) *AdvertisersChannelsSitesDeleteCall {
19988 c := &AdvertisersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19989 c.advertiserId = advertiserId
19990 c.channelId = channelId
19991 c.urlOrAppId = urlOrAppId
19992 return c
19993 }
19994
19995
19996
19997 func (c *AdvertisersChannelsSitesDeleteCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesDeleteCall {
19998 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
19999 return c
20000 }
20001
20002
20003
20004
20005 func (c *AdvertisersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesDeleteCall {
20006 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20007 return c
20008 }
20009
20010
20011 func (c *AdvertisersChannelsSitesDeleteCall) Context(ctx context.Context) *AdvertisersChannelsSitesDeleteCall {
20012 c.ctx_ = ctx
20013 return c
20014 }
20015
20016
20017
20018 func (c *AdvertisersChannelsSitesDeleteCall) Header() http.Header {
20019 if c.header_ == nil {
20020 c.header_ = make(http.Header)
20021 }
20022 return c.header_
20023 }
20024
20025 func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) {
20026 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20027 var body io.Reader = nil
20028 c.urlParams_.Set("alt", alt)
20029 c.urlParams_.Set("prettyPrint", "false")
20030 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}")
20031 urls += "?" + c.urlParams_.Encode()
20032 req, err := http.NewRequest("DELETE", urls, body)
20033 if err != nil {
20034 return nil, err
20035 }
20036 req.Header = reqHeaders
20037 googleapi.Expand(req.URL, map[string]string{
20038 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20039 "channelId": strconv.FormatInt(c.channelId, 10),
20040 "urlOrAppId": c.urlOrAppId,
20041 })
20042 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20043 }
20044
20045
20046
20047
20048
20049
20050 func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
20051 gensupport.SetOptions(c.urlParams_, opts...)
20052 res, err := c.doRequest("json")
20053 if res != nil && res.StatusCode == http.StatusNotModified {
20054 if res.Body != nil {
20055 res.Body.Close()
20056 }
20057 return nil, gensupport.WrapError(&googleapi.Error{
20058 Code: res.StatusCode,
20059 Header: res.Header,
20060 })
20061 }
20062 if err != nil {
20063 return nil, err
20064 }
20065 defer googleapi.CloseBody(res)
20066 if err := googleapi.CheckResponse(res); err != nil {
20067 return nil, gensupport.WrapError(err)
20068 }
20069 ret := &Empty{
20070 ServerResponse: googleapi.ServerResponse{
20071 Header: res.Header,
20072 HTTPStatusCode: res.StatusCode,
20073 },
20074 }
20075 target := &ret
20076 if err := gensupport.DecodeResponse(target, res); err != nil {
20077 return nil, err
20078 }
20079 return ret, nil
20080 }
20081
20082 type AdvertisersChannelsSitesListCall struct {
20083 s *Service
20084 advertiserId int64
20085 channelId int64
20086 urlParams_ gensupport.URLParams
20087 ifNoneMatch_ string
20088 ctx_ context.Context
20089 header_ http.Header
20090 }
20091
20092
20093
20094
20095
20096
20097 func (r *AdvertisersChannelsSitesService) List(advertiserId int64, channelId int64) *AdvertisersChannelsSitesListCall {
20098 c := &AdvertisersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20099 c.advertiserId = advertiserId
20100 c.channelId = channelId
20101 return c
20102 }
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112 func (c *AdvertisersChannelsSitesListCall) Filter(filter string) *AdvertisersChannelsSitesListCall {
20113 c.urlParams_.Set("filter", filter)
20114 return c
20115 }
20116
20117
20118
20119
20120
20121 func (c *AdvertisersChannelsSitesListCall) OrderBy(orderBy string) *AdvertisersChannelsSitesListCall {
20122 c.urlParams_.Set("orderBy", orderBy)
20123 return c
20124 }
20125
20126
20127
20128
20129 func (c *AdvertisersChannelsSitesListCall) PageSize(pageSize int64) *AdvertisersChannelsSitesListCall {
20130 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
20131 return c
20132 }
20133
20134
20135
20136
20137
20138 func (c *AdvertisersChannelsSitesListCall) PageToken(pageToken string) *AdvertisersChannelsSitesListCall {
20139 c.urlParams_.Set("pageToken", pageToken)
20140 return c
20141 }
20142
20143
20144
20145 func (c *AdvertisersChannelsSitesListCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesListCall {
20146 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
20147 return c
20148 }
20149
20150
20151
20152
20153 func (c *AdvertisersChannelsSitesListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesListCall {
20154 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20155 return c
20156 }
20157
20158
20159
20160
20161 func (c *AdvertisersChannelsSitesListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsSitesListCall {
20162 c.ifNoneMatch_ = entityTag
20163 return c
20164 }
20165
20166
20167 func (c *AdvertisersChannelsSitesListCall) Context(ctx context.Context) *AdvertisersChannelsSitesListCall {
20168 c.ctx_ = ctx
20169 return c
20170 }
20171
20172
20173
20174 func (c *AdvertisersChannelsSitesListCall) Header() http.Header {
20175 if c.header_ == nil {
20176 c.header_ = make(http.Header)
20177 }
20178 return c.header_
20179 }
20180
20181 func (c *AdvertisersChannelsSitesListCall) doRequest(alt string) (*http.Response, error) {
20182 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20183 if c.ifNoneMatch_ != "" {
20184 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20185 }
20186 var body io.Reader = nil
20187 c.urlParams_.Set("alt", alt)
20188 c.urlParams_.Set("prettyPrint", "false")
20189 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/channels/{+channelId}/sites")
20190 urls += "?" + c.urlParams_.Encode()
20191 req, err := http.NewRequest("GET", urls, body)
20192 if err != nil {
20193 return nil, err
20194 }
20195 req.Header = reqHeaders
20196 googleapi.Expand(req.URL, map[string]string{
20197 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20198 "channelId": strconv.FormatInt(c.channelId, 10),
20199 })
20200 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20201 }
20202
20203
20204
20205
20206
20207
20208
20209 func (c *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) {
20210 gensupport.SetOptions(c.urlParams_, opts...)
20211 res, err := c.doRequest("json")
20212 if res != nil && res.StatusCode == http.StatusNotModified {
20213 if res.Body != nil {
20214 res.Body.Close()
20215 }
20216 return nil, gensupport.WrapError(&googleapi.Error{
20217 Code: res.StatusCode,
20218 Header: res.Header,
20219 })
20220 }
20221 if err != nil {
20222 return nil, err
20223 }
20224 defer googleapi.CloseBody(res)
20225 if err := googleapi.CheckResponse(res); err != nil {
20226 return nil, gensupport.WrapError(err)
20227 }
20228 ret := &ListSitesResponse{
20229 ServerResponse: googleapi.ServerResponse{
20230 Header: res.Header,
20231 HTTPStatusCode: res.StatusCode,
20232 },
20233 }
20234 target := &ret
20235 if err := gensupport.DecodeResponse(target, res); err != nil {
20236 return nil, err
20237 }
20238 return ret, nil
20239 }
20240
20241
20242
20243
20244 func (c *AdvertisersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) error) error {
20245 c.ctx_ = ctx
20246 defer c.PageToken(c.urlParams_.Get("pageToken"))
20247 for {
20248 x, err := c.Do()
20249 if err != nil {
20250 return err
20251 }
20252 if err := f(x); err != nil {
20253 return err
20254 }
20255 if x.NextPageToken == "" {
20256 return nil
20257 }
20258 c.PageToken(x.NextPageToken)
20259 }
20260 }
20261
20262 type AdvertisersChannelsSitesReplaceCall struct {
20263 s *Service
20264 advertiserId int64
20265 channelId int64
20266 replacesitesrequest *ReplaceSitesRequest
20267 urlParams_ gensupport.URLParams
20268 ctx_ context.Context
20269 header_ http.Header
20270 }
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281 func (r *AdvertisersChannelsSitesService) Replace(advertiserId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *AdvertisersChannelsSitesReplaceCall {
20282 c := &AdvertisersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20283 c.advertiserId = advertiserId
20284 c.channelId = channelId
20285 c.replacesitesrequest = replacesitesrequest
20286 return c
20287 }
20288
20289
20290
20291
20292 func (c *AdvertisersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesReplaceCall {
20293 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20294 return c
20295 }
20296
20297
20298 func (c *AdvertisersChannelsSitesReplaceCall) Context(ctx context.Context) *AdvertisersChannelsSitesReplaceCall {
20299 c.ctx_ = ctx
20300 return c
20301 }
20302
20303
20304
20305 func (c *AdvertisersChannelsSitesReplaceCall) Header() http.Header {
20306 if c.header_ == nil {
20307 c.header_ = make(http.Header)
20308 }
20309 return c.header_
20310 }
20311
20312 func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) {
20313 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20314 var body io.Reader = nil
20315 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacesitesrequest)
20316 if err != nil {
20317 return nil, err
20318 }
20319 c.urlParams_.Set("alt", alt)
20320 c.urlParams_.Set("prettyPrint", "false")
20321 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/channels/{+channelId}/sites:replace")
20322 urls += "?" + c.urlParams_.Encode()
20323 req, err := http.NewRequest("POST", urls, body)
20324 if err != nil {
20325 return nil, err
20326 }
20327 req.Header = reqHeaders
20328 googleapi.Expand(req.URL, map[string]string{
20329 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20330 "channelId": strconv.FormatInt(c.channelId, 10),
20331 })
20332 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20333 }
20334
20335
20336
20337
20338
20339
20340
20341 func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, error) {
20342 gensupport.SetOptions(c.urlParams_, opts...)
20343 res, err := c.doRequest("json")
20344 if res != nil && res.StatusCode == http.StatusNotModified {
20345 if res.Body != nil {
20346 res.Body.Close()
20347 }
20348 return nil, gensupport.WrapError(&googleapi.Error{
20349 Code: res.StatusCode,
20350 Header: res.Header,
20351 })
20352 }
20353 if err != nil {
20354 return nil, err
20355 }
20356 defer googleapi.CloseBody(res)
20357 if err := googleapi.CheckResponse(res); err != nil {
20358 return nil, gensupport.WrapError(err)
20359 }
20360 ret := &ReplaceSitesResponse{
20361 ServerResponse: googleapi.ServerResponse{
20362 Header: res.Header,
20363 HTTPStatusCode: res.StatusCode,
20364 },
20365 }
20366 target := &ret
20367 if err := gensupport.DecodeResponse(target, res); err != nil {
20368 return nil, err
20369 }
20370 return ret, nil
20371 }
20372
20373 type AdvertisersCreativesCreateCall struct {
20374 s *Service
20375 advertiserId int64
20376 creative *Creative
20377 urlParams_ gensupport.URLParams
20378 ctx_ context.Context
20379 header_ http.Header
20380 }
20381
20382
20383
20384
20385
20386
20387
20388
20389 func (r *AdvertisersCreativesService) Create(advertiserId int64, creative *Creative) *AdvertisersCreativesCreateCall {
20390 c := &AdvertisersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20391 c.advertiserId = advertiserId
20392 c.creative = creative
20393 return c
20394 }
20395
20396
20397
20398
20399 func (c *AdvertisersCreativesCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreativesCreateCall {
20400 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20401 return c
20402 }
20403
20404
20405 func (c *AdvertisersCreativesCreateCall) Context(ctx context.Context) *AdvertisersCreativesCreateCall {
20406 c.ctx_ = ctx
20407 return c
20408 }
20409
20410
20411
20412 func (c *AdvertisersCreativesCreateCall) Header() http.Header {
20413 if c.header_ == nil {
20414 c.header_ = make(http.Header)
20415 }
20416 return c.header_
20417 }
20418
20419 func (c *AdvertisersCreativesCreateCall) doRequest(alt string) (*http.Response, error) {
20420 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20421 var body io.Reader = nil
20422 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
20423 if err != nil {
20424 return nil, err
20425 }
20426 c.urlParams_.Set("alt", alt)
20427 c.urlParams_.Set("prettyPrint", "false")
20428 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/creatives")
20429 urls += "?" + c.urlParams_.Encode()
20430 req, err := http.NewRequest("POST", urls, body)
20431 if err != nil {
20432 return nil, err
20433 }
20434 req.Header = reqHeaders
20435 googleapi.Expand(req.URL, map[string]string{
20436 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20437 })
20438 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20439 }
20440
20441
20442
20443
20444
20445
20446 func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
20447 gensupport.SetOptions(c.urlParams_, opts...)
20448 res, err := c.doRequest("json")
20449 if res != nil && res.StatusCode == http.StatusNotModified {
20450 if res.Body != nil {
20451 res.Body.Close()
20452 }
20453 return nil, gensupport.WrapError(&googleapi.Error{
20454 Code: res.StatusCode,
20455 Header: res.Header,
20456 })
20457 }
20458 if err != nil {
20459 return nil, err
20460 }
20461 defer googleapi.CloseBody(res)
20462 if err := googleapi.CheckResponse(res); err != nil {
20463 return nil, gensupport.WrapError(err)
20464 }
20465 ret := &Creative{
20466 ServerResponse: googleapi.ServerResponse{
20467 Header: res.Header,
20468 HTTPStatusCode: res.StatusCode,
20469 },
20470 }
20471 target := &ret
20472 if err := gensupport.DecodeResponse(target, res); err != nil {
20473 return nil, err
20474 }
20475 return ret, nil
20476 }
20477
20478 type AdvertisersCreativesDeleteCall struct {
20479 s *Service
20480 advertiserId int64
20481 creativeId int64
20482 urlParams_ gensupport.URLParams
20483 ctx_ context.Context
20484 header_ http.Header
20485 }
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496 func (r *AdvertisersCreativesService) Delete(advertiserId int64, creativeId int64) *AdvertisersCreativesDeleteCall {
20497 c := &AdvertisersCreativesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20498 c.advertiserId = advertiserId
20499 c.creativeId = creativeId
20500 return c
20501 }
20502
20503
20504
20505
20506 func (c *AdvertisersCreativesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCreativesDeleteCall {
20507 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20508 return c
20509 }
20510
20511
20512 func (c *AdvertisersCreativesDeleteCall) Context(ctx context.Context) *AdvertisersCreativesDeleteCall {
20513 c.ctx_ = ctx
20514 return c
20515 }
20516
20517
20518
20519 func (c *AdvertisersCreativesDeleteCall) Header() http.Header {
20520 if c.header_ == nil {
20521 c.header_ = make(http.Header)
20522 }
20523 return c.header_
20524 }
20525
20526 func (c *AdvertisersCreativesDeleteCall) doRequest(alt string) (*http.Response, error) {
20527 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20528 var body io.Reader = nil
20529 c.urlParams_.Set("alt", alt)
20530 c.urlParams_.Set("prettyPrint", "false")
20531 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/creatives/{+creativeId}")
20532 urls += "?" + c.urlParams_.Encode()
20533 req, err := http.NewRequest("DELETE", urls, body)
20534 if err != nil {
20535 return nil, err
20536 }
20537 req.Header = reqHeaders
20538 googleapi.Expand(req.URL, map[string]string{
20539 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20540 "creativeId": strconv.FormatInt(c.creativeId, 10),
20541 })
20542 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20543 }
20544
20545
20546
20547
20548
20549
20550 func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
20551 gensupport.SetOptions(c.urlParams_, opts...)
20552 res, err := c.doRequest("json")
20553 if res != nil && res.StatusCode == http.StatusNotModified {
20554 if res.Body != nil {
20555 res.Body.Close()
20556 }
20557 return nil, gensupport.WrapError(&googleapi.Error{
20558 Code: res.StatusCode,
20559 Header: res.Header,
20560 })
20561 }
20562 if err != nil {
20563 return nil, err
20564 }
20565 defer googleapi.CloseBody(res)
20566 if err := googleapi.CheckResponse(res); err != nil {
20567 return nil, gensupport.WrapError(err)
20568 }
20569 ret := &Empty{
20570 ServerResponse: googleapi.ServerResponse{
20571 Header: res.Header,
20572 HTTPStatusCode: res.StatusCode,
20573 },
20574 }
20575 target := &ret
20576 if err := gensupport.DecodeResponse(target, res); err != nil {
20577 return nil, err
20578 }
20579 return ret, nil
20580 }
20581
20582 type AdvertisersCreativesGetCall struct {
20583 s *Service
20584 advertiserId int64
20585 creativeId int64
20586 urlParams_ gensupport.URLParams
20587 ifNoneMatch_ string
20588 ctx_ context.Context
20589 header_ http.Header
20590 }
20591
20592
20593
20594
20595
20596 func (r *AdvertisersCreativesService) Get(advertiserId int64, creativeId int64) *AdvertisersCreativesGetCall {
20597 c := &AdvertisersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20598 c.advertiserId = advertiserId
20599 c.creativeId = creativeId
20600 return c
20601 }
20602
20603
20604
20605
20606 func (c *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersCreativesGetCall {
20607 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20608 return c
20609 }
20610
20611
20612
20613
20614 func (c *AdvertisersCreativesGetCall) IfNoneMatch(entityTag string) *AdvertisersCreativesGetCall {
20615 c.ifNoneMatch_ = entityTag
20616 return c
20617 }
20618
20619
20620 func (c *AdvertisersCreativesGetCall) Context(ctx context.Context) *AdvertisersCreativesGetCall {
20621 c.ctx_ = ctx
20622 return c
20623 }
20624
20625
20626
20627 func (c *AdvertisersCreativesGetCall) Header() http.Header {
20628 if c.header_ == nil {
20629 c.header_ = make(http.Header)
20630 }
20631 return c.header_
20632 }
20633
20634 func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, error) {
20635 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20636 if c.ifNoneMatch_ != "" {
20637 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20638 }
20639 var body io.Reader = nil
20640 c.urlParams_.Set("alt", alt)
20641 c.urlParams_.Set("prettyPrint", "false")
20642 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/creatives/{+creativeId}")
20643 urls += "?" + c.urlParams_.Encode()
20644 req, err := http.NewRequest("GET", urls, body)
20645 if err != nil {
20646 return nil, err
20647 }
20648 req.Header = reqHeaders
20649 googleapi.Expand(req.URL, map[string]string{
20650 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20651 "creativeId": strconv.FormatInt(c.creativeId, 10),
20652 })
20653 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20654 }
20655
20656
20657
20658
20659
20660
20661 func (c *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
20662 gensupport.SetOptions(c.urlParams_, opts...)
20663 res, err := c.doRequest("json")
20664 if res != nil && res.StatusCode == http.StatusNotModified {
20665 if res.Body != nil {
20666 res.Body.Close()
20667 }
20668 return nil, gensupport.WrapError(&googleapi.Error{
20669 Code: res.StatusCode,
20670 Header: res.Header,
20671 })
20672 }
20673 if err != nil {
20674 return nil, err
20675 }
20676 defer googleapi.CloseBody(res)
20677 if err := googleapi.CheckResponse(res); err != nil {
20678 return nil, gensupport.WrapError(err)
20679 }
20680 ret := &Creative{
20681 ServerResponse: googleapi.ServerResponse{
20682 Header: res.Header,
20683 HTTPStatusCode: res.StatusCode,
20684 },
20685 }
20686 target := &ret
20687 if err := gensupport.DecodeResponse(target, res); err != nil {
20688 return nil, err
20689 }
20690 return ret, nil
20691 }
20692
20693 type AdvertisersCreativesListCall struct {
20694 s *Service
20695 advertiserId int64
20696 urlParams_ gensupport.URLParams
20697 ifNoneMatch_ string
20698 ctx_ context.Context
20699 header_ http.Header
20700 }
20701
20702
20703
20704
20705
20706
20707 func (r *AdvertisersCreativesService) List(advertiserId int64) *AdvertisersCreativesListCall {
20708 c := &AdvertisersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20709 c.advertiserId = advertiserId
20710 return c
20711 }
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748 func (c *AdvertisersCreativesListCall) Filter(filter string) *AdvertisersCreativesListCall {
20749 c.urlParams_.Set("filter", filter)
20750 return c
20751 }
20752
20753
20754
20755
20756
20757
20758
20759 func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreativesListCall {
20760 c.urlParams_.Set("orderBy", orderBy)
20761 return c
20762 }
20763
20764
20765
20766
20767 func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall {
20768 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
20769 return c
20770 }
20771
20772
20773
20774
20775
20776 func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersCreativesListCall {
20777 c.urlParams_.Set("pageToken", pageToken)
20778 return c
20779 }
20780
20781
20782
20783
20784 func (c *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *AdvertisersCreativesListCall {
20785 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20786 return c
20787 }
20788
20789
20790
20791
20792 func (c *AdvertisersCreativesListCall) IfNoneMatch(entityTag string) *AdvertisersCreativesListCall {
20793 c.ifNoneMatch_ = entityTag
20794 return c
20795 }
20796
20797
20798 func (c *AdvertisersCreativesListCall) Context(ctx context.Context) *AdvertisersCreativesListCall {
20799 c.ctx_ = ctx
20800 return c
20801 }
20802
20803
20804
20805 func (c *AdvertisersCreativesListCall) Header() http.Header {
20806 if c.header_ == nil {
20807 c.header_ = make(http.Header)
20808 }
20809 return c.header_
20810 }
20811
20812 func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, error) {
20813 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20814 if c.ifNoneMatch_ != "" {
20815 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20816 }
20817 var body io.Reader = nil
20818 c.urlParams_.Set("alt", alt)
20819 c.urlParams_.Set("prettyPrint", "false")
20820 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/creatives")
20821 urls += "?" + c.urlParams_.Encode()
20822 req, err := http.NewRequest("GET", urls, body)
20823 if err != nil {
20824 return nil, err
20825 }
20826 req.Header = reqHeaders
20827 googleapi.Expand(req.URL, map[string]string{
20828 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20829 })
20830 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20831 }
20832
20833
20834
20835
20836
20837
20838
20839 func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) {
20840 gensupport.SetOptions(c.urlParams_, opts...)
20841 res, err := c.doRequest("json")
20842 if res != nil && res.StatusCode == http.StatusNotModified {
20843 if res.Body != nil {
20844 res.Body.Close()
20845 }
20846 return nil, gensupport.WrapError(&googleapi.Error{
20847 Code: res.StatusCode,
20848 Header: res.Header,
20849 })
20850 }
20851 if err != nil {
20852 return nil, err
20853 }
20854 defer googleapi.CloseBody(res)
20855 if err := googleapi.CheckResponse(res); err != nil {
20856 return nil, gensupport.WrapError(err)
20857 }
20858 ret := &ListCreativesResponse{
20859 ServerResponse: googleapi.ServerResponse{
20860 Header: res.Header,
20861 HTTPStatusCode: res.StatusCode,
20862 },
20863 }
20864 target := &ret
20865 if err := gensupport.DecodeResponse(target, res); err != nil {
20866 return nil, err
20867 }
20868 return ret, nil
20869 }
20870
20871
20872
20873
20874 func (c *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error {
20875 c.ctx_ = ctx
20876 defer c.PageToken(c.urlParams_.Get("pageToken"))
20877 for {
20878 x, err := c.Do()
20879 if err != nil {
20880 return err
20881 }
20882 if err := f(x); err != nil {
20883 return err
20884 }
20885 if x.NextPageToken == "" {
20886 return nil
20887 }
20888 c.PageToken(x.NextPageToken)
20889 }
20890 }
20891
20892 type AdvertisersCreativesPatchCall struct {
20893 s *Service
20894 advertiserId int64
20895 creativeId int64
20896 creative *Creative
20897 urlParams_ gensupport.URLParams
20898 ctx_ context.Context
20899 header_ http.Header
20900 }
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911 func (r *AdvertisersCreativesService) Patch(advertiserId int64, creativeId int64, creative *Creative) *AdvertisersCreativesPatchCall {
20912 c := &AdvertisersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20913 c.advertiserId = advertiserId
20914 c.creativeId = creativeId
20915 c.creative = creative
20916 return c
20917 }
20918
20919
20920
20921 func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *AdvertisersCreativesPatchCall {
20922 c.urlParams_.Set("updateMask", updateMask)
20923 return c
20924 }
20925
20926
20927
20928
20929 func (c *AdvertisersCreativesPatchCall) Fields(s ...googleapi.Field) *AdvertisersCreativesPatchCall {
20930 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20931 return c
20932 }
20933
20934
20935 func (c *AdvertisersCreativesPatchCall) Context(ctx context.Context) *AdvertisersCreativesPatchCall {
20936 c.ctx_ = ctx
20937 return c
20938 }
20939
20940
20941
20942 func (c *AdvertisersCreativesPatchCall) Header() http.Header {
20943 if c.header_ == nil {
20944 c.header_ = make(http.Header)
20945 }
20946 return c.header_
20947 }
20948
20949 func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, error) {
20950 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20951 var body io.Reader = nil
20952 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
20953 if err != nil {
20954 return nil, err
20955 }
20956 c.urlParams_.Set("alt", alt)
20957 c.urlParams_.Set("prettyPrint", "false")
20958 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/creatives/{+creativeId}")
20959 urls += "?" + c.urlParams_.Encode()
20960 req, err := http.NewRequest("PATCH", urls, body)
20961 if err != nil {
20962 return nil, err
20963 }
20964 req.Header = reqHeaders
20965 googleapi.Expand(req.URL, map[string]string{
20966 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20967 "creativeId": strconv.FormatInt(c.creativeId, 10),
20968 })
20969 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20970 }
20971
20972
20973
20974
20975
20976
20977 func (c *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
20978 gensupport.SetOptions(c.urlParams_, opts...)
20979 res, err := c.doRequest("json")
20980 if res != nil && res.StatusCode == http.StatusNotModified {
20981 if res.Body != nil {
20982 res.Body.Close()
20983 }
20984 return nil, gensupport.WrapError(&googleapi.Error{
20985 Code: res.StatusCode,
20986 Header: res.Header,
20987 })
20988 }
20989 if err != nil {
20990 return nil, err
20991 }
20992 defer googleapi.CloseBody(res)
20993 if err := googleapi.CheckResponse(res); err != nil {
20994 return nil, gensupport.WrapError(err)
20995 }
20996 ret := &Creative{
20997 ServerResponse: googleapi.ServerResponse{
20998 Header: res.Header,
20999 HTTPStatusCode: res.StatusCode,
21000 },
21001 }
21002 target := &ret
21003 if err := gensupport.DecodeResponse(target, res); err != nil {
21004 return nil, err
21005 }
21006 return ret, nil
21007 }
21008
21009 type AdvertisersInsertionOrdersCreateCall struct {
21010 s *Service
21011 advertiserId int64
21012 insertionorder *InsertionOrder
21013 urlParams_ gensupport.URLParams
21014 ctx_ context.Context
21015 header_ http.Header
21016 }
21017
21018
21019
21020
21021
21022
21023 func (r *AdvertisersInsertionOrdersService) Create(advertiserId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersCreateCall {
21024 c := &AdvertisersInsertionOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21025 c.advertiserId = advertiserId
21026 c.insertionorder = insertionorder
21027 return c
21028 }
21029
21030
21031
21032
21033 func (c *AdvertisersInsertionOrdersCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersCreateCall {
21034 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21035 return c
21036 }
21037
21038
21039 func (c *AdvertisersInsertionOrdersCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersCreateCall {
21040 c.ctx_ = ctx
21041 return c
21042 }
21043
21044
21045
21046 func (c *AdvertisersInsertionOrdersCreateCall) Header() http.Header {
21047 if c.header_ == nil {
21048 c.header_ = make(http.Header)
21049 }
21050 return c.header_
21051 }
21052
21053 func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Response, error) {
21054 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21055 var body io.Reader = nil
21056 body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertionorder)
21057 if err != nil {
21058 return nil, err
21059 }
21060 c.urlParams_.Set("alt", alt)
21061 c.urlParams_.Set("prettyPrint", "false")
21062 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders")
21063 urls += "?" + c.urlParams_.Encode()
21064 req, err := http.NewRequest("POST", urls, body)
21065 if err != nil {
21066 return nil, err
21067 }
21068 req.Header = reqHeaders
21069 googleapi.Expand(req.URL, map[string]string{
21070 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21071 })
21072 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21073 }
21074
21075
21076
21077
21078
21079
21080 func (c *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) {
21081 gensupport.SetOptions(c.urlParams_, opts...)
21082 res, err := c.doRequest("json")
21083 if res != nil && res.StatusCode == http.StatusNotModified {
21084 if res.Body != nil {
21085 res.Body.Close()
21086 }
21087 return nil, gensupport.WrapError(&googleapi.Error{
21088 Code: res.StatusCode,
21089 Header: res.Header,
21090 })
21091 }
21092 if err != nil {
21093 return nil, err
21094 }
21095 defer googleapi.CloseBody(res)
21096 if err := googleapi.CheckResponse(res); err != nil {
21097 return nil, gensupport.WrapError(err)
21098 }
21099 ret := &InsertionOrder{
21100 ServerResponse: googleapi.ServerResponse{
21101 Header: res.Header,
21102 HTTPStatusCode: res.StatusCode,
21103 },
21104 }
21105 target := &ret
21106 if err := gensupport.DecodeResponse(target, res); err != nil {
21107 return nil, err
21108 }
21109 return ret, nil
21110 }
21111
21112 type AdvertisersInsertionOrdersDeleteCall struct {
21113 s *Service
21114 advertiserId int64
21115 insertionOrderId int64
21116 urlParams_ gensupport.URLParams
21117 ctx_ context.Context
21118 header_ http.Header
21119 }
21120
21121
21122
21123
21124
21125
21126
21127
21128 func (r *AdvertisersInsertionOrdersService) Delete(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersDeleteCall {
21129 c := &AdvertisersInsertionOrdersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21130 c.advertiserId = advertiserId
21131 c.insertionOrderId = insertionOrderId
21132 return c
21133 }
21134
21135
21136
21137
21138 func (c *AdvertisersInsertionOrdersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersDeleteCall {
21139 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21140 return c
21141 }
21142
21143
21144 func (c *AdvertisersInsertionOrdersDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersDeleteCall {
21145 c.ctx_ = ctx
21146 return c
21147 }
21148
21149
21150
21151 func (c *AdvertisersInsertionOrdersDeleteCall) Header() http.Header {
21152 if c.header_ == nil {
21153 c.header_ = make(http.Header)
21154 }
21155 return c.header_
21156 }
21157
21158 func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Response, error) {
21159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21160 var body io.Reader = nil
21161 c.urlParams_.Set("alt", alt)
21162 c.urlParams_.Set("prettyPrint", "false")
21163 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}")
21164 urls += "?" + c.urlParams_.Encode()
21165 req, err := http.NewRequest("DELETE", urls, body)
21166 if err != nil {
21167 return nil, err
21168 }
21169 req.Header = reqHeaders
21170 googleapi.Expand(req.URL, map[string]string{
21171 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21172 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
21173 })
21174 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21175 }
21176
21177
21178
21179
21180
21181
21182 func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
21183 gensupport.SetOptions(c.urlParams_, opts...)
21184 res, err := c.doRequest("json")
21185 if res != nil && res.StatusCode == http.StatusNotModified {
21186 if res.Body != nil {
21187 res.Body.Close()
21188 }
21189 return nil, gensupport.WrapError(&googleapi.Error{
21190 Code: res.StatusCode,
21191 Header: res.Header,
21192 })
21193 }
21194 if err != nil {
21195 return nil, err
21196 }
21197 defer googleapi.CloseBody(res)
21198 if err := googleapi.CheckResponse(res); err != nil {
21199 return nil, gensupport.WrapError(err)
21200 }
21201 ret := &Empty{
21202 ServerResponse: googleapi.ServerResponse{
21203 Header: res.Header,
21204 HTTPStatusCode: res.StatusCode,
21205 },
21206 }
21207 target := &ret
21208 if err := gensupport.DecodeResponse(target, res); err != nil {
21209 return nil, err
21210 }
21211 return ret, nil
21212 }
21213
21214 type AdvertisersInsertionOrdersGetCall struct {
21215 s *Service
21216 advertiserId int64
21217 insertionOrderId int64
21218 urlParams_ gensupport.URLParams
21219 ifNoneMatch_ string
21220 ctx_ context.Context
21221 header_ http.Header
21222 }
21223
21224
21225
21226
21227
21228
21229 func (r *AdvertisersInsertionOrdersService) Get(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersGetCall {
21230 c := &AdvertisersInsertionOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21231 c.advertiserId = advertiserId
21232 c.insertionOrderId = insertionOrderId
21233 return c
21234 }
21235
21236
21237
21238
21239 func (c *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersGetCall {
21240 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21241 return c
21242 }
21243
21244
21245
21246
21247 func (c *AdvertisersInsertionOrdersGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersGetCall {
21248 c.ifNoneMatch_ = entityTag
21249 return c
21250 }
21251
21252
21253 func (c *AdvertisersInsertionOrdersGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersGetCall {
21254 c.ctx_ = ctx
21255 return c
21256 }
21257
21258
21259
21260 func (c *AdvertisersInsertionOrdersGetCall) Header() http.Header {
21261 if c.header_ == nil {
21262 c.header_ = make(http.Header)
21263 }
21264 return c.header_
21265 }
21266
21267 func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Response, error) {
21268 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21269 if c.ifNoneMatch_ != "" {
21270 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21271 }
21272 var body io.Reader = nil
21273 c.urlParams_.Set("alt", alt)
21274 c.urlParams_.Set("prettyPrint", "false")
21275 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}")
21276 urls += "?" + c.urlParams_.Encode()
21277 req, err := http.NewRequest("GET", urls, body)
21278 if err != nil {
21279 return nil, err
21280 }
21281 req.Header = reqHeaders
21282 googleapi.Expand(req.URL, map[string]string{
21283 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21284 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
21285 })
21286 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21287 }
21288
21289
21290
21291
21292
21293
21294 func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) {
21295 gensupport.SetOptions(c.urlParams_, opts...)
21296 res, err := c.doRequest("json")
21297 if res != nil && res.StatusCode == http.StatusNotModified {
21298 if res.Body != nil {
21299 res.Body.Close()
21300 }
21301 return nil, gensupport.WrapError(&googleapi.Error{
21302 Code: res.StatusCode,
21303 Header: res.Header,
21304 })
21305 }
21306 if err != nil {
21307 return nil, err
21308 }
21309 defer googleapi.CloseBody(res)
21310 if err := googleapi.CheckResponse(res); err != nil {
21311 return nil, gensupport.WrapError(err)
21312 }
21313 ret := &InsertionOrder{
21314 ServerResponse: googleapi.ServerResponse{
21315 Header: res.Header,
21316 HTTPStatusCode: res.StatusCode,
21317 },
21318 }
21319 target := &ret
21320 if err := gensupport.DecodeResponse(target, res); err != nil {
21321 return nil, err
21322 }
21323 return ret, nil
21324 }
21325
21326 type AdvertisersInsertionOrdersListCall struct {
21327 s *Service
21328 advertiserId int64
21329 urlParams_ gensupport.URLParams
21330 ifNoneMatch_ string
21331 ctx_ context.Context
21332 header_ http.Header
21333 }
21334
21335
21336
21337
21338
21339
21340 func (r *AdvertisersInsertionOrdersService) List(advertiserId int64) *AdvertisersInsertionOrdersListCall {
21341 c := &AdvertisersInsertionOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21342 c.advertiserId = advertiserId
21343 return c
21344 }
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365 func (c *AdvertisersInsertionOrdersListCall) Filter(filter string) *AdvertisersInsertionOrdersListCall {
21366 c.urlParams_.Set("filter", filter)
21367 return c
21368 }
21369
21370
21371
21372
21373
21374
21375 func (c *AdvertisersInsertionOrdersListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListCall {
21376 c.urlParams_.Set("orderBy", orderBy)
21377 return c
21378 }
21379
21380
21381
21382
21383 func (c *AdvertisersInsertionOrdersListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListCall {
21384 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21385 return c
21386 }
21387
21388
21389
21390
21391
21392 func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListCall {
21393 c.urlParams_.Set("pageToken", pageToken)
21394 return c
21395 }
21396
21397
21398
21399
21400 func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListCall {
21401 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21402 return c
21403 }
21404
21405
21406
21407
21408 func (c *AdvertisersInsertionOrdersListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListCall {
21409 c.ifNoneMatch_ = entityTag
21410 return c
21411 }
21412
21413
21414 func (c *AdvertisersInsertionOrdersListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListCall {
21415 c.ctx_ = ctx
21416 return c
21417 }
21418
21419
21420
21421 func (c *AdvertisersInsertionOrdersListCall) Header() http.Header {
21422 if c.header_ == nil {
21423 c.header_ = make(http.Header)
21424 }
21425 return c.header_
21426 }
21427
21428 func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Response, error) {
21429 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21430 if c.ifNoneMatch_ != "" {
21431 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21432 }
21433 var body io.Reader = nil
21434 c.urlParams_.Set("alt", alt)
21435 c.urlParams_.Set("prettyPrint", "false")
21436 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders")
21437 urls += "?" + c.urlParams_.Encode()
21438 req, err := http.NewRequest("GET", urls, body)
21439 if err != nil {
21440 return nil, err
21441 }
21442 req.Header = reqHeaders
21443 googleapi.Expand(req.URL, map[string]string{
21444 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21445 })
21446 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21447 }
21448
21449
21450
21451
21452
21453
21454
21455 func (c *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrdersResponse, error) {
21456 gensupport.SetOptions(c.urlParams_, opts...)
21457 res, err := c.doRequest("json")
21458 if res != nil && res.StatusCode == http.StatusNotModified {
21459 if res.Body != nil {
21460 res.Body.Close()
21461 }
21462 return nil, gensupport.WrapError(&googleapi.Error{
21463 Code: res.StatusCode,
21464 Header: res.Header,
21465 })
21466 }
21467 if err != nil {
21468 return nil, err
21469 }
21470 defer googleapi.CloseBody(res)
21471 if err := googleapi.CheckResponse(res); err != nil {
21472 return nil, gensupport.WrapError(err)
21473 }
21474 ret := &ListInsertionOrdersResponse{
21475 ServerResponse: googleapi.ServerResponse{
21476 Header: res.Header,
21477 HTTPStatusCode: res.StatusCode,
21478 },
21479 }
21480 target := &ret
21481 if err := gensupport.DecodeResponse(target, res); err != nil {
21482 return nil, err
21483 }
21484 return ret, nil
21485 }
21486
21487
21488
21489
21490 func (c *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(*ListInsertionOrdersResponse) error) error {
21491 c.ctx_ = ctx
21492 defer c.PageToken(c.urlParams_.Get("pageToken"))
21493 for {
21494 x, err := c.Do()
21495 if err != nil {
21496 return err
21497 }
21498 if err := f(x); err != nil {
21499 return err
21500 }
21501 if x.NextPageToken == "" {
21502 return nil
21503 }
21504 c.PageToken(x.NextPageToken)
21505 }
21506 }
21507
21508 type AdvertisersInsertionOrdersListAssignedTargetingOptionsCall struct {
21509 s *Service
21510 advertiserId int64
21511 insertionOrderId int64
21512 urlParams_ gensupport.URLParams
21513 ifNoneMatch_ string
21514 ctx_ context.Context
21515 header_ http.Header
21516 }
21517
21518
21519
21520
21521
21522
21523
21524 func (r *AdvertisersInsertionOrdersService) ListAssignedTargetingOptions(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
21525 c := &AdvertisersInsertionOrdersListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21526 c.advertiserId = advertiserId
21527 c.insertionOrderId = insertionOrderId
21528 return c
21529 }
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
21547 c.urlParams_.Set("filter", filter)
21548 return c
21549 }
21550
21551
21552
21553
21554
21555 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
21556 c.urlParams_.Set("orderBy", orderBy)
21557 return c
21558 }
21559
21560
21561
21562
21563
21564 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
21565 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
21566 return c
21567 }
21568
21569
21570
21571
21572
21573
21574 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
21575 c.urlParams_.Set("pageToken", pageToken)
21576 return c
21577 }
21578
21579
21580
21581
21582 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
21583 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21584 return c
21585 }
21586
21587
21588
21589
21590 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
21591 c.ifNoneMatch_ = entityTag
21592 return c
21593 }
21594
21595
21596 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall {
21597 c.ctx_ = ctx
21598 return c
21599 }
21600
21601
21602
21603 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Header() http.Header {
21604 if c.header_ == nil {
21605 c.header_ = make(http.Header)
21606 }
21607 return c.header_
21608 }
21609
21610 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
21611 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21612 if c.ifNoneMatch_ != "" {
21613 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21614 }
21615 var body io.Reader = nil
21616 c.urlParams_.Set("alt", alt)
21617 c.urlParams_.Set("prettyPrint", "false")
21618 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}:listAssignedTargetingOptions")
21619 urls += "?" + c.urlParams_.Encode()
21620 req, err := http.NewRequest("GET", urls, body)
21621 if err != nil {
21622 return nil, err
21623 }
21624 req.Header = reqHeaders
21625 googleapi.Expand(req.URL, map[string]string{
21626 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21627 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
21628 })
21629 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21630 }
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListInsertionOrderAssignedTargetingOptionsResponse, error) {
21641 gensupport.SetOptions(c.urlParams_, opts...)
21642 res, err := c.doRequest("json")
21643 if res != nil && res.StatusCode == http.StatusNotModified {
21644 if res.Body != nil {
21645 res.Body.Close()
21646 }
21647 return nil, gensupport.WrapError(&googleapi.Error{
21648 Code: res.StatusCode,
21649 Header: res.Header,
21650 })
21651 }
21652 if err != nil {
21653 return nil, err
21654 }
21655 defer googleapi.CloseBody(res)
21656 if err := googleapi.CheckResponse(res); err != nil {
21657 return nil, gensupport.WrapError(err)
21658 }
21659 ret := &BulkListInsertionOrderAssignedTargetingOptionsResponse{
21660 ServerResponse: googleapi.ServerResponse{
21661 Header: res.Header,
21662 HTTPStatusCode: res.StatusCode,
21663 },
21664 }
21665 target := &ret
21666 if err := gensupport.DecodeResponse(target, res); err != nil {
21667 return nil, err
21668 }
21669 return ret, nil
21670 }
21671
21672
21673
21674
21675 func (c *AdvertisersInsertionOrdersListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListInsertionOrderAssignedTargetingOptionsResponse) error) error {
21676 c.ctx_ = ctx
21677 defer c.PageToken(c.urlParams_.Get("pageToken"))
21678 for {
21679 x, err := c.Do()
21680 if err != nil {
21681 return err
21682 }
21683 if err := f(x); err != nil {
21684 return err
21685 }
21686 if x.NextPageToken == "" {
21687 return nil
21688 }
21689 c.PageToken(x.NextPageToken)
21690 }
21691 }
21692
21693 type AdvertisersInsertionOrdersPatchCall struct {
21694 s *Service
21695 advertiserId int64
21696 insertionOrderId int64
21697 insertionorder *InsertionOrder
21698 urlParams_ gensupport.URLParams
21699 ctx_ context.Context
21700 header_ http.Header
21701 }
21702
21703
21704
21705
21706
21707
21708
21709
21710 func (r *AdvertisersInsertionOrdersService) Patch(advertiserId int64, insertionOrderId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersPatchCall {
21711 c := &AdvertisersInsertionOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21712 c.advertiserId = advertiserId
21713 c.insertionOrderId = insertionOrderId
21714 c.insertionorder = insertionorder
21715 return c
21716 }
21717
21718
21719
21720 func (c *AdvertisersInsertionOrdersPatchCall) UpdateMask(updateMask string) *AdvertisersInsertionOrdersPatchCall {
21721 c.urlParams_.Set("updateMask", updateMask)
21722 return c
21723 }
21724
21725
21726
21727
21728 func (c *AdvertisersInsertionOrdersPatchCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersPatchCall {
21729 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21730 return c
21731 }
21732
21733
21734 func (c *AdvertisersInsertionOrdersPatchCall) Context(ctx context.Context) *AdvertisersInsertionOrdersPatchCall {
21735 c.ctx_ = ctx
21736 return c
21737 }
21738
21739
21740
21741 func (c *AdvertisersInsertionOrdersPatchCall) Header() http.Header {
21742 if c.header_ == nil {
21743 c.header_ = make(http.Header)
21744 }
21745 return c.header_
21746 }
21747
21748 func (c *AdvertisersInsertionOrdersPatchCall) doRequest(alt string) (*http.Response, error) {
21749 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21750 var body io.Reader = nil
21751 body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertionorder)
21752 if err != nil {
21753 return nil, err
21754 }
21755 c.urlParams_.Set("alt", alt)
21756 c.urlParams_.Set("prettyPrint", "false")
21757 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}")
21758 urls += "?" + c.urlParams_.Encode()
21759 req, err := http.NewRequest("PATCH", urls, body)
21760 if err != nil {
21761 return nil, err
21762 }
21763 req.Header = reqHeaders
21764 googleapi.Expand(req.URL, map[string]string{
21765 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21766 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
21767 })
21768 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21769 }
21770
21771
21772
21773
21774
21775
21776 func (c *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) {
21777 gensupport.SetOptions(c.urlParams_, opts...)
21778 res, err := c.doRequest("json")
21779 if res != nil && res.StatusCode == http.StatusNotModified {
21780 if res.Body != nil {
21781 res.Body.Close()
21782 }
21783 return nil, gensupport.WrapError(&googleapi.Error{
21784 Code: res.StatusCode,
21785 Header: res.Header,
21786 })
21787 }
21788 if err != nil {
21789 return nil, err
21790 }
21791 defer googleapi.CloseBody(res)
21792 if err := googleapi.CheckResponse(res); err != nil {
21793 return nil, gensupport.WrapError(err)
21794 }
21795 ret := &InsertionOrder{
21796 ServerResponse: googleapi.ServerResponse{
21797 Header: res.Header,
21798 HTTPStatusCode: res.StatusCode,
21799 },
21800 }
21801 target := &ret
21802 if err := gensupport.DecodeResponse(target, res); err != nil {
21803 return nil, err
21804 }
21805 return ret, nil
21806 }
21807
21808 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall struct {
21809 s *Service
21810 advertiserId int64
21811 insertionOrderId int64
21812 targetingType string
21813 assignedtargetingoption *AssignedTargetingOption
21814 urlParams_ gensupport.URLParams
21815 ctx_ context.Context
21816 header_ http.Header
21817 }
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, insertionOrderId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall {
21846 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21847 c.advertiserId = advertiserId
21848 c.insertionOrderId = insertionOrderId
21849 c.targetingType = targetingType
21850 c.assignedtargetingoption = assignedtargetingoption
21851 return c
21852 }
21853
21854
21855
21856
21857 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall {
21858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21859 return c
21860 }
21861
21862
21863 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall {
21864 c.ctx_ = ctx
21865 return c
21866 }
21867
21868
21869
21870 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header {
21871 if c.header_ == nil {
21872 c.header_ = make(http.Header)
21873 }
21874 return c.header_
21875 }
21876
21877 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) {
21878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21879 var body io.Reader = nil
21880 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption)
21881 if err != nil {
21882 return nil, err
21883 }
21884 c.urlParams_.Set("alt", alt)
21885 c.urlParams_.Set("prettyPrint", "false")
21886 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
21887 urls += "?" + c.urlParams_.Encode()
21888 req, err := http.NewRequest("POST", urls, body)
21889 if err != nil {
21890 return nil, err
21891 }
21892 req.Header = reqHeaders
21893 googleapi.Expand(req.URL, map[string]string{
21894 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
21895 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
21896 "targetingType": c.targetingType,
21897 })
21898 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21899 }
21900
21901
21902
21903
21904
21905
21906
21907 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
21908 gensupport.SetOptions(c.urlParams_, opts...)
21909 res, err := c.doRequest("json")
21910 if res != nil && res.StatusCode == http.StatusNotModified {
21911 if res.Body != nil {
21912 res.Body.Close()
21913 }
21914 return nil, gensupport.WrapError(&googleapi.Error{
21915 Code: res.StatusCode,
21916 Header: res.Header,
21917 })
21918 }
21919 if err != nil {
21920 return nil, err
21921 }
21922 defer googleapi.CloseBody(res)
21923 if err := googleapi.CheckResponse(res); err != nil {
21924 return nil, gensupport.WrapError(err)
21925 }
21926 ret := &AssignedTargetingOption{
21927 ServerResponse: googleapi.ServerResponse{
21928 Header: res.Header,
21929 HTTPStatusCode: res.StatusCode,
21930 },
21931 }
21932 target := &ret
21933 if err := gensupport.DecodeResponse(target, res); err != nil {
21934 return nil, err
21935 }
21936 return ret, nil
21937 }
21938
21939 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall struct {
21940 s *Service
21941 advertiserId int64
21942 insertionOrderId int64
21943 targetingType string
21944 assignedTargetingOptionId string
21945 urlParams_ gensupport.URLParams
21946 ctx_ context.Context
21947 header_ http.Header
21948 }
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall {
21978 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21979 c.advertiserId = advertiserId
21980 c.insertionOrderId = insertionOrderId
21981 c.targetingType = targetingType
21982 c.assignedTargetingOptionId = assignedTargetingOptionId
21983 return c
21984 }
21985
21986
21987
21988
21989 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall {
21990 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21991 return c
21992 }
21993
21994
21995 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall {
21996 c.ctx_ = ctx
21997 return c
21998 }
21999
22000
22001
22002 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header {
22003 if c.header_ == nil {
22004 c.header_ = make(http.Header)
22005 }
22006 return c.header_
22007 }
22008
22009 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
22010 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22011 var body io.Reader = nil
22012 c.urlParams_.Set("alt", alt)
22013 c.urlParams_.Set("prettyPrint", "false")
22014 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
22015 urls += "?" + c.urlParams_.Encode()
22016 req, err := http.NewRequest("DELETE", urls, body)
22017 if err != nil {
22018 return nil, err
22019 }
22020 req.Header = reqHeaders
22021 googleapi.Expand(req.URL, map[string]string{
22022 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22023 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
22024 "targetingType": c.targetingType,
22025 "assignedTargetingOptionId": c.assignedTargetingOptionId,
22026 })
22027 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22028 }
22029
22030
22031
22032
22033
22034
22035 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
22036 gensupport.SetOptions(c.urlParams_, opts...)
22037 res, err := c.doRequest("json")
22038 if res != nil && res.StatusCode == http.StatusNotModified {
22039 if res.Body != nil {
22040 res.Body.Close()
22041 }
22042 return nil, gensupport.WrapError(&googleapi.Error{
22043 Code: res.StatusCode,
22044 Header: res.Header,
22045 })
22046 }
22047 if err != nil {
22048 return nil, err
22049 }
22050 defer googleapi.CloseBody(res)
22051 if err := googleapi.CheckResponse(res); err != nil {
22052 return nil, gensupport.WrapError(err)
22053 }
22054 ret := &Empty{
22055 ServerResponse: googleapi.ServerResponse{
22056 Header: res.Header,
22057 HTTPStatusCode: res.StatusCode,
22058 },
22059 }
22060 target := &ret
22061 if err := gensupport.DecodeResponse(target, res); err != nil {
22062 return nil, err
22063 }
22064 return ret, nil
22065 }
22066
22067 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall struct {
22068 s *Service
22069 advertiserId int64
22070 insertionOrderId int64
22071 targetingType string
22072 assignedTargetingOptionId string
22073 urlParams_ gensupport.URLParams
22074 ifNoneMatch_ string
22075 ctx_ context.Context
22076 header_ http.Header
22077 }
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall {
22115 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22116 c.advertiserId = advertiserId
22117 c.insertionOrderId = insertionOrderId
22118 c.targetingType = targetingType
22119 c.assignedTargetingOptionId = assignedTargetingOptionId
22120 return c
22121 }
22122
22123
22124
22125
22126 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall {
22127 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22128 return c
22129 }
22130
22131
22132
22133
22134 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall {
22135 c.ifNoneMatch_ = entityTag
22136 return c
22137 }
22138
22139
22140 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall {
22141 c.ctx_ = ctx
22142 return c
22143 }
22144
22145
22146
22147 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
22148 if c.header_ == nil {
22149 c.header_ = make(http.Header)
22150 }
22151 return c.header_
22152 }
22153
22154 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
22155 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22156 if c.ifNoneMatch_ != "" {
22157 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22158 }
22159 var body io.Reader = nil
22160 c.urlParams_.Set("alt", alt)
22161 c.urlParams_.Set("prettyPrint", "false")
22162 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
22163 urls += "?" + c.urlParams_.Encode()
22164 req, err := http.NewRequest("GET", urls, body)
22165 if err != nil {
22166 return nil, err
22167 }
22168 req.Header = reqHeaders
22169 googleapi.Expand(req.URL, map[string]string{
22170 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22171 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
22172 "targetingType": c.targetingType,
22173 "assignedTargetingOptionId": c.assignedTargetingOptionId,
22174 })
22175 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22176 }
22177
22178
22179
22180
22181
22182
22183
22184 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
22185 gensupport.SetOptions(c.urlParams_, opts...)
22186 res, err := c.doRequest("json")
22187 if res != nil && res.StatusCode == http.StatusNotModified {
22188 if res.Body != nil {
22189 res.Body.Close()
22190 }
22191 return nil, gensupport.WrapError(&googleapi.Error{
22192 Code: res.StatusCode,
22193 Header: res.Header,
22194 })
22195 }
22196 if err != nil {
22197 return nil, err
22198 }
22199 defer googleapi.CloseBody(res)
22200 if err := googleapi.CheckResponse(res); err != nil {
22201 return nil, gensupport.WrapError(err)
22202 }
22203 ret := &AssignedTargetingOption{
22204 ServerResponse: googleapi.ServerResponse{
22205 Header: res.Header,
22206 HTTPStatusCode: res.StatusCode,
22207 },
22208 }
22209 target := &ret
22210 if err := gensupport.DecodeResponse(target, res); err != nil {
22211 return nil, err
22212 }
22213 return ret, nil
22214 }
22215
22216 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall struct {
22217 s *Service
22218 advertiserId int64
22219 insertionOrderId int64
22220 targetingType string
22221 urlParams_ gensupport.URLParams
22222 ifNoneMatch_ string
22223 ctx_ context.Context
22224 header_ http.Header
22225 }
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, insertionOrderId int64, targetingType string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
22260 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22261 c.advertiserId = advertiserId
22262 c.insertionOrderId = insertionOrderId
22263 c.targetingType = targetingType
22264 return c
22265 }
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
22281 c.urlParams_.Set("filter", filter)
22282 return c
22283 }
22284
22285
22286
22287
22288
22289
22290 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
22291 c.urlParams_.Set("orderBy", orderBy)
22292 return c
22293 }
22294
22295
22296
22297
22298 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
22299 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22300 return c
22301 }
22302
22303
22304
22305
22306
22307
22308 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
22309 c.urlParams_.Set("pageToken", pageToken)
22310 return c
22311 }
22312
22313
22314
22315
22316 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
22317 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22318 return c
22319 }
22320
22321
22322
22323
22324 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
22325 c.ifNoneMatch_ = entityTag
22326 return c
22327 }
22328
22329
22330 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall {
22331 c.ctx_ = ctx
22332 return c
22333 }
22334
22335
22336
22337 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
22338 if c.header_ == nil {
22339 c.header_ = make(http.Header)
22340 }
22341 return c.header_
22342 }
22343
22344 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
22345 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22346 if c.ifNoneMatch_ != "" {
22347 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22348 }
22349 var body io.Reader = nil
22350 c.urlParams_.Set("alt", alt)
22351 c.urlParams_.Set("prettyPrint", "false")
22352 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
22353 urls += "?" + c.urlParams_.Encode()
22354 req, err := http.NewRequest("GET", urls, body)
22355 if err != nil {
22356 return nil, err
22357 }
22358 req.Header = reqHeaders
22359 googleapi.Expand(req.URL, map[string]string{
22360 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22361 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10),
22362 "targetingType": c.targetingType,
22363 })
22364 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22365 }
22366
22367
22368
22369
22370
22371
22372
22373 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrderAssignedTargetingOptionsResponse, error) {
22374 gensupport.SetOptions(c.urlParams_, opts...)
22375 res, err := c.doRequest("json")
22376 if res != nil && res.StatusCode == http.StatusNotModified {
22377 if res.Body != nil {
22378 res.Body.Close()
22379 }
22380 return nil, gensupport.WrapError(&googleapi.Error{
22381 Code: res.StatusCode,
22382 Header: res.Header,
22383 })
22384 }
22385 if err != nil {
22386 return nil, err
22387 }
22388 defer googleapi.CloseBody(res)
22389 if err := googleapi.CheckResponse(res); err != nil {
22390 return nil, gensupport.WrapError(err)
22391 }
22392 ret := &ListInsertionOrderAssignedTargetingOptionsResponse{
22393 ServerResponse: googleapi.ServerResponse{
22394 Header: res.Header,
22395 HTTPStatusCode: res.StatusCode,
22396 },
22397 }
22398 target := &ret
22399 if err := gensupport.DecodeResponse(target, res); err != nil {
22400 return nil, err
22401 }
22402 return ret, nil
22403 }
22404
22405
22406
22407
22408 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListInsertionOrderAssignedTargetingOptionsResponse) error) error {
22409 c.ctx_ = ctx
22410 defer c.PageToken(c.urlParams_.Get("pageToken"))
22411 for {
22412 x, err := c.Do()
22413 if err != nil {
22414 return err
22415 }
22416 if err := f(x); err != nil {
22417 return err
22418 }
22419 if x.NextPageToken == "" {
22420 return nil
22421 }
22422 c.PageToken(x.NextPageToken)
22423 }
22424 }
22425
22426 type AdvertisersInvoicesListCall struct {
22427 s *Service
22428 advertiserId int64
22429 urlParams_ gensupport.URLParams
22430 ifNoneMatch_ string
22431 ctx_ context.Context
22432 header_ http.Header
22433 }
22434
22435
22436
22437
22438
22439
22440 func (r *AdvertisersInvoicesService) List(advertiserId int64) *AdvertisersInvoicesListCall {
22441 c := &AdvertisersInvoicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22442 c.advertiserId = advertiserId
22443 return c
22444 }
22445
22446
22447
22448
22449 func (c *AdvertisersInvoicesListCall) IssueMonth(issueMonth string) *AdvertisersInvoicesListCall {
22450 c.urlParams_.Set("issueMonth", issueMonth)
22451 return c
22452 }
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463 func (c *AdvertisersInvoicesListCall) LoiSapinInvoiceType(loiSapinInvoiceType string) *AdvertisersInvoicesListCall {
22464 c.urlParams_.Set("loiSapinInvoiceType", loiSapinInvoiceType)
22465 return c
22466 }
22467
22468
22469
22470
22471 func (c *AdvertisersInvoicesListCall) PageSize(pageSize int64) *AdvertisersInvoicesListCall {
22472 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22473 return c
22474 }
22475
22476
22477
22478
22479
22480 func (c *AdvertisersInvoicesListCall) PageToken(pageToken string) *AdvertisersInvoicesListCall {
22481 c.urlParams_.Set("pageToken", pageToken)
22482 return c
22483 }
22484
22485
22486
22487
22488 func (c *AdvertisersInvoicesListCall) Fields(s ...googleapi.Field) *AdvertisersInvoicesListCall {
22489 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22490 return c
22491 }
22492
22493
22494
22495
22496 func (c *AdvertisersInvoicesListCall) IfNoneMatch(entityTag string) *AdvertisersInvoicesListCall {
22497 c.ifNoneMatch_ = entityTag
22498 return c
22499 }
22500
22501
22502 func (c *AdvertisersInvoicesListCall) Context(ctx context.Context) *AdvertisersInvoicesListCall {
22503 c.ctx_ = ctx
22504 return c
22505 }
22506
22507
22508
22509 func (c *AdvertisersInvoicesListCall) Header() http.Header {
22510 if c.header_ == nil {
22511 c.header_ = make(http.Header)
22512 }
22513 return c.header_
22514 }
22515
22516 func (c *AdvertisersInvoicesListCall) doRequest(alt string) (*http.Response, error) {
22517 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22518 if c.ifNoneMatch_ != "" {
22519 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22520 }
22521 var body io.Reader = nil
22522 c.urlParams_.Set("alt", alt)
22523 c.urlParams_.Set("prettyPrint", "false")
22524 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/invoices")
22525 urls += "?" + c.urlParams_.Encode()
22526 req, err := http.NewRequest("GET", urls, body)
22527 if err != nil {
22528 return nil, err
22529 }
22530 req.Header = reqHeaders
22531 googleapi.Expand(req.URL, map[string]string{
22532 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22533 })
22534 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22535 }
22536
22537
22538
22539
22540
22541
22542
22543 func (c *AdvertisersInvoicesListCall) Do(opts ...googleapi.CallOption) (*ListInvoicesResponse, error) {
22544 gensupport.SetOptions(c.urlParams_, opts...)
22545 res, err := c.doRequest("json")
22546 if res != nil && res.StatusCode == http.StatusNotModified {
22547 if res.Body != nil {
22548 res.Body.Close()
22549 }
22550 return nil, gensupport.WrapError(&googleapi.Error{
22551 Code: res.StatusCode,
22552 Header: res.Header,
22553 })
22554 }
22555 if err != nil {
22556 return nil, err
22557 }
22558 defer googleapi.CloseBody(res)
22559 if err := googleapi.CheckResponse(res); err != nil {
22560 return nil, gensupport.WrapError(err)
22561 }
22562 ret := &ListInvoicesResponse{
22563 ServerResponse: googleapi.ServerResponse{
22564 Header: res.Header,
22565 HTTPStatusCode: res.StatusCode,
22566 },
22567 }
22568 target := &ret
22569 if err := gensupport.DecodeResponse(target, res); err != nil {
22570 return nil, err
22571 }
22572 return ret, nil
22573 }
22574
22575
22576
22577
22578 func (c *AdvertisersInvoicesListCall) Pages(ctx context.Context, f func(*ListInvoicesResponse) error) error {
22579 c.ctx_ = ctx
22580 defer c.PageToken(c.urlParams_.Get("pageToken"))
22581 for {
22582 x, err := c.Do()
22583 if err != nil {
22584 return err
22585 }
22586 if err := f(x); err != nil {
22587 return err
22588 }
22589 if x.NextPageToken == "" {
22590 return nil
22591 }
22592 c.PageToken(x.NextPageToken)
22593 }
22594 }
22595
22596 type AdvertisersInvoicesLookupInvoiceCurrencyCall struct {
22597 s *Service
22598 advertiserId int64
22599 urlParams_ gensupport.URLParams
22600 ifNoneMatch_ string
22601 ctx_ context.Context
22602 header_ http.Header
22603 }
22604
22605
22606
22607
22608
22609 func (r *AdvertisersInvoicesService) LookupInvoiceCurrency(advertiserId int64) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
22610 c := &AdvertisersInvoicesLookupInvoiceCurrencyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22611 c.advertiserId = advertiserId
22612 return c
22613 }
22614
22615
22616
22617
22618 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) InvoiceMonth(invoiceMonth string) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
22619 c.urlParams_.Set("invoiceMonth", invoiceMonth)
22620 return c
22621 }
22622
22623
22624
22625
22626 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Fields(s ...googleapi.Field) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
22627 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22628 return c
22629 }
22630
22631
22632
22633
22634 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) IfNoneMatch(entityTag string) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
22635 c.ifNoneMatch_ = entityTag
22636 return c
22637 }
22638
22639
22640 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Context(ctx context.Context) *AdvertisersInvoicesLookupInvoiceCurrencyCall {
22641 c.ctx_ = ctx
22642 return c
22643 }
22644
22645
22646
22647 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Header() http.Header {
22648 if c.header_ == nil {
22649 c.header_ = make(http.Header)
22650 }
22651 return c.header_
22652 }
22653
22654 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) doRequest(alt string) (*http.Response, error) {
22655 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22656 if c.ifNoneMatch_ != "" {
22657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22658 }
22659 var body io.Reader = nil
22660 c.urlParams_.Set("alt", alt)
22661 c.urlParams_.Set("prettyPrint", "false")
22662 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/invoices:lookupInvoiceCurrency")
22663 urls += "?" + c.urlParams_.Encode()
22664 req, err := http.NewRequest("GET", urls, body)
22665 if err != nil {
22666 return nil, err
22667 }
22668 req.Header = reqHeaders
22669 googleapi.Expand(req.URL, map[string]string{
22670 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22671 })
22672 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22673 }
22674
22675
22676
22677
22678
22679
22680
22681 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Do(opts ...googleapi.CallOption) (*LookupInvoiceCurrencyResponse, error) {
22682 gensupport.SetOptions(c.urlParams_, opts...)
22683 res, err := c.doRequest("json")
22684 if res != nil && res.StatusCode == http.StatusNotModified {
22685 if res.Body != nil {
22686 res.Body.Close()
22687 }
22688 return nil, gensupport.WrapError(&googleapi.Error{
22689 Code: res.StatusCode,
22690 Header: res.Header,
22691 })
22692 }
22693 if err != nil {
22694 return nil, err
22695 }
22696 defer googleapi.CloseBody(res)
22697 if err := googleapi.CheckResponse(res); err != nil {
22698 return nil, gensupport.WrapError(err)
22699 }
22700 ret := &LookupInvoiceCurrencyResponse{
22701 ServerResponse: googleapi.ServerResponse{
22702 Header: res.Header,
22703 HTTPStatusCode: res.StatusCode,
22704 },
22705 }
22706 target := &ret
22707 if err := gensupport.DecodeResponse(target, res); err != nil {
22708 return nil, err
22709 }
22710 return ret, nil
22711 }
22712
22713 type AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall struct {
22714 s *Service
22715 advertiserId int64
22716 bulkeditassignedtargetingoptionsrequest *BulkEditAssignedTargetingOptionsRequest
22717 urlParams_ gensupport.URLParams
22718 ctx_ context.Context
22719 header_ http.Header
22720 }
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733 func (r *AdvertisersLineItemsService) BulkEditAssignedTargetingOptions(advertiserId int64, bulkeditassignedtargetingoptionsrequest *BulkEditAssignedTargetingOptionsRequest) *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall {
22734 c := &AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22735 c.advertiserId = advertiserId
22736 c.bulkeditassignedtargetingoptionsrequest = bulkeditassignedtargetingoptionsrequest
22737 return c
22738 }
22739
22740
22741
22742
22743 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall {
22744 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22745 return c
22746 }
22747
22748
22749 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall {
22750 c.ctx_ = ctx
22751 return c
22752 }
22753
22754
22755
22756 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Header() http.Header {
22757 if c.header_ == nil {
22758 c.header_ = make(http.Header)
22759 }
22760 return c.header_
22761 }
22762
22763 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
22764 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22765 var body io.Reader = nil
22766 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassignedtargetingoptionsrequest)
22767 if err != nil {
22768 return nil, err
22769 }
22770 c.urlParams_.Set("alt", alt)
22771 c.urlParams_.Set("prettyPrint", "false")
22772 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems:bulkEditAssignedTargetingOptions")
22773 urls += "?" + c.urlParams_.Encode()
22774 req, err := http.NewRequest("POST", urls, body)
22775 if err != nil {
22776 return nil, err
22777 }
22778 req.Header = reqHeaders
22779 googleapi.Expand(req.URL, map[string]string{
22780 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22781 })
22782 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22783 }
22784
22785
22786
22787
22788
22789
22790
22791 func (c *AdvertisersLineItemsBulkEditAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedTargetingOptionsResponse, error) {
22792 gensupport.SetOptions(c.urlParams_, opts...)
22793 res, err := c.doRequest("json")
22794 if res != nil && res.StatusCode == http.StatusNotModified {
22795 if res.Body != nil {
22796 res.Body.Close()
22797 }
22798 return nil, gensupport.WrapError(&googleapi.Error{
22799 Code: res.StatusCode,
22800 Header: res.Header,
22801 })
22802 }
22803 if err != nil {
22804 return nil, err
22805 }
22806 defer googleapi.CloseBody(res)
22807 if err := googleapi.CheckResponse(res); err != nil {
22808 return nil, gensupport.WrapError(err)
22809 }
22810 ret := &BulkEditAssignedTargetingOptionsResponse{
22811 ServerResponse: googleapi.ServerResponse{
22812 Header: res.Header,
22813 HTTPStatusCode: res.StatusCode,
22814 },
22815 }
22816 target := &ret
22817 if err := gensupport.DecodeResponse(target, res); err != nil {
22818 return nil, err
22819 }
22820 return ret, nil
22821 }
22822
22823 type AdvertisersLineItemsBulkListAssignedTargetingOptionsCall struct {
22824 s *Service
22825 advertiserId int64
22826 urlParams_ gensupport.URLParams
22827 ifNoneMatch_ string
22828 ctx_ context.Context
22829 header_ http.Header
22830 }
22831
22832
22833
22834
22835
22836 func (r *AdvertisersLineItemsService) BulkListAssignedTargetingOptions(advertiserId int64) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22837 c := &AdvertisersLineItemsBulkListAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22838 c.advertiserId = advertiserId
22839 return c
22840 }
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22858 c.urlParams_.Set("filter", filter)
22859 return c
22860 }
22861
22862
22863
22864 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) LineItemIds(lineItemIds ...int64) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22865 var lineItemIds_ []string
22866 for _, v := range lineItemIds {
22867 lineItemIds_ = append(lineItemIds_, fmt.Sprint(v))
22868 }
22869 c.urlParams_.SetMulti("lineItemIds", lineItemIds_)
22870 return c
22871 }
22872
22873
22874
22875
22876
22877
22878 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22879 c.urlParams_.Set("orderBy", orderBy)
22880 return c
22881 }
22882
22883
22884
22885
22886
22887 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22888 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
22889 return c
22890 }
22891
22892
22893
22894
22895
22896
22897 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22898 c.urlParams_.Set("pageToken", pageToken)
22899 return c
22900 }
22901
22902
22903
22904
22905 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22906 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22907 return c
22908 }
22909
22910
22911
22912
22913 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22914 c.ifNoneMatch_ = entityTag
22915 return c
22916 }
22917
22918
22919 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall {
22920 c.ctx_ = ctx
22921 return c
22922 }
22923
22924
22925
22926 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Header() http.Header {
22927 if c.header_ == nil {
22928 c.header_ = make(http.Header)
22929 }
22930 return c.header_
22931 }
22932
22933 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
22934 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22935 if c.ifNoneMatch_ != "" {
22936 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22937 }
22938 var body io.Reader = nil
22939 c.urlParams_.Set("alt", alt)
22940 c.urlParams_.Set("prettyPrint", "false")
22941 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems:bulkListAssignedTargetingOptions")
22942 urls += "?" + c.urlParams_.Encode()
22943 req, err := http.NewRequest("GET", urls, body)
22944 if err != nil {
22945 return nil, err
22946 }
22947 req.Header = reqHeaders
22948 googleapi.Expand(req.URL, map[string]string{
22949 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
22950 })
22951 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22952 }
22953
22954
22955
22956
22957
22958
22959
22960 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListAssignedTargetingOptionsResponse, error) {
22961 gensupport.SetOptions(c.urlParams_, opts...)
22962 res, err := c.doRequest("json")
22963 if res != nil && res.StatusCode == http.StatusNotModified {
22964 if res.Body != nil {
22965 res.Body.Close()
22966 }
22967 return nil, gensupport.WrapError(&googleapi.Error{
22968 Code: res.StatusCode,
22969 Header: res.Header,
22970 })
22971 }
22972 if err != nil {
22973 return nil, err
22974 }
22975 defer googleapi.CloseBody(res)
22976 if err := googleapi.CheckResponse(res); err != nil {
22977 return nil, gensupport.WrapError(err)
22978 }
22979 ret := &BulkListAssignedTargetingOptionsResponse{
22980 ServerResponse: googleapi.ServerResponse{
22981 Header: res.Header,
22982 HTTPStatusCode: res.StatusCode,
22983 },
22984 }
22985 target := &ret
22986 if err := gensupport.DecodeResponse(target, res); err != nil {
22987 return nil, err
22988 }
22989 return ret, nil
22990 }
22991
22992
22993
22994
22995 func (c *AdvertisersLineItemsBulkListAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListAssignedTargetingOptionsResponse) error) error {
22996 c.ctx_ = ctx
22997 defer c.PageToken(c.urlParams_.Get("pageToken"))
22998 for {
22999 x, err := c.Do()
23000 if err != nil {
23001 return err
23002 }
23003 if err := f(x); err != nil {
23004 return err
23005 }
23006 if x.NextPageToken == "" {
23007 return nil
23008 }
23009 c.PageToken(x.NextPageToken)
23010 }
23011 }
23012
23013 type AdvertisersLineItemsBulkUpdateCall struct {
23014 s *Service
23015 advertiserId int64
23016 bulkupdatelineitemsrequest *BulkUpdateLineItemsRequest
23017 urlParams_ gensupport.URLParams
23018 ctx_ context.Context
23019 header_ http.Header
23020 }
23021
23022
23023
23024
23025
23026
23027
23028
23029 func (r *AdvertisersLineItemsService) BulkUpdate(advertiserId int64, bulkupdatelineitemsrequest *BulkUpdateLineItemsRequest) *AdvertisersLineItemsBulkUpdateCall {
23030 c := &AdvertisersLineItemsBulkUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23031 c.advertiserId = advertiserId
23032 c.bulkupdatelineitemsrequest = bulkupdatelineitemsrequest
23033 return c
23034 }
23035
23036
23037
23038
23039 func (c *AdvertisersLineItemsBulkUpdateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkUpdateCall {
23040 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23041 return c
23042 }
23043
23044
23045 func (c *AdvertisersLineItemsBulkUpdateCall) Context(ctx context.Context) *AdvertisersLineItemsBulkUpdateCall {
23046 c.ctx_ = ctx
23047 return c
23048 }
23049
23050
23051
23052 func (c *AdvertisersLineItemsBulkUpdateCall) Header() http.Header {
23053 if c.header_ == nil {
23054 c.header_ = make(http.Header)
23055 }
23056 return c.header_
23057 }
23058
23059 func (c *AdvertisersLineItemsBulkUpdateCall) doRequest(alt string) (*http.Response, error) {
23060 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23061 var body io.Reader = nil
23062 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkupdatelineitemsrequest)
23063 if err != nil {
23064 return nil, err
23065 }
23066 c.urlParams_.Set("alt", alt)
23067 c.urlParams_.Set("prettyPrint", "false")
23068 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems:bulkUpdate")
23069 urls += "?" + c.urlParams_.Encode()
23070 req, err := http.NewRequest("POST", urls, body)
23071 if err != nil {
23072 return nil, err
23073 }
23074 req.Header = reqHeaders
23075 googleapi.Expand(req.URL, map[string]string{
23076 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23077 })
23078 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23079 }
23080
23081
23082
23083
23084
23085
23086
23087 func (c *AdvertisersLineItemsBulkUpdateCall) Do(opts ...googleapi.CallOption) (*BulkUpdateLineItemsResponse, error) {
23088 gensupport.SetOptions(c.urlParams_, opts...)
23089 res, err := c.doRequest("json")
23090 if res != nil && res.StatusCode == http.StatusNotModified {
23091 if res.Body != nil {
23092 res.Body.Close()
23093 }
23094 return nil, gensupport.WrapError(&googleapi.Error{
23095 Code: res.StatusCode,
23096 Header: res.Header,
23097 })
23098 }
23099 if err != nil {
23100 return nil, err
23101 }
23102 defer googleapi.CloseBody(res)
23103 if err := googleapi.CheckResponse(res); err != nil {
23104 return nil, gensupport.WrapError(err)
23105 }
23106 ret := &BulkUpdateLineItemsResponse{
23107 ServerResponse: googleapi.ServerResponse{
23108 Header: res.Header,
23109 HTTPStatusCode: res.StatusCode,
23110 },
23111 }
23112 target := &ret
23113 if err := gensupport.DecodeResponse(target, res); err != nil {
23114 return nil, err
23115 }
23116 return ret, nil
23117 }
23118
23119 type AdvertisersLineItemsCreateCall struct {
23120 s *Service
23121 advertiserId int64
23122 lineitem *LineItem
23123 urlParams_ gensupport.URLParams
23124 ctx_ context.Context
23125 header_ http.Header
23126 }
23127
23128
23129
23130
23131
23132
23133
23134 func (r *AdvertisersLineItemsService) Create(advertiserId int64, lineitem *LineItem) *AdvertisersLineItemsCreateCall {
23135 c := &AdvertisersLineItemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23136 c.advertiserId = advertiserId
23137 c.lineitem = lineitem
23138 return c
23139 }
23140
23141
23142
23143
23144 func (c *AdvertisersLineItemsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsCreateCall {
23145 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23146 return c
23147 }
23148
23149
23150 func (c *AdvertisersLineItemsCreateCall) Context(ctx context.Context) *AdvertisersLineItemsCreateCall {
23151 c.ctx_ = ctx
23152 return c
23153 }
23154
23155
23156
23157 func (c *AdvertisersLineItemsCreateCall) Header() http.Header {
23158 if c.header_ == nil {
23159 c.header_ = make(http.Header)
23160 }
23161 return c.header_
23162 }
23163
23164 func (c *AdvertisersLineItemsCreateCall) doRequest(alt string) (*http.Response, error) {
23165 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23166 var body io.Reader = nil
23167 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lineitem)
23168 if err != nil {
23169 return nil, err
23170 }
23171 c.urlParams_.Set("alt", alt)
23172 c.urlParams_.Set("prettyPrint", "false")
23173 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems")
23174 urls += "?" + c.urlParams_.Encode()
23175 req, err := http.NewRequest("POST", urls, body)
23176 if err != nil {
23177 return nil, err
23178 }
23179 req.Header = reqHeaders
23180 googleapi.Expand(req.URL, map[string]string{
23181 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23182 })
23183 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23184 }
23185
23186
23187
23188
23189
23190
23191 func (c *AdvertisersLineItemsCreateCall) Do(opts ...googleapi.CallOption) (*LineItem, error) {
23192 gensupport.SetOptions(c.urlParams_, opts...)
23193 res, err := c.doRequest("json")
23194 if res != nil && res.StatusCode == http.StatusNotModified {
23195 if res.Body != nil {
23196 res.Body.Close()
23197 }
23198 return nil, gensupport.WrapError(&googleapi.Error{
23199 Code: res.StatusCode,
23200 Header: res.Header,
23201 })
23202 }
23203 if err != nil {
23204 return nil, err
23205 }
23206 defer googleapi.CloseBody(res)
23207 if err := googleapi.CheckResponse(res); err != nil {
23208 return nil, gensupport.WrapError(err)
23209 }
23210 ret := &LineItem{
23211 ServerResponse: googleapi.ServerResponse{
23212 Header: res.Header,
23213 HTTPStatusCode: res.StatusCode,
23214 },
23215 }
23216 target := &ret
23217 if err := gensupport.DecodeResponse(target, res); err != nil {
23218 return nil, err
23219 }
23220 return ret, nil
23221 }
23222
23223 type AdvertisersLineItemsDeleteCall struct {
23224 s *Service
23225 advertiserId int64
23226 lineItemId int64
23227 urlParams_ gensupport.URLParams
23228 ctx_ context.Context
23229 header_ http.Header
23230 }
23231
23232
23233
23234
23235
23236
23237
23238
23239 func (r *AdvertisersLineItemsService) Delete(advertiserId int64, lineItemId int64) *AdvertisersLineItemsDeleteCall {
23240 c := &AdvertisersLineItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23241 c.advertiserId = advertiserId
23242 c.lineItemId = lineItemId
23243 return c
23244 }
23245
23246
23247
23248
23249 func (c *AdvertisersLineItemsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsDeleteCall {
23250 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23251 return c
23252 }
23253
23254
23255 func (c *AdvertisersLineItemsDeleteCall) Context(ctx context.Context) *AdvertisersLineItemsDeleteCall {
23256 c.ctx_ = ctx
23257 return c
23258 }
23259
23260
23261
23262 func (c *AdvertisersLineItemsDeleteCall) Header() http.Header {
23263 if c.header_ == nil {
23264 c.header_ = make(http.Header)
23265 }
23266 return c.header_
23267 }
23268
23269 func (c *AdvertisersLineItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
23270 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23271 var body io.Reader = nil
23272 c.urlParams_.Set("alt", alt)
23273 c.urlParams_.Set("prettyPrint", "false")
23274 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems/{+lineItemId}")
23275 urls += "?" + c.urlParams_.Encode()
23276 req, err := http.NewRequest("DELETE", urls, body)
23277 if err != nil {
23278 return nil, err
23279 }
23280 req.Header = reqHeaders
23281 googleapi.Expand(req.URL, map[string]string{
23282 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23283 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
23284 })
23285 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23286 }
23287
23288
23289
23290
23291
23292
23293 func (c *AdvertisersLineItemsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
23294 gensupport.SetOptions(c.urlParams_, opts...)
23295 res, err := c.doRequest("json")
23296 if res != nil && res.StatusCode == http.StatusNotModified {
23297 if res.Body != nil {
23298 res.Body.Close()
23299 }
23300 return nil, gensupport.WrapError(&googleapi.Error{
23301 Code: res.StatusCode,
23302 Header: res.Header,
23303 })
23304 }
23305 if err != nil {
23306 return nil, err
23307 }
23308 defer googleapi.CloseBody(res)
23309 if err := googleapi.CheckResponse(res); err != nil {
23310 return nil, gensupport.WrapError(err)
23311 }
23312 ret := &Empty{
23313 ServerResponse: googleapi.ServerResponse{
23314 Header: res.Header,
23315 HTTPStatusCode: res.StatusCode,
23316 },
23317 }
23318 target := &ret
23319 if err := gensupport.DecodeResponse(target, res); err != nil {
23320 return nil, err
23321 }
23322 return ret, nil
23323 }
23324
23325 type AdvertisersLineItemsDuplicateCall struct {
23326 s *Service
23327 advertiserId int64
23328 lineItemId int64
23329 duplicatelineitemrequest *DuplicateLineItemRequest
23330 urlParams_ gensupport.URLParams
23331 ctx_ context.Context
23332 header_ http.Header
23333 }
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344 func (r *AdvertisersLineItemsService) Duplicate(advertiserId int64, lineItemId int64, duplicatelineitemrequest *DuplicateLineItemRequest) *AdvertisersLineItemsDuplicateCall {
23345 c := &AdvertisersLineItemsDuplicateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23346 c.advertiserId = advertiserId
23347 c.lineItemId = lineItemId
23348 c.duplicatelineitemrequest = duplicatelineitemrequest
23349 return c
23350 }
23351
23352
23353
23354
23355 func (c *AdvertisersLineItemsDuplicateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsDuplicateCall {
23356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23357 return c
23358 }
23359
23360
23361 func (c *AdvertisersLineItemsDuplicateCall) Context(ctx context.Context) *AdvertisersLineItemsDuplicateCall {
23362 c.ctx_ = ctx
23363 return c
23364 }
23365
23366
23367
23368 func (c *AdvertisersLineItemsDuplicateCall) Header() http.Header {
23369 if c.header_ == nil {
23370 c.header_ = make(http.Header)
23371 }
23372 return c.header_
23373 }
23374
23375 func (c *AdvertisersLineItemsDuplicateCall) 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.duplicatelineitemrequest)
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, "v3/advertisers/{+advertiserId}/lineItems/{+lineItemId}:duplicate")
23385 urls += "?" + c.urlParams_.Encode()
23386 req, err := http.NewRequest("POST", 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 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
23394 })
23395 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23396 }
23397
23398
23399
23400
23401
23402
23403
23404 func (c *AdvertisersLineItemsDuplicateCall) Do(opts ...googleapi.CallOption) (*DuplicateLineItemResponse, error) {
23405 gensupport.SetOptions(c.urlParams_, opts...)
23406 res, err := c.doRequest("json")
23407 if res != nil && res.StatusCode == http.StatusNotModified {
23408 if res.Body != nil {
23409 res.Body.Close()
23410 }
23411 return nil, gensupport.WrapError(&googleapi.Error{
23412 Code: res.StatusCode,
23413 Header: res.Header,
23414 })
23415 }
23416 if err != nil {
23417 return nil, err
23418 }
23419 defer googleapi.CloseBody(res)
23420 if err := googleapi.CheckResponse(res); err != nil {
23421 return nil, gensupport.WrapError(err)
23422 }
23423 ret := &DuplicateLineItemResponse{
23424 ServerResponse: googleapi.ServerResponse{
23425 Header: res.Header,
23426 HTTPStatusCode: res.StatusCode,
23427 },
23428 }
23429 target := &ret
23430 if err := gensupport.DecodeResponse(target, res); err != nil {
23431 return nil, err
23432 }
23433 return ret, nil
23434 }
23435
23436 type AdvertisersLineItemsGenerateDefaultCall struct {
23437 s *Service
23438 advertiserId int64
23439 generatedefaultlineitemrequest *GenerateDefaultLineItemRequest
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 *AdvertisersLineItemsService) GenerateDefault(advertiserId int64, generatedefaultlineitemrequest *GenerateDefaultLineItemRequest) *AdvertisersLineItemsGenerateDefaultCall {
23455 c := &AdvertisersLineItemsGenerateDefaultCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23456 c.advertiserId = advertiserId
23457 c.generatedefaultlineitemrequest = generatedefaultlineitemrequest
23458 return c
23459 }
23460
23461
23462
23463
23464 func (c *AdvertisersLineItemsGenerateDefaultCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsGenerateDefaultCall {
23465 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23466 return c
23467 }
23468
23469
23470 func (c *AdvertisersLineItemsGenerateDefaultCall) Context(ctx context.Context) *AdvertisersLineItemsGenerateDefaultCall {
23471 c.ctx_ = ctx
23472 return c
23473 }
23474
23475
23476
23477 func (c *AdvertisersLineItemsGenerateDefaultCall) Header() http.Header {
23478 if c.header_ == nil {
23479 c.header_ = make(http.Header)
23480 }
23481 return c.header_
23482 }
23483
23484 func (c *AdvertisersLineItemsGenerateDefaultCall) doRequest(alt string) (*http.Response, error) {
23485 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23486 var body io.Reader = nil
23487 body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatedefaultlineitemrequest)
23488 if err != nil {
23489 return nil, err
23490 }
23491 c.urlParams_.Set("alt", alt)
23492 c.urlParams_.Set("prettyPrint", "false")
23493 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems:generateDefault")
23494 urls += "?" + c.urlParams_.Encode()
23495 req, err := http.NewRequest("POST", urls, body)
23496 if err != nil {
23497 return nil, err
23498 }
23499 req.Header = reqHeaders
23500 googleapi.Expand(req.URL, map[string]string{
23501 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23502 })
23503 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23504 }
23505
23506
23507
23508
23509
23510
23511 func (c *AdvertisersLineItemsGenerateDefaultCall) Do(opts ...googleapi.CallOption) (*LineItem, error) {
23512 gensupport.SetOptions(c.urlParams_, opts...)
23513 res, err := c.doRequest("json")
23514 if res != nil && res.StatusCode == http.StatusNotModified {
23515 if res.Body != nil {
23516 res.Body.Close()
23517 }
23518 return nil, gensupport.WrapError(&googleapi.Error{
23519 Code: res.StatusCode,
23520 Header: res.Header,
23521 })
23522 }
23523 if err != nil {
23524 return nil, err
23525 }
23526 defer googleapi.CloseBody(res)
23527 if err := googleapi.CheckResponse(res); err != nil {
23528 return nil, gensupport.WrapError(err)
23529 }
23530 ret := &LineItem{
23531 ServerResponse: googleapi.ServerResponse{
23532 Header: res.Header,
23533 HTTPStatusCode: res.StatusCode,
23534 },
23535 }
23536 target := &ret
23537 if err := gensupport.DecodeResponse(target, res); err != nil {
23538 return nil, err
23539 }
23540 return ret, nil
23541 }
23542
23543 type AdvertisersLineItemsGetCall struct {
23544 s *Service
23545 advertiserId int64
23546 lineItemId int64
23547 urlParams_ gensupport.URLParams
23548 ifNoneMatch_ string
23549 ctx_ context.Context
23550 header_ http.Header
23551 }
23552
23553
23554
23555
23556
23557 func (r *AdvertisersLineItemsService) Get(advertiserId int64, lineItemId int64) *AdvertisersLineItemsGetCall {
23558 c := &AdvertisersLineItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23559 c.advertiserId = advertiserId
23560 c.lineItemId = lineItemId
23561 return c
23562 }
23563
23564
23565
23566
23567 func (c *AdvertisersLineItemsGetCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsGetCall {
23568 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23569 return c
23570 }
23571
23572
23573
23574
23575 func (c *AdvertisersLineItemsGetCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsGetCall {
23576 c.ifNoneMatch_ = entityTag
23577 return c
23578 }
23579
23580
23581 func (c *AdvertisersLineItemsGetCall) Context(ctx context.Context) *AdvertisersLineItemsGetCall {
23582 c.ctx_ = ctx
23583 return c
23584 }
23585
23586
23587
23588 func (c *AdvertisersLineItemsGetCall) Header() http.Header {
23589 if c.header_ == nil {
23590 c.header_ = make(http.Header)
23591 }
23592 return c.header_
23593 }
23594
23595 func (c *AdvertisersLineItemsGetCall) doRequest(alt string) (*http.Response, error) {
23596 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23597 if c.ifNoneMatch_ != "" {
23598 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23599 }
23600 var body io.Reader = nil
23601 c.urlParams_.Set("alt", alt)
23602 c.urlParams_.Set("prettyPrint", "false")
23603 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems/{+lineItemId}")
23604 urls += "?" + c.urlParams_.Encode()
23605 req, err := http.NewRequest("GET", urls, body)
23606 if err != nil {
23607 return nil, err
23608 }
23609 req.Header = reqHeaders
23610 googleapi.Expand(req.URL, map[string]string{
23611 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23612 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
23613 })
23614 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23615 }
23616
23617
23618
23619
23620
23621
23622 func (c *AdvertisersLineItemsGetCall) Do(opts ...googleapi.CallOption) (*LineItem, 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 := &LineItem{
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 AdvertisersLineItemsListCall struct {
23655 s *Service
23656 advertiserId int64
23657 urlParams_ gensupport.URLParams
23658 ifNoneMatch_ string
23659 ctx_ context.Context
23660 header_ http.Header
23661 }
23662
23663
23664
23665
23666
23667
23668 func (r *AdvertisersLineItemsService) List(advertiserId int64) *AdvertisersLineItemsListCall {
23669 c := &AdvertisersLineItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23670 c.advertiserId = advertiserId
23671 return c
23672 }
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695 func (c *AdvertisersLineItemsListCall) Filter(filter string) *AdvertisersLineItemsListCall {
23696 c.urlParams_.Set("filter", filter)
23697 return c
23698 }
23699
23700
23701
23702
23703
23704
23705 func (c *AdvertisersLineItemsListCall) OrderBy(orderBy string) *AdvertisersLineItemsListCall {
23706 c.urlParams_.Set("orderBy", orderBy)
23707 return c
23708 }
23709
23710
23711
23712
23713 func (c *AdvertisersLineItemsListCall) PageSize(pageSize int64) *AdvertisersLineItemsListCall {
23714 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
23715 return c
23716 }
23717
23718
23719
23720
23721
23722 func (c *AdvertisersLineItemsListCall) PageToken(pageToken string) *AdvertisersLineItemsListCall {
23723 c.urlParams_.Set("pageToken", pageToken)
23724 return c
23725 }
23726
23727
23728
23729
23730 func (c *AdvertisersLineItemsListCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsListCall {
23731 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23732 return c
23733 }
23734
23735
23736
23737
23738 func (c *AdvertisersLineItemsListCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsListCall {
23739 c.ifNoneMatch_ = entityTag
23740 return c
23741 }
23742
23743
23744 func (c *AdvertisersLineItemsListCall) Context(ctx context.Context) *AdvertisersLineItemsListCall {
23745 c.ctx_ = ctx
23746 return c
23747 }
23748
23749
23750
23751 func (c *AdvertisersLineItemsListCall) Header() http.Header {
23752 if c.header_ == nil {
23753 c.header_ = make(http.Header)
23754 }
23755 return c.header_
23756 }
23757
23758 func (c *AdvertisersLineItemsListCall) doRequest(alt string) (*http.Response, error) {
23759 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23760 if c.ifNoneMatch_ != "" {
23761 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23762 }
23763 var body io.Reader = nil
23764 c.urlParams_.Set("alt", alt)
23765 c.urlParams_.Set("prettyPrint", "false")
23766 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems")
23767 urls += "?" + c.urlParams_.Encode()
23768 req, err := http.NewRequest("GET", urls, body)
23769 if err != nil {
23770 return nil, err
23771 }
23772 req.Header = reqHeaders
23773 googleapi.Expand(req.URL, map[string]string{
23774 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23775 })
23776 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23777 }
23778
23779
23780
23781
23782
23783
23784
23785 func (c *AdvertisersLineItemsListCall) Do(opts ...googleapi.CallOption) (*ListLineItemsResponse, error) {
23786 gensupport.SetOptions(c.urlParams_, opts...)
23787 res, err := c.doRequest("json")
23788 if res != nil && res.StatusCode == http.StatusNotModified {
23789 if res.Body != nil {
23790 res.Body.Close()
23791 }
23792 return nil, gensupport.WrapError(&googleapi.Error{
23793 Code: res.StatusCode,
23794 Header: res.Header,
23795 })
23796 }
23797 if err != nil {
23798 return nil, err
23799 }
23800 defer googleapi.CloseBody(res)
23801 if err := googleapi.CheckResponse(res); err != nil {
23802 return nil, gensupport.WrapError(err)
23803 }
23804 ret := &ListLineItemsResponse{
23805 ServerResponse: googleapi.ServerResponse{
23806 Header: res.Header,
23807 HTTPStatusCode: res.StatusCode,
23808 },
23809 }
23810 target := &ret
23811 if err := gensupport.DecodeResponse(target, res); err != nil {
23812 return nil, err
23813 }
23814 return ret, nil
23815 }
23816
23817
23818
23819
23820 func (c *AdvertisersLineItemsListCall) Pages(ctx context.Context, f func(*ListLineItemsResponse) error) error {
23821 c.ctx_ = ctx
23822 defer c.PageToken(c.urlParams_.Get("pageToken"))
23823 for {
23824 x, err := c.Do()
23825 if err != nil {
23826 return err
23827 }
23828 if err := f(x); err != nil {
23829 return err
23830 }
23831 if x.NextPageToken == "" {
23832 return nil
23833 }
23834 c.PageToken(x.NextPageToken)
23835 }
23836 }
23837
23838 type AdvertisersLineItemsPatchCall struct {
23839 s *Service
23840 advertiserId int64
23841 lineItemId int64
23842 lineitem *LineItem
23843 urlParams_ gensupport.URLParams
23844 ctx_ context.Context
23845 header_ http.Header
23846 }
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863 func (r *AdvertisersLineItemsService) Patch(advertiserId int64, lineItemId int64, lineitem *LineItem) *AdvertisersLineItemsPatchCall {
23864 c := &AdvertisersLineItemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23865 c.advertiserId = advertiserId
23866 c.lineItemId = lineItemId
23867 c.lineitem = lineitem
23868 return c
23869 }
23870
23871
23872
23873 func (c *AdvertisersLineItemsPatchCall) UpdateMask(updateMask string) *AdvertisersLineItemsPatchCall {
23874 c.urlParams_.Set("updateMask", updateMask)
23875 return c
23876 }
23877
23878
23879
23880
23881 func (c *AdvertisersLineItemsPatchCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsPatchCall {
23882 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23883 return c
23884 }
23885
23886
23887 func (c *AdvertisersLineItemsPatchCall) Context(ctx context.Context) *AdvertisersLineItemsPatchCall {
23888 c.ctx_ = ctx
23889 return c
23890 }
23891
23892
23893
23894 func (c *AdvertisersLineItemsPatchCall) Header() http.Header {
23895 if c.header_ == nil {
23896 c.header_ = make(http.Header)
23897 }
23898 return c.header_
23899 }
23900
23901 func (c *AdvertisersLineItemsPatchCall) doRequest(alt string) (*http.Response, error) {
23902 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23903 var body io.Reader = nil
23904 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lineitem)
23905 if err != nil {
23906 return nil, err
23907 }
23908 c.urlParams_.Set("alt", alt)
23909 c.urlParams_.Set("prettyPrint", "false")
23910 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems/{+lineItemId}")
23911 urls += "?" + c.urlParams_.Encode()
23912 req, err := http.NewRequest("PATCH", urls, body)
23913 if err != nil {
23914 return nil, err
23915 }
23916 req.Header = reqHeaders
23917 googleapi.Expand(req.URL, map[string]string{
23918 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
23919 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
23920 })
23921 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23922 }
23923
23924
23925
23926
23927
23928
23929 func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineItem, error) {
23930 gensupport.SetOptions(c.urlParams_, opts...)
23931 res, err := c.doRequest("json")
23932 if res != nil && res.StatusCode == http.StatusNotModified {
23933 if res.Body != nil {
23934 res.Body.Close()
23935 }
23936 return nil, gensupport.WrapError(&googleapi.Error{
23937 Code: res.StatusCode,
23938 Header: res.Header,
23939 })
23940 }
23941 if err != nil {
23942 return nil, err
23943 }
23944 defer googleapi.CloseBody(res)
23945 if err := googleapi.CheckResponse(res); err != nil {
23946 return nil, gensupport.WrapError(err)
23947 }
23948 ret := &LineItem{
23949 ServerResponse: googleapi.ServerResponse{
23950 Header: res.Header,
23951 HTTPStatusCode: res.StatusCode,
23952 },
23953 }
23954 target := &ret
23955 if err := gensupport.DecodeResponse(target, res); err != nil {
23956 return nil, err
23957 }
23958 return ret, nil
23959 }
23960
23961 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall struct {
23962 s *Service
23963 advertiserId int64
23964 lineItemId int64
23965 targetingType string
23966 assignedtargetingoption *AssignedTargetingOption
23967 urlParams_ gensupport.URLParams
23968 ctx_ context.Context
23969 header_ http.Header
23970 }
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, lineItemId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall {
24010 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24011 c.advertiserId = advertiserId
24012 c.lineItemId = lineItemId
24013 c.targetingType = targetingType
24014 c.assignedtargetingoption = assignedtargetingoption
24015 return c
24016 }
24017
24018
24019
24020
24021 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall {
24022 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24023 return c
24024 }
24025
24026
24027 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall {
24028 c.ctx_ = ctx
24029 return c
24030 }
24031
24032
24033
24034 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header {
24035 if c.header_ == nil {
24036 c.header_ = make(http.Header)
24037 }
24038 return c.header_
24039 }
24040
24041 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) {
24042 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24043 var body io.Reader = nil
24044 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption)
24045 if err != nil {
24046 return nil, err
24047 }
24048 c.urlParams_.Set("alt", alt)
24049 c.urlParams_.Set("prettyPrint", "false")
24050 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
24051 urls += "?" + c.urlParams_.Encode()
24052 req, err := http.NewRequest("POST", urls, body)
24053 if err != nil {
24054 return nil, err
24055 }
24056 req.Header = reqHeaders
24057 googleapi.Expand(req.URL, map[string]string{
24058 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24059 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
24060 "targetingType": c.targetingType,
24061 })
24062 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24063 }
24064
24065
24066
24067
24068
24069
24070
24071 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
24072 gensupport.SetOptions(c.urlParams_, opts...)
24073 res, err := c.doRequest("json")
24074 if res != nil && res.StatusCode == http.StatusNotModified {
24075 if res.Body != nil {
24076 res.Body.Close()
24077 }
24078 return nil, gensupport.WrapError(&googleapi.Error{
24079 Code: res.StatusCode,
24080 Header: res.Header,
24081 })
24082 }
24083 if err != nil {
24084 return nil, err
24085 }
24086 defer googleapi.CloseBody(res)
24087 if err := googleapi.CheckResponse(res); err != nil {
24088 return nil, gensupport.WrapError(err)
24089 }
24090 ret := &AssignedTargetingOption{
24091 ServerResponse: googleapi.ServerResponse{
24092 Header: res.Header,
24093 HTTPStatusCode: res.StatusCode,
24094 },
24095 }
24096 target := &ret
24097 if err := gensupport.DecodeResponse(target, res); err != nil {
24098 return nil, err
24099 }
24100 return ret, nil
24101 }
24102
24103 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall struct {
24104 s *Service
24105 advertiserId int64
24106 lineItemId int64
24107 targetingType string
24108 assignedTargetingOptionId string
24109 urlParams_ gensupport.URLParams
24110 ctx_ context.Context
24111 header_ http.Header
24112 }
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, lineItemId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall {
24154 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24155 c.advertiserId = advertiserId
24156 c.lineItemId = lineItemId
24157 c.targetingType = targetingType
24158 c.assignedTargetingOptionId = assignedTargetingOptionId
24159 return c
24160 }
24161
24162
24163
24164
24165 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall {
24166 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24167 return c
24168 }
24169
24170
24171 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall {
24172 c.ctx_ = ctx
24173 return c
24174 }
24175
24176
24177
24178 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header {
24179 if c.header_ == nil {
24180 c.header_ = make(http.Header)
24181 }
24182 return c.header_
24183 }
24184
24185 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
24186 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24187 var body io.Reader = nil
24188 c.urlParams_.Set("alt", alt)
24189 c.urlParams_.Set("prettyPrint", "false")
24190 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
24191 urls += "?" + c.urlParams_.Encode()
24192 req, err := http.NewRequest("DELETE", urls, body)
24193 if err != nil {
24194 return nil, err
24195 }
24196 req.Header = reqHeaders
24197 googleapi.Expand(req.URL, map[string]string{
24198 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24199 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
24200 "targetingType": c.targetingType,
24201 "assignedTargetingOptionId": c.assignedTargetingOptionId,
24202 })
24203 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24204 }
24205
24206
24207
24208
24209
24210
24211 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
24212 gensupport.SetOptions(c.urlParams_, opts...)
24213 res, err := c.doRequest("json")
24214 if res != nil && res.StatusCode == http.StatusNotModified {
24215 if res.Body != nil {
24216 res.Body.Close()
24217 }
24218 return nil, gensupport.WrapError(&googleapi.Error{
24219 Code: res.StatusCode,
24220 Header: res.Header,
24221 })
24222 }
24223 if err != nil {
24224 return nil, err
24225 }
24226 defer googleapi.CloseBody(res)
24227 if err := googleapi.CheckResponse(res); err != nil {
24228 return nil, gensupport.WrapError(err)
24229 }
24230 ret := &Empty{
24231 ServerResponse: googleapi.ServerResponse{
24232 Header: res.Header,
24233 HTTPStatusCode: res.StatusCode,
24234 },
24235 }
24236 target := &ret
24237 if err := gensupport.DecodeResponse(target, res); err != nil {
24238 return nil, err
24239 }
24240 return ret, nil
24241 }
24242
24243 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall struct {
24244 s *Service
24245 advertiserId int64
24246 lineItemId int64
24247 targetingType string
24248 assignedTargetingOptionId string
24249 urlParams_ gensupport.URLParams
24250 ifNoneMatch_ string
24251 ctx_ context.Context
24252 header_ http.Header
24253 }
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, lineItemId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall {
24295 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24296 c.advertiserId = advertiserId
24297 c.lineItemId = lineItemId
24298 c.targetingType = targetingType
24299 c.assignedTargetingOptionId = assignedTargetingOptionId
24300 return c
24301 }
24302
24303
24304
24305
24306 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall {
24307 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24308 return c
24309 }
24310
24311
24312
24313
24314 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall {
24315 c.ifNoneMatch_ = entityTag
24316 return c
24317 }
24318
24319
24320 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall {
24321 c.ctx_ = ctx
24322 return c
24323 }
24324
24325
24326
24327 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
24328 if c.header_ == nil {
24329 c.header_ = make(http.Header)
24330 }
24331 return c.header_
24332 }
24333
24334 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
24335 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24336 if c.ifNoneMatch_ != "" {
24337 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24338 }
24339 var body io.Reader = nil
24340 c.urlParams_.Set("alt", alt)
24341 c.urlParams_.Set("prettyPrint", "false")
24342 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
24343 urls += "?" + c.urlParams_.Encode()
24344 req, err := http.NewRequest("GET", urls, body)
24345 if err != nil {
24346 return nil, err
24347 }
24348 req.Header = reqHeaders
24349 googleapi.Expand(req.URL, map[string]string{
24350 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24351 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
24352 "targetingType": c.targetingType,
24353 "assignedTargetingOptionId": c.assignedTargetingOptionId,
24354 })
24355 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24356 }
24357
24358
24359
24360
24361
24362
24363
24364 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
24365 gensupport.SetOptions(c.urlParams_, opts...)
24366 res, err := c.doRequest("json")
24367 if res != nil && res.StatusCode == http.StatusNotModified {
24368 if res.Body != nil {
24369 res.Body.Close()
24370 }
24371 return nil, gensupport.WrapError(&googleapi.Error{
24372 Code: res.StatusCode,
24373 Header: res.Header,
24374 })
24375 }
24376 if err != nil {
24377 return nil, err
24378 }
24379 defer googleapi.CloseBody(res)
24380 if err := googleapi.CheckResponse(res); err != nil {
24381 return nil, gensupport.WrapError(err)
24382 }
24383 ret := &AssignedTargetingOption{
24384 ServerResponse: googleapi.ServerResponse{
24385 Header: res.Header,
24386 HTTPStatusCode: res.StatusCode,
24387 },
24388 }
24389 target := &ret
24390 if err := gensupport.DecodeResponse(target, res); err != nil {
24391 return nil, err
24392 }
24393 return ret, nil
24394 }
24395
24396 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall struct {
24397 s *Service
24398 advertiserId int64
24399 lineItemId int64
24400 targetingType string
24401 urlParams_ gensupport.URLParams
24402 ifNoneMatch_ string
24403 ctx_ context.Context
24404 header_ http.Header
24405 }
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, lineItemId int64, targetingType string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
24444 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24445 c.advertiserId = advertiserId
24446 c.lineItemId = lineItemId
24447 c.targetingType = targetingType
24448 return c
24449 }
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
24465 c.urlParams_.Set("filter", filter)
24466 return c
24467 }
24468
24469
24470
24471
24472
24473
24474 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
24475 c.urlParams_.Set("orderBy", orderBy)
24476 return c
24477 }
24478
24479
24480
24481
24482 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
24483 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24484 return c
24485 }
24486
24487
24488
24489
24490
24491
24492 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
24493 c.urlParams_.Set("pageToken", pageToken)
24494 return c
24495 }
24496
24497
24498
24499
24500 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
24501 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24502 return c
24503 }
24504
24505
24506
24507
24508 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
24509 c.ifNoneMatch_ = entityTag
24510 return c
24511 }
24512
24513
24514 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall {
24515 c.ctx_ = ctx
24516 return c
24517 }
24518
24519
24520
24521 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
24522 if c.header_ == nil {
24523 c.header_ = make(http.Header)
24524 }
24525 return c.header_
24526 }
24527
24528 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
24529 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24530 if c.ifNoneMatch_ != "" {
24531 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24532 }
24533 var body io.Reader = nil
24534 c.urlParams_.Set("alt", alt)
24535 c.urlParams_.Set("prettyPrint", "false")
24536 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
24537 urls += "?" + c.urlParams_.Encode()
24538 req, err := http.NewRequest("GET", urls, body)
24539 if err != nil {
24540 return nil, err
24541 }
24542 req.Header = reqHeaders
24543 googleapi.Expand(req.URL, map[string]string{
24544 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24545 "lineItemId": strconv.FormatInt(c.lineItemId, 10),
24546 "targetingType": c.targetingType,
24547 })
24548 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24549 }
24550
24551
24552
24553
24554
24555
24556
24557 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListLineItemAssignedTargetingOptionsResponse, error) {
24558 gensupport.SetOptions(c.urlParams_, opts...)
24559 res, err := c.doRequest("json")
24560 if res != nil && res.StatusCode == http.StatusNotModified {
24561 if res.Body != nil {
24562 res.Body.Close()
24563 }
24564 return nil, gensupport.WrapError(&googleapi.Error{
24565 Code: res.StatusCode,
24566 Header: res.Header,
24567 })
24568 }
24569 if err != nil {
24570 return nil, err
24571 }
24572 defer googleapi.CloseBody(res)
24573 if err := googleapi.CheckResponse(res); err != nil {
24574 return nil, gensupport.WrapError(err)
24575 }
24576 ret := &ListLineItemAssignedTargetingOptionsResponse{
24577 ServerResponse: googleapi.ServerResponse{
24578 Header: res.Header,
24579 HTTPStatusCode: res.StatusCode,
24580 },
24581 }
24582 target := &ret
24583 if err := gensupport.DecodeResponse(target, res); err != nil {
24584 return nil, err
24585 }
24586 return ret, nil
24587 }
24588
24589
24590
24591
24592 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListLineItemAssignedTargetingOptionsResponse) error) error {
24593 c.ctx_ = ctx
24594 defer c.PageToken(c.urlParams_.Get("pageToken"))
24595 for {
24596 x, err := c.Do()
24597 if err != nil {
24598 return err
24599 }
24600 if err := f(x); err != nil {
24601 return err
24602 }
24603 if x.NextPageToken == "" {
24604 return nil
24605 }
24606 c.PageToken(x.NextPageToken)
24607 }
24608 }
24609
24610 type AdvertisersLocationListsCreateCall struct {
24611 s *Service
24612 advertiserId int64
24613 locationlist *LocationList
24614 urlParams_ gensupport.URLParams
24615 ctx_ context.Context
24616 header_ http.Header
24617 }
24618
24619
24620
24621
24622
24623
24624 func (r *AdvertisersLocationListsService) Create(advertiserId int64, locationlist *LocationList) *AdvertisersLocationListsCreateCall {
24625 c := &AdvertisersLocationListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24626 c.advertiserId = advertiserId
24627 c.locationlist = locationlist
24628 return c
24629 }
24630
24631
24632
24633
24634 func (c *AdvertisersLocationListsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsCreateCall {
24635 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24636 return c
24637 }
24638
24639
24640 func (c *AdvertisersLocationListsCreateCall) Context(ctx context.Context) *AdvertisersLocationListsCreateCall {
24641 c.ctx_ = ctx
24642 return c
24643 }
24644
24645
24646
24647 func (c *AdvertisersLocationListsCreateCall) Header() http.Header {
24648 if c.header_ == nil {
24649 c.header_ = make(http.Header)
24650 }
24651 return c.header_
24652 }
24653
24654 func (c *AdvertisersLocationListsCreateCall) doRequest(alt string) (*http.Response, error) {
24655 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24656 var body io.Reader = nil
24657 body, err := googleapi.WithoutDataWrapper.JSONReader(c.locationlist)
24658 if err != nil {
24659 return nil, err
24660 }
24661 c.urlParams_.Set("alt", alt)
24662 c.urlParams_.Set("prettyPrint", "false")
24663 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/locationLists")
24664 urls += "?" + c.urlParams_.Encode()
24665 req, err := http.NewRequest("POST", urls, body)
24666 if err != nil {
24667 return nil, err
24668 }
24669 req.Header = reqHeaders
24670 googleapi.Expand(req.URL, map[string]string{
24671 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24672 })
24673 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24674 }
24675
24676
24677
24678
24679
24680
24681 func (c *AdvertisersLocationListsCreateCall) Do(opts ...googleapi.CallOption) (*LocationList, error) {
24682 gensupport.SetOptions(c.urlParams_, opts...)
24683 res, err := c.doRequest("json")
24684 if res != nil && res.StatusCode == http.StatusNotModified {
24685 if res.Body != nil {
24686 res.Body.Close()
24687 }
24688 return nil, gensupport.WrapError(&googleapi.Error{
24689 Code: res.StatusCode,
24690 Header: res.Header,
24691 })
24692 }
24693 if err != nil {
24694 return nil, err
24695 }
24696 defer googleapi.CloseBody(res)
24697 if err := googleapi.CheckResponse(res); err != nil {
24698 return nil, gensupport.WrapError(err)
24699 }
24700 ret := &LocationList{
24701 ServerResponse: googleapi.ServerResponse{
24702 Header: res.Header,
24703 HTTPStatusCode: res.StatusCode,
24704 },
24705 }
24706 target := &ret
24707 if err := gensupport.DecodeResponse(target, res); err != nil {
24708 return nil, err
24709 }
24710 return ret, nil
24711 }
24712
24713 type AdvertisersLocationListsGetCall struct {
24714 s *Service
24715 advertiserId int64
24716 locationListId int64
24717 urlParams_ gensupport.URLParams
24718 ifNoneMatch_ string
24719 ctx_ context.Context
24720 header_ http.Header
24721 }
24722
24723
24724
24725
24726
24727
24728 func (r *AdvertisersLocationListsService) Get(advertiserId int64, locationListId int64) *AdvertisersLocationListsGetCall {
24729 c := &AdvertisersLocationListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24730 c.advertiserId = advertiserId
24731 c.locationListId = locationListId
24732 return c
24733 }
24734
24735
24736
24737
24738 func (c *AdvertisersLocationListsGetCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsGetCall {
24739 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24740 return c
24741 }
24742
24743
24744
24745
24746 func (c *AdvertisersLocationListsGetCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsGetCall {
24747 c.ifNoneMatch_ = entityTag
24748 return c
24749 }
24750
24751
24752 func (c *AdvertisersLocationListsGetCall) Context(ctx context.Context) *AdvertisersLocationListsGetCall {
24753 c.ctx_ = ctx
24754 return c
24755 }
24756
24757
24758
24759 func (c *AdvertisersLocationListsGetCall) Header() http.Header {
24760 if c.header_ == nil {
24761 c.header_ = make(http.Header)
24762 }
24763 return c.header_
24764 }
24765
24766 func (c *AdvertisersLocationListsGetCall) doRequest(alt string) (*http.Response, error) {
24767 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24768 if c.ifNoneMatch_ != "" {
24769 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24770 }
24771 var body io.Reader = nil
24772 c.urlParams_.Set("alt", alt)
24773 c.urlParams_.Set("prettyPrint", "false")
24774 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/locationLists/{+locationListId}")
24775 urls += "?" + c.urlParams_.Encode()
24776 req, err := http.NewRequest("GET", urls, body)
24777 if err != nil {
24778 return nil, err
24779 }
24780 req.Header = reqHeaders
24781 googleapi.Expand(req.URL, map[string]string{
24782 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24783 "locationListId": strconv.FormatInt(c.locationListId, 10),
24784 })
24785 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24786 }
24787
24788
24789
24790
24791
24792
24793 func (c *AdvertisersLocationListsGetCall) Do(opts ...googleapi.CallOption) (*LocationList, error) {
24794 gensupport.SetOptions(c.urlParams_, opts...)
24795 res, err := c.doRequest("json")
24796 if res != nil && res.StatusCode == http.StatusNotModified {
24797 if res.Body != nil {
24798 res.Body.Close()
24799 }
24800 return nil, gensupport.WrapError(&googleapi.Error{
24801 Code: res.StatusCode,
24802 Header: res.Header,
24803 })
24804 }
24805 if err != nil {
24806 return nil, err
24807 }
24808 defer googleapi.CloseBody(res)
24809 if err := googleapi.CheckResponse(res); err != nil {
24810 return nil, gensupport.WrapError(err)
24811 }
24812 ret := &LocationList{
24813 ServerResponse: googleapi.ServerResponse{
24814 Header: res.Header,
24815 HTTPStatusCode: res.StatusCode,
24816 },
24817 }
24818 target := &ret
24819 if err := gensupport.DecodeResponse(target, res); err != nil {
24820 return nil, err
24821 }
24822 return ret, nil
24823 }
24824
24825 type AdvertisersLocationListsListCall struct {
24826 s *Service
24827 advertiserId int64
24828 urlParams_ gensupport.URLParams
24829 ifNoneMatch_ string
24830 ctx_ context.Context
24831 header_ http.Header
24832 }
24833
24834
24835
24836
24837
24838 func (r *AdvertisersLocationListsService) List(advertiserId int64) *AdvertisersLocationListsListCall {
24839 c := &AdvertisersLocationListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24840 c.advertiserId = advertiserId
24841 return c
24842 }
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855 func (c *AdvertisersLocationListsListCall) Filter(filter string) *AdvertisersLocationListsListCall {
24856 c.urlParams_.Set("filter", filter)
24857 return c
24858 }
24859
24860
24861
24862
24863
24864
24865 func (c *AdvertisersLocationListsListCall) OrderBy(orderBy string) *AdvertisersLocationListsListCall {
24866 c.urlParams_.Set("orderBy", orderBy)
24867 return c
24868 }
24869
24870
24871
24872
24873 func (c *AdvertisersLocationListsListCall) PageSize(pageSize int64) *AdvertisersLocationListsListCall {
24874 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
24875 return c
24876 }
24877
24878
24879
24880
24881
24882 func (c *AdvertisersLocationListsListCall) PageToken(pageToken string) *AdvertisersLocationListsListCall {
24883 c.urlParams_.Set("pageToken", pageToken)
24884 return c
24885 }
24886
24887
24888
24889
24890 func (c *AdvertisersLocationListsListCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsListCall {
24891 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24892 return c
24893 }
24894
24895
24896
24897
24898 func (c *AdvertisersLocationListsListCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsListCall {
24899 c.ifNoneMatch_ = entityTag
24900 return c
24901 }
24902
24903
24904 func (c *AdvertisersLocationListsListCall) Context(ctx context.Context) *AdvertisersLocationListsListCall {
24905 c.ctx_ = ctx
24906 return c
24907 }
24908
24909
24910
24911 func (c *AdvertisersLocationListsListCall) Header() http.Header {
24912 if c.header_ == nil {
24913 c.header_ = make(http.Header)
24914 }
24915 return c.header_
24916 }
24917
24918 func (c *AdvertisersLocationListsListCall) doRequest(alt string) (*http.Response, error) {
24919 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24920 if c.ifNoneMatch_ != "" {
24921 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24922 }
24923 var body io.Reader = nil
24924 c.urlParams_.Set("alt", alt)
24925 c.urlParams_.Set("prettyPrint", "false")
24926 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/locationLists")
24927 urls += "?" + c.urlParams_.Encode()
24928 req, err := http.NewRequest("GET", urls, body)
24929 if err != nil {
24930 return nil, err
24931 }
24932 req.Header = reqHeaders
24933 googleapi.Expand(req.URL, map[string]string{
24934 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24935 })
24936 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24937 }
24938
24939
24940
24941
24942
24943
24944
24945 func (c *AdvertisersLocationListsListCall) Do(opts ...googleapi.CallOption) (*ListLocationListsResponse, error) {
24946 gensupport.SetOptions(c.urlParams_, opts...)
24947 res, err := c.doRequest("json")
24948 if res != nil && res.StatusCode == http.StatusNotModified {
24949 if res.Body != nil {
24950 res.Body.Close()
24951 }
24952 return nil, gensupport.WrapError(&googleapi.Error{
24953 Code: res.StatusCode,
24954 Header: res.Header,
24955 })
24956 }
24957 if err != nil {
24958 return nil, err
24959 }
24960 defer googleapi.CloseBody(res)
24961 if err := googleapi.CheckResponse(res); err != nil {
24962 return nil, gensupport.WrapError(err)
24963 }
24964 ret := &ListLocationListsResponse{
24965 ServerResponse: googleapi.ServerResponse{
24966 Header: res.Header,
24967 HTTPStatusCode: res.StatusCode,
24968 },
24969 }
24970 target := &ret
24971 if err := gensupport.DecodeResponse(target, res); err != nil {
24972 return nil, err
24973 }
24974 return ret, nil
24975 }
24976
24977
24978
24979
24980 func (c *AdvertisersLocationListsListCall) Pages(ctx context.Context, f func(*ListLocationListsResponse) error) error {
24981 c.ctx_ = ctx
24982 defer c.PageToken(c.urlParams_.Get("pageToken"))
24983 for {
24984 x, err := c.Do()
24985 if err != nil {
24986 return err
24987 }
24988 if err := f(x); err != nil {
24989 return err
24990 }
24991 if x.NextPageToken == "" {
24992 return nil
24993 }
24994 c.PageToken(x.NextPageToken)
24995 }
24996 }
24997
24998 type AdvertisersLocationListsPatchCall struct {
24999 s *Service
25000 advertiserId int64
25001 locationListId int64
25002 locationlist *LocationList
25003 urlParams_ gensupport.URLParams
25004 ctx_ context.Context
25005 header_ http.Header
25006 }
25007
25008
25009
25010
25011
25012
25013
25014
25015 func (r *AdvertisersLocationListsService) Patch(advertiserId int64, locationListId int64, locationlist *LocationList) *AdvertisersLocationListsPatchCall {
25016 c := &AdvertisersLocationListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25017 c.advertiserId = advertiserId
25018 c.locationListId = locationListId
25019 c.locationlist = locationlist
25020 return c
25021 }
25022
25023
25024
25025 func (c *AdvertisersLocationListsPatchCall) UpdateMask(updateMask string) *AdvertisersLocationListsPatchCall {
25026 c.urlParams_.Set("updateMask", updateMask)
25027 return c
25028 }
25029
25030
25031
25032
25033 func (c *AdvertisersLocationListsPatchCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsPatchCall {
25034 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25035 return c
25036 }
25037
25038
25039 func (c *AdvertisersLocationListsPatchCall) Context(ctx context.Context) *AdvertisersLocationListsPatchCall {
25040 c.ctx_ = ctx
25041 return c
25042 }
25043
25044
25045
25046 func (c *AdvertisersLocationListsPatchCall) Header() http.Header {
25047 if c.header_ == nil {
25048 c.header_ = make(http.Header)
25049 }
25050 return c.header_
25051 }
25052
25053 func (c *AdvertisersLocationListsPatchCall) doRequest(alt string) (*http.Response, error) {
25054 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25055 var body io.Reader = nil
25056 body, err := googleapi.WithoutDataWrapper.JSONReader(c.locationlist)
25057 if err != nil {
25058 return nil, err
25059 }
25060 c.urlParams_.Set("alt", alt)
25061 c.urlParams_.Set("prettyPrint", "false")
25062 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/locationLists/{locationListId}")
25063 urls += "?" + c.urlParams_.Encode()
25064 req, err := http.NewRequest("PATCH", urls, body)
25065 if err != nil {
25066 return nil, err
25067 }
25068 req.Header = reqHeaders
25069 googleapi.Expand(req.URL, map[string]string{
25070 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25071 "locationListId": strconv.FormatInt(c.locationListId, 10),
25072 })
25073 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25074 }
25075
25076
25077
25078
25079
25080
25081 func (c *AdvertisersLocationListsPatchCall) Do(opts ...googleapi.CallOption) (*LocationList, error) {
25082 gensupport.SetOptions(c.urlParams_, opts...)
25083 res, err := c.doRequest("json")
25084 if res != nil && res.StatusCode == http.StatusNotModified {
25085 if res.Body != nil {
25086 res.Body.Close()
25087 }
25088 return nil, gensupport.WrapError(&googleapi.Error{
25089 Code: res.StatusCode,
25090 Header: res.Header,
25091 })
25092 }
25093 if err != nil {
25094 return nil, err
25095 }
25096 defer googleapi.CloseBody(res)
25097 if err := googleapi.CheckResponse(res); err != nil {
25098 return nil, gensupport.WrapError(err)
25099 }
25100 ret := &LocationList{
25101 ServerResponse: googleapi.ServerResponse{
25102 Header: res.Header,
25103 HTTPStatusCode: res.StatusCode,
25104 },
25105 }
25106 target := &ret
25107 if err := gensupport.DecodeResponse(target, res); err != nil {
25108 return nil, err
25109 }
25110 return ret, nil
25111 }
25112
25113 type AdvertisersLocationListsAssignedLocationsBulkEditCall struct {
25114 s *Service
25115 advertiserId int64
25116 locationListId int64
25117 bulkeditassignedlocationsrequest *BulkEditAssignedLocationsRequest
25118 urlParams_ gensupport.URLParams
25119 ctx_ context.Context
25120 header_ http.Header
25121 }
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132 func (r *AdvertisersLocationListsAssignedLocationsService) BulkEdit(advertiserId int64, locationListId int64, bulkeditassignedlocationsrequest *BulkEditAssignedLocationsRequest) *AdvertisersLocationListsAssignedLocationsBulkEditCall {
25133 c := &AdvertisersLocationListsAssignedLocationsBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25134 c.advertiserId = advertiserId
25135 c.locationListId = locationListId
25136 c.bulkeditassignedlocationsrequest = bulkeditassignedlocationsrequest
25137 return c
25138 }
25139
25140
25141
25142
25143 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsBulkEditCall {
25144 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25145 return c
25146 }
25147
25148
25149 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsBulkEditCall {
25150 c.ctx_ = ctx
25151 return c
25152 }
25153
25154
25155
25156 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Header() http.Header {
25157 if c.header_ == nil {
25158 c.header_ = make(http.Header)
25159 }
25160 return c.header_
25161 }
25162
25163 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) doRequest(alt string) (*http.Response, error) {
25164 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25165 var body io.Reader = nil
25166 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassignedlocationsrequest)
25167 if err != nil {
25168 return nil, err
25169 }
25170 c.urlParams_.Set("alt", alt)
25171 c.urlParams_.Set("prettyPrint", "false")
25172 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/locationLists/{+locationListId}/assignedLocations:bulkEdit")
25173 urls += "?" + c.urlParams_.Encode()
25174 req, err := http.NewRequest("POST", urls, body)
25175 if err != nil {
25176 return nil, err
25177 }
25178 req.Header = reqHeaders
25179 googleapi.Expand(req.URL, map[string]string{
25180 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25181 "locationListId": strconv.FormatInt(c.locationListId, 10),
25182 })
25183 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25184 }
25185
25186
25187
25188
25189
25190
25191
25192 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedLocationsResponse, error) {
25193 gensupport.SetOptions(c.urlParams_, opts...)
25194 res, err := c.doRequest("json")
25195 if res != nil && res.StatusCode == http.StatusNotModified {
25196 if res.Body != nil {
25197 res.Body.Close()
25198 }
25199 return nil, gensupport.WrapError(&googleapi.Error{
25200 Code: res.StatusCode,
25201 Header: res.Header,
25202 })
25203 }
25204 if err != nil {
25205 return nil, err
25206 }
25207 defer googleapi.CloseBody(res)
25208 if err := googleapi.CheckResponse(res); err != nil {
25209 return nil, gensupport.WrapError(err)
25210 }
25211 ret := &BulkEditAssignedLocationsResponse{
25212 ServerResponse: googleapi.ServerResponse{
25213 Header: res.Header,
25214 HTTPStatusCode: res.StatusCode,
25215 },
25216 }
25217 target := &ret
25218 if err := gensupport.DecodeResponse(target, res); err != nil {
25219 return nil, err
25220 }
25221 return ret, nil
25222 }
25223
25224 type AdvertisersLocationListsAssignedLocationsCreateCall struct {
25225 s *Service
25226 advertiserId int64
25227 locationListId int64
25228 assignedlocation *AssignedLocation
25229 urlParams_ gensupport.URLParams
25230 ctx_ context.Context
25231 header_ http.Header
25232 }
25233
25234
25235
25236
25237
25238
25239
25240 func (r *AdvertisersLocationListsAssignedLocationsService) Create(advertiserId int64, locationListId int64, assignedlocation *AssignedLocation) *AdvertisersLocationListsAssignedLocationsCreateCall {
25241 c := &AdvertisersLocationListsAssignedLocationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25242 c.advertiserId = advertiserId
25243 c.locationListId = locationListId
25244 c.assignedlocation = assignedlocation
25245 return c
25246 }
25247
25248
25249
25250
25251 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsCreateCall {
25252 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25253 return c
25254 }
25255
25256
25257 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsCreateCall {
25258 c.ctx_ = ctx
25259 return c
25260 }
25261
25262
25263
25264 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Header() http.Header {
25265 if c.header_ == nil {
25266 c.header_ = make(http.Header)
25267 }
25268 return c.header_
25269 }
25270
25271 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) doRequest(alt string) (*http.Response, error) {
25272 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25273 var body io.Reader = nil
25274 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedlocation)
25275 if err != nil {
25276 return nil, err
25277 }
25278 c.urlParams_.Set("alt", alt)
25279 c.urlParams_.Set("prettyPrint", "false")
25280 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations")
25281 urls += "?" + c.urlParams_.Encode()
25282 req, err := http.NewRequest("POST", urls, body)
25283 if err != nil {
25284 return nil, err
25285 }
25286 req.Header = reqHeaders
25287 googleapi.Expand(req.URL, map[string]string{
25288 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25289 "locationListId": strconv.FormatInt(c.locationListId, 10),
25290 })
25291 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25292 }
25293
25294
25295
25296
25297
25298
25299
25300 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedLocation, error) {
25301 gensupport.SetOptions(c.urlParams_, opts...)
25302 res, err := c.doRequest("json")
25303 if res != nil && res.StatusCode == http.StatusNotModified {
25304 if res.Body != nil {
25305 res.Body.Close()
25306 }
25307 return nil, gensupport.WrapError(&googleapi.Error{
25308 Code: res.StatusCode,
25309 Header: res.Header,
25310 })
25311 }
25312 if err != nil {
25313 return nil, err
25314 }
25315 defer googleapi.CloseBody(res)
25316 if err := googleapi.CheckResponse(res); err != nil {
25317 return nil, gensupport.WrapError(err)
25318 }
25319 ret := &AssignedLocation{
25320 ServerResponse: googleapi.ServerResponse{
25321 Header: res.Header,
25322 HTTPStatusCode: res.StatusCode,
25323 },
25324 }
25325 target := &ret
25326 if err := gensupport.DecodeResponse(target, res); err != nil {
25327 return nil, err
25328 }
25329 return ret, nil
25330 }
25331
25332 type AdvertisersLocationListsAssignedLocationsDeleteCall struct {
25333 s *Service
25334 advertiserId int64
25335 locationListId int64
25336 assignedLocationId int64
25337 urlParams_ gensupport.URLParams
25338 ctx_ context.Context
25339 header_ http.Header
25340 }
25341
25342
25343
25344
25345
25346
25347
25348
25349 func (r *AdvertisersLocationListsAssignedLocationsService) Delete(advertiserId int64, locationListId int64, assignedLocationId int64) *AdvertisersLocationListsAssignedLocationsDeleteCall {
25350 c := &AdvertisersLocationListsAssignedLocationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25351 c.advertiserId = advertiserId
25352 c.locationListId = locationListId
25353 c.assignedLocationId = assignedLocationId
25354 return c
25355 }
25356
25357
25358
25359
25360 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsDeleteCall {
25361 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25362 return c
25363 }
25364
25365
25366 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsDeleteCall {
25367 c.ctx_ = ctx
25368 return c
25369 }
25370
25371
25372
25373 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Header() http.Header {
25374 if c.header_ == nil {
25375 c.header_ = make(http.Header)
25376 }
25377 return c.header_
25378 }
25379
25380 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) doRequest(alt string) (*http.Response, error) {
25381 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25382 var body io.Reader = nil
25383 c.urlParams_.Set("alt", alt)
25384 c.urlParams_.Set("prettyPrint", "false")
25385 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations/{+assignedLocationId}")
25386 urls += "?" + c.urlParams_.Encode()
25387 req, err := http.NewRequest("DELETE", urls, body)
25388 if err != nil {
25389 return nil, err
25390 }
25391 req.Header = reqHeaders
25392 googleapi.Expand(req.URL, map[string]string{
25393 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25394 "locationListId": strconv.FormatInt(c.locationListId, 10),
25395 "assignedLocationId": strconv.FormatInt(c.assignedLocationId, 10),
25396 })
25397 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25398 }
25399
25400
25401
25402
25403
25404
25405 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
25406 gensupport.SetOptions(c.urlParams_, opts...)
25407 res, err := c.doRequest("json")
25408 if res != nil && res.StatusCode == http.StatusNotModified {
25409 if res.Body != nil {
25410 res.Body.Close()
25411 }
25412 return nil, gensupport.WrapError(&googleapi.Error{
25413 Code: res.StatusCode,
25414 Header: res.Header,
25415 })
25416 }
25417 if err != nil {
25418 return nil, err
25419 }
25420 defer googleapi.CloseBody(res)
25421 if err := googleapi.CheckResponse(res); err != nil {
25422 return nil, gensupport.WrapError(err)
25423 }
25424 ret := &Empty{
25425 ServerResponse: googleapi.ServerResponse{
25426 Header: res.Header,
25427 HTTPStatusCode: res.StatusCode,
25428 },
25429 }
25430 target := &ret
25431 if err := gensupport.DecodeResponse(target, res); err != nil {
25432 return nil, err
25433 }
25434 return ret, nil
25435 }
25436
25437 type AdvertisersLocationListsAssignedLocationsListCall struct {
25438 s *Service
25439 advertiserId int64
25440 locationListId int64
25441 urlParams_ gensupport.URLParams
25442 ifNoneMatch_ string
25443 ctx_ context.Context
25444 header_ http.Header
25445 }
25446
25447
25448
25449
25450
25451
25452
25453 func (r *AdvertisersLocationListsAssignedLocationsService) List(advertiserId int64, locationListId int64) *AdvertisersLocationListsAssignedLocationsListCall {
25454 c := &AdvertisersLocationListsAssignedLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25455 c.advertiserId = advertiserId
25456 c.locationListId = locationListId
25457 return c
25458 }
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468 func (c *AdvertisersLocationListsAssignedLocationsListCall) Filter(filter string) *AdvertisersLocationListsAssignedLocationsListCall {
25469 c.urlParams_.Set("filter", filter)
25470 return c
25471 }
25472
25473
25474
25475
25476
25477
25478 func (c *AdvertisersLocationListsAssignedLocationsListCall) OrderBy(orderBy string) *AdvertisersLocationListsAssignedLocationsListCall {
25479 c.urlParams_.Set("orderBy", orderBy)
25480 return c
25481 }
25482
25483
25484
25485
25486 func (c *AdvertisersLocationListsAssignedLocationsListCall) PageSize(pageSize int64) *AdvertisersLocationListsAssignedLocationsListCall {
25487 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25488 return c
25489 }
25490
25491
25492
25493
25494
25495 func (c *AdvertisersLocationListsAssignedLocationsListCall) PageToken(pageToken string) *AdvertisersLocationListsAssignedLocationsListCall {
25496 c.urlParams_.Set("pageToken", pageToken)
25497 return c
25498 }
25499
25500
25501
25502
25503 func (c *AdvertisersLocationListsAssignedLocationsListCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsListCall {
25504 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25505 return c
25506 }
25507
25508
25509
25510
25511 func (c *AdvertisersLocationListsAssignedLocationsListCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsAssignedLocationsListCall {
25512 c.ifNoneMatch_ = entityTag
25513 return c
25514 }
25515
25516
25517 func (c *AdvertisersLocationListsAssignedLocationsListCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsListCall {
25518 c.ctx_ = ctx
25519 return c
25520 }
25521
25522
25523
25524 func (c *AdvertisersLocationListsAssignedLocationsListCall) Header() http.Header {
25525 if c.header_ == nil {
25526 c.header_ = make(http.Header)
25527 }
25528 return c.header_
25529 }
25530
25531 func (c *AdvertisersLocationListsAssignedLocationsListCall) doRequest(alt string) (*http.Response, error) {
25532 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25533 if c.ifNoneMatch_ != "" {
25534 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25535 }
25536 var body io.Reader = nil
25537 c.urlParams_.Set("alt", alt)
25538 c.urlParams_.Set("prettyPrint", "false")
25539 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations")
25540 urls += "?" + c.urlParams_.Encode()
25541 req, err := http.NewRequest("GET", urls, body)
25542 if err != nil {
25543 return nil, err
25544 }
25545 req.Header = reqHeaders
25546 googleapi.Expand(req.URL, map[string]string{
25547 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25548 "locationListId": strconv.FormatInt(c.locationListId, 10),
25549 })
25550 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25551 }
25552
25553
25554
25555
25556
25557
25558
25559 func (c *AdvertisersLocationListsAssignedLocationsListCall) Do(opts ...googleapi.CallOption) (*ListAssignedLocationsResponse, error) {
25560 gensupport.SetOptions(c.urlParams_, opts...)
25561 res, err := c.doRequest("json")
25562 if res != nil && res.StatusCode == http.StatusNotModified {
25563 if res.Body != nil {
25564 res.Body.Close()
25565 }
25566 return nil, gensupport.WrapError(&googleapi.Error{
25567 Code: res.StatusCode,
25568 Header: res.Header,
25569 })
25570 }
25571 if err != nil {
25572 return nil, err
25573 }
25574 defer googleapi.CloseBody(res)
25575 if err := googleapi.CheckResponse(res); err != nil {
25576 return nil, gensupport.WrapError(err)
25577 }
25578 ret := &ListAssignedLocationsResponse{
25579 ServerResponse: googleapi.ServerResponse{
25580 Header: res.Header,
25581 HTTPStatusCode: res.StatusCode,
25582 },
25583 }
25584 target := &ret
25585 if err := gensupport.DecodeResponse(target, res); err != nil {
25586 return nil, err
25587 }
25588 return ret, nil
25589 }
25590
25591
25592
25593
25594 func (c *AdvertisersLocationListsAssignedLocationsListCall) Pages(ctx context.Context, f func(*ListAssignedLocationsResponse) error) error {
25595 c.ctx_ = ctx
25596 defer c.PageToken(c.urlParams_.Get("pageToken"))
25597 for {
25598 x, err := c.Do()
25599 if err != nil {
25600 return err
25601 }
25602 if err := f(x); err != nil {
25603 return err
25604 }
25605 if x.NextPageToken == "" {
25606 return nil
25607 }
25608 c.PageToken(x.NextPageToken)
25609 }
25610 }
25611
25612 type AdvertisersNegativeKeywordListsCreateCall struct {
25613 s *Service
25614 advertiserId int64
25615 negativekeywordlist *NegativeKeywordList
25616 urlParams_ gensupport.URLParams
25617 ctx_ context.Context
25618 header_ http.Header
25619 }
25620
25621
25622
25623
25624
25625
25626 func (r *AdvertisersNegativeKeywordListsService) Create(advertiserId int64, negativekeywordlist *NegativeKeywordList) *AdvertisersNegativeKeywordListsCreateCall {
25627 c := &AdvertisersNegativeKeywordListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25628 c.advertiserId = advertiserId
25629 c.negativekeywordlist = negativekeywordlist
25630 return c
25631 }
25632
25633
25634
25635
25636 func (c *AdvertisersNegativeKeywordListsCreateCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsCreateCall {
25637 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25638 return c
25639 }
25640
25641
25642 func (c *AdvertisersNegativeKeywordListsCreateCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsCreateCall {
25643 c.ctx_ = ctx
25644 return c
25645 }
25646
25647
25648
25649 func (c *AdvertisersNegativeKeywordListsCreateCall) Header() http.Header {
25650 if c.header_ == nil {
25651 c.header_ = make(http.Header)
25652 }
25653 return c.header_
25654 }
25655
25656 func (c *AdvertisersNegativeKeywordListsCreateCall) doRequest(alt string) (*http.Response, error) {
25657 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25658 var body io.Reader = nil
25659 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeywordlist)
25660 if err != nil {
25661 return nil, err
25662 }
25663 c.urlParams_.Set("alt", alt)
25664 c.urlParams_.Set("prettyPrint", "false")
25665 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/negativeKeywordLists")
25666 urls += "?" + c.urlParams_.Encode()
25667 req, err := http.NewRequest("POST", urls, body)
25668 if err != nil {
25669 return nil, err
25670 }
25671 req.Header = reqHeaders
25672 googleapi.Expand(req.URL, map[string]string{
25673 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25674 })
25675 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25676 }
25677
25678
25679
25680
25681
25682
25683
25684 func (c *AdvertisersNegativeKeywordListsCreateCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) {
25685 gensupport.SetOptions(c.urlParams_, opts...)
25686 res, err := c.doRequest("json")
25687 if res != nil && res.StatusCode == http.StatusNotModified {
25688 if res.Body != nil {
25689 res.Body.Close()
25690 }
25691 return nil, gensupport.WrapError(&googleapi.Error{
25692 Code: res.StatusCode,
25693 Header: res.Header,
25694 })
25695 }
25696 if err != nil {
25697 return nil, err
25698 }
25699 defer googleapi.CloseBody(res)
25700 if err := googleapi.CheckResponse(res); err != nil {
25701 return nil, gensupport.WrapError(err)
25702 }
25703 ret := &NegativeKeywordList{
25704 ServerResponse: googleapi.ServerResponse{
25705 Header: res.Header,
25706 HTTPStatusCode: res.StatusCode,
25707 },
25708 }
25709 target := &ret
25710 if err := gensupport.DecodeResponse(target, res); err != nil {
25711 return nil, err
25712 }
25713 return ret, nil
25714 }
25715
25716 type AdvertisersNegativeKeywordListsDeleteCall struct {
25717 s *Service
25718 advertiserId int64
25719 negativeKeywordListId int64
25720 urlParams_ gensupport.URLParams
25721 ctx_ context.Context
25722 header_ http.Header
25723 }
25724
25725
25726
25727
25728
25729
25730
25731 func (r *AdvertisersNegativeKeywordListsService) Delete(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsDeleteCall {
25732 c := &AdvertisersNegativeKeywordListsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25733 c.advertiserId = advertiserId
25734 c.negativeKeywordListId = negativeKeywordListId
25735 return c
25736 }
25737
25738
25739
25740
25741 func (c *AdvertisersNegativeKeywordListsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsDeleteCall {
25742 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25743 return c
25744 }
25745
25746
25747 func (c *AdvertisersNegativeKeywordListsDeleteCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsDeleteCall {
25748 c.ctx_ = ctx
25749 return c
25750 }
25751
25752
25753
25754 func (c *AdvertisersNegativeKeywordListsDeleteCall) Header() http.Header {
25755 if c.header_ == nil {
25756 c.header_ = make(http.Header)
25757 }
25758 return c.header_
25759 }
25760
25761 func (c *AdvertisersNegativeKeywordListsDeleteCall) doRequest(alt string) (*http.Response, error) {
25762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25763 var body io.Reader = nil
25764 c.urlParams_.Set("alt", alt)
25765 c.urlParams_.Set("prettyPrint", "false")
25766 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}")
25767 urls += "?" + c.urlParams_.Encode()
25768 req, err := http.NewRequest("DELETE", urls, body)
25769 if err != nil {
25770 return nil, err
25771 }
25772 req.Header = reqHeaders
25773 googleapi.Expand(req.URL, map[string]string{
25774 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25775 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
25776 })
25777 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25778 }
25779
25780
25781
25782
25783
25784
25785 func (c *AdvertisersNegativeKeywordListsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
25786 gensupport.SetOptions(c.urlParams_, opts...)
25787 res, err := c.doRequest("json")
25788 if res != nil && res.StatusCode == http.StatusNotModified {
25789 if res.Body != nil {
25790 res.Body.Close()
25791 }
25792 return nil, gensupport.WrapError(&googleapi.Error{
25793 Code: res.StatusCode,
25794 Header: res.Header,
25795 })
25796 }
25797 if err != nil {
25798 return nil, err
25799 }
25800 defer googleapi.CloseBody(res)
25801 if err := googleapi.CheckResponse(res); err != nil {
25802 return nil, gensupport.WrapError(err)
25803 }
25804 ret := &Empty{
25805 ServerResponse: googleapi.ServerResponse{
25806 Header: res.Header,
25807 HTTPStatusCode: res.StatusCode,
25808 },
25809 }
25810 target := &ret
25811 if err := gensupport.DecodeResponse(target, res); err != nil {
25812 return nil, err
25813 }
25814 return ret, nil
25815 }
25816
25817 type AdvertisersNegativeKeywordListsGetCall struct {
25818 s *Service
25819 advertiserId int64
25820 negativeKeywordListId int64
25821 urlParams_ gensupport.URLParams
25822 ifNoneMatch_ string
25823 ctx_ context.Context
25824 header_ http.Header
25825 }
25826
25827
25828
25829
25830
25831
25832
25833 func (r *AdvertisersNegativeKeywordListsService) Get(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsGetCall {
25834 c := &AdvertisersNegativeKeywordListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25835 c.advertiserId = advertiserId
25836 c.negativeKeywordListId = negativeKeywordListId
25837 return c
25838 }
25839
25840
25841
25842
25843 func (c *AdvertisersNegativeKeywordListsGetCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsGetCall {
25844 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25845 return c
25846 }
25847
25848
25849
25850
25851 func (c *AdvertisersNegativeKeywordListsGetCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsGetCall {
25852 c.ifNoneMatch_ = entityTag
25853 return c
25854 }
25855
25856
25857 func (c *AdvertisersNegativeKeywordListsGetCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsGetCall {
25858 c.ctx_ = ctx
25859 return c
25860 }
25861
25862
25863
25864 func (c *AdvertisersNegativeKeywordListsGetCall) Header() http.Header {
25865 if c.header_ == nil {
25866 c.header_ = make(http.Header)
25867 }
25868 return c.header_
25869 }
25870
25871 func (c *AdvertisersNegativeKeywordListsGetCall) doRequest(alt string) (*http.Response, error) {
25872 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25873 if c.ifNoneMatch_ != "" {
25874 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25875 }
25876 var body io.Reader = nil
25877 c.urlParams_.Set("alt", alt)
25878 c.urlParams_.Set("prettyPrint", "false")
25879 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}")
25880 urls += "?" + c.urlParams_.Encode()
25881 req, err := http.NewRequest("GET", urls, body)
25882 if err != nil {
25883 return nil, err
25884 }
25885 req.Header = reqHeaders
25886 googleapi.Expand(req.URL, map[string]string{
25887 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
25888 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
25889 })
25890 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25891 }
25892
25893
25894
25895
25896
25897
25898
25899 func (c *AdvertisersNegativeKeywordListsGetCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) {
25900 gensupport.SetOptions(c.urlParams_, opts...)
25901 res, err := c.doRequest("json")
25902 if res != nil && res.StatusCode == http.StatusNotModified {
25903 if res.Body != nil {
25904 res.Body.Close()
25905 }
25906 return nil, gensupport.WrapError(&googleapi.Error{
25907 Code: res.StatusCode,
25908 Header: res.Header,
25909 })
25910 }
25911 if err != nil {
25912 return nil, err
25913 }
25914 defer googleapi.CloseBody(res)
25915 if err := googleapi.CheckResponse(res); err != nil {
25916 return nil, gensupport.WrapError(err)
25917 }
25918 ret := &NegativeKeywordList{
25919 ServerResponse: googleapi.ServerResponse{
25920 Header: res.Header,
25921 HTTPStatusCode: res.StatusCode,
25922 },
25923 }
25924 target := &ret
25925 if err := gensupport.DecodeResponse(target, res); err != nil {
25926 return nil, err
25927 }
25928 return ret, nil
25929 }
25930
25931 type AdvertisersNegativeKeywordListsListCall struct {
25932 s *Service
25933 advertiserId int64
25934 urlParams_ gensupport.URLParams
25935 ifNoneMatch_ string
25936 ctx_ context.Context
25937 header_ http.Header
25938 }
25939
25940
25941
25942
25943
25944 func (r *AdvertisersNegativeKeywordListsService) List(advertiserId int64) *AdvertisersNegativeKeywordListsListCall {
25945 c := &AdvertisersNegativeKeywordListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25946 c.advertiserId = advertiserId
25947 return c
25948 }
25949
25950
25951
25952
25953 func (c *AdvertisersNegativeKeywordListsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsListCall {
25954 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
25955 return c
25956 }
25957
25958
25959
25960
25961
25962
25963 func (c *AdvertisersNegativeKeywordListsListCall) PageToken(pageToken string) *AdvertisersNegativeKeywordListsListCall {
25964 c.urlParams_.Set("pageToken", pageToken)
25965 return c
25966 }
25967
25968
25969
25970
25971 func (c *AdvertisersNegativeKeywordListsListCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsListCall {
25972 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25973 return c
25974 }
25975
25976
25977
25978
25979 func (c *AdvertisersNegativeKeywordListsListCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsListCall {
25980 c.ifNoneMatch_ = entityTag
25981 return c
25982 }
25983
25984
25985 func (c *AdvertisersNegativeKeywordListsListCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsListCall {
25986 c.ctx_ = ctx
25987 return c
25988 }
25989
25990
25991
25992 func (c *AdvertisersNegativeKeywordListsListCall) Header() http.Header {
25993 if c.header_ == nil {
25994 c.header_ = make(http.Header)
25995 }
25996 return c.header_
25997 }
25998
25999 func (c *AdvertisersNegativeKeywordListsListCall) doRequest(alt string) (*http.Response, error) {
26000 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26001 if c.ifNoneMatch_ != "" {
26002 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26003 }
26004 var body io.Reader = nil
26005 c.urlParams_.Set("alt", alt)
26006 c.urlParams_.Set("prettyPrint", "false")
26007 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/negativeKeywordLists")
26008 urls += "?" + c.urlParams_.Encode()
26009 req, err := http.NewRequest("GET", urls, body)
26010 if err != nil {
26011 return nil, err
26012 }
26013 req.Header = reqHeaders
26014 googleapi.Expand(req.URL, map[string]string{
26015 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26016 })
26017 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26018 }
26019
26020
26021
26022
26023
26024
26025
26026 func (c *AdvertisersNegativeKeywordListsListCall) Do(opts ...googleapi.CallOption) (*ListNegativeKeywordListsResponse, error) {
26027 gensupport.SetOptions(c.urlParams_, opts...)
26028 res, err := c.doRequest("json")
26029 if res != nil && res.StatusCode == http.StatusNotModified {
26030 if res.Body != nil {
26031 res.Body.Close()
26032 }
26033 return nil, gensupport.WrapError(&googleapi.Error{
26034 Code: res.StatusCode,
26035 Header: res.Header,
26036 })
26037 }
26038 if err != nil {
26039 return nil, err
26040 }
26041 defer googleapi.CloseBody(res)
26042 if err := googleapi.CheckResponse(res); err != nil {
26043 return nil, gensupport.WrapError(err)
26044 }
26045 ret := &ListNegativeKeywordListsResponse{
26046 ServerResponse: googleapi.ServerResponse{
26047 Header: res.Header,
26048 HTTPStatusCode: res.StatusCode,
26049 },
26050 }
26051 target := &ret
26052 if err := gensupport.DecodeResponse(target, res); err != nil {
26053 return nil, err
26054 }
26055 return ret, nil
26056 }
26057
26058
26059
26060
26061 func (c *AdvertisersNegativeKeywordListsListCall) Pages(ctx context.Context, f func(*ListNegativeKeywordListsResponse) error) error {
26062 c.ctx_ = ctx
26063 defer c.PageToken(c.urlParams_.Get("pageToken"))
26064 for {
26065 x, err := c.Do()
26066 if err != nil {
26067 return err
26068 }
26069 if err := f(x); err != nil {
26070 return err
26071 }
26072 if x.NextPageToken == "" {
26073 return nil
26074 }
26075 c.PageToken(x.NextPageToken)
26076 }
26077 }
26078
26079 type AdvertisersNegativeKeywordListsPatchCall struct {
26080 s *Service
26081 advertiserId int64
26082 negativeKeywordListId int64
26083 negativekeywordlist *NegativeKeywordList
26084 urlParams_ gensupport.URLParams
26085 ctx_ context.Context
26086 header_ http.Header
26087 }
26088
26089
26090
26091
26092
26093
26094
26095
26096 func (r *AdvertisersNegativeKeywordListsService) Patch(advertiserId int64, negativeKeywordListId int64, negativekeywordlist *NegativeKeywordList) *AdvertisersNegativeKeywordListsPatchCall {
26097 c := &AdvertisersNegativeKeywordListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26098 c.advertiserId = advertiserId
26099 c.negativeKeywordListId = negativeKeywordListId
26100 c.negativekeywordlist = negativekeywordlist
26101 return c
26102 }
26103
26104
26105
26106 func (c *AdvertisersNegativeKeywordListsPatchCall) UpdateMask(updateMask string) *AdvertisersNegativeKeywordListsPatchCall {
26107 c.urlParams_.Set("updateMask", updateMask)
26108 return c
26109 }
26110
26111
26112
26113
26114 func (c *AdvertisersNegativeKeywordListsPatchCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsPatchCall {
26115 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26116 return c
26117 }
26118
26119
26120 func (c *AdvertisersNegativeKeywordListsPatchCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsPatchCall {
26121 c.ctx_ = ctx
26122 return c
26123 }
26124
26125
26126
26127 func (c *AdvertisersNegativeKeywordListsPatchCall) Header() http.Header {
26128 if c.header_ == nil {
26129 c.header_ = make(http.Header)
26130 }
26131 return c.header_
26132 }
26133
26134 func (c *AdvertisersNegativeKeywordListsPatchCall) doRequest(alt string) (*http.Response, error) {
26135 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26136 var body io.Reader = nil
26137 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeywordlist)
26138 if err != nil {
26139 return nil, err
26140 }
26141 c.urlParams_.Set("alt", alt)
26142 c.urlParams_.Set("prettyPrint", "false")
26143 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/negativeKeywordLists/{negativeKeywordListId}")
26144 urls += "?" + c.urlParams_.Encode()
26145 req, err := http.NewRequest("PATCH", urls, body)
26146 if err != nil {
26147 return nil, err
26148 }
26149 req.Header = reqHeaders
26150 googleapi.Expand(req.URL, map[string]string{
26151 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26152 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
26153 })
26154 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26155 }
26156
26157
26158
26159
26160
26161
26162
26163 func (c *AdvertisersNegativeKeywordListsPatchCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) {
26164 gensupport.SetOptions(c.urlParams_, opts...)
26165 res, err := c.doRequest("json")
26166 if res != nil && res.StatusCode == http.StatusNotModified {
26167 if res.Body != nil {
26168 res.Body.Close()
26169 }
26170 return nil, gensupport.WrapError(&googleapi.Error{
26171 Code: res.StatusCode,
26172 Header: res.Header,
26173 })
26174 }
26175 if err != nil {
26176 return nil, err
26177 }
26178 defer googleapi.CloseBody(res)
26179 if err := googleapi.CheckResponse(res); err != nil {
26180 return nil, gensupport.WrapError(err)
26181 }
26182 ret := &NegativeKeywordList{
26183 ServerResponse: googleapi.ServerResponse{
26184 Header: res.Header,
26185 HTTPStatusCode: res.StatusCode,
26186 },
26187 }
26188 target := &ret
26189 if err := gensupport.DecodeResponse(target, res); err != nil {
26190 return nil, err
26191 }
26192 return ret, nil
26193 }
26194
26195 type AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall struct {
26196 s *Service
26197 advertiserId int64
26198 negativeKeywordListId int64
26199 bulkeditnegativekeywordsrequest *BulkEditNegativeKeywordsRequest
26200 urlParams_ gensupport.URLParams
26201 ctx_ context.Context
26202 header_ http.Header
26203 }
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) BulkEdit(advertiserId int64, negativeKeywordListId int64, bulkeditnegativekeywordsrequest *BulkEditNegativeKeywordsRequest) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall {
26218 c := &AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26219 c.advertiserId = advertiserId
26220 c.negativeKeywordListId = negativeKeywordListId
26221 c.bulkeditnegativekeywordsrequest = bulkeditnegativekeywordsrequest
26222 return c
26223 }
26224
26225
26226
26227
26228 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall {
26229 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26230 return c
26231 }
26232
26233
26234 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall {
26235 c.ctx_ = ctx
26236 return c
26237 }
26238
26239
26240
26241 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Header() http.Header {
26242 if c.header_ == nil {
26243 c.header_ = make(http.Header)
26244 }
26245 return c.header_
26246 }
26247
26248 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) doRequest(alt string) (*http.Response, error) {
26249 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26250 var body io.Reader = nil
26251 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditnegativekeywordsrequest)
26252 if err != nil {
26253 return nil, err
26254 }
26255 c.urlParams_.Set("alt", alt)
26256 c.urlParams_.Set("prettyPrint", "false")
26257 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:bulkEdit")
26258 urls += "?" + c.urlParams_.Encode()
26259 req, err := http.NewRequest("POST", urls, body)
26260 if err != nil {
26261 return nil, err
26262 }
26263 req.Header = reqHeaders
26264 googleapi.Expand(req.URL, map[string]string{
26265 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26266 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
26267 })
26268 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26269 }
26270
26271
26272
26273
26274
26275
26276
26277 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditNegativeKeywordsResponse, error) {
26278 gensupport.SetOptions(c.urlParams_, opts...)
26279 res, err := c.doRequest("json")
26280 if res != nil && res.StatusCode == http.StatusNotModified {
26281 if res.Body != nil {
26282 res.Body.Close()
26283 }
26284 return nil, gensupport.WrapError(&googleapi.Error{
26285 Code: res.StatusCode,
26286 Header: res.Header,
26287 })
26288 }
26289 if err != nil {
26290 return nil, err
26291 }
26292 defer googleapi.CloseBody(res)
26293 if err := googleapi.CheckResponse(res); err != nil {
26294 return nil, gensupport.WrapError(err)
26295 }
26296 ret := &BulkEditNegativeKeywordsResponse{
26297 ServerResponse: googleapi.ServerResponse{
26298 Header: res.Header,
26299 HTTPStatusCode: res.StatusCode,
26300 },
26301 }
26302 target := &ret
26303 if err := gensupport.DecodeResponse(target, res); err != nil {
26304 return nil, err
26305 }
26306 return ret, nil
26307 }
26308
26309 type AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall struct {
26310 s *Service
26311 advertiserId int64
26312 negativeKeywordListId int64
26313 negativekeyword *NegativeKeyword
26314 urlParams_ gensupport.URLParams
26315 ctx_ context.Context
26316 header_ http.Header
26317 }
26318
26319
26320
26321
26322
26323
26324
26325 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Create(advertiserId int64, negativeKeywordListId int64, negativekeyword *NegativeKeyword) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall {
26326 c := &AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26327 c.advertiserId = advertiserId
26328 c.negativeKeywordListId = negativeKeywordListId
26329 c.negativekeyword = negativekeyword
26330 return c
26331 }
26332
26333
26334
26335
26336 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall {
26337 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26338 return c
26339 }
26340
26341
26342 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall {
26343 c.ctx_ = ctx
26344 return c
26345 }
26346
26347
26348
26349 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Header() http.Header {
26350 if c.header_ == nil {
26351 c.header_ = make(http.Header)
26352 }
26353 return c.header_
26354 }
26355
26356 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) doRequest(alt string) (*http.Response, error) {
26357 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26358 var body io.Reader = nil
26359 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeyword)
26360 if err != nil {
26361 return nil, err
26362 }
26363 c.urlParams_.Set("alt", alt)
26364 c.urlParams_.Set("prettyPrint", "false")
26365 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords")
26366 urls += "?" + c.urlParams_.Encode()
26367 req, err := http.NewRequest("POST", urls, body)
26368 if err != nil {
26369 return nil, err
26370 }
26371 req.Header = reqHeaders
26372 googleapi.Expand(req.URL, map[string]string{
26373 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26374 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
26375 })
26376 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26377 }
26378
26379
26380
26381
26382
26383
26384
26385 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Do(opts ...googleapi.CallOption) (*NegativeKeyword, error) {
26386 gensupport.SetOptions(c.urlParams_, opts...)
26387 res, err := c.doRequest("json")
26388 if res != nil && res.StatusCode == http.StatusNotModified {
26389 if res.Body != nil {
26390 res.Body.Close()
26391 }
26392 return nil, gensupport.WrapError(&googleapi.Error{
26393 Code: res.StatusCode,
26394 Header: res.Header,
26395 })
26396 }
26397 if err != nil {
26398 return nil, err
26399 }
26400 defer googleapi.CloseBody(res)
26401 if err := googleapi.CheckResponse(res); err != nil {
26402 return nil, gensupport.WrapError(err)
26403 }
26404 ret := &NegativeKeyword{
26405 ServerResponse: googleapi.ServerResponse{
26406 Header: res.Header,
26407 HTTPStatusCode: res.StatusCode,
26408 },
26409 }
26410 target := &ret
26411 if err := gensupport.DecodeResponse(target, res); err != nil {
26412 return nil, err
26413 }
26414 return ret, nil
26415 }
26416
26417 type AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall struct {
26418 s *Service
26419 advertiserId int64
26420 negativeKeywordListId int64
26421 keywordValue string
26422 urlParams_ gensupport.URLParams
26423 ctx_ context.Context
26424 header_ http.Header
26425 }
26426
26427
26428
26429
26430
26431
26432
26433
26434 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Delete(advertiserId int64, negativeKeywordListId int64, keywordValue string) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall {
26435 c := &AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26436 c.advertiserId = advertiserId
26437 c.negativeKeywordListId = negativeKeywordListId
26438 c.keywordValue = keywordValue
26439 return c
26440 }
26441
26442
26443
26444
26445 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall {
26446 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26447 return c
26448 }
26449
26450
26451 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall {
26452 c.ctx_ = ctx
26453 return c
26454 }
26455
26456
26457
26458 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Header() http.Header {
26459 if c.header_ == nil {
26460 c.header_ = make(http.Header)
26461 }
26462 return c.header_
26463 }
26464
26465 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) doRequest(alt string) (*http.Response, error) {
26466 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26467 var body io.Reader = nil
26468 c.urlParams_.Set("alt", alt)
26469 c.urlParams_.Set("prettyPrint", "false")
26470 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords/{+keywordValue}")
26471 urls += "?" + c.urlParams_.Encode()
26472 req, err := http.NewRequest("DELETE", urls, body)
26473 if err != nil {
26474 return nil, err
26475 }
26476 req.Header = reqHeaders
26477 googleapi.Expand(req.URL, map[string]string{
26478 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26479 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
26480 "keywordValue": c.keywordValue,
26481 })
26482 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26483 }
26484
26485
26486
26487
26488
26489
26490 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
26491 gensupport.SetOptions(c.urlParams_, opts...)
26492 res, err := c.doRequest("json")
26493 if res != nil && res.StatusCode == http.StatusNotModified {
26494 if res.Body != nil {
26495 res.Body.Close()
26496 }
26497 return nil, gensupport.WrapError(&googleapi.Error{
26498 Code: res.StatusCode,
26499 Header: res.Header,
26500 })
26501 }
26502 if err != nil {
26503 return nil, err
26504 }
26505 defer googleapi.CloseBody(res)
26506 if err := googleapi.CheckResponse(res); err != nil {
26507 return nil, gensupport.WrapError(err)
26508 }
26509 ret := &Empty{
26510 ServerResponse: googleapi.ServerResponse{
26511 Header: res.Header,
26512 HTTPStatusCode: res.StatusCode,
26513 },
26514 }
26515 target := &ret
26516 if err := gensupport.DecodeResponse(target, res); err != nil {
26517 return nil, err
26518 }
26519 return ret, nil
26520 }
26521
26522 type AdvertisersNegativeKeywordListsNegativeKeywordsListCall struct {
26523 s *Service
26524 advertiserId int64
26525 negativeKeywordListId int64
26526 urlParams_ gensupport.URLParams
26527 ifNoneMatch_ string
26528 ctx_ context.Context
26529 header_ http.Header
26530 }
26531
26532
26533
26534
26535
26536
26537
26538 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) List(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
26539 c := &AdvertisersNegativeKeywordListsNegativeKeywordsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26540 c.advertiserId = advertiserId
26541 c.negativeKeywordListId = negativeKeywordListId
26542 return c
26543 }
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Filter(filter string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
26555 c.urlParams_.Set("filter", filter)
26556 return c
26557 }
26558
26559
26560
26561
26562
26563 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) OrderBy(orderBy string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
26564 c.urlParams_.Set("orderBy", orderBy)
26565 return c
26566 }
26567
26568
26569
26570
26571 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
26572 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
26573 return c
26574 }
26575
26576
26577
26578
26579
26580 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) PageToken(pageToken string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
26581 c.urlParams_.Set("pageToken", pageToken)
26582 return c
26583 }
26584
26585
26586
26587
26588 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
26589 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26590 return c
26591 }
26592
26593
26594
26595
26596 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
26597 c.ifNoneMatch_ = entityTag
26598 return c
26599 }
26600
26601
26602 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall {
26603 c.ctx_ = ctx
26604 return c
26605 }
26606
26607
26608
26609 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Header() http.Header {
26610 if c.header_ == nil {
26611 c.header_ = make(http.Header)
26612 }
26613 return c.header_
26614 }
26615
26616 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) doRequest(alt string) (*http.Response, error) {
26617 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26618 if c.ifNoneMatch_ != "" {
26619 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26620 }
26621 var body io.Reader = nil
26622 c.urlParams_.Set("alt", alt)
26623 c.urlParams_.Set("prettyPrint", "false")
26624 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords")
26625 urls += "?" + c.urlParams_.Encode()
26626 req, err := http.NewRequest("GET", urls, body)
26627 if err != nil {
26628 return nil, err
26629 }
26630 req.Header = reqHeaders
26631 googleapi.Expand(req.URL, map[string]string{
26632 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26633 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
26634 })
26635 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26636 }
26637
26638
26639
26640
26641
26642
26643
26644 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Do(opts ...googleapi.CallOption) (*ListNegativeKeywordsResponse, error) {
26645 gensupport.SetOptions(c.urlParams_, opts...)
26646 res, err := c.doRequest("json")
26647 if res != nil && res.StatusCode == http.StatusNotModified {
26648 if res.Body != nil {
26649 res.Body.Close()
26650 }
26651 return nil, gensupport.WrapError(&googleapi.Error{
26652 Code: res.StatusCode,
26653 Header: res.Header,
26654 })
26655 }
26656 if err != nil {
26657 return nil, err
26658 }
26659 defer googleapi.CloseBody(res)
26660 if err := googleapi.CheckResponse(res); err != nil {
26661 return nil, gensupport.WrapError(err)
26662 }
26663 ret := &ListNegativeKeywordsResponse{
26664 ServerResponse: googleapi.ServerResponse{
26665 Header: res.Header,
26666 HTTPStatusCode: res.StatusCode,
26667 },
26668 }
26669 target := &ret
26670 if err := gensupport.DecodeResponse(target, res); err != nil {
26671 return nil, err
26672 }
26673 return ret, nil
26674 }
26675
26676
26677
26678
26679 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Pages(ctx context.Context, f func(*ListNegativeKeywordsResponse) error) error {
26680 c.ctx_ = ctx
26681 defer c.PageToken(c.urlParams_.Get("pageToken"))
26682 for {
26683 x, err := c.Do()
26684 if err != nil {
26685 return err
26686 }
26687 if err := f(x); err != nil {
26688 return err
26689 }
26690 if x.NextPageToken == "" {
26691 return nil
26692 }
26693 c.PageToken(x.NextPageToken)
26694 }
26695 }
26696
26697 type AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall struct {
26698 s *Service
26699 advertiserId int64
26700 negativeKeywordListId int64
26701 replacenegativekeywordsrequest *ReplaceNegativeKeywordsRequest
26702 urlParams_ gensupport.URLParams
26703 ctx_ context.Context
26704 header_ http.Header
26705 }
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Replace(advertiserId int64, negativeKeywordListId int64, replacenegativekeywordsrequest *ReplaceNegativeKeywordsRequest) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall {
26716 c := &AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26717 c.advertiserId = advertiserId
26718 c.negativeKeywordListId = negativeKeywordListId
26719 c.replacenegativekeywordsrequest = replacenegativekeywordsrequest
26720 return c
26721 }
26722
26723
26724
26725
26726 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall {
26727 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26728 return c
26729 }
26730
26731
26732 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall {
26733 c.ctx_ = ctx
26734 return c
26735 }
26736
26737
26738
26739 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Header() http.Header {
26740 if c.header_ == nil {
26741 c.header_ = make(http.Header)
26742 }
26743 return c.header_
26744 }
26745
26746 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) doRequest(alt string) (*http.Response, error) {
26747 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26748 var body io.Reader = nil
26749 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacenegativekeywordsrequest)
26750 if err != nil {
26751 return nil, err
26752 }
26753 c.urlParams_.Set("alt", alt)
26754 c.urlParams_.Set("prettyPrint", "false")
26755 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:replace")
26756 urls += "?" + c.urlParams_.Encode()
26757 req, err := http.NewRequest("POST", urls, body)
26758 if err != nil {
26759 return nil, err
26760 }
26761 req.Header = reqHeaders
26762 googleapi.Expand(req.URL, map[string]string{
26763 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26764 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10),
26765 })
26766 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26767 }
26768
26769
26770
26771
26772
26773
26774
26775 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceNegativeKeywordsResponse, error) {
26776 gensupport.SetOptions(c.urlParams_, opts...)
26777 res, err := c.doRequest("json")
26778 if res != nil && res.StatusCode == http.StatusNotModified {
26779 if res.Body != nil {
26780 res.Body.Close()
26781 }
26782 return nil, gensupport.WrapError(&googleapi.Error{
26783 Code: res.StatusCode,
26784 Header: res.Header,
26785 })
26786 }
26787 if err != nil {
26788 return nil, err
26789 }
26790 defer googleapi.CloseBody(res)
26791 if err := googleapi.CheckResponse(res); err != nil {
26792 return nil, gensupport.WrapError(err)
26793 }
26794 ret := &ReplaceNegativeKeywordsResponse{
26795 ServerResponse: googleapi.ServerResponse{
26796 Header: res.Header,
26797 HTTPStatusCode: res.StatusCode,
26798 },
26799 }
26800 target := &ret
26801 if err := gensupport.DecodeResponse(target, res); err != nil {
26802 return nil, err
26803 }
26804 return ret, nil
26805 }
26806
26807 type AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall struct {
26808 s *Service
26809 advertiserId int64
26810 targetingType string
26811 assignedtargetingoption *AssignedTargetingOption
26812 urlParams_ gensupport.URLParams
26813 ctx_ context.Context
26814 header_ http.Header
26815 }
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall {
26826 c := &AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26827 c.advertiserId = advertiserId
26828 c.targetingType = targetingType
26829 c.assignedtargetingoption = assignedtargetingoption
26830 return c
26831 }
26832
26833
26834
26835
26836 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall {
26837 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26838 return c
26839 }
26840
26841
26842 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall {
26843 c.ctx_ = ctx
26844 return c
26845 }
26846
26847
26848
26849 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header {
26850 if c.header_ == nil {
26851 c.header_ = make(http.Header)
26852 }
26853 return c.header_
26854 }
26855
26856 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) {
26857 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26858 var body io.Reader = nil
26859 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption)
26860 if err != nil {
26861 return nil, err
26862 }
26863 c.urlParams_.Set("alt", alt)
26864 c.urlParams_.Set("prettyPrint", "false")
26865 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
26866 urls += "?" + c.urlParams_.Encode()
26867 req, err := http.NewRequest("POST", urls, body)
26868 if err != nil {
26869 return nil, err
26870 }
26871 req.Header = reqHeaders
26872 googleapi.Expand(req.URL, map[string]string{
26873 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26874 "targetingType": c.targetingType,
26875 })
26876 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26877 }
26878
26879
26880
26881
26882
26883
26884
26885 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
26886 gensupport.SetOptions(c.urlParams_, opts...)
26887 res, err := c.doRequest("json")
26888 if res != nil && res.StatusCode == http.StatusNotModified {
26889 if res.Body != nil {
26890 res.Body.Close()
26891 }
26892 return nil, gensupport.WrapError(&googleapi.Error{
26893 Code: res.StatusCode,
26894 Header: res.Header,
26895 })
26896 }
26897 if err != nil {
26898 return nil, err
26899 }
26900 defer googleapi.CloseBody(res)
26901 if err := googleapi.CheckResponse(res); err != nil {
26902 return nil, gensupport.WrapError(err)
26903 }
26904 ret := &AssignedTargetingOption{
26905 ServerResponse: googleapi.ServerResponse{
26906 Header: res.Header,
26907 HTTPStatusCode: res.StatusCode,
26908 },
26909 }
26910 target := &ret
26911 if err := gensupport.DecodeResponse(target, res); err != nil {
26912 return nil, err
26913 }
26914 return ret, nil
26915 }
26916
26917 type AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall struct {
26918 s *Service
26919 advertiserId int64
26920 targetingType string
26921 assignedTargetingOptionId string
26922 urlParams_ gensupport.URLParams
26923 ctx_ context.Context
26924 header_ http.Header
26925 }
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall {
26937 c := &AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26938 c.advertiserId = advertiserId
26939 c.targetingType = targetingType
26940 c.assignedTargetingOptionId = assignedTargetingOptionId
26941 return c
26942 }
26943
26944
26945
26946
26947 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall {
26948 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26949 return c
26950 }
26951
26952
26953 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall {
26954 c.ctx_ = ctx
26955 return c
26956 }
26957
26958
26959
26960 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header {
26961 if c.header_ == nil {
26962 c.header_ = make(http.Header)
26963 }
26964 return c.header_
26965 }
26966
26967 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
26968 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26969 var body io.Reader = nil
26970 c.urlParams_.Set("alt", alt)
26971 c.urlParams_.Set("prettyPrint", "false")
26972 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
26973 urls += "?" + c.urlParams_.Encode()
26974 req, err := http.NewRequest("DELETE", urls, body)
26975 if err != nil {
26976 return nil, err
26977 }
26978 req.Header = reqHeaders
26979 googleapi.Expand(req.URL, map[string]string{
26980 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
26981 "targetingType": c.targetingType,
26982 "assignedTargetingOptionId": c.assignedTargetingOptionId,
26983 })
26984 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26985 }
26986
26987
26988
26989
26990
26991
26992 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
26993 gensupport.SetOptions(c.urlParams_, opts...)
26994 res, err := c.doRequest("json")
26995 if res != nil && res.StatusCode == http.StatusNotModified {
26996 if res.Body != nil {
26997 res.Body.Close()
26998 }
26999 return nil, gensupport.WrapError(&googleapi.Error{
27000 Code: res.StatusCode,
27001 Header: res.Header,
27002 })
27003 }
27004 if err != nil {
27005 return nil, err
27006 }
27007 defer googleapi.CloseBody(res)
27008 if err := googleapi.CheckResponse(res); err != nil {
27009 return nil, gensupport.WrapError(err)
27010 }
27011 ret := &Empty{
27012 ServerResponse: googleapi.ServerResponse{
27013 Header: res.Header,
27014 HTTPStatusCode: res.StatusCode,
27015 },
27016 }
27017 target := &ret
27018 if err := gensupport.DecodeResponse(target, res); err != nil {
27019 return nil, err
27020 }
27021 return ret, nil
27022 }
27023
27024 type AdvertisersTargetingTypesAssignedTargetingOptionsGetCall struct {
27025 s *Service
27026 advertiserId int64
27027 targetingType string
27028 assignedTargetingOptionId string
27029 urlParams_ gensupport.URLParams
27030 ifNoneMatch_ string
27031 ctx_ context.Context
27032 header_ http.Header
27033 }
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall {
27047 c := &AdvertisersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27048 c.advertiserId = advertiserId
27049 c.targetingType = targetingType
27050 c.assignedTargetingOptionId = assignedTargetingOptionId
27051 return c
27052 }
27053
27054
27055
27056
27057 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall {
27058 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27059 return c
27060 }
27061
27062
27063
27064
27065 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall {
27066 c.ifNoneMatch_ = entityTag
27067 return c
27068 }
27069
27070
27071 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall {
27072 c.ctx_ = ctx
27073 return c
27074 }
27075
27076
27077
27078 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
27079 if c.header_ == nil {
27080 c.header_ = make(http.Header)
27081 }
27082 return c.header_
27083 }
27084
27085 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
27086 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27087 if c.ifNoneMatch_ != "" {
27088 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27089 }
27090 var body io.Reader = nil
27091 c.urlParams_.Set("alt", alt)
27092 c.urlParams_.Set("prettyPrint", "false")
27093 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
27094 urls += "?" + c.urlParams_.Encode()
27095 req, err := http.NewRequest("GET", urls, body)
27096 if err != nil {
27097 return nil, err
27098 }
27099 req.Header = reqHeaders
27100 googleapi.Expand(req.URL, map[string]string{
27101 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
27102 "targetingType": c.targetingType,
27103 "assignedTargetingOptionId": c.assignedTargetingOptionId,
27104 })
27105 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27106 }
27107
27108
27109
27110
27111
27112
27113
27114 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
27115 gensupport.SetOptions(c.urlParams_, opts...)
27116 res, err := c.doRequest("json")
27117 if res != nil && res.StatusCode == http.StatusNotModified {
27118 if res.Body != nil {
27119 res.Body.Close()
27120 }
27121 return nil, gensupport.WrapError(&googleapi.Error{
27122 Code: res.StatusCode,
27123 Header: res.Header,
27124 })
27125 }
27126 if err != nil {
27127 return nil, err
27128 }
27129 defer googleapi.CloseBody(res)
27130 if err := googleapi.CheckResponse(res); err != nil {
27131 return nil, gensupport.WrapError(err)
27132 }
27133 ret := &AssignedTargetingOption{
27134 ServerResponse: googleapi.ServerResponse{
27135 Header: res.Header,
27136 HTTPStatusCode: res.StatusCode,
27137 },
27138 }
27139 target := &ret
27140 if err := gensupport.DecodeResponse(target, res); err != nil {
27141 return nil, err
27142 }
27143 return ret, nil
27144 }
27145
27146 type AdvertisersTargetingTypesAssignedTargetingOptionsListCall struct {
27147 s *Service
27148 advertiserId int64
27149 targetingType string
27150 urlParams_ gensupport.URLParams
27151 ifNoneMatch_ string
27152 ctx_ context.Context
27153 header_ http.Header
27154 }
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, targetingType string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
27165 c := &AdvertisersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27166 c.advertiserId = advertiserId
27167 c.targetingType = targetingType
27168 return c
27169 }
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
27181 c.urlParams_.Set("filter", filter)
27182 return c
27183 }
27184
27185
27186
27187
27188
27189
27190 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
27191 c.urlParams_.Set("orderBy", orderBy)
27192 return c
27193 }
27194
27195
27196
27197
27198 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
27199 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27200 return c
27201 }
27202
27203
27204
27205
27206
27207
27208 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
27209 c.urlParams_.Set("pageToken", pageToken)
27210 return c
27211 }
27212
27213
27214
27215
27216 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
27217 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27218 return c
27219 }
27220
27221
27222
27223
27224 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
27225 c.ifNoneMatch_ = entityTag
27226 return c
27227 }
27228
27229
27230 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall {
27231 c.ctx_ = ctx
27232 return c
27233 }
27234
27235
27236
27237 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
27238 if c.header_ == nil {
27239 c.header_ = make(http.Header)
27240 }
27241 return c.header_
27242 }
27243
27244 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
27245 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27246 if c.ifNoneMatch_ != "" {
27247 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27248 }
27249 var body io.Reader = nil
27250 c.urlParams_.Set("alt", alt)
27251 c.urlParams_.Set("prettyPrint", "false")
27252 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
27253 urls += "?" + c.urlParams_.Encode()
27254 req, err := http.NewRequest("GET", urls, body)
27255 if err != nil {
27256 return nil, err
27257 }
27258 req.Header = reqHeaders
27259 googleapi.Expand(req.URL, map[string]string{
27260 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
27261 "targetingType": c.targetingType,
27262 })
27263 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27264 }
27265
27266
27267
27268
27269
27270
27271
27272 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListAdvertiserAssignedTargetingOptionsResponse, error) {
27273 gensupport.SetOptions(c.urlParams_, opts...)
27274 res, err := c.doRequest("json")
27275 if res != nil && res.StatusCode == http.StatusNotModified {
27276 if res.Body != nil {
27277 res.Body.Close()
27278 }
27279 return nil, gensupport.WrapError(&googleapi.Error{
27280 Code: res.StatusCode,
27281 Header: res.Header,
27282 })
27283 }
27284 if err != nil {
27285 return nil, err
27286 }
27287 defer googleapi.CloseBody(res)
27288 if err := googleapi.CheckResponse(res); err != nil {
27289 return nil, gensupport.WrapError(err)
27290 }
27291 ret := &ListAdvertiserAssignedTargetingOptionsResponse{
27292 ServerResponse: googleapi.ServerResponse{
27293 Header: res.Header,
27294 HTTPStatusCode: res.StatusCode,
27295 },
27296 }
27297 target := &ret
27298 if err := gensupport.DecodeResponse(target, res); err != nil {
27299 return nil, err
27300 }
27301 return ret, nil
27302 }
27303
27304
27305
27306
27307 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListAdvertiserAssignedTargetingOptionsResponse) error) error {
27308 c.ctx_ = ctx
27309 defer c.PageToken(c.urlParams_.Get("pageToken"))
27310 for {
27311 x, err := c.Do()
27312 if err != nil {
27313 return err
27314 }
27315 if err := f(x); err != nil {
27316 return err
27317 }
27318 if x.NextPageToken == "" {
27319 return nil
27320 }
27321 c.PageToken(x.NextPageToken)
27322 }
27323 }
27324
27325 type CombinedAudiencesGetCall struct {
27326 s *Service
27327 combinedAudienceId int64
27328 urlParams_ gensupport.URLParams
27329 ifNoneMatch_ string
27330 ctx_ context.Context
27331 header_ http.Header
27332 }
27333
27334
27335
27336
27337 func (r *CombinedAudiencesService) Get(combinedAudienceId int64) *CombinedAudiencesGetCall {
27338 c := &CombinedAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27339 c.combinedAudienceId = combinedAudienceId
27340 return c
27341 }
27342
27343
27344
27345 func (c *CombinedAudiencesGetCall) AdvertiserId(advertiserId int64) *CombinedAudiencesGetCall {
27346 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
27347 return c
27348 }
27349
27350
27351
27352 func (c *CombinedAudiencesGetCall) PartnerId(partnerId int64) *CombinedAudiencesGetCall {
27353 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
27354 return c
27355 }
27356
27357
27358
27359
27360 func (c *CombinedAudiencesGetCall) Fields(s ...googleapi.Field) *CombinedAudiencesGetCall {
27361 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27362 return c
27363 }
27364
27365
27366
27367
27368 func (c *CombinedAudiencesGetCall) IfNoneMatch(entityTag string) *CombinedAudiencesGetCall {
27369 c.ifNoneMatch_ = entityTag
27370 return c
27371 }
27372
27373
27374 func (c *CombinedAudiencesGetCall) Context(ctx context.Context) *CombinedAudiencesGetCall {
27375 c.ctx_ = ctx
27376 return c
27377 }
27378
27379
27380
27381 func (c *CombinedAudiencesGetCall) Header() http.Header {
27382 if c.header_ == nil {
27383 c.header_ = make(http.Header)
27384 }
27385 return c.header_
27386 }
27387
27388 func (c *CombinedAudiencesGetCall) doRequest(alt string) (*http.Response, error) {
27389 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27390 if c.ifNoneMatch_ != "" {
27391 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27392 }
27393 var body io.Reader = nil
27394 c.urlParams_.Set("alt", alt)
27395 c.urlParams_.Set("prettyPrint", "false")
27396 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/combinedAudiences/{+combinedAudienceId}")
27397 urls += "?" + c.urlParams_.Encode()
27398 req, err := http.NewRequest("GET", urls, body)
27399 if err != nil {
27400 return nil, err
27401 }
27402 req.Header = reqHeaders
27403 googleapi.Expand(req.URL, map[string]string{
27404 "combinedAudienceId": strconv.FormatInt(c.combinedAudienceId, 10),
27405 })
27406 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27407 }
27408
27409
27410
27411
27412
27413
27414
27415 func (c *CombinedAudiencesGetCall) Do(opts ...googleapi.CallOption) (*CombinedAudience, error) {
27416 gensupport.SetOptions(c.urlParams_, opts...)
27417 res, err := c.doRequest("json")
27418 if res != nil && res.StatusCode == http.StatusNotModified {
27419 if res.Body != nil {
27420 res.Body.Close()
27421 }
27422 return nil, gensupport.WrapError(&googleapi.Error{
27423 Code: res.StatusCode,
27424 Header: res.Header,
27425 })
27426 }
27427 if err != nil {
27428 return nil, err
27429 }
27430 defer googleapi.CloseBody(res)
27431 if err := googleapi.CheckResponse(res); err != nil {
27432 return nil, gensupport.WrapError(err)
27433 }
27434 ret := &CombinedAudience{
27435 ServerResponse: googleapi.ServerResponse{
27436 Header: res.Header,
27437 HTTPStatusCode: res.StatusCode,
27438 },
27439 }
27440 target := &ret
27441 if err := gensupport.DecodeResponse(target, res); err != nil {
27442 return nil, err
27443 }
27444 return ret, nil
27445 }
27446
27447 type CombinedAudiencesListCall struct {
27448 s *Service
27449 urlParams_ gensupport.URLParams
27450 ifNoneMatch_ string
27451 ctx_ context.Context
27452 header_ http.Header
27453 }
27454
27455
27456
27457 func (r *CombinedAudiencesService) List() *CombinedAudiencesListCall {
27458 c := &CombinedAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27459 return c
27460 }
27461
27462
27463
27464 func (c *CombinedAudiencesListCall) AdvertiserId(advertiserId int64) *CombinedAudiencesListCall {
27465 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
27466 return c
27467 }
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478 func (c *CombinedAudiencesListCall) Filter(filter string) *CombinedAudiencesListCall {
27479 c.urlParams_.Set("filter", filter)
27480 return c
27481 }
27482
27483
27484
27485
27486
27487
27488 func (c *CombinedAudiencesListCall) OrderBy(orderBy string) *CombinedAudiencesListCall {
27489 c.urlParams_.Set("orderBy", orderBy)
27490 return c
27491 }
27492
27493
27494
27495
27496 func (c *CombinedAudiencesListCall) PageSize(pageSize int64) *CombinedAudiencesListCall {
27497 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27498 return c
27499 }
27500
27501
27502
27503
27504
27505 func (c *CombinedAudiencesListCall) PageToken(pageToken string) *CombinedAudiencesListCall {
27506 c.urlParams_.Set("pageToken", pageToken)
27507 return c
27508 }
27509
27510
27511
27512 func (c *CombinedAudiencesListCall) PartnerId(partnerId int64) *CombinedAudiencesListCall {
27513 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
27514 return c
27515 }
27516
27517
27518
27519
27520 func (c *CombinedAudiencesListCall) Fields(s ...googleapi.Field) *CombinedAudiencesListCall {
27521 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27522 return c
27523 }
27524
27525
27526
27527
27528 func (c *CombinedAudiencesListCall) IfNoneMatch(entityTag string) *CombinedAudiencesListCall {
27529 c.ifNoneMatch_ = entityTag
27530 return c
27531 }
27532
27533
27534 func (c *CombinedAudiencesListCall) Context(ctx context.Context) *CombinedAudiencesListCall {
27535 c.ctx_ = ctx
27536 return c
27537 }
27538
27539
27540
27541 func (c *CombinedAudiencesListCall) Header() http.Header {
27542 if c.header_ == nil {
27543 c.header_ = make(http.Header)
27544 }
27545 return c.header_
27546 }
27547
27548 func (c *CombinedAudiencesListCall) doRequest(alt string) (*http.Response, error) {
27549 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27550 if c.ifNoneMatch_ != "" {
27551 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27552 }
27553 var body io.Reader = nil
27554 c.urlParams_.Set("alt", alt)
27555 c.urlParams_.Set("prettyPrint", "false")
27556 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/combinedAudiences")
27557 urls += "?" + c.urlParams_.Encode()
27558 req, err := http.NewRequest("GET", urls, body)
27559 if err != nil {
27560 return nil, err
27561 }
27562 req.Header = reqHeaders
27563 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27564 }
27565
27566
27567
27568
27569
27570
27571
27572 func (c *CombinedAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListCombinedAudiencesResponse, error) {
27573 gensupport.SetOptions(c.urlParams_, opts...)
27574 res, err := c.doRequest("json")
27575 if res != nil && res.StatusCode == http.StatusNotModified {
27576 if res.Body != nil {
27577 res.Body.Close()
27578 }
27579 return nil, gensupport.WrapError(&googleapi.Error{
27580 Code: res.StatusCode,
27581 Header: res.Header,
27582 })
27583 }
27584 if err != nil {
27585 return nil, err
27586 }
27587 defer googleapi.CloseBody(res)
27588 if err := googleapi.CheckResponse(res); err != nil {
27589 return nil, gensupport.WrapError(err)
27590 }
27591 ret := &ListCombinedAudiencesResponse{
27592 ServerResponse: googleapi.ServerResponse{
27593 Header: res.Header,
27594 HTTPStatusCode: res.StatusCode,
27595 },
27596 }
27597 target := &ret
27598 if err := gensupport.DecodeResponse(target, res); err != nil {
27599 return nil, err
27600 }
27601 return ret, nil
27602 }
27603
27604
27605
27606
27607 func (c *CombinedAudiencesListCall) Pages(ctx context.Context, f func(*ListCombinedAudiencesResponse) error) error {
27608 c.ctx_ = ctx
27609 defer c.PageToken(c.urlParams_.Get("pageToken"))
27610 for {
27611 x, err := c.Do()
27612 if err != nil {
27613 return err
27614 }
27615 if err := f(x); err != nil {
27616 return err
27617 }
27618 if x.NextPageToken == "" {
27619 return nil
27620 }
27621 c.PageToken(x.NextPageToken)
27622 }
27623 }
27624
27625 type CustomBiddingAlgorithmsCreateCall struct {
27626 s *Service
27627 custombiddingalgorithm *CustomBiddingAlgorithm
27628 urlParams_ gensupport.URLParams
27629 ctx_ context.Context
27630 header_ http.Header
27631 }
27632
27633
27634
27635 func (r *CustomBiddingAlgorithmsService) Create(custombiddingalgorithm *CustomBiddingAlgorithm) *CustomBiddingAlgorithmsCreateCall {
27636 c := &CustomBiddingAlgorithmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27637 c.custombiddingalgorithm = custombiddingalgorithm
27638 return c
27639 }
27640
27641
27642
27643
27644 func (c *CustomBiddingAlgorithmsCreateCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsCreateCall {
27645 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27646 return c
27647 }
27648
27649
27650 func (c *CustomBiddingAlgorithmsCreateCall) Context(ctx context.Context) *CustomBiddingAlgorithmsCreateCall {
27651 c.ctx_ = ctx
27652 return c
27653 }
27654
27655
27656
27657 func (c *CustomBiddingAlgorithmsCreateCall) Header() http.Header {
27658 if c.header_ == nil {
27659 c.header_ = make(http.Header)
27660 }
27661 return c.header_
27662 }
27663
27664 func (c *CustomBiddingAlgorithmsCreateCall) doRequest(alt string) (*http.Response, error) {
27665 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27666 var body io.Reader = nil
27667 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingalgorithm)
27668 if err != nil {
27669 return nil, err
27670 }
27671 c.urlParams_.Set("alt", alt)
27672 c.urlParams_.Set("prettyPrint", "false")
27673 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms")
27674 urls += "?" + c.urlParams_.Encode()
27675 req, err := http.NewRequest("POST", urls, body)
27676 if err != nil {
27677 return nil, err
27678 }
27679 req.Header = reqHeaders
27680 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27681 }
27682
27683
27684
27685
27686
27687
27688
27689 func (c *CustomBiddingAlgorithmsCreateCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) {
27690 gensupport.SetOptions(c.urlParams_, opts...)
27691 res, err := c.doRequest("json")
27692 if res != nil && res.StatusCode == http.StatusNotModified {
27693 if res.Body != nil {
27694 res.Body.Close()
27695 }
27696 return nil, gensupport.WrapError(&googleapi.Error{
27697 Code: res.StatusCode,
27698 Header: res.Header,
27699 })
27700 }
27701 if err != nil {
27702 return nil, err
27703 }
27704 defer googleapi.CloseBody(res)
27705 if err := googleapi.CheckResponse(res); err != nil {
27706 return nil, gensupport.WrapError(err)
27707 }
27708 ret := &CustomBiddingAlgorithm{
27709 ServerResponse: googleapi.ServerResponse{
27710 Header: res.Header,
27711 HTTPStatusCode: res.StatusCode,
27712 },
27713 }
27714 target := &ret
27715 if err := gensupport.DecodeResponse(target, res); err != nil {
27716 return nil, err
27717 }
27718 return ret, nil
27719 }
27720
27721 type CustomBiddingAlgorithmsGetCall struct {
27722 s *Service
27723 customBiddingAlgorithmId int64
27724 urlParams_ gensupport.URLParams
27725 ifNoneMatch_ string
27726 ctx_ context.Context
27727 header_ http.Header
27728 }
27729
27730
27731
27732
27733 func (r *CustomBiddingAlgorithmsService) Get(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsGetCall {
27734 c := &CustomBiddingAlgorithmsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27735 c.customBiddingAlgorithmId = customBiddingAlgorithmId
27736 return c
27737 }
27738
27739
27740
27741 func (c *CustomBiddingAlgorithmsGetCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsGetCall {
27742 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
27743 return c
27744 }
27745
27746
27747
27748 func (c *CustomBiddingAlgorithmsGetCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsGetCall {
27749 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
27750 return c
27751 }
27752
27753
27754
27755
27756 func (c *CustomBiddingAlgorithmsGetCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsGetCall {
27757 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27758 return c
27759 }
27760
27761
27762
27763
27764 func (c *CustomBiddingAlgorithmsGetCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsGetCall {
27765 c.ifNoneMatch_ = entityTag
27766 return c
27767 }
27768
27769
27770 func (c *CustomBiddingAlgorithmsGetCall) Context(ctx context.Context) *CustomBiddingAlgorithmsGetCall {
27771 c.ctx_ = ctx
27772 return c
27773 }
27774
27775
27776
27777 func (c *CustomBiddingAlgorithmsGetCall) Header() http.Header {
27778 if c.header_ == nil {
27779 c.header_ = make(http.Header)
27780 }
27781 return c.header_
27782 }
27783
27784 func (c *CustomBiddingAlgorithmsGetCall) doRequest(alt string) (*http.Response, error) {
27785 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27786 if c.ifNoneMatch_ != "" {
27787 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27788 }
27789 var body io.Reader = nil
27790 c.urlParams_.Set("alt", alt)
27791 c.urlParams_.Set("prettyPrint", "false")
27792 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}")
27793 urls += "?" + c.urlParams_.Encode()
27794 req, err := http.NewRequest("GET", urls, body)
27795 if err != nil {
27796 return nil, err
27797 }
27798 req.Header = reqHeaders
27799 googleapi.Expand(req.URL, map[string]string{
27800 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
27801 })
27802 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27803 }
27804
27805
27806
27807
27808
27809
27810
27811 func (c *CustomBiddingAlgorithmsGetCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) {
27812 gensupport.SetOptions(c.urlParams_, opts...)
27813 res, err := c.doRequest("json")
27814 if res != nil && res.StatusCode == http.StatusNotModified {
27815 if res.Body != nil {
27816 res.Body.Close()
27817 }
27818 return nil, gensupport.WrapError(&googleapi.Error{
27819 Code: res.StatusCode,
27820 Header: res.Header,
27821 })
27822 }
27823 if err != nil {
27824 return nil, err
27825 }
27826 defer googleapi.CloseBody(res)
27827 if err := googleapi.CheckResponse(res); err != nil {
27828 return nil, gensupport.WrapError(err)
27829 }
27830 ret := &CustomBiddingAlgorithm{
27831 ServerResponse: googleapi.ServerResponse{
27832 Header: res.Header,
27833 HTTPStatusCode: res.StatusCode,
27834 },
27835 }
27836 target := &ret
27837 if err := gensupport.DecodeResponse(target, res); err != nil {
27838 return nil, err
27839 }
27840 return ret, nil
27841 }
27842
27843 type CustomBiddingAlgorithmsListCall struct {
27844 s *Service
27845 urlParams_ gensupport.URLParams
27846 ifNoneMatch_ string
27847 ctx_ context.Context
27848 header_ http.Header
27849 }
27850
27851
27852
27853
27854 func (r *CustomBiddingAlgorithmsService) List() *CustomBiddingAlgorithmsListCall {
27855 c := &CustomBiddingAlgorithmsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27856 return c
27857 }
27858
27859
27860
27861 func (c *CustomBiddingAlgorithmsListCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsListCall {
27862 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
27863 return c
27864 }
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879 func (c *CustomBiddingAlgorithmsListCall) Filter(filter string) *CustomBiddingAlgorithmsListCall {
27880 c.urlParams_.Set("filter", filter)
27881 return c
27882 }
27883
27884
27885
27886
27887
27888 func (c *CustomBiddingAlgorithmsListCall) OrderBy(orderBy string) *CustomBiddingAlgorithmsListCall {
27889 c.urlParams_.Set("orderBy", orderBy)
27890 return c
27891 }
27892
27893
27894
27895
27896 func (c *CustomBiddingAlgorithmsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsListCall {
27897 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
27898 return c
27899 }
27900
27901
27902
27903
27904
27905
27906 func (c *CustomBiddingAlgorithmsListCall) PageToken(pageToken string) *CustomBiddingAlgorithmsListCall {
27907 c.urlParams_.Set("pageToken", pageToken)
27908 return c
27909 }
27910
27911
27912
27913 func (c *CustomBiddingAlgorithmsListCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsListCall {
27914 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
27915 return c
27916 }
27917
27918
27919
27920
27921 func (c *CustomBiddingAlgorithmsListCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsListCall {
27922 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27923 return c
27924 }
27925
27926
27927
27928
27929 func (c *CustomBiddingAlgorithmsListCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsListCall {
27930 c.ifNoneMatch_ = entityTag
27931 return c
27932 }
27933
27934
27935 func (c *CustomBiddingAlgorithmsListCall) Context(ctx context.Context) *CustomBiddingAlgorithmsListCall {
27936 c.ctx_ = ctx
27937 return c
27938 }
27939
27940
27941
27942 func (c *CustomBiddingAlgorithmsListCall) Header() http.Header {
27943 if c.header_ == nil {
27944 c.header_ = make(http.Header)
27945 }
27946 return c.header_
27947 }
27948
27949 func (c *CustomBiddingAlgorithmsListCall) doRequest(alt string) (*http.Response, error) {
27950 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27951 if c.ifNoneMatch_ != "" {
27952 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27953 }
27954 var body io.Reader = nil
27955 c.urlParams_.Set("alt", alt)
27956 c.urlParams_.Set("prettyPrint", "false")
27957 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms")
27958 urls += "?" + c.urlParams_.Encode()
27959 req, err := http.NewRequest("GET", urls, body)
27960 if err != nil {
27961 return nil, err
27962 }
27963 req.Header = reqHeaders
27964 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27965 }
27966
27967
27968
27969
27970
27971
27972
27973 func (c *CustomBiddingAlgorithmsListCall) Do(opts ...googleapi.CallOption) (*ListCustomBiddingAlgorithmsResponse, error) {
27974 gensupport.SetOptions(c.urlParams_, opts...)
27975 res, err := c.doRequest("json")
27976 if res != nil && res.StatusCode == http.StatusNotModified {
27977 if res.Body != nil {
27978 res.Body.Close()
27979 }
27980 return nil, gensupport.WrapError(&googleapi.Error{
27981 Code: res.StatusCode,
27982 Header: res.Header,
27983 })
27984 }
27985 if err != nil {
27986 return nil, err
27987 }
27988 defer googleapi.CloseBody(res)
27989 if err := googleapi.CheckResponse(res); err != nil {
27990 return nil, gensupport.WrapError(err)
27991 }
27992 ret := &ListCustomBiddingAlgorithmsResponse{
27993 ServerResponse: googleapi.ServerResponse{
27994 Header: res.Header,
27995 HTTPStatusCode: res.StatusCode,
27996 },
27997 }
27998 target := &ret
27999 if err := gensupport.DecodeResponse(target, res); err != nil {
28000 return nil, err
28001 }
28002 return ret, nil
28003 }
28004
28005
28006
28007
28008 func (c *CustomBiddingAlgorithmsListCall) Pages(ctx context.Context, f func(*ListCustomBiddingAlgorithmsResponse) error) error {
28009 c.ctx_ = ctx
28010 defer c.PageToken(c.urlParams_.Get("pageToken"))
28011 for {
28012 x, err := c.Do()
28013 if err != nil {
28014 return err
28015 }
28016 if err := f(x); err != nil {
28017 return err
28018 }
28019 if x.NextPageToken == "" {
28020 return nil
28021 }
28022 c.PageToken(x.NextPageToken)
28023 }
28024 }
28025
28026 type CustomBiddingAlgorithmsPatchCall struct {
28027 s *Service
28028 customBiddingAlgorithmId int64
28029 custombiddingalgorithm *CustomBiddingAlgorithm
28030 urlParams_ gensupport.URLParams
28031 ctx_ context.Context
28032 header_ http.Header
28033 }
28034
28035
28036
28037
28038
28039
28040 func (r *CustomBiddingAlgorithmsService) Patch(customBiddingAlgorithmId int64, custombiddingalgorithm *CustomBiddingAlgorithm) *CustomBiddingAlgorithmsPatchCall {
28041 c := &CustomBiddingAlgorithmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28042 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28043 c.custombiddingalgorithm = custombiddingalgorithm
28044 return c
28045 }
28046
28047
28048
28049 func (c *CustomBiddingAlgorithmsPatchCall) UpdateMask(updateMask string) *CustomBiddingAlgorithmsPatchCall {
28050 c.urlParams_.Set("updateMask", updateMask)
28051 return c
28052 }
28053
28054
28055
28056
28057 func (c *CustomBiddingAlgorithmsPatchCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsPatchCall {
28058 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28059 return c
28060 }
28061
28062
28063 func (c *CustomBiddingAlgorithmsPatchCall) Context(ctx context.Context) *CustomBiddingAlgorithmsPatchCall {
28064 c.ctx_ = ctx
28065 return c
28066 }
28067
28068
28069
28070 func (c *CustomBiddingAlgorithmsPatchCall) Header() http.Header {
28071 if c.header_ == nil {
28072 c.header_ = make(http.Header)
28073 }
28074 return c.header_
28075 }
28076
28077 func (c *CustomBiddingAlgorithmsPatchCall) doRequest(alt string) (*http.Response, error) {
28078 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
28079 var body io.Reader = nil
28080 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingalgorithm)
28081 if err != nil {
28082 return nil, err
28083 }
28084 c.urlParams_.Set("alt", alt)
28085 c.urlParams_.Set("prettyPrint", "false")
28086 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}")
28087 urls += "?" + c.urlParams_.Encode()
28088 req, err := http.NewRequest("PATCH", urls, body)
28089 if err != nil {
28090 return nil, err
28091 }
28092 req.Header = reqHeaders
28093 googleapi.Expand(req.URL, map[string]string{
28094 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28095 })
28096 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28097 }
28098
28099
28100
28101
28102
28103
28104
28105 func (c *CustomBiddingAlgorithmsPatchCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) {
28106 gensupport.SetOptions(c.urlParams_, opts...)
28107 res, err := c.doRequest("json")
28108 if res != nil && res.StatusCode == http.StatusNotModified {
28109 if res.Body != nil {
28110 res.Body.Close()
28111 }
28112 return nil, gensupport.WrapError(&googleapi.Error{
28113 Code: res.StatusCode,
28114 Header: res.Header,
28115 })
28116 }
28117 if err != nil {
28118 return nil, err
28119 }
28120 defer googleapi.CloseBody(res)
28121 if err := googleapi.CheckResponse(res); err != nil {
28122 return nil, gensupport.WrapError(err)
28123 }
28124 ret := &CustomBiddingAlgorithm{
28125 ServerResponse: googleapi.ServerResponse{
28126 Header: res.Header,
28127 HTTPStatusCode: res.StatusCode,
28128 },
28129 }
28130 target := &ret
28131 if err := gensupport.DecodeResponse(target, res); err != nil {
28132 return nil, err
28133 }
28134 return ret, nil
28135 }
28136
28137 type CustomBiddingAlgorithmsUploadRulesCall struct {
28138 s *Service
28139 customBiddingAlgorithmId int64
28140 urlParams_ gensupport.URLParams
28141 ifNoneMatch_ string
28142 ctx_ context.Context
28143 header_ http.Header
28144 }
28145
28146
28147
28148
28149
28150
28151
28152
28153 func (r *CustomBiddingAlgorithmsService) UploadRules(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsUploadRulesCall {
28154 c := &CustomBiddingAlgorithmsUploadRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28155 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28156 return c
28157 }
28158
28159
28160
28161 func (c *CustomBiddingAlgorithmsUploadRulesCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsUploadRulesCall {
28162 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28163 return c
28164 }
28165
28166
28167
28168 func (c *CustomBiddingAlgorithmsUploadRulesCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsUploadRulesCall {
28169 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28170 return c
28171 }
28172
28173
28174
28175
28176 func (c *CustomBiddingAlgorithmsUploadRulesCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsUploadRulesCall {
28177 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28178 return c
28179 }
28180
28181
28182
28183
28184 func (c *CustomBiddingAlgorithmsUploadRulesCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsUploadRulesCall {
28185 c.ifNoneMatch_ = entityTag
28186 return c
28187 }
28188
28189
28190 func (c *CustomBiddingAlgorithmsUploadRulesCall) Context(ctx context.Context) *CustomBiddingAlgorithmsUploadRulesCall {
28191 c.ctx_ = ctx
28192 return c
28193 }
28194
28195
28196
28197 func (c *CustomBiddingAlgorithmsUploadRulesCall) Header() http.Header {
28198 if c.header_ == nil {
28199 c.header_ = make(http.Header)
28200 }
28201 return c.header_
28202 }
28203
28204 func (c *CustomBiddingAlgorithmsUploadRulesCall) doRequest(alt string) (*http.Response, error) {
28205 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28206 if c.ifNoneMatch_ != "" {
28207 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28208 }
28209 var body io.Reader = nil
28210 c.urlParams_.Set("alt", alt)
28211 c.urlParams_.Set("prettyPrint", "false")
28212 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}:uploadRules")
28213 urls += "?" + c.urlParams_.Encode()
28214 req, err := http.NewRequest("GET", urls, body)
28215 if err != nil {
28216 return nil, err
28217 }
28218 req.Header = reqHeaders
28219 googleapi.Expand(req.URL, map[string]string{
28220 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28221 })
28222 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28223 }
28224
28225
28226
28227
28228
28229
28230
28231 func (c *CustomBiddingAlgorithmsUploadRulesCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithmRulesRef, error) {
28232 gensupport.SetOptions(c.urlParams_, opts...)
28233 res, err := c.doRequest("json")
28234 if res != nil && res.StatusCode == http.StatusNotModified {
28235 if res.Body != nil {
28236 res.Body.Close()
28237 }
28238 return nil, gensupport.WrapError(&googleapi.Error{
28239 Code: res.StatusCode,
28240 Header: res.Header,
28241 })
28242 }
28243 if err != nil {
28244 return nil, err
28245 }
28246 defer googleapi.CloseBody(res)
28247 if err := googleapi.CheckResponse(res); err != nil {
28248 return nil, gensupport.WrapError(err)
28249 }
28250 ret := &CustomBiddingAlgorithmRulesRef{
28251 ServerResponse: googleapi.ServerResponse{
28252 Header: res.Header,
28253 HTTPStatusCode: res.StatusCode,
28254 },
28255 }
28256 target := &ret
28257 if err := gensupport.DecodeResponse(target, res); err != nil {
28258 return nil, err
28259 }
28260 return ret, nil
28261 }
28262
28263 type CustomBiddingAlgorithmsUploadScriptCall struct {
28264 s *Service
28265 customBiddingAlgorithmId int64
28266 urlParams_ gensupport.URLParams
28267 ifNoneMatch_ string
28268 ctx_ context.Context
28269 header_ http.Header
28270 }
28271
28272
28273
28274
28275
28276
28277
28278
28279 func (r *CustomBiddingAlgorithmsService) UploadScript(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsUploadScriptCall {
28280 c := &CustomBiddingAlgorithmsUploadScriptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28281 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28282 return c
28283 }
28284
28285
28286
28287 func (c *CustomBiddingAlgorithmsUploadScriptCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsUploadScriptCall {
28288 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28289 return c
28290 }
28291
28292
28293
28294
28295 func (c *CustomBiddingAlgorithmsUploadScriptCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsUploadScriptCall {
28296 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28297 return c
28298 }
28299
28300
28301
28302
28303 func (c *CustomBiddingAlgorithmsUploadScriptCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsUploadScriptCall {
28304 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28305 return c
28306 }
28307
28308
28309
28310
28311 func (c *CustomBiddingAlgorithmsUploadScriptCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsUploadScriptCall {
28312 c.ifNoneMatch_ = entityTag
28313 return c
28314 }
28315
28316
28317 func (c *CustomBiddingAlgorithmsUploadScriptCall) Context(ctx context.Context) *CustomBiddingAlgorithmsUploadScriptCall {
28318 c.ctx_ = ctx
28319 return c
28320 }
28321
28322
28323
28324 func (c *CustomBiddingAlgorithmsUploadScriptCall) Header() http.Header {
28325 if c.header_ == nil {
28326 c.header_ = make(http.Header)
28327 }
28328 return c.header_
28329 }
28330
28331 func (c *CustomBiddingAlgorithmsUploadScriptCall) doRequest(alt string) (*http.Response, error) {
28332 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28333 if c.ifNoneMatch_ != "" {
28334 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28335 }
28336 var body io.Reader = nil
28337 c.urlParams_.Set("alt", alt)
28338 c.urlParams_.Set("prettyPrint", "false")
28339 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}:uploadScript")
28340 urls += "?" + c.urlParams_.Encode()
28341 req, err := http.NewRequest("GET", urls, body)
28342 if err != nil {
28343 return nil, err
28344 }
28345 req.Header = reqHeaders
28346 googleapi.Expand(req.URL, map[string]string{
28347 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28348 })
28349 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28350 }
28351
28352
28353
28354
28355
28356
28357
28358 func (c *CustomBiddingAlgorithmsUploadScriptCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScriptRef, error) {
28359 gensupport.SetOptions(c.urlParams_, opts...)
28360 res, err := c.doRequest("json")
28361 if res != nil && res.StatusCode == http.StatusNotModified {
28362 if res.Body != nil {
28363 res.Body.Close()
28364 }
28365 return nil, gensupport.WrapError(&googleapi.Error{
28366 Code: res.StatusCode,
28367 Header: res.Header,
28368 })
28369 }
28370 if err != nil {
28371 return nil, err
28372 }
28373 defer googleapi.CloseBody(res)
28374 if err := googleapi.CheckResponse(res); err != nil {
28375 return nil, gensupport.WrapError(err)
28376 }
28377 ret := &CustomBiddingScriptRef{
28378 ServerResponse: googleapi.ServerResponse{
28379 Header: res.Header,
28380 HTTPStatusCode: res.StatusCode,
28381 },
28382 }
28383 target := &ret
28384 if err := gensupport.DecodeResponse(target, res); err != nil {
28385 return nil, err
28386 }
28387 return ret, nil
28388 }
28389
28390 type CustomBiddingAlgorithmsRulesCreateCall struct {
28391 s *Service
28392 customBiddingAlgorithmId int64
28393 custombiddingalgorithmrules *CustomBiddingAlgorithmRules
28394 urlParams_ gensupport.URLParams
28395 ctx_ context.Context
28396 header_ http.Header
28397 }
28398
28399
28400
28401
28402
28403
28404 func (r *CustomBiddingAlgorithmsRulesService) Create(customBiddingAlgorithmId int64, custombiddingalgorithmrules *CustomBiddingAlgorithmRules) *CustomBiddingAlgorithmsRulesCreateCall {
28405 c := &CustomBiddingAlgorithmsRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28406 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28407 c.custombiddingalgorithmrules = custombiddingalgorithmrules
28408 return c
28409 }
28410
28411
28412
28413 func (c *CustomBiddingAlgorithmsRulesCreateCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsRulesCreateCall {
28414 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28415 return c
28416 }
28417
28418
28419
28420
28421 func (c *CustomBiddingAlgorithmsRulesCreateCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsRulesCreateCall {
28422 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28423 return c
28424 }
28425
28426
28427
28428
28429 func (c *CustomBiddingAlgorithmsRulesCreateCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsRulesCreateCall {
28430 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28431 return c
28432 }
28433
28434
28435 func (c *CustomBiddingAlgorithmsRulesCreateCall) Context(ctx context.Context) *CustomBiddingAlgorithmsRulesCreateCall {
28436 c.ctx_ = ctx
28437 return c
28438 }
28439
28440
28441
28442 func (c *CustomBiddingAlgorithmsRulesCreateCall) Header() http.Header {
28443 if c.header_ == nil {
28444 c.header_ = make(http.Header)
28445 }
28446 return c.header_
28447 }
28448
28449 func (c *CustomBiddingAlgorithmsRulesCreateCall) doRequest(alt string) (*http.Response, error) {
28450 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
28451 var body io.Reader = nil
28452 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingalgorithmrules)
28453 if err != nil {
28454 return nil, err
28455 }
28456 c.urlParams_.Set("alt", alt)
28457 c.urlParams_.Set("prettyPrint", "false")
28458 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}/rules")
28459 urls += "?" + c.urlParams_.Encode()
28460 req, err := http.NewRequest("POST", urls, body)
28461 if err != nil {
28462 return nil, err
28463 }
28464 req.Header = reqHeaders
28465 googleapi.Expand(req.URL, map[string]string{
28466 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28467 })
28468 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28469 }
28470
28471
28472
28473
28474
28475
28476
28477 func (c *CustomBiddingAlgorithmsRulesCreateCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithmRules, error) {
28478 gensupport.SetOptions(c.urlParams_, opts...)
28479 res, err := c.doRequest("json")
28480 if res != nil && res.StatusCode == http.StatusNotModified {
28481 if res.Body != nil {
28482 res.Body.Close()
28483 }
28484 return nil, gensupport.WrapError(&googleapi.Error{
28485 Code: res.StatusCode,
28486 Header: res.Header,
28487 })
28488 }
28489 if err != nil {
28490 return nil, err
28491 }
28492 defer googleapi.CloseBody(res)
28493 if err := googleapi.CheckResponse(res); err != nil {
28494 return nil, gensupport.WrapError(err)
28495 }
28496 ret := &CustomBiddingAlgorithmRules{
28497 ServerResponse: googleapi.ServerResponse{
28498 Header: res.Header,
28499 HTTPStatusCode: res.StatusCode,
28500 },
28501 }
28502 target := &ret
28503 if err := gensupport.DecodeResponse(target, res); err != nil {
28504 return nil, err
28505 }
28506 return ret, nil
28507 }
28508
28509 type CustomBiddingAlgorithmsRulesGetCall struct {
28510 s *Service
28511 customBiddingAlgorithmId int64
28512 customBiddingAlgorithmRulesId int64
28513 urlParams_ gensupport.URLParams
28514 ifNoneMatch_ string
28515 ctx_ context.Context
28516 header_ http.Header
28517 }
28518
28519
28520
28521
28522
28523
28524 func (r *CustomBiddingAlgorithmsRulesService) Get(customBiddingAlgorithmId int64, customBiddingAlgorithmRulesId int64) *CustomBiddingAlgorithmsRulesGetCall {
28525 c := &CustomBiddingAlgorithmsRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28526 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28527 c.customBiddingAlgorithmRulesId = customBiddingAlgorithmRulesId
28528 return c
28529 }
28530
28531
28532
28533 func (c *CustomBiddingAlgorithmsRulesGetCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsRulesGetCall {
28534 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28535 return c
28536 }
28537
28538
28539
28540 func (c *CustomBiddingAlgorithmsRulesGetCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsRulesGetCall {
28541 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28542 return c
28543 }
28544
28545
28546
28547
28548 func (c *CustomBiddingAlgorithmsRulesGetCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsRulesGetCall {
28549 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28550 return c
28551 }
28552
28553
28554
28555
28556 func (c *CustomBiddingAlgorithmsRulesGetCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsRulesGetCall {
28557 c.ifNoneMatch_ = entityTag
28558 return c
28559 }
28560
28561
28562 func (c *CustomBiddingAlgorithmsRulesGetCall) Context(ctx context.Context) *CustomBiddingAlgorithmsRulesGetCall {
28563 c.ctx_ = ctx
28564 return c
28565 }
28566
28567
28568
28569 func (c *CustomBiddingAlgorithmsRulesGetCall) Header() http.Header {
28570 if c.header_ == nil {
28571 c.header_ = make(http.Header)
28572 }
28573 return c.header_
28574 }
28575
28576 func (c *CustomBiddingAlgorithmsRulesGetCall) doRequest(alt string) (*http.Response, error) {
28577 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28578 if c.ifNoneMatch_ != "" {
28579 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28580 }
28581 var body io.Reader = nil
28582 c.urlParams_.Set("alt", alt)
28583 c.urlParams_.Set("prettyPrint", "false")
28584 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}/rules/{+customBiddingAlgorithmRulesId}")
28585 urls += "?" + c.urlParams_.Encode()
28586 req, err := http.NewRequest("GET", urls, body)
28587 if err != nil {
28588 return nil, err
28589 }
28590 req.Header = reqHeaders
28591 googleapi.Expand(req.URL, map[string]string{
28592 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28593 "customBiddingAlgorithmRulesId": strconv.FormatInt(c.customBiddingAlgorithmRulesId, 10),
28594 })
28595 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28596 }
28597
28598
28599
28600
28601
28602
28603
28604 func (c *CustomBiddingAlgorithmsRulesGetCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithmRules, error) {
28605 gensupport.SetOptions(c.urlParams_, opts...)
28606 res, err := c.doRequest("json")
28607 if res != nil && res.StatusCode == http.StatusNotModified {
28608 if res.Body != nil {
28609 res.Body.Close()
28610 }
28611 return nil, gensupport.WrapError(&googleapi.Error{
28612 Code: res.StatusCode,
28613 Header: res.Header,
28614 })
28615 }
28616 if err != nil {
28617 return nil, err
28618 }
28619 defer googleapi.CloseBody(res)
28620 if err := googleapi.CheckResponse(res); err != nil {
28621 return nil, gensupport.WrapError(err)
28622 }
28623 ret := &CustomBiddingAlgorithmRules{
28624 ServerResponse: googleapi.ServerResponse{
28625 Header: res.Header,
28626 HTTPStatusCode: res.StatusCode,
28627 },
28628 }
28629 target := &ret
28630 if err := gensupport.DecodeResponse(target, res); err != nil {
28631 return nil, err
28632 }
28633 return ret, nil
28634 }
28635
28636 type CustomBiddingAlgorithmsRulesListCall struct {
28637 s *Service
28638 customBiddingAlgorithmId int64
28639 urlParams_ gensupport.URLParams
28640 ifNoneMatch_ string
28641 ctx_ context.Context
28642 header_ http.Header
28643 }
28644
28645
28646
28647
28648
28649
28650 func (r *CustomBiddingAlgorithmsRulesService) List(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsRulesListCall {
28651 c := &CustomBiddingAlgorithmsRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28652 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28653 return c
28654 }
28655
28656
28657
28658 func (c *CustomBiddingAlgorithmsRulesListCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsRulesListCall {
28659 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28660 return c
28661 }
28662
28663
28664
28665
28666
28667 func (c *CustomBiddingAlgorithmsRulesListCall) OrderBy(orderBy string) *CustomBiddingAlgorithmsRulesListCall {
28668 c.urlParams_.Set("orderBy", orderBy)
28669 return c
28670 }
28671
28672
28673
28674
28675 func (c *CustomBiddingAlgorithmsRulesListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsRulesListCall {
28676 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
28677 return c
28678 }
28679
28680
28681
28682
28683
28684
28685 func (c *CustomBiddingAlgorithmsRulesListCall) PageToken(pageToken string) *CustomBiddingAlgorithmsRulesListCall {
28686 c.urlParams_.Set("pageToken", pageToken)
28687 return c
28688 }
28689
28690
28691
28692 func (c *CustomBiddingAlgorithmsRulesListCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsRulesListCall {
28693 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28694 return c
28695 }
28696
28697
28698
28699
28700 func (c *CustomBiddingAlgorithmsRulesListCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsRulesListCall {
28701 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28702 return c
28703 }
28704
28705
28706
28707
28708 func (c *CustomBiddingAlgorithmsRulesListCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsRulesListCall {
28709 c.ifNoneMatch_ = entityTag
28710 return c
28711 }
28712
28713
28714 func (c *CustomBiddingAlgorithmsRulesListCall) Context(ctx context.Context) *CustomBiddingAlgorithmsRulesListCall {
28715 c.ctx_ = ctx
28716 return c
28717 }
28718
28719
28720
28721 func (c *CustomBiddingAlgorithmsRulesListCall) Header() http.Header {
28722 if c.header_ == nil {
28723 c.header_ = make(http.Header)
28724 }
28725 return c.header_
28726 }
28727
28728 func (c *CustomBiddingAlgorithmsRulesListCall) doRequest(alt string) (*http.Response, error) {
28729 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28730 if c.ifNoneMatch_ != "" {
28731 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28732 }
28733 var body io.Reader = nil
28734 c.urlParams_.Set("alt", alt)
28735 c.urlParams_.Set("prettyPrint", "false")
28736 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}/rules")
28737 urls += "?" + c.urlParams_.Encode()
28738 req, err := http.NewRequest("GET", urls, body)
28739 if err != nil {
28740 return nil, err
28741 }
28742 req.Header = reqHeaders
28743 googleapi.Expand(req.URL, map[string]string{
28744 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28745 })
28746 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28747 }
28748
28749
28750
28751
28752
28753
28754
28755 func (c *CustomBiddingAlgorithmsRulesListCall) Do(opts ...googleapi.CallOption) (*ListCustomBiddingAlgorithmRulesResponse, error) {
28756 gensupport.SetOptions(c.urlParams_, opts...)
28757 res, err := c.doRequest("json")
28758 if res != nil && res.StatusCode == http.StatusNotModified {
28759 if res.Body != nil {
28760 res.Body.Close()
28761 }
28762 return nil, gensupport.WrapError(&googleapi.Error{
28763 Code: res.StatusCode,
28764 Header: res.Header,
28765 })
28766 }
28767 if err != nil {
28768 return nil, err
28769 }
28770 defer googleapi.CloseBody(res)
28771 if err := googleapi.CheckResponse(res); err != nil {
28772 return nil, gensupport.WrapError(err)
28773 }
28774 ret := &ListCustomBiddingAlgorithmRulesResponse{
28775 ServerResponse: googleapi.ServerResponse{
28776 Header: res.Header,
28777 HTTPStatusCode: res.StatusCode,
28778 },
28779 }
28780 target := &ret
28781 if err := gensupport.DecodeResponse(target, res); err != nil {
28782 return nil, err
28783 }
28784 return ret, nil
28785 }
28786
28787
28788
28789
28790 func (c *CustomBiddingAlgorithmsRulesListCall) Pages(ctx context.Context, f func(*ListCustomBiddingAlgorithmRulesResponse) error) error {
28791 c.ctx_ = ctx
28792 defer c.PageToken(c.urlParams_.Get("pageToken"))
28793 for {
28794 x, err := c.Do()
28795 if err != nil {
28796 return err
28797 }
28798 if err := f(x); err != nil {
28799 return err
28800 }
28801 if x.NextPageToken == "" {
28802 return nil
28803 }
28804 c.PageToken(x.NextPageToken)
28805 }
28806 }
28807
28808 type CustomBiddingAlgorithmsScriptsCreateCall struct {
28809 s *Service
28810 customBiddingAlgorithmId int64
28811 custombiddingscript *CustomBiddingScript
28812 urlParams_ gensupport.URLParams
28813 ctx_ context.Context
28814 header_ http.Header
28815 }
28816
28817
28818
28819
28820
28821
28822 func (r *CustomBiddingAlgorithmsScriptsService) Create(customBiddingAlgorithmId int64, custombiddingscript *CustomBiddingScript) *CustomBiddingAlgorithmsScriptsCreateCall {
28823 c := &CustomBiddingAlgorithmsScriptsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28824 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28825 c.custombiddingscript = custombiddingscript
28826 return c
28827 }
28828
28829
28830
28831 func (c *CustomBiddingAlgorithmsScriptsCreateCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsCreateCall {
28832 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28833 return c
28834 }
28835
28836
28837
28838
28839 func (c *CustomBiddingAlgorithmsScriptsCreateCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsCreateCall {
28840 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28841 return c
28842 }
28843
28844
28845
28846
28847 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsCreateCall {
28848 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28849 return c
28850 }
28851
28852
28853 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsCreateCall {
28854 c.ctx_ = ctx
28855 return c
28856 }
28857
28858
28859
28860 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Header() http.Header {
28861 if c.header_ == nil {
28862 c.header_ = make(http.Header)
28863 }
28864 return c.header_
28865 }
28866
28867 func (c *CustomBiddingAlgorithmsScriptsCreateCall) doRequest(alt string) (*http.Response, error) {
28868 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
28869 var body io.Reader = nil
28870 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingscript)
28871 if err != nil {
28872 return nil, err
28873 }
28874 c.urlParams_.Set("alt", alt)
28875 c.urlParams_.Set("prettyPrint", "false")
28876 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts")
28877 urls += "?" + c.urlParams_.Encode()
28878 req, err := http.NewRequest("POST", urls, body)
28879 if err != nil {
28880 return nil, err
28881 }
28882 req.Header = reqHeaders
28883 googleapi.Expand(req.URL, map[string]string{
28884 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
28885 })
28886 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28887 }
28888
28889
28890
28891
28892
28893
28894
28895 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScript, error) {
28896 gensupport.SetOptions(c.urlParams_, opts...)
28897 res, err := c.doRequest("json")
28898 if res != nil && res.StatusCode == http.StatusNotModified {
28899 if res.Body != nil {
28900 res.Body.Close()
28901 }
28902 return nil, gensupport.WrapError(&googleapi.Error{
28903 Code: res.StatusCode,
28904 Header: res.Header,
28905 })
28906 }
28907 if err != nil {
28908 return nil, err
28909 }
28910 defer googleapi.CloseBody(res)
28911 if err := googleapi.CheckResponse(res); err != nil {
28912 return nil, gensupport.WrapError(err)
28913 }
28914 ret := &CustomBiddingScript{
28915 ServerResponse: googleapi.ServerResponse{
28916 Header: res.Header,
28917 HTTPStatusCode: res.StatusCode,
28918 },
28919 }
28920 target := &ret
28921 if err := gensupport.DecodeResponse(target, res); err != nil {
28922 return nil, err
28923 }
28924 return ret, nil
28925 }
28926
28927 type CustomBiddingAlgorithmsScriptsGetCall struct {
28928 s *Service
28929 customBiddingAlgorithmId int64
28930 customBiddingScriptId int64
28931 urlParams_ gensupport.URLParams
28932 ifNoneMatch_ string
28933 ctx_ context.Context
28934 header_ http.Header
28935 }
28936
28937
28938
28939
28940
28941
28942 func (r *CustomBiddingAlgorithmsScriptsService) Get(customBiddingAlgorithmId int64, customBiddingScriptId int64) *CustomBiddingAlgorithmsScriptsGetCall {
28943 c := &CustomBiddingAlgorithmsScriptsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28944 c.customBiddingAlgorithmId = customBiddingAlgorithmId
28945 c.customBiddingScriptId = customBiddingScriptId
28946 return c
28947 }
28948
28949
28950
28951 func (c *CustomBiddingAlgorithmsScriptsGetCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsGetCall {
28952 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28953 return c
28954 }
28955
28956
28957
28958
28959 func (c *CustomBiddingAlgorithmsScriptsGetCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsGetCall {
28960 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
28961 return c
28962 }
28963
28964
28965
28966
28967 func (c *CustomBiddingAlgorithmsScriptsGetCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsGetCall {
28968 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28969 return c
28970 }
28971
28972
28973
28974
28975 func (c *CustomBiddingAlgorithmsScriptsGetCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsScriptsGetCall {
28976 c.ifNoneMatch_ = entityTag
28977 return c
28978 }
28979
28980
28981 func (c *CustomBiddingAlgorithmsScriptsGetCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsGetCall {
28982 c.ctx_ = ctx
28983 return c
28984 }
28985
28986
28987
28988 func (c *CustomBiddingAlgorithmsScriptsGetCall) Header() http.Header {
28989 if c.header_ == nil {
28990 c.header_ = make(http.Header)
28991 }
28992 return c.header_
28993 }
28994
28995 func (c *CustomBiddingAlgorithmsScriptsGetCall) doRequest(alt string) (*http.Response, error) {
28996 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28997 if c.ifNoneMatch_ != "" {
28998 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28999 }
29000 var body io.Reader = nil
29001 c.urlParams_.Set("alt", alt)
29002 c.urlParams_.Set("prettyPrint", "false")
29003 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts/{+customBiddingScriptId}")
29004 urls += "?" + c.urlParams_.Encode()
29005 req, err := http.NewRequest("GET", urls, body)
29006 if err != nil {
29007 return nil, err
29008 }
29009 req.Header = reqHeaders
29010 googleapi.Expand(req.URL, map[string]string{
29011 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
29012 "customBiddingScriptId": strconv.FormatInt(c.customBiddingScriptId, 10),
29013 })
29014 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29015 }
29016
29017
29018
29019
29020
29021
29022
29023 func (c *CustomBiddingAlgorithmsScriptsGetCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScript, error) {
29024 gensupport.SetOptions(c.urlParams_, opts...)
29025 res, err := c.doRequest("json")
29026 if res != nil && res.StatusCode == http.StatusNotModified {
29027 if res.Body != nil {
29028 res.Body.Close()
29029 }
29030 return nil, gensupport.WrapError(&googleapi.Error{
29031 Code: res.StatusCode,
29032 Header: res.Header,
29033 })
29034 }
29035 if err != nil {
29036 return nil, err
29037 }
29038 defer googleapi.CloseBody(res)
29039 if err := googleapi.CheckResponse(res); err != nil {
29040 return nil, gensupport.WrapError(err)
29041 }
29042 ret := &CustomBiddingScript{
29043 ServerResponse: googleapi.ServerResponse{
29044 Header: res.Header,
29045 HTTPStatusCode: res.StatusCode,
29046 },
29047 }
29048 target := &ret
29049 if err := gensupport.DecodeResponse(target, res); err != nil {
29050 return nil, err
29051 }
29052 return ret, nil
29053 }
29054
29055 type CustomBiddingAlgorithmsScriptsListCall struct {
29056 s *Service
29057 customBiddingAlgorithmId int64
29058 urlParams_ gensupport.URLParams
29059 ifNoneMatch_ string
29060 ctx_ context.Context
29061 header_ http.Header
29062 }
29063
29064
29065
29066
29067
29068
29069 func (r *CustomBiddingAlgorithmsScriptsService) List(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsScriptsListCall {
29070 c := &CustomBiddingAlgorithmsScriptsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29071 c.customBiddingAlgorithmId = customBiddingAlgorithmId
29072 return c
29073 }
29074
29075
29076
29077 func (c *CustomBiddingAlgorithmsScriptsListCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsListCall {
29078 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29079 return c
29080 }
29081
29082
29083
29084
29085
29086 func (c *CustomBiddingAlgorithmsScriptsListCall) OrderBy(orderBy string) *CustomBiddingAlgorithmsScriptsListCall {
29087 c.urlParams_.Set("orderBy", orderBy)
29088 return c
29089 }
29090
29091
29092
29093
29094 func (c *CustomBiddingAlgorithmsScriptsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsScriptsListCall {
29095 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29096 return c
29097 }
29098
29099
29100
29101
29102
29103
29104 func (c *CustomBiddingAlgorithmsScriptsListCall) PageToken(pageToken string) *CustomBiddingAlgorithmsScriptsListCall {
29105 c.urlParams_.Set("pageToken", pageToken)
29106 return c
29107 }
29108
29109
29110
29111
29112 func (c *CustomBiddingAlgorithmsScriptsListCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsListCall {
29113 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
29114 return c
29115 }
29116
29117
29118
29119
29120 func (c *CustomBiddingAlgorithmsScriptsListCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsListCall {
29121 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29122 return c
29123 }
29124
29125
29126
29127
29128 func (c *CustomBiddingAlgorithmsScriptsListCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsScriptsListCall {
29129 c.ifNoneMatch_ = entityTag
29130 return c
29131 }
29132
29133
29134 func (c *CustomBiddingAlgorithmsScriptsListCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsListCall {
29135 c.ctx_ = ctx
29136 return c
29137 }
29138
29139
29140
29141 func (c *CustomBiddingAlgorithmsScriptsListCall) Header() http.Header {
29142 if c.header_ == nil {
29143 c.header_ = make(http.Header)
29144 }
29145 return c.header_
29146 }
29147
29148 func (c *CustomBiddingAlgorithmsScriptsListCall) doRequest(alt string) (*http.Response, error) {
29149 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29150 if c.ifNoneMatch_ != "" {
29151 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29152 }
29153 var body io.Reader = nil
29154 c.urlParams_.Set("alt", alt)
29155 c.urlParams_.Set("prettyPrint", "false")
29156 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts")
29157 urls += "?" + c.urlParams_.Encode()
29158 req, err := http.NewRequest("GET", urls, body)
29159 if err != nil {
29160 return nil, err
29161 }
29162 req.Header = reqHeaders
29163 googleapi.Expand(req.URL, map[string]string{
29164 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10),
29165 })
29166 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29167 }
29168
29169
29170
29171
29172
29173
29174
29175 func (c *CustomBiddingAlgorithmsScriptsListCall) Do(opts ...googleapi.CallOption) (*ListCustomBiddingScriptsResponse, error) {
29176 gensupport.SetOptions(c.urlParams_, opts...)
29177 res, err := c.doRequest("json")
29178 if res != nil && res.StatusCode == http.StatusNotModified {
29179 if res.Body != nil {
29180 res.Body.Close()
29181 }
29182 return nil, gensupport.WrapError(&googleapi.Error{
29183 Code: res.StatusCode,
29184 Header: res.Header,
29185 })
29186 }
29187 if err != nil {
29188 return nil, err
29189 }
29190 defer googleapi.CloseBody(res)
29191 if err := googleapi.CheckResponse(res); err != nil {
29192 return nil, gensupport.WrapError(err)
29193 }
29194 ret := &ListCustomBiddingScriptsResponse{
29195 ServerResponse: googleapi.ServerResponse{
29196 Header: res.Header,
29197 HTTPStatusCode: res.StatusCode,
29198 },
29199 }
29200 target := &ret
29201 if err := gensupport.DecodeResponse(target, res); err != nil {
29202 return nil, err
29203 }
29204 return ret, nil
29205 }
29206
29207
29208
29209
29210 func (c *CustomBiddingAlgorithmsScriptsListCall) Pages(ctx context.Context, f func(*ListCustomBiddingScriptsResponse) error) error {
29211 c.ctx_ = ctx
29212 defer c.PageToken(c.urlParams_.Get("pageToken"))
29213 for {
29214 x, err := c.Do()
29215 if err != nil {
29216 return err
29217 }
29218 if err := f(x); err != nil {
29219 return err
29220 }
29221 if x.NextPageToken == "" {
29222 return nil
29223 }
29224 c.PageToken(x.NextPageToken)
29225 }
29226 }
29227
29228 type CustomListsGetCall struct {
29229 s *Service
29230 customListId int64
29231 urlParams_ gensupport.URLParams
29232 ifNoneMatch_ string
29233 ctx_ context.Context
29234 header_ http.Header
29235 }
29236
29237
29238
29239
29240 func (r *CustomListsService) Get(customListId int64) *CustomListsGetCall {
29241 c := &CustomListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29242 c.customListId = customListId
29243 return c
29244 }
29245
29246
29247
29248 func (c *CustomListsGetCall) AdvertiserId(advertiserId int64) *CustomListsGetCall {
29249 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29250 return c
29251 }
29252
29253
29254
29255
29256 func (c *CustomListsGetCall) Fields(s ...googleapi.Field) *CustomListsGetCall {
29257 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29258 return c
29259 }
29260
29261
29262
29263
29264 func (c *CustomListsGetCall) IfNoneMatch(entityTag string) *CustomListsGetCall {
29265 c.ifNoneMatch_ = entityTag
29266 return c
29267 }
29268
29269
29270 func (c *CustomListsGetCall) Context(ctx context.Context) *CustomListsGetCall {
29271 c.ctx_ = ctx
29272 return c
29273 }
29274
29275
29276
29277 func (c *CustomListsGetCall) Header() http.Header {
29278 if c.header_ == nil {
29279 c.header_ = make(http.Header)
29280 }
29281 return c.header_
29282 }
29283
29284 func (c *CustomListsGetCall) doRequest(alt string) (*http.Response, error) {
29285 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29286 if c.ifNoneMatch_ != "" {
29287 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29288 }
29289 var body io.Reader = nil
29290 c.urlParams_.Set("alt", alt)
29291 c.urlParams_.Set("prettyPrint", "false")
29292 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customLists/{+customListId}")
29293 urls += "?" + c.urlParams_.Encode()
29294 req, err := http.NewRequest("GET", urls, body)
29295 if err != nil {
29296 return nil, err
29297 }
29298 req.Header = reqHeaders
29299 googleapi.Expand(req.URL, map[string]string{
29300 "customListId": strconv.FormatInt(c.customListId, 10),
29301 })
29302 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29303 }
29304
29305
29306
29307
29308
29309
29310 func (c *CustomListsGetCall) Do(opts ...googleapi.CallOption) (*CustomList, error) {
29311 gensupport.SetOptions(c.urlParams_, opts...)
29312 res, err := c.doRequest("json")
29313 if res != nil && res.StatusCode == http.StatusNotModified {
29314 if res.Body != nil {
29315 res.Body.Close()
29316 }
29317 return nil, gensupport.WrapError(&googleapi.Error{
29318 Code: res.StatusCode,
29319 Header: res.Header,
29320 })
29321 }
29322 if err != nil {
29323 return nil, err
29324 }
29325 defer googleapi.CloseBody(res)
29326 if err := googleapi.CheckResponse(res); err != nil {
29327 return nil, gensupport.WrapError(err)
29328 }
29329 ret := &CustomList{
29330 ServerResponse: googleapi.ServerResponse{
29331 Header: res.Header,
29332 HTTPStatusCode: res.StatusCode,
29333 },
29334 }
29335 target := &ret
29336 if err := gensupport.DecodeResponse(target, res); err != nil {
29337 return nil, err
29338 }
29339 return ret, nil
29340 }
29341
29342 type CustomListsListCall struct {
29343 s *Service
29344 urlParams_ gensupport.URLParams
29345 ifNoneMatch_ string
29346 ctx_ context.Context
29347 header_ http.Header
29348 }
29349
29350
29351 func (r *CustomListsService) List() *CustomListsListCall {
29352 c := &CustomListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29353 return c
29354 }
29355
29356
29357
29358 func (c *CustomListsListCall) AdvertiserId(advertiserId int64) *CustomListsListCall {
29359 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29360 return c
29361 }
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371 func (c *CustomListsListCall) Filter(filter string) *CustomListsListCall {
29372 c.urlParams_.Set("filter", filter)
29373 return c
29374 }
29375
29376
29377
29378
29379
29380
29381 func (c *CustomListsListCall) OrderBy(orderBy string) *CustomListsListCall {
29382 c.urlParams_.Set("orderBy", orderBy)
29383 return c
29384 }
29385
29386
29387
29388
29389 func (c *CustomListsListCall) PageSize(pageSize int64) *CustomListsListCall {
29390 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29391 return c
29392 }
29393
29394
29395
29396
29397
29398 func (c *CustomListsListCall) PageToken(pageToken string) *CustomListsListCall {
29399 c.urlParams_.Set("pageToken", pageToken)
29400 return c
29401 }
29402
29403
29404
29405
29406 func (c *CustomListsListCall) Fields(s ...googleapi.Field) *CustomListsListCall {
29407 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29408 return c
29409 }
29410
29411
29412
29413
29414 func (c *CustomListsListCall) IfNoneMatch(entityTag string) *CustomListsListCall {
29415 c.ifNoneMatch_ = entityTag
29416 return c
29417 }
29418
29419
29420 func (c *CustomListsListCall) Context(ctx context.Context) *CustomListsListCall {
29421 c.ctx_ = ctx
29422 return c
29423 }
29424
29425
29426
29427 func (c *CustomListsListCall) Header() http.Header {
29428 if c.header_ == nil {
29429 c.header_ = make(http.Header)
29430 }
29431 return c.header_
29432 }
29433
29434 func (c *CustomListsListCall) doRequest(alt string) (*http.Response, error) {
29435 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29436 if c.ifNoneMatch_ != "" {
29437 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29438 }
29439 var body io.Reader = nil
29440 c.urlParams_.Set("alt", alt)
29441 c.urlParams_.Set("prettyPrint", "false")
29442 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/customLists")
29443 urls += "?" + c.urlParams_.Encode()
29444 req, err := http.NewRequest("GET", urls, body)
29445 if err != nil {
29446 return nil, err
29447 }
29448 req.Header = reqHeaders
29449 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29450 }
29451
29452
29453
29454
29455
29456
29457
29458 func (c *CustomListsListCall) Do(opts ...googleapi.CallOption) (*ListCustomListsResponse, error) {
29459 gensupport.SetOptions(c.urlParams_, opts...)
29460 res, err := c.doRequest("json")
29461 if res != nil && res.StatusCode == http.StatusNotModified {
29462 if res.Body != nil {
29463 res.Body.Close()
29464 }
29465 return nil, gensupport.WrapError(&googleapi.Error{
29466 Code: res.StatusCode,
29467 Header: res.Header,
29468 })
29469 }
29470 if err != nil {
29471 return nil, err
29472 }
29473 defer googleapi.CloseBody(res)
29474 if err := googleapi.CheckResponse(res); err != nil {
29475 return nil, gensupport.WrapError(err)
29476 }
29477 ret := &ListCustomListsResponse{
29478 ServerResponse: googleapi.ServerResponse{
29479 Header: res.Header,
29480 HTTPStatusCode: res.StatusCode,
29481 },
29482 }
29483 target := &ret
29484 if err := gensupport.DecodeResponse(target, res); err != nil {
29485 return nil, err
29486 }
29487 return ret, nil
29488 }
29489
29490
29491
29492
29493 func (c *CustomListsListCall) Pages(ctx context.Context, f func(*ListCustomListsResponse) error) error {
29494 c.ctx_ = ctx
29495 defer c.PageToken(c.urlParams_.Get("pageToken"))
29496 for {
29497 x, err := c.Do()
29498 if err != nil {
29499 return err
29500 }
29501 if err := f(x); err != nil {
29502 return err
29503 }
29504 if x.NextPageToken == "" {
29505 return nil
29506 }
29507 c.PageToken(x.NextPageToken)
29508 }
29509 }
29510
29511 type FirstAndThirdPartyAudiencesCreateCall struct {
29512 s *Service
29513 firstandthirdpartyaudience *FirstAndThirdPartyAudience
29514 urlParams_ gensupport.URLParams
29515 ctx_ context.Context
29516 header_ http.Header
29517 }
29518
29519
29520
29521
29522 func (r *FirstAndThirdPartyAudiencesService) Create(firstandthirdpartyaudience *FirstAndThirdPartyAudience) *FirstAndThirdPartyAudiencesCreateCall {
29523 c := &FirstAndThirdPartyAudiencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29524 c.firstandthirdpartyaudience = firstandthirdpartyaudience
29525 return c
29526 }
29527
29528
29529
29530 func (c *FirstAndThirdPartyAudiencesCreateCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesCreateCall {
29531 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29532 return c
29533 }
29534
29535
29536
29537
29538 func (c *FirstAndThirdPartyAudiencesCreateCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesCreateCall {
29539 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29540 return c
29541 }
29542
29543
29544 func (c *FirstAndThirdPartyAudiencesCreateCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesCreateCall {
29545 c.ctx_ = ctx
29546 return c
29547 }
29548
29549
29550
29551 func (c *FirstAndThirdPartyAudiencesCreateCall) Header() http.Header {
29552 if c.header_ == nil {
29553 c.header_ = make(http.Header)
29554 }
29555 return c.header_
29556 }
29557
29558 func (c *FirstAndThirdPartyAudiencesCreateCall) doRequest(alt string) (*http.Response, error) {
29559 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29560 var body io.Reader = nil
29561 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firstandthirdpartyaudience)
29562 if err != nil {
29563 return nil, err
29564 }
29565 c.urlParams_.Set("alt", alt)
29566 c.urlParams_.Set("prettyPrint", "false")
29567 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/firstAndThirdPartyAudiences")
29568 urls += "?" + c.urlParams_.Encode()
29569 req, err := http.NewRequest("POST", urls, body)
29570 if err != nil {
29571 return nil, err
29572 }
29573 req.Header = reqHeaders
29574 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29575 }
29576
29577
29578
29579
29580
29581
29582
29583 func (c *FirstAndThirdPartyAudiencesCreateCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) {
29584 gensupport.SetOptions(c.urlParams_, opts...)
29585 res, err := c.doRequest("json")
29586 if res != nil && res.StatusCode == http.StatusNotModified {
29587 if res.Body != nil {
29588 res.Body.Close()
29589 }
29590 return nil, gensupport.WrapError(&googleapi.Error{
29591 Code: res.StatusCode,
29592 Header: res.Header,
29593 })
29594 }
29595 if err != nil {
29596 return nil, err
29597 }
29598 defer googleapi.CloseBody(res)
29599 if err := googleapi.CheckResponse(res); err != nil {
29600 return nil, gensupport.WrapError(err)
29601 }
29602 ret := &FirstAndThirdPartyAudience{
29603 ServerResponse: googleapi.ServerResponse{
29604 Header: res.Header,
29605 HTTPStatusCode: res.StatusCode,
29606 },
29607 }
29608 target := &ret
29609 if err := gensupport.DecodeResponse(target, res); err != nil {
29610 return nil, err
29611 }
29612 return ret, nil
29613 }
29614
29615 type FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall struct {
29616 s *Service
29617 firstAndThirdPartyAudienceId int64
29618 editcustomermatchmembersrequest *EditCustomerMatchMembersRequest
29619 urlParams_ gensupport.URLParams
29620 ctx_ context.Context
29621 header_ http.Header
29622 }
29623
29624
29625
29626
29627
29628
29629
29630 func (r *FirstAndThirdPartyAudiencesService) EditCustomerMatchMembers(firstAndThirdPartyAudienceId int64, editcustomermatchmembersrequest *EditCustomerMatchMembersRequest) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall {
29631 c := &FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29632 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId
29633 c.editcustomermatchmembersrequest = editcustomermatchmembersrequest
29634 return c
29635 }
29636
29637
29638
29639
29640 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall {
29641 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29642 return c
29643 }
29644
29645
29646 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall {
29647 c.ctx_ = ctx
29648 return c
29649 }
29650
29651
29652
29653 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Header() http.Header {
29654 if c.header_ == nil {
29655 c.header_ = make(http.Header)
29656 }
29657 return c.header_
29658 }
29659
29660 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) doRequest(alt string) (*http.Response, error) {
29661 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29662 var body io.Reader = nil
29663 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editcustomermatchmembersrequest)
29664 if err != nil {
29665 return nil, err
29666 }
29667 c.urlParams_.Set("alt", alt)
29668 c.urlParams_.Set("prettyPrint", "false")
29669 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}:editCustomerMatchMembers")
29670 urls += "?" + c.urlParams_.Encode()
29671 req, err := http.NewRequest("POST", urls, body)
29672 if err != nil {
29673 return nil, err
29674 }
29675 req.Header = reqHeaders
29676 googleapi.Expand(req.URL, map[string]string{
29677 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10),
29678 })
29679 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29680 }
29681
29682
29683
29684
29685
29686
29687
29688 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Do(opts ...googleapi.CallOption) (*EditCustomerMatchMembersResponse, error) {
29689 gensupport.SetOptions(c.urlParams_, opts...)
29690 res, err := c.doRequest("json")
29691 if res != nil && res.StatusCode == http.StatusNotModified {
29692 if res.Body != nil {
29693 res.Body.Close()
29694 }
29695 return nil, gensupport.WrapError(&googleapi.Error{
29696 Code: res.StatusCode,
29697 Header: res.Header,
29698 })
29699 }
29700 if err != nil {
29701 return nil, err
29702 }
29703 defer googleapi.CloseBody(res)
29704 if err := googleapi.CheckResponse(res); err != nil {
29705 return nil, gensupport.WrapError(err)
29706 }
29707 ret := &EditCustomerMatchMembersResponse{
29708 ServerResponse: googleapi.ServerResponse{
29709 Header: res.Header,
29710 HTTPStatusCode: res.StatusCode,
29711 },
29712 }
29713 target := &ret
29714 if err := gensupport.DecodeResponse(target, res); err != nil {
29715 return nil, err
29716 }
29717 return ret, nil
29718 }
29719
29720 type FirstAndThirdPartyAudiencesGetCall struct {
29721 s *Service
29722 firstAndThirdPartyAudienceId int64
29723 urlParams_ gensupport.URLParams
29724 ifNoneMatch_ string
29725 ctx_ context.Context
29726 header_ http.Header
29727 }
29728
29729
29730
29731
29732
29733 func (r *FirstAndThirdPartyAudiencesService) Get(firstAndThirdPartyAudienceId int64) *FirstAndThirdPartyAudiencesGetCall {
29734 c := &FirstAndThirdPartyAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29735 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId
29736 return c
29737 }
29738
29739
29740
29741 func (c *FirstAndThirdPartyAudiencesGetCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesGetCall {
29742 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29743 return c
29744 }
29745
29746
29747
29748 func (c *FirstAndThirdPartyAudiencesGetCall) PartnerId(partnerId int64) *FirstAndThirdPartyAudiencesGetCall {
29749 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
29750 return c
29751 }
29752
29753
29754
29755
29756 func (c *FirstAndThirdPartyAudiencesGetCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesGetCall {
29757 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29758 return c
29759 }
29760
29761
29762
29763
29764 func (c *FirstAndThirdPartyAudiencesGetCall) IfNoneMatch(entityTag string) *FirstAndThirdPartyAudiencesGetCall {
29765 c.ifNoneMatch_ = entityTag
29766 return c
29767 }
29768
29769
29770 func (c *FirstAndThirdPartyAudiencesGetCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesGetCall {
29771 c.ctx_ = ctx
29772 return c
29773 }
29774
29775
29776
29777 func (c *FirstAndThirdPartyAudiencesGetCall) Header() http.Header {
29778 if c.header_ == nil {
29779 c.header_ = make(http.Header)
29780 }
29781 return c.header_
29782 }
29783
29784 func (c *FirstAndThirdPartyAudiencesGetCall) doRequest(alt string) (*http.Response, error) {
29785 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29786 if c.ifNoneMatch_ != "" {
29787 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29788 }
29789 var body io.Reader = nil
29790 c.urlParams_.Set("alt", alt)
29791 c.urlParams_.Set("prettyPrint", "false")
29792 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}")
29793 urls += "?" + c.urlParams_.Encode()
29794 req, err := http.NewRequest("GET", urls, body)
29795 if err != nil {
29796 return nil, err
29797 }
29798 req.Header = reqHeaders
29799 googleapi.Expand(req.URL, map[string]string{
29800 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10),
29801 })
29802 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29803 }
29804
29805
29806
29807
29808
29809
29810
29811 func (c *FirstAndThirdPartyAudiencesGetCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) {
29812 gensupport.SetOptions(c.urlParams_, opts...)
29813 res, err := c.doRequest("json")
29814 if res != nil && res.StatusCode == http.StatusNotModified {
29815 if res.Body != nil {
29816 res.Body.Close()
29817 }
29818 return nil, gensupport.WrapError(&googleapi.Error{
29819 Code: res.StatusCode,
29820 Header: res.Header,
29821 })
29822 }
29823 if err != nil {
29824 return nil, err
29825 }
29826 defer googleapi.CloseBody(res)
29827 if err := googleapi.CheckResponse(res); err != nil {
29828 return nil, gensupport.WrapError(err)
29829 }
29830 ret := &FirstAndThirdPartyAudience{
29831 ServerResponse: googleapi.ServerResponse{
29832 Header: res.Header,
29833 HTTPStatusCode: res.StatusCode,
29834 },
29835 }
29836 target := &ret
29837 if err := gensupport.DecodeResponse(target, res); err != nil {
29838 return nil, err
29839 }
29840 return ret, nil
29841 }
29842
29843 type FirstAndThirdPartyAudiencesListCall struct {
29844 s *Service
29845 urlParams_ gensupport.URLParams
29846 ifNoneMatch_ string
29847 ctx_ context.Context
29848 header_ http.Header
29849 }
29850
29851
29852
29853 func (r *FirstAndThirdPartyAudiencesService) List() *FirstAndThirdPartyAudiencesListCall {
29854 c := &FirstAndThirdPartyAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29855 return c
29856 }
29857
29858
29859
29860 func (c *FirstAndThirdPartyAudiencesListCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesListCall {
29861 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
29862 return c
29863 }
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874 func (c *FirstAndThirdPartyAudiencesListCall) Filter(filter string) *FirstAndThirdPartyAudiencesListCall {
29875 c.urlParams_.Set("filter", filter)
29876 return c
29877 }
29878
29879
29880
29881
29882
29883
29884 func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndThirdPartyAudiencesListCall {
29885 c.urlParams_.Set("orderBy", orderBy)
29886 return c
29887 }
29888
29889
29890
29891
29892 func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall {
29893 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
29894 return c
29895 }
29896
29897
29898
29899
29900
29901
29902 func (c *FirstAndThirdPartyAudiencesListCall) PageToken(pageToken string) *FirstAndThirdPartyAudiencesListCall {
29903 c.urlParams_.Set("pageToken", pageToken)
29904 return c
29905 }
29906
29907
29908
29909 func (c *FirstAndThirdPartyAudiencesListCall) PartnerId(partnerId int64) *FirstAndThirdPartyAudiencesListCall {
29910 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
29911 return c
29912 }
29913
29914
29915
29916
29917 func (c *FirstAndThirdPartyAudiencesListCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesListCall {
29918 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29919 return c
29920 }
29921
29922
29923
29924
29925 func (c *FirstAndThirdPartyAudiencesListCall) IfNoneMatch(entityTag string) *FirstAndThirdPartyAudiencesListCall {
29926 c.ifNoneMatch_ = entityTag
29927 return c
29928 }
29929
29930
29931 func (c *FirstAndThirdPartyAudiencesListCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesListCall {
29932 c.ctx_ = ctx
29933 return c
29934 }
29935
29936
29937
29938 func (c *FirstAndThirdPartyAudiencesListCall) Header() http.Header {
29939 if c.header_ == nil {
29940 c.header_ = make(http.Header)
29941 }
29942 return c.header_
29943 }
29944
29945 func (c *FirstAndThirdPartyAudiencesListCall) doRequest(alt string) (*http.Response, error) {
29946 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29947 if c.ifNoneMatch_ != "" {
29948 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29949 }
29950 var body io.Reader = nil
29951 c.urlParams_.Set("alt", alt)
29952 c.urlParams_.Set("prettyPrint", "false")
29953 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/firstAndThirdPartyAudiences")
29954 urls += "?" + c.urlParams_.Encode()
29955 req, err := http.NewRequest("GET", urls, body)
29956 if err != nil {
29957 return nil, err
29958 }
29959 req.Header = reqHeaders
29960 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29961 }
29962
29963
29964
29965
29966
29967
29968
29969 func (c *FirstAndThirdPartyAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListFirstAndThirdPartyAudiencesResponse, error) {
29970 gensupport.SetOptions(c.urlParams_, opts...)
29971 res, err := c.doRequest("json")
29972 if res != nil && res.StatusCode == http.StatusNotModified {
29973 if res.Body != nil {
29974 res.Body.Close()
29975 }
29976 return nil, gensupport.WrapError(&googleapi.Error{
29977 Code: res.StatusCode,
29978 Header: res.Header,
29979 })
29980 }
29981 if err != nil {
29982 return nil, err
29983 }
29984 defer googleapi.CloseBody(res)
29985 if err := googleapi.CheckResponse(res); err != nil {
29986 return nil, gensupport.WrapError(err)
29987 }
29988 ret := &ListFirstAndThirdPartyAudiencesResponse{
29989 ServerResponse: googleapi.ServerResponse{
29990 Header: res.Header,
29991 HTTPStatusCode: res.StatusCode,
29992 },
29993 }
29994 target := &ret
29995 if err := gensupport.DecodeResponse(target, res); err != nil {
29996 return nil, err
29997 }
29998 return ret, nil
29999 }
30000
30001
30002
30003
30004 func (c *FirstAndThirdPartyAudiencesListCall) Pages(ctx context.Context, f func(*ListFirstAndThirdPartyAudiencesResponse) error) error {
30005 c.ctx_ = ctx
30006 defer c.PageToken(c.urlParams_.Get("pageToken"))
30007 for {
30008 x, err := c.Do()
30009 if err != nil {
30010 return err
30011 }
30012 if err := f(x); err != nil {
30013 return err
30014 }
30015 if x.NextPageToken == "" {
30016 return nil
30017 }
30018 c.PageToken(x.NextPageToken)
30019 }
30020 }
30021
30022 type FirstAndThirdPartyAudiencesPatchCall struct {
30023 s *Service
30024 firstAndThirdPartyAudienceId int64
30025 firstandthirdpartyaudience *FirstAndThirdPartyAudience
30026 urlParams_ gensupport.URLParams
30027 ctx_ context.Context
30028 header_ http.Header
30029 }
30030
30031
30032
30033
30034
30035
30036
30037 func (r *FirstAndThirdPartyAudiencesService) Patch(firstAndThirdPartyAudienceId int64, firstandthirdpartyaudience *FirstAndThirdPartyAudience) *FirstAndThirdPartyAudiencesPatchCall {
30038 c := &FirstAndThirdPartyAudiencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30039 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId
30040 c.firstandthirdpartyaudience = firstandthirdpartyaudience
30041 return c
30042 }
30043
30044
30045
30046 func (c *FirstAndThirdPartyAudiencesPatchCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesPatchCall {
30047 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30048 return c
30049 }
30050
30051
30052
30053
30054 func (c *FirstAndThirdPartyAudiencesPatchCall) UpdateMask(updateMask string) *FirstAndThirdPartyAudiencesPatchCall {
30055 c.urlParams_.Set("updateMask", updateMask)
30056 return c
30057 }
30058
30059
30060
30061
30062 func (c *FirstAndThirdPartyAudiencesPatchCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesPatchCall {
30063 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30064 return c
30065 }
30066
30067
30068 func (c *FirstAndThirdPartyAudiencesPatchCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesPatchCall {
30069 c.ctx_ = ctx
30070 return c
30071 }
30072
30073
30074
30075 func (c *FirstAndThirdPartyAudiencesPatchCall) Header() http.Header {
30076 if c.header_ == nil {
30077 c.header_ = make(http.Header)
30078 }
30079 return c.header_
30080 }
30081
30082 func (c *FirstAndThirdPartyAudiencesPatchCall) doRequest(alt string) (*http.Response, error) {
30083 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30084 var body io.Reader = nil
30085 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firstandthirdpartyaudience)
30086 if err != nil {
30087 return nil, err
30088 }
30089 c.urlParams_.Set("alt", alt)
30090 c.urlParams_.Set("prettyPrint", "false")
30091 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}")
30092 urls += "?" + c.urlParams_.Encode()
30093 req, err := http.NewRequest("PATCH", urls, body)
30094 if err != nil {
30095 return nil, err
30096 }
30097 req.Header = reqHeaders
30098 googleapi.Expand(req.URL, map[string]string{
30099 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10),
30100 })
30101 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30102 }
30103
30104
30105
30106
30107
30108
30109
30110 func (c *FirstAndThirdPartyAudiencesPatchCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) {
30111 gensupport.SetOptions(c.urlParams_, opts...)
30112 res, err := c.doRequest("json")
30113 if res != nil && res.StatusCode == http.StatusNotModified {
30114 if res.Body != nil {
30115 res.Body.Close()
30116 }
30117 return nil, gensupport.WrapError(&googleapi.Error{
30118 Code: res.StatusCode,
30119 Header: res.Header,
30120 })
30121 }
30122 if err != nil {
30123 return nil, err
30124 }
30125 defer googleapi.CloseBody(res)
30126 if err := googleapi.CheckResponse(res); err != nil {
30127 return nil, gensupport.WrapError(err)
30128 }
30129 ret := &FirstAndThirdPartyAudience{
30130 ServerResponse: googleapi.ServerResponse{
30131 Header: res.Header,
30132 HTTPStatusCode: res.StatusCode,
30133 },
30134 }
30135 target := &ret
30136 if err := gensupport.DecodeResponse(target, res); err != nil {
30137 return nil, err
30138 }
30139 return ret, nil
30140 }
30141
30142 type FloodlightGroupsGetCall struct {
30143 s *Service
30144 floodlightGroupId int64
30145 urlParams_ gensupport.URLParams
30146 ifNoneMatch_ string
30147 ctx_ context.Context
30148 header_ http.Header
30149 }
30150
30151
30152
30153
30154 func (r *FloodlightGroupsService) Get(floodlightGroupId int64) *FloodlightGroupsGetCall {
30155 c := &FloodlightGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30156 c.floodlightGroupId = floodlightGroupId
30157 return c
30158 }
30159
30160
30161
30162 func (c *FloodlightGroupsGetCall) PartnerId(partnerId int64) *FloodlightGroupsGetCall {
30163 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30164 return c
30165 }
30166
30167
30168
30169
30170 func (c *FloodlightGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightGroupsGetCall {
30171 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30172 return c
30173 }
30174
30175
30176
30177
30178 func (c *FloodlightGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightGroupsGetCall {
30179 c.ifNoneMatch_ = entityTag
30180 return c
30181 }
30182
30183
30184 func (c *FloodlightGroupsGetCall) Context(ctx context.Context) *FloodlightGroupsGetCall {
30185 c.ctx_ = ctx
30186 return c
30187 }
30188
30189
30190
30191 func (c *FloodlightGroupsGetCall) Header() http.Header {
30192 if c.header_ == nil {
30193 c.header_ = make(http.Header)
30194 }
30195 return c.header_
30196 }
30197
30198 func (c *FloodlightGroupsGetCall) doRequest(alt string) (*http.Response, error) {
30199 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30200 if c.ifNoneMatch_ != "" {
30201 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30202 }
30203 var body io.Reader = nil
30204 c.urlParams_.Set("alt", alt)
30205 c.urlParams_.Set("prettyPrint", "false")
30206 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/floodlightGroups/{+floodlightGroupId}")
30207 urls += "?" + c.urlParams_.Encode()
30208 req, err := http.NewRequest("GET", urls, body)
30209 if err != nil {
30210 return nil, err
30211 }
30212 req.Header = reqHeaders
30213 googleapi.Expand(req.URL, map[string]string{
30214 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10),
30215 })
30216 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30217 }
30218
30219
30220
30221
30222
30223
30224
30225 func (c *FloodlightGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightGroup, error) {
30226 gensupport.SetOptions(c.urlParams_, opts...)
30227 res, err := c.doRequest("json")
30228 if res != nil && res.StatusCode == http.StatusNotModified {
30229 if res.Body != nil {
30230 res.Body.Close()
30231 }
30232 return nil, gensupport.WrapError(&googleapi.Error{
30233 Code: res.StatusCode,
30234 Header: res.Header,
30235 })
30236 }
30237 if err != nil {
30238 return nil, err
30239 }
30240 defer googleapi.CloseBody(res)
30241 if err := googleapi.CheckResponse(res); err != nil {
30242 return nil, gensupport.WrapError(err)
30243 }
30244 ret := &FloodlightGroup{
30245 ServerResponse: googleapi.ServerResponse{
30246 Header: res.Header,
30247 HTTPStatusCode: res.StatusCode,
30248 },
30249 }
30250 target := &ret
30251 if err := gensupport.DecodeResponse(target, res); err != nil {
30252 return nil, err
30253 }
30254 return ret, nil
30255 }
30256
30257 type FloodlightGroupsPatchCall struct {
30258 s *Service
30259 floodlightGroupId int64
30260 floodlightgroup *FloodlightGroup
30261 urlParams_ gensupport.URLParams
30262 ctx_ context.Context
30263 header_ http.Header
30264 }
30265
30266
30267
30268
30269
30270
30271 func (r *FloodlightGroupsService) Patch(floodlightGroupId int64, floodlightgroup *FloodlightGroup) *FloodlightGroupsPatchCall {
30272 c := &FloodlightGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30273 c.floodlightGroupId = floodlightGroupId
30274 c.floodlightgroup = floodlightgroup
30275 return c
30276 }
30277
30278
30279
30280 func (c *FloodlightGroupsPatchCall) PartnerId(partnerId int64) *FloodlightGroupsPatchCall {
30281 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30282 return c
30283 }
30284
30285
30286
30287 func (c *FloodlightGroupsPatchCall) UpdateMask(updateMask string) *FloodlightGroupsPatchCall {
30288 c.urlParams_.Set("updateMask", updateMask)
30289 return c
30290 }
30291
30292
30293
30294
30295 func (c *FloodlightGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightGroupsPatchCall {
30296 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30297 return c
30298 }
30299
30300
30301 func (c *FloodlightGroupsPatchCall) Context(ctx context.Context) *FloodlightGroupsPatchCall {
30302 c.ctx_ = ctx
30303 return c
30304 }
30305
30306
30307
30308 func (c *FloodlightGroupsPatchCall) Header() http.Header {
30309 if c.header_ == nil {
30310 c.header_ = make(http.Header)
30311 }
30312 return c.header_
30313 }
30314
30315 func (c *FloodlightGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
30316 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30317 var body io.Reader = nil
30318 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightgroup)
30319 if err != nil {
30320 return nil, err
30321 }
30322 c.urlParams_.Set("alt", alt)
30323 c.urlParams_.Set("prettyPrint", "false")
30324 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/floodlightGroups/{floodlightGroupId}")
30325 urls += "?" + c.urlParams_.Encode()
30326 req, err := http.NewRequest("PATCH", urls, body)
30327 if err != nil {
30328 return nil, err
30329 }
30330 req.Header = reqHeaders
30331 googleapi.Expand(req.URL, map[string]string{
30332 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10),
30333 })
30334 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30335 }
30336
30337
30338
30339
30340
30341
30342
30343 func (c *FloodlightGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightGroup, error) {
30344 gensupport.SetOptions(c.urlParams_, opts...)
30345 res, err := c.doRequest("json")
30346 if res != nil && res.StatusCode == http.StatusNotModified {
30347 if res.Body != nil {
30348 res.Body.Close()
30349 }
30350 return nil, gensupport.WrapError(&googleapi.Error{
30351 Code: res.StatusCode,
30352 Header: res.Header,
30353 })
30354 }
30355 if err != nil {
30356 return nil, err
30357 }
30358 defer googleapi.CloseBody(res)
30359 if err := googleapi.CheckResponse(res); err != nil {
30360 return nil, gensupport.WrapError(err)
30361 }
30362 ret := &FloodlightGroup{
30363 ServerResponse: googleapi.ServerResponse{
30364 Header: res.Header,
30365 HTTPStatusCode: res.StatusCode,
30366 },
30367 }
30368 target := &ret
30369 if err := gensupport.DecodeResponse(target, res); err != nil {
30370 return nil, err
30371 }
30372 return ret, nil
30373 }
30374
30375 type FloodlightGroupsFloodlightActivitiesGetCall struct {
30376 s *Service
30377 floodlightGroupId int64
30378 floodlightActivityId int64
30379 urlParams_ gensupport.URLParams
30380 ifNoneMatch_ string
30381 ctx_ context.Context
30382 header_ http.Header
30383 }
30384
30385
30386
30387
30388
30389
30390 func (r *FloodlightGroupsFloodlightActivitiesService) Get(floodlightGroupId int64, floodlightActivityId int64) *FloodlightGroupsFloodlightActivitiesGetCall {
30391 c := &FloodlightGroupsFloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30392 c.floodlightGroupId = floodlightGroupId
30393 c.floodlightActivityId = floodlightActivityId
30394 return c
30395 }
30396
30397
30398
30399 func (c *FloodlightGroupsFloodlightActivitiesGetCall) PartnerId(partnerId int64) *FloodlightGroupsFloodlightActivitiesGetCall {
30400 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30401 return c
30402 }
30403
30404
30405
30406
30407 func (c *FloodlightGroupsFloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightGroupsFloodlightActivitiesGetCall {
30408 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30409 return c
30410 }
30411
30412
30413
30414
30415 func (c *FloodlightGroupsFloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightGroupsFloodlightActivitiesGetCall {
30416 c.ifNoneMatch_ = entityTag
30417 return c
30418 }
30419
30420
30421 func (c *FloodlightGroupsFloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightGroupsFloodlightActivitiesGetCall {
30422 c.ctx_ = ctx
30423 return c
30424 }
30425
30426
30427
30428 func (c *FloodlightGroupsFloodlightActivitiesGetCall) Header() http.Header {
30429 if c.header_ == nil {
30430 c.header_ = make(http.Header)
30431 }
30432 return c.header_
30433 }
30434
30435 func (c *FloodlightGroupsFloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
30436 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30437 if c.ifNoneMatch_ != "" {
30438 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30439 }
30440 var body io.Reader = nil
30441 c.urlParams_.Set("alt", alt)
30442 c.urlParams_.Set("prettyPrint", "false")
30443 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/floodlightGroups/{+floodlightGroupId}/floodlightActivities/{+floodlightActivityId}")
30444 urls += "?" + c.urlParams_.Encode()
30445 req, err := http.NewRequest("GET", urls, body)
30446 if err != nil {
30447 return nil, err
30448 }
30449 req.Header = reqHeaders
30450 googleapi.Expand(req.URL, map[string]string{
30451 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10),
30452 "floodlightActivityId": strconv.FormatInt(c.floodlightActivityId, 10),
30453 })
30454 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30455 }
30456
30457
30458
30459
30460
30461
30462
30463 func (c *FloodlightGroupsFloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
30464 gensupport.SetOptions(c.urlParams_, opts...)
30465 res, err := c.doRequest("json")
30466 if res != nil && res.StatusCode == http.StatusNotModified {
30467 if res.Body != nil {
30468 res.Body.Close()
30469 }
30470 return nil, gensupport.WrapError(&googleapi.Error{
30471 Code: res.StatusCode,
30472 Header: res.Header,
30473 })
30474 }
30475 if err != nil {
30476 return nil, err
30477 }
30478 defer googleapi.CloseBody(res)
30479 if err := googleapi.CheckResponse(res); err != nil {
30480 return nil, gensupport.WrapError(err)
30481 }
30482 ret := &FloodlightActivity{
30483 ServerResponse: googleapi.ServerResponse{
30484 Header: res.Header,
30485 HTTPStatusCode: res.StatusCode,
30486 },
30487 }
30488 target := &ret
30489 if err := gensupport.DecodeResponse(target, res); err != nil {
30490 return nil, err
30491 }
30492 return ret, nil
30493 }
30494
30495 type FloodlightGroupsFloodlightActivitiesListCall struct {
30496 s *Service
30497 floodlightGroupId int64
30498 urlParams_ gensupport.URLParams
30499 ifNoneMatch_ string
30500 ctx_ context.Context
30501 header_ http.Header
30502 }
30503
30504
30505
30506
30507
30508 func (r *FloodlightGroupsFloodlightActivitiesService) List(floodlightGroupId int64) *FloodlightGroupsFloodlightActivitiesListCall {
30509 c := &FloodlightGroupsFloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30510 c.floodlightGroupId = floodlightGroupId
30511 return c
30512 }
30513
30514
30515
30516
30517
30518
30519 func (c *FloodlightGroupsFloodlightActivitiesListCall) OrderBy(orderBy string) *FloodlightGroupsFloodlightActivitiesListCall {
30520 c.urlParams_.Set("orderBy", orderBy)
30521 return c
30522 }
30523
30524
30525
30526
30527 func (c *FloodlightGroupsFloodlightActivitiesListCall) PageSize(pageSize int64) *FloodlightGroupsFloodlightActivitiesListCall {
30528 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30529 return c
30530 }
30531
30532
30533
30534
30535
30536
30537 func (c *FloodlightGroupsFloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightGroupsFloodlightActivitiesListCall {
30538 c.urlParams_.Set("pageToken", pageToken)
30539 return c
30540 }
30541
30542
30543
30544 func (c *FloodlightGroupsFloodlightActivitiesListCall) PartnerId(partnerId int64) *FloodlightGroupsFloodlightActivitiesListCall {
30545 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30546 return c
30547 }
30548
30549
30550
30551
30552 func (c *FloodlightGroupsFloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightGroupsFloodlightActivitiesListCall {
30553 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30554 return c
30555 }
30556
30557
30558
30559
30560 func (c *FloodlightGroupsFloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightGroupsFloodlightActivitiesListCall {
30561 c.ifNoneMatch_ = entityTag
30562 return c
30563 }
30564
30565
30566 func (c *FloodlightGroupsFloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightGroupsFloodlightActivitiesListCall {
30567 c.ctx_ = ctx
30568 return c
30569 }
30570
30571
30572
30573 func (c *FloodlightGroupsFloodlightActivitiesListCall) Header() http.Header {
30574 if c.header_ == nil {
30575 c.header_ = make(http.Header)
30576 }
30577 return c.header_
30578 }
30579
30580 func (c *FloodlightGroupsFloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
30581 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30582 if c.ifNoneMatch_ != "" {
30583 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30584 }
30585 var body io.Reader = nil
30586 c.urlParams_.Set("alt", alt)
30587 c.urlParams_.Set("prettyPrint", "false")
30588 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/floodlightGroups/{+floodlightGroupId}/floodlightActivities")
30589 urls += "?" + c.urlParams_.Encode()
30590 req, err := http.NewRequest("GET", urls, body)
30591 if err != nil {
30592 return nil, err
30593 }
30594 req.Header = reqHeaders
30595 googleapi.Expand(req.URL, map[string]string{
30596 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10),
30597 })
30598 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30599 }
30600
30601
30602
30603
30604
30605
30606
30607 func (c *FloodlightGroupsFloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*ListFloodlightActivitiesResponse, error) {
30608 gensupport.SetOptions(c.urlParams_, opts...)
30609 res, err := c.doRequest("json")
30610 if res != nil && res.StatusCode == http.StatusNotModified {
30611 if res.Body != nil {
30612 res.Body.Close()
30613 }
30614 return nil, gensupport.WrapError(&googleapi.Error{
30615 Code: res.StatusCode,
30616 Header: res.Header,
30617 })
30618 }
30619 if err != nil {
30620 return nil, err
30621 }
30622 defer googleapi.CloseBody(res)
30623 if err := googleapi.CheckResponse(res); err != nil {
30624 return nil, gensupport.WrapError(err)
30625 }
30626 ret := &ListFloodlightActivitiesResponse{
30627 ServerResponse: googleapi.ServerResponse{
30628 Header: res.Header,
30629 HTTPStatusCode: res.StatusCode,
30630 },
30631 }
30632 target := &ret
30633 if err := gensupport.DecodeResponse(target, res); err != nil {
30634 return nil, err
30635 }
30636 return ret, nil
30637 }
30638
30639
30640
30641
30642 func (c *FloodlightGroupsFloodlightActivitiesListCall) Pages(ctx context.Context, f func(*ListFloodlightActivitiesResponse) error) error {
30643 c.ctx_ = ctx
30644 defer c.PageToken(c.urlParams_.Get("pageToken"))
30645 for {
30646 x, err := c.Do()
30647 if err != nil {
30648 return err
30649 }
30650 if err := f(x); err != nil {
30651 return err
30652 }
30653 if x.NextPageToken == "" {
30654 return nil
30655 }
30656 c.PageToken(x.NextPageToken)
30657 }
30658 }
30659
30660 type GoogleAudiencesGetCall struct {
30661 s *Service
30662 googleAudienceId int64
30663 urlParams_ gensupport.URLParams
30664 ifNoneMatch_ string
30665 ctx_ context.Context
30666 header_ http.Header
30667 }
30668
30669
30670
30671
30672 func (r *GoogleAudiencesService) Get(googleAudienceId int64) *GoogleAudiencesGetCall {
30673 c := &GoogleAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30674 c.googleAudienceId = googleAudienceId
30675 return c
30676 }
30677
30678
30679
30680 func (c *GoogleAudiencesGetCall) AdvertiserId(advertiserId int64) *GoogleAudiencesGetCall {
30681 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30682 return c
30683 }
30684
30685
30686
30687 func (c *GoogleAudiencesGetCall) PartnerId(partnerId int64) *GoogleAudiencesGetCall {
30688 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30689 return c
30690 }
30691
30692
30693
30694
30695 func (c *GoogleAudiencesGetCall) Fields(s ...googleapi.Field) *GoogleAudiencesGetCall {
30696 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30697 return c
30698 }
30699
30700
30701
30702
30703 func (c *GoogleAudiencesGetCall) IfNoneMatch(entityTag string) *GoogleAudiencesGetCall {
30704 c.ifNoneMatch_ = entityTag
30705 return c
30706 }
30707
30708
30709 func (c *GoogleAudiencesGetCall) Context(ctx context.Context) *GoogleAudiencesGetCall {
30710 c.ctx_ = ctx
30711 return c
30712 }
30713
30714
30715
30716 func (c *GoogleAudiencesGetCall) Header() http.Header {
30717 if c.header_ == nil {
30718 c.header_ = make(http.Header)
30719 }
30720 return c.header_
30721 }
30722
30723 func (c *GoogleAudiencesGetCall) doRequest(alt string) (*http.Response, error) {
30724 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30725 if c.ifNoneMatch_ != "" {
30726 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30727 }
30728 var body io.Reader = nil
30729 c.urlParams_.Set("alt", alt)
30730 c.urlParams_.Set("prettyPrint", "false")
30731 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/googleAudiences/{+googleAudienceId}")
30732 urls += "?" + c.urlParams_.Encode()
30733 req, err := http.NewRequest("GET", urls, body)
30734 if err != nil {
30735 return nil, err
30736 }
30737 req.Header = reqHeaders
30738 googleapi.Expand(req.URL, map[string]string{
30739 "googleAudienceId": strconv.FormatInt(c.googleAudienceId, 10),
30740 })
30741 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30742 }
30743
30744
30745
30746
30747
30748
30749 func (c *GoogleAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAudience, error) {
30750 gensupport.SetOptions(c.urlParams_, opts...)
30751 res, err := c.doRequest("json")
30752 if res != nil && res.StatusCode == http.StatusNotModified {
30753 if res.Body != nil {
30754 res.Body.Close()
30755 }
30756 return nil, gensupport.WrapError(&googleapi.Error{
30757 Code: res.StatusCode,
30758 Header: res.Header,
30759 })
30760 }
30761 if err != nil {
30762 return nil, err
30763 }
30764 defer googleapi.CloseBody(res)
30765 if err := googleapi.CheckResponse(res); err != nil {
30766 return nil, gensupport.WrapError(err)
30767 }
30768 ret := &GoogleAudience{
30769 ServerResponse: googleapi.ServerResponse{
30770 Header: res.Header,
30771 HTTPStatusCode: res.StatusCode,
30772 },
30773 }
30774 target := &ret
30775 if err := gensupport.DecodeResponse(target, res); err != nil {
30776 return nil, err
30777 }
30778 return ret, nil
30779 }
30780
30781 type GoogleAudiencesListCall struct {
30782 s *Service
30783 urlParams_ gensupport.URLParams
30784 ifNoneMatch_ string
30785 ctx_ context.Context
30786 header_ http.Header
30787 }
30788
30789
30790
30791 func (r *GoogleAudiencesService) List() *GoogleAudiencesListCall {
30792 c := &GoogleAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30793 return c
30794 }
30795
30796
30797
30798 func (c *GoogleAudiencesListCall) AdvertiserId(advertiserId int64) *GoogleAudiencesListCall {
30799 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30800 return c
30801 }
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812 func (c *GoogleAudiencesListCall) Filter(filter string) *GoogleAudiencesListCall {
30813 c.urlParams_.Set("filter", filter)
30814 return c
30815 }
30816
30817
30818
30819
30820
30821
30822 func (c *GoogleAudiencesListCall) OrderBy(orderBy string) *GoogleAudiencesListCall {
30823 c.urlParams_.Set("orderBy", orderBy)
30824 return c
30825 }
30826
30827
30828
30829
30830 func (c *GoogleAudiencesListCall) PageSize(pageSize int64) *GoogleAudiencesListCall {
30831 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
30832 return c
30833 }
30834
30835
30836
30837
30838
30839 func (c *GoogleAudiencesListCall) PageToken(pageToken string) *GoogleAudiencesListCall {
30840 c.urlParams_.Set("pageToken", pageToken)
30841 return c
30842 }
30843
30844
30845
30846 func (c *GoogleAudiencesListCall) PartnerId(partnerId int64) *GoogleAudiencesListCall {
30847 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30848 return c
30849 }
30850
30851
30852
30853
30854 func (c *GoogleAudiencesListCall) Fields(s ...googleapi.Field) *GoogleAudiencesListCall {
30855 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30856 return c
30857 }
30858
30859
30860
30861
30862 func (c *GoogleAudiencesListCall) IfNoneMatch(entityTag string) *GoogleAudiencesListCall {
30863 c.ifNoneMatch_ = entityTag
30864 return c
30865 }
30866
30867
30868 func (c *GoogleAudiencesListCall) Context(ctx context.Context) *GoogleAudiencesListCall {
30869 c.ctx_ = ctx
30870 return c
30871 }
30872
30873
30874
30875 func (c *GoogleAudiencesListCall) Header() http.Header {
30876 if c.header_ == nil {
30877 c.header_ = make(http.Header)
30878 }
30879 return c.header_
30880 }
30881
30882 func (c *GoogleAudiencesListCall) doRequest(alt string) (*http.Response, error) {
30883 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30884 if c.ifNoneMatch_ != "" {
30885 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30886 }
30887 var body io.Reader = nil
30888 c.urlParams_.Set("alt", alt)
30889 c.urlParams_.Set("prettyPrint", "false")
30890 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/googleAudiences")
30891 urls += "?" + c.urlParams_.Encode()
30892 req, err := http.NewRequest("GET", urls, body)
30893 if err != nil {
30894 return nil, err
30895 }
30896 req.Header = reqHeaders
30897 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30898 }
30899
30900
30901
30902
30903
30904
30905
30906 func (c *GoogleAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListGoogleAudiencesResponse, error) {
30907 gensupport.SetOptions(c.urlParams_, opts...)
30908 res, err := c.doRequest("json")
30909 if res != nil && res.StatusCode == http.StatusNotModified {
30910 if res.Body != nil {
30911 res.Body.Close()
30912 }
30913 return nil, gensupport.WrapError(&googleapi.Error{
30914 Code: res.StatusCode,
30915 Header: res.Header,
30916 })
30917 }
30918 if err != nil {
30919 return nil, err
30920 }
30921 defer googleapi.CloseBody(res)
30922 if err := googleapi.CheckResponse(res); err != nil {
30923 return nil, gensupport.WrapError(err)
30924 }
30925 ret := &ListGoogleAudiencesResponse{
30926 ServerResponse: googleapi.ServerResponse{
30927 Header: res.Header,
30928 HTTPStatusCode: res.StatusCode,
30929 },
30930 }
30931 target := &ret
30932 if err := gensupport.DecodeResponse(target, res); err != nil {
30933 return nil, err
30934 }
30935 return ret, nil
30936 }
30937
30938
30939
30940
30941 func (c *GoogleAudiencesListCall) Pages(ctx context.Context, f func(*ListGoogleAudiencesResponse) error) error {
30942 c.ctx_ = ctx
30943 defer c.PageToken(c.urlParams_.Get("pageToken"))
30944 for {
30945 x, err := c.Do()
30946 if err != nil {
30947 return err
30948 }
30949 if err := f(x); err != nil {
30950 return err
30951 }
30952 if x.NextPageToken == "" {
30953 return nil
30954 }
30955 c.PageToken(x.NextPageToken)
30956 }
30957 }
30958
30959 type GuaranteedOrdersCreateCall struct {
30960 s *Service
30961 guaranteedorder *GuaranteedOrder
30962 urlParams_ gensupport.URLParams
30963 ctx_ context.Context
30964 header_ http.Header
30965 }
30966
30967
30968
30969 func (r *GuaranteedOrdersService) Create(guaranteedorder *GuaranteedOrder) *GuaranteedOrdersCreateCall {
30970 c := &GuaranteedOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30971 c.guaranteedorder = guaranteedorder
30972 return c
30973 }
30974
30975
30976
30977 func (c *GuaranteedOrdersCreateCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersCreateCall {
30978 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30979 return c
30980 }
30981
30982
30983
30984 func (c *GuaranteedOrdersCreateCall) PartnerId(partnerId int64) *GuaranteedOrdersCreateCall {
30985 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
30986 return c
30987 }
30988
30989
30990
30991
30992 func (c *GuaranteedOrdersCreateCall) Fields(s ...googleapi.Field) *GuaranteedOrdersCreateCall {
30993 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30994 return c
30995 }
30996
30997
30998 func (c *GuaranteedOrdersCreateCall) Context(ctx context.Context) *GuaranteedOrdersCreateCall {
30999 c.ctx_ = ctx
31000 return c
31001 }
31002
31003
31004
31005 func (c *GuaranteedOrdersCreateCall) Header() http.Header {
31006 if c.header_ == nil {
31007 c.header_ = make(http.Header)
31008 }
31009 return c.header_
31010 }
31011
31012 func (c *GuaranteedOrdersCreateCall) doRequest(alt string) (*http.Response, error) {
31013 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31014 var body io.Reader = nil
31015 body, err := googleapi.WithoutDataWrapper.JSONReader(c.guaranteedorder)
31016 if err != nil {
31017 return nil, err
31018 }
31019 c.urlParams_.Set("alt", alt)
31020 c.urlParams_.Set("prettyPrint", "false")
31021 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/guaranteedOrders")
31022 urls += "?" + c.urlParams_.Encode()
31023 req, err := http.NewRequest("POST", urls, body)
31024 if err != nil {
31025 return nil, err
31026 }
31027 req.Header = reqHeaders
31028 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31029 }
31030
31031
31032
31033
31034
31035
31036
31037 func (c *GuaranteedOrdersCreateCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) {
31038 gensupport.SetOptions(c.urlParams_, opts...)
31039 res, err := c.doRequest("json")
31040 if res != nil && res.StatusCode == http.StatusNotModified {
31041 if res.Body != nil {
31042 res.Body.Close()
31043 }
31044 return nil, gensupport.WrapError(&googleapi.Error{
31045 Code: res.StatusCode,
31046 Header: res.Header,
31047 })
31048 }
31049 if err != nil {
31050 return nil, err
31051 }
31052 defer googleapi.CloseBody(res)
31053 if err := googleapi.CheckResponse(res); err != nil {
31054 return nil, gensupport.WrapError(err)
31055 }
31056 ret := &GuaranteedOrder{
31057 ServerResponse: googleapi.ServerResponse{
31058 Header: res.Header,
31059 HTTPStatusCode: res.StatusCode,
31060 },
31061 }
31062 target := &ret
31063 if err := gensupport.DecodeResponse(target, res); err != nil {
31064 return nil, err
31065 }
31066 return ret, nil
31067 }
31068
31069 type GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall struct {
31070 s *Service
31071 guaranteedOrderId string
31072 editguaranteedorderreadaccessorsrequest *EditGuaranteedOrderReadAccessorsRequest
31073 urlParams_ gensupport.URLParams
31074 ctx_ context.Context
31075 header_ http.Header
31076 }
31077
31078
31079
31080
31081
31082
31083 func (r *GuaranteedOrdersService) EditGuaranteedOrderReadAccessors(guaranteedOrderId string, editguaranteedorderreadaccessorsrequest *EditGuaranteedOrderReadAccessorsRequest) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall {
31084 c := &GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31085 c.guaranteedOrderId = guaranteedOrderId
31086 c.editguaranteedorderreadaccessorsrequest = editguaranteedorderreadaccessorsrequest
31087 return c
31088 }
31089
31090
31091
31092
31093 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Fields(s ...googleapi.Field) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall {
31094 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31095 return c
31096 }
31097
31098
31099 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Context(ctx context.Context) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall {
31100 c.ctx_ = ctx
31101 return c
31102 }
31103
31104
31105
31106 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Header() http.Header {
31107 if c.header_ == nil {
31108 c.header_ = make(http.Header)
31109 }
31110 return c.header_
31111 }
31112
31113 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) doRequest(alt string) (*http.Response, error) {
31114 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31115 var body io.Reader = nil
31116 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editguaranteedorderreadaccessorsrequest)
31117 if err != nil {
31118 return nil, err
31119 }
31120 c.urlParams_.Set("alt", alt)
31121 c.urlParams_.Set("prettyPrint", "false")
31122 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/guaranteedOrders/{+guaranteedOrderId}:editGuaranteedOrderReadAccessors")
31123 urls += "?" + c.urlParams_.Encode()
31124 req, err := http.NewRequest("POST", urls, body)
31125 if err != nil {
31126 return nil, err
31127 }
31128 req.Header = reqHeaders
31129 googleapi.Expand(req.URL, map[string]string{
31130 "guaranteedOrderId": c.guaranteedOrderId,
31131 })
31132 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31133 }
31134
31135
31136
31137
31138
31139
31140
31141 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Do(opts ...googleapi.CallOption) (*EditGuaranteedOrderReadAccessorsResponse, error) {
31142 gensupport.SetOptions(c.urlParams_, opts...)
31143 res, err := c.doRequest("json")
31144 if res != nil && res.StatusCode == http.StatusNotModified {
31145 if res.Body != nil {
31146 res.Body.Close()
31147 }
31148 return nil, gensupport.WrapError(&googleapi.Error{
31149 Code: res.StatusCode,
31150 Header: res.Header,
31151 })
31152 }
31153 if err != nil {
31154 return nil, err
31155 }
31156 defer googleapi.CloseBody(res)
31157 if err := googleapi.CheckResponse(res); err != nil {
31158 return nil, gensupport.WrapError(err)
31159 }
31160 ret := &EditGuaranteedOrderReadAccessorsResponse{
31161 ServerResponse: googleapi.ServerResponse{
31162 Header: res.Header,
31163 HTTPStatusCode: res.StatusCode,
31164 },
31165 }
31166 target := &ret
31167 if err := gensupport.DecodeResponse(target, res); err != nil {
31168 return nil, err
31169 }
31170 return ret, nil
31171 }
31172
31173 type GuaranteedOrdersGetCall struct {
31174 s *Service
31175 guaranteedOrderId string
31176 urlParams_ gensupport.URLParams
31177 ifNoneMatch_ string
31178 ctx_ context.Context
31179 header_ http.Header
31180 }
31181
31182
31183
31184
31185
31186 func (r *GuaranteedOrdersService) Get(guaranteedOrderId string) *GuaranteedOrdersGetCall {
31187 c := &GuaranteedOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31188 c.guaranteedOrderId = guaranteedOrderId
31189 return c
31190 }
31191
31192
31193
31194 func (c *GuaranteedOrdersGetCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersGetCall {
31195 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31196 return c
31197 }
31198
31199
31200
31201 func (c *GuaranteedOrdersGetCall) PartnerId(partnerId int64) *GuaranteedOrdersGetCall {
31202 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31203 return c
31204 }
31205
31206
31207
31208
31209 func (c *GuaranteedOrdersGetCall) Fields(s ...googleapi.Field) *GuaranteedOrdersGetCall {
31210 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31211 return c
31212 }
31213
31214
31215
31216
31217 func (c *GuaranteedOrdersGetCall) IfNoneMatch(entityTag string) *GuaranteedOrdersGetCall {
31218 c.ifNoneMatch_ = entityTag
31219 return c
31220 }
31221
31222
31223 func (c *GuaranteedOrdersGetCall) Context(ctx context.Context) *GuaranteedOrdersGetCall {
31224 c.ctx_ = ctx
31225 return c
31226 }
31227
31228
31229
31230 func (c *GuaranteedOrdersGetCall) Header() http.Header {
31231 if c.header_ == nil {
31232 c.header_ = make(http.Header)
31233 }
31234 return c.header_
31235 }
31236
31237 func (c *GuaranteedOrdersGetCall) doRequest(alt string) (*http.Response, error) {
31238 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31239 if c.ifNoneMatch_ != "" {
31240 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31241 }
31242 var body io.Reader = nil
31243 c.urlParams_.Set("alt", alt)
31244 c.urlParams_.Set("prettyPrint", "false")
31245 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/guaranteedOrders/{+guaranteedOrderId}")
31246 urls += "?" + c.urlParams_.Encode()
31247 req, err := http.NewRequest("GET", urls, body)
31248 if err != nil {
31249 return nil, err
31250 }
31251 req.Header = reqHeaders
31252 googleapi.Expand(req.URL, map[string]string{
31253 "guaranteedOrderId": c.guaranteedOrderId,
31254 })
31255 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31256 }
31257
31258
31259
31260
31261
31262
31263
31264 func (c *GuaranteedOrdersGetCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) {
31265 gensupport.SetOptions(c.urlParams_, opts...)
31266 res, err := c.doRequest("json")
31267 if res != nil && res.StatusCode == http.StatusNotModified {
31268 if res.Body != nil {
31269 res.Body.Close()
31270 }
31271 return nil, gensupport.WrapError(&googleapi.Error{
31272 Code: res.StatusCode,
31273 Header: res.Header,
31274 })
31275 }
31276 if err != nil {
31277 return nil, err
31278 }
31279 defer googleapi.CloseBody(res)
31280 if err := googleapi.CheckResponse(res); err != nil {
31281 return nil, gensupport.WrapError(err)
31282 }
31283 ret := &GuaranteedOrder{
31284 ServerResponse: googleapi.ServerResponse{
31285 Header: res.Header,
31286 HTTPStatusCode: res.StatusCode,
31287 },
31288 }
31289 target := &ret
31290 if err := gensupport.DecodeResponse(target, res); err != nil {
31291 return nil, err
31292 }
31293 return ret, nil
31294 }
31295
31296 type GuaranteedOrdersListCall struct {
31297 s *Service
31298 urlParams_ gensupport.URLParams
31299 ifNoneMatch_ string
31300 ctx_ context.Context
31301 header_ http.Header
31302 }
31303
31304
31305
31306
31307
31308 func (r *GuaranteedOrdersService) List() *GuaranteedOrdersListCall {
31309 c := &GuaranteedOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31310 return c
31311 }
31312
31313
31314
31315 func (c *GuaranteedOrdersListCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersListCall {
31316 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31317 return c
31318 }
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333 func (c *GuaranteedOrdersListCall) Filter(filter string) *GuaranteedOrdersListCall {
31334 c.urlParams_.Set("filter", filter)
31335 return c
31336 }
31337
31338
31339
31340
31341
31342 func (c *GuaranteedOrdersListCall) OrderBy(orderBy string) *GuaranteedOrdersListCall {
31343 c.urlParams_.Set("orderBy", orderBy)
31344 return c
31345 }
31346
31347
31348
31349 func (c *GuaranteedOrdersListCall) PageSize(pageSize int64) *GuaranteedOrdersListCall {
31350 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
31351 return c
31352 }
31353
31354
31355
31356
31357
31358 func (c *GuaranteedOrdersListCall) PageToken(pageToken string) *GuaranteedOrdersListCall {
31359 c.urlParams_.Set("pageToken", pageToken)
31360 return c
31361 }
31362
31363
31364
31365 func (c *GuaranteedOrdersListCall) PartnerId(partnerId int64) *GuaranteedOrdersListCall {
31366 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31367 return c
31368 }
31369
31370
31371
31372
31373 func (c *GuaranteedOrdersListCall) Fields(s ...googleapi.Field) *GuaranteedOrdersListCall {
31374 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31375 return c
31376 }
31377
31378
31379
31380
31381 func (c *GuaranteedOrdersListCall) IfNoneMatch(entityTag string) *GuaranteedOrdersListCall {
31382 c.ifNoneMatch_ = entityTag
31383 return c
31384 }
31385
31386
31387 func (c *GuaranteedOrdersListCall) Context(ctx context.Context) *GuaranteedOrdersListCall {
31388 c.ctx_ = ctx
31389 return c
31390 }
31391
31392
31393
31394 func (c *GuaranteedOrdersListCall) Header() http.Header {
31395 if c.header_ == nil {
31396 c.header_ = make(http.Header)
31397 }
31398 return c.header_
31399 }
31400
31401 func (c *GuaranteedOrdersListCall) doRequest(alt string) (*http.Response, error) {
31402 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31403 if c.ifNoneMatch_ != "" {
31404 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31405 }
31406 var body io.Reader = nil
31407 c.urlParams_.Set("alt", alt)
31408 c.urlParams_.Set("prettyPrint", "false")
31409 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/guaranteedOrders")
31410 urls += "?" + c.urlParams_.Encode()
31411 req, err := http.NewRequest("GET", urls, body)
31412 if err != nil {
31413 return nil, err
31414 }
31415 req.Header = reqHeaders
31416 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31417 }
31418
31419
31420
31421
31422
31423
31424
31425 func (c *GuaranteedOrdersListCall) Do(opts ...googleapi.CallOption) (*ListGuaranteedOrdersResponse, error) {
31426 gensupport.SetOptions(c.urlParams_, opts...)
31427 res, err := c.doRequest("json")
31428 if res != nil && res.StatusCode == http.StatusNotModified {
31429 if res.Body != nil {
31430 res.Body.Close()
31431 }
31432 return nil, gensupport.WrapError(&googleapi.Error{
31433 Code: res.StatusCode,
31434 Header: res.Header,
31435 })
31436 }
31437 if err != nil {
31438 return nil, err
31439 }
31440 defer googleapi.CloseBody(res)
31441 if err := googleapi.CheckResponse(res); err != nil {
31442 return nil, gensupport.WrapError(err)
31443 }
31444 ret := &ListGuaranteedOrdersResponse{
31445 ServerResponse: googleapi.ServerResponse{
31446 Header: res.Header,
31447 HTTPStatusCode: res.StatusCode,
31448 },
31449 }
31450 target := &ret
31451 if err := gensupport.DecodeResponse(target, res); err != nil {
31452 return nil, err
31453 }
31454 return ret, nil
31455 }
31456
31457
31458
31459
31460 func (c *GuaranteedOrdersListCall) Pages(ctx context.Context, f func(*ListGuaranteedOrdersResponse) error) error {
31461 c.ctx_ = ctx
31462 defer c.PageToken(c.urlParams_.Get("pageToken"))
31463 for {
31464 x, err := c.Do()
31465 if err != nil {
31466 return err
31467 }
31468 if err := f(x); err != nil {
31469 return err
31470 }
31471 if x.NextPageToken == "" {
31472 return nil
31473 }
31474 c.PageToken(x.NextPageToken)
31475 }
31476 }
31477
31478 type GuaranteedOrdersPatchCall struct {
31479 s *Service
31480 guaranteedOrderId string
31481 guaranteedorder *GuaranteedOrder
31482 urlParams_ gensupport.URLParams
31483 ctx_ context.Context
31484 header_ http.Header
31485 }
31486
31487
31488
31489
31490
31491
31492
31493 func (r *GuaranteedOrdersService) Patch(guaranteedOrderId string, guaranteedorder *GuaranteedOrder) *GuaranteedOrdersPatchCall {
31494 c := &GuaranteedOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31495 c.guaranteedOrderId = guaranteedOrderId
31496 c.guaranteedorder = guaranteedorder
31497 return c
31498 }
31499
31500
31501
31502 func (c *GuaranteedOrdersPatchCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersPatchCall {
31503 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31504 return c
31505 }
31506
31507
31508
31509 func (c *GuaranteedOrdersPatchCall) PartnerId(partnerId int64) *GuaranteedOrdersPatchCall {
31510 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31511 return c
31512 }
31513
31514
31515
31516 func (c *GuaranteedOrdersPatchCall) UpdateMask(updateMask string) *GuaranteedOrdersPatchCall {
31517 c.urlParams_.Set("updateMask", updateMask)
31518 return c
31519 }
31520
31521
31522
31523
31524 func (c *GuaranteedOrdersPatchCall) Fields(s ...googleapi.Field) *GuaranteedOrdersPatchCall {
31525 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31526 return c
31527 }
31528
31529
31530 func (c *GuaranteedOrdersPatchCall) Context(ctx context.Context) *GuaranteedOrdersPatchCall {
31531 c.ctx_ = ctx
31532 return c
31533 }
31534
31535
31536
31537 func (c *GuaranteedOrdersPatchCall) Header() http.Header {
31538 if c.header_ == nil {
31539 c.header_ = make(http.Header)
31540 }
31541 return c.header_
31542 }
31543
31544 func (c *GuaranteedOrdersPatchCall) doRequest(alt string) (*http.Response, error) {
31545 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31546 var body io.Reader = nil
31547 body, err := googleapi.WithoutDataWrapper.JSONReader(c.guaranteedorder)
31548 if err != nil {
31549 return nil, err
31550 }
31551 c.urlParams_.Set("alt", alt)
31552 c.urlParams_.Set("prettyPrint", "false")
31553 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/guaranteedOrders/{+guaranteedOrderId}")
31554 urls += "?" + c.urlParams_.Encode()
31555 req, err := http.NewRequest("PATCH", urls, body)
31556 if err != nil {
31557 return nil, err
31558 }
31559 req.Header = reqHeaders
31560 googleapi.Expand(req.URL, map[string]string{
31561 "guaranteedOrderId": c.guaranteedOrderId,
31562 })
31563 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31564 }
31565
31566
31567
31568
31569
31570
31571
31572 func (c *GuaranteedOrdersPatchCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) {
31573 gensupport.SetOptions(c.urlParams_, opts...)
31574 res, err := c.doRequest("json")
31575 if res != nil && res.StatusCode == http.StatusNotModified {
31576 if res.Body != nil {
31577 res.Body.Close()
31578 }
31579 return nil, gensupport.WrapError(&googleapi.Error{
31580 Code: res.StatusCode,
31581 Header: res.Header,
31582 })
31583 }
31584 if err != nil {
31585 return nil, err
31586 }
31587 defer googleapi.CloseBody(res)
31588 if err := googleapi.CheckResponse(res); err != nil {
31589 return nil, gensupport.WrapError(err)
31590 }
31591 ret := &GuaranteedOrder{
31592 ServerResponse: googleapi.ServerResponse{
31593 Header: res.Header,
31594 HTTPStatusCode: res.StatusCode,
31595 },
31596 }
31597 target := &ret
31598 if err := gensupport.DecodeResponse(target, res); err != nil {
31599 return nil, err
31600 }
31601 return ret, nil
31602 }
31603
31604 type InventorySourceGroupsCreateCall struct {
31605 s *Service
31606 inventorysourcegroup *InventorySourceGroup
31607 urlParams_ gensupport.URLParams
31608 ctx_ context.Context
31609 header_ http.Header
31610 }
31611
31612
31613
31614 func (r *InventorySourceGroupsService) Create(inventorysourcegroup *InventorySourceGroup) *InventorySourceGroupsCreateCall {
31615 c := &InventorySourceGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31616 c.inventorysourcegroup = inventorysourcegroup
31617 return c
31618 }
31619
31620
31621
31622
31623 func (c *InventorySourceGroupsCreateCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsCreateCall {
31624 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31625 return c
31626 }
31627
31628
31629
31630
31631
31632 func (c *InventorySourceGroupsCreateCall) PartnerId(partnerId int64) *InventorySourceGroupsCreateCall {
31633 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31634 return c
31635 }
31636
31637
31638
31639
31640 func (c *InventorySourceGroupsCreateCall) Fields(s ...googleapi.Field) *InventorySourceGroupsCreateCall {
31641 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31642 return c
31643 }
31644
31645
31646 func (c *InventorySourceGroupsCreateCall) Context(ctx context.Context) *InventorySourceGroupsCreateCall {
31647 c.ctx_ = ctx
31648 return c
31649 }
31650
31651
31652
31653 func (c *InventorySourceGroupsCreateCall) Header() http.Header {
31654 if c.header_ == nil {
31655 c.header_ = make(http.Header)
31656 }
31657 return c.header_
31658 }
31659
31660 func (c *InventorySourceGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
31661 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31662 var body io.Reader = nil
31663 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysourcegroup)
31664 if err != nil {
31665 return nil, err
31666 }
31667 c.urlParams_.Set("alt", alt)
31668 c.urlParams_.Set("prettyPrint", "false")
31669 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups")
31670 urls += "?" + c.urlParams_.Encode()
31671 req, err := http.NewRequest("POST", urls, body)
31672 if err != nil {
31673 return nil, err
31674 }
31675 req.Header = reqHeaders
31676 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31677 }
31678
31679
31680
31681
31682
31683
31684
31685 func (c *InventorySourceGroupsCreateCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) {
31686 gensupport.SetOptions(c.urlParams_, opts...)
31687 res, err := c.doRequest("json")
31688 if res != nil && res.StatusCode == http.StatusNotModified {
31689 if res.Body != nil {
31690 res.Body.Close()
31691 }
31692 return nil, gensupport.WrapError(&googleapi.Error{
31693 Code: res.StatusCode,
31694 Header: res.Header,
31695 })
31696 }
31697 if err != nil {
31698 return nil, err
31699 }
31700 defer googleapi.CloseBody(res)
31701 if err := googleapi.CheckResponse(res); err != nil {
31702 return nil, gensupport.WrapError(err)
31703 }
31704 ret := &InventorySourceGroup{
31705 ServerResponse: googleapi.ServerResponse{
31706 Header: res.Header,
31707 HTTPStatusCode: res.StatusCode,
31708 },
31709 }
31710 target := &ret
31711 if err := gensupport.DecodeResponse(target, res); err != nil {
31712 return nil, err
31713 }
31714 return ret, nil
31715 }
31716
31717 type InventorySourceGroupsDeleteCall struct {
31718 s *Service
31719 inventorySourceGroupId int64
31720 urlParams_ gensupport.URLParams
31721 ctx_ context.Context
31722 header_ http.Header
31723 }
31724
31725
31726
31727
31728 func (r *InventorySourceGroupsService) Delete(inventorySourceGroupId int64) *InventorySourceGroupsDeleteCall {
31729 c := &InventorySourceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31730 c.inventorySourceGroupId = inventorySourceGroupId
31731 return c
31732 }
31733
31734
31735
31736
31737 func (c *InventorySourceGroupsDeleteCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsDeleteCall {
31738 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31739 return c
31740 }
31741
31742
31743
31744
31745 func (c *InventorySourceGroupsDeleteCall) PartnerId(partnerId int64) *InventorySourceGroupsDeleteCall {
31746 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31747 return c
31748 }
31749
31750
31751
31752
31753 func (c *InventorySourceGroupsDeleteCall) Fields(s ...googleapi.Field) *InventorySourceGroupsDeleteCall {
31754 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31755 return c
31756 }
31757
31758
31759 func (c *InventorySourceGroupsDeleteCall) Context(ctx context.Context) *InventorySourceGroupsDeleteCall {
31760 c.ctx_ = ctx
31761 return c
31762 }
31763
31764
31765
31766 func (c *InventorySourceGroupsDeleteCall) Header() http.Header {
31767 if c.header_ == nil {
31768 c.header_ = make(http.Header)
31769 }
31770 return c.header_
31771 }
31772
31773 func (c *InventorySourceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
31774 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31775 var body io.Reader = nil
31776 c.urlParams_.Set("alt", alt)
31777 c.urlParams_.Set("prettyPrint", "false")
31778 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups/{+inventorySourceGroupId}")
31779 urls += "?" + c.urlParams_.Encode()
31780 req, err := http.NewRequest("DELETE", urls, body)
31781 if err != nil {
31782 return nil, err
31783 }
31784 req.Header = reqHeaders
31785 googleapi.Expand(req.URL, map[string]string{
31786 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
31787 })
31788 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31789 }
31790
31791
31792
31793
31794
31795
31796 func (c *InventorySourceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
31797 gensupport.SetOptions(c.urlParams_, opts...)
31798 res, err := c.doRequest("json")
31799 if res != nil && res.StatusCode == http.StatusNotModified {
31800 if res.Body != nil {
31801 res.Body.Close()
31802 }
31803 return nil, gensupport.WrapError(&googleapi.Error{
31804 Code: res.StatusCode,
31805 Header: res.Header,
31806 })
31807 }
31808 if err != nil {
31809 return nil, err
31810 }
31811 defer googleapi.CloseBody(res)
31812 if err := googleapi.CheckResponse(res); err != nil {
31813 return nil, gensupport.WrapError(err)
31814 }
31815 ret := &Empty{
31816 ServerResponse: googleapi.ServerResponse{
31817 Header: res.Header,
31818 HTTPStatusCode: res.StatusCode,
31819 },
31820 }
31821 target := &ret
31822 if err := gensupport.DecodeResponse(target, res); err != nil {
31823 return nil, err
31824 }
31825 return ret, nil
31826 }
31827
31828 type InventorySourceGroupsGetCall struct {
31829 s *Service
31830 inventorySourceGroupId int64
31831 urlParams_ gensupport.URLParams
31832 ifNoneMatch_ string
31833 ctx_ context.Context
31834 header_ http.Header
31835 }
31836
31837
31838
31839
31840 func (r *InventorySourceGroupsService) Get(inventorySourceGroupId int64) *InventorySourceGroupsGetCall {
31841 c := &InventorySourceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31842 c.inventorySourceGroupId = inventorySourceGroupId
31843 return c
31844 }
31845
31846
31847
31848
31849
31850 func (c *InventorySourceGroupsGetCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsGetCall {
31851 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31852 return c
31853 }
31854
31855
31856
31857
31858 func (c *InventorySourceGroupsGetCall) PartnerId(partnerId int64) *InventorySourceGroupsGetCall {
31859 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
31860 return c
31861 }
31862
31863
31864
31865
31866 func (c *InventorySourceGroupsGetCall) Fields(s ...googleapi.Field) *InventorySourceGroupsGetCall {
31867 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31868 return c
31869 }
31870
31871
31872
31873
31874 func (c *InventorySourceGroupsGetCall) IfNoneMatch(entityTag string) *InventorySourceGroupsGetCall {
31875 c.ifNoneMatch_ = entityTag
31876 return c
31877 }
31878
31879
31880 func (c *InventorySourceGroupsGetCall) Context(ctx context.Context) *InventorySourceGroupsGetCall {
31881 c.ctx_ = ctx
31882 return c
31883 }
31884
31885
31886
31887 func (c *InventorySourceGroupsGetCall) Header() http.Header {
31888 if c.header_ == nil {
31889 c.header_ = make(http.Header)
31890 }
31891 return c.header_
31892 }
31893
31894 func (c *InventorySourceGroupsGetCall) doRequest(alt string) (*http.Response, error) {
31895 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31896 if c.ifNoneMatch_ != "" {
31897 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31898 }
31899 var body io.Reader = nil
31900 c.urlParams_.Set("alt", alt)
31901 c.urlParams_.Set("prettyPrint", "false")
31902 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups/{+inventorySourceGroupId}")
31903 urls += "?" + c.urlParams_.Encode()
31904 req, err := http.NewRequest("GET", urls, body)
31905 if err != nil {
31906 return nil, err
31907 }
31908 req.Header = reqHeaders
31909 googleapi.Expand(req.URL, map[string]string{
31910 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
31911 })
31912 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31913 }
31914
31915
31916
31917
31918
31919
31920
31921 func (c *InventorySourceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) {
31922 gensupport.SetOptions(c.urlParams_, opts...)
31923 res, err := c.doRequest("json")
31924 if res != nil && res.StatusCode == http.StatusNotModified {
31925 if res.Body != nil {
31926 res.Body.Close()
31927 }
31928 return nil, gensupport.WrapError(&googleapi.Error{
31929 Code: res.StatusCode,
31930 Header: res.Header,
31931 })
31932 }
31933 if err != nil {
31934 return nil, err
31935 }
31936 defer googleapi.CloseBody(res)
31937 if err := googleapi.CheckResponse(res); err != nil {
31938 return nil, gensupport.WrapError(err)
31939 }
31940 ret := &InventorySourceGroup{
31941 ServerResponse: googleapi.ServerResponse{
31942 Header: res.Header,
31943 HTTPStatusCode: res.StatusCode,
31944 },
31945 }
31946 target := &ret
31947 if err := gensupport.DecodeResponse(target, res); err != nil {
31948 return nil, err
31949 }
31950 return ret, nil
31951 }
31952
31953 type InventorySourceGroupsListCall struct {
31954 s *Service
31955 urlParams_ gensupport.URLParams
31956 ifNoneMatch_ string
31957 ctx_ context.Context
31958 header_ http.Header
31959 }
31960
31961
31962
31963 func (r *InventorySourceGroupsService) List() *InventorySourceGroupsListCall {
31964 c := &InventorySourceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31965 return c
31966 }
31967
31968
31969
31970
31971
31972 func (c *InventorySourceGroupsListCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsListCall {
31973 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31974 return c
31975 }
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985 func (c *InventorySourceGroupsListCall) Filter(filter string) *InventorySourceGroupsListCall {
31986 c.urlParams_.Set("filter", filter)
31987 return c
31988 }
31989
31990
31991
31992
31993
31994
31995 func (c *InventorySourceGroupsListCall) OrderBy(orderBy string) *InventorySourceGroupsListCall {
31996 c.urlParams_.Set("orderBy", orderBy)
31997 return c
31998 }
31999
32000
32001
32002 func (c *InventorySourceGroupsListCall) PageSize(pageSize int64) *InventorySourceGroupsListCall {
32003 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
32004 return c
32005 }
32006
32007
32008
32009
32010
32011 func (c *InventorySourceGroupsListCall) PageToken(pageToken string) *InventorySourceGroupsListCall {
32012 c.urlParams_.Set("pageToken", pageToken)
32013 return c
32014 }
32015
32016
32017
32018
32019 func (c *InventorySourceGroupsListCall) PartnerId(partnerId int64) *InventorySourceGroupsListCall {
32020 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32021 return c
32022 }
32023
32024
32025
32026
32027 func (c *InventorySourceGroupsListCall) Fields(s ...googleapi.Field) *InventorySourceGroupsListCall {
32028 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32029 return c
32030 }
32031
32032
32033
32034
32035 func (c *InventorySourceGroupsListCall) IfNoneMatch(entityTag string) *InventorySourceGroupsListCall {
32036 c.ifNoneMatch_ = entityTag
32037 return c
32038 }
32039
32040
32041 func (c *InventorySourceGroupsListCall) Context(ctx context.Context) *InventorySourceGroupsListCall {
32042 c.ctx_ = ctx
32043 return c
32044 }
32045
32046
32047
32048 func (c *InventorySourceGroupsListCall) Header() http.Header {
32049 if c.header_ == nil {
32050 c.header_ = make(http.Header)
32051 }
32052 return c.header_
32053 }
32054
32055 func (c *InventorySourceGroupsListCall) doRequest(alt string) (*http.Response, error) {
32056 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32057 if c.ifNoneMatch_ != "" {
32058 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32059 }
32060 var body io.Reader = nil
32061 c.urlParams_.Set("alt", alt)
32062 c.urlParams_.Set("prettyPrint", "false")
32063 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups")
32064 urls += "?" + c.urlParams_.Encode()
32065 req, err := http.NewRequest("GET", urls, body)
32066 if err != nil {
32067 return nil, err
32068 }
32069 req.Header = reqHeaders
32070 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32071 }
32072
32073
32074
32075
32076
32077
32078
32079 func (c *InventorySourceGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInventorySourceGroupsResponse, error) {
32080 gensupport.SetOptions(c.urlParams_, opts...)
32081 res, err := c.doRequest("json")
32082 if res != nil && res.StatusCode == http.StatusNotModified {
32083 if res.Body != nil {
32084 res.Body.Close()
32085 }
32086 return nil, gensupport.WrapError(&googleapi.Error{
32087 Code: res.StatusCode,
32088 Header: res.Header,
32089 })
32090 }
32091 if err != nil {
32092 return nil, err
32093 }
32094 defer googleapi.CloseBody(res)
32095 if err := googleapi.CheckResponse(res); err != nil {
32096 return nil, gensupport.WrapError(err)
32097 }
32098 ret := &ListInventorySourceGroupsResponse{
32099 ServerResponse: googleapi.ServerResponse{
32100 Header: res.Header,
32101 HTTPStatusCode: res.StatusCode,
32102 },
32103 }
32104 target := &ret
32105 if err := gensupport.DecodeResponse(target, res); err != nil {
32106 return nil, err
32107 }
32108 return ret, nil
32109 }
32110
32111
32112
32113
32114 func (c *InventorySourceGroupsListCall) Pages(ctx context.Context, f func(*ListInventorySourceGroupsResponse) error) error {
32115 c.ctx_ = ctx
32116 defer c.PageToken(c.urlParams_.Get("pageToken"))
32117 for {
32118 x, err := c.Do()
32119 if err != nil {
32120 return err
32121 }
32122 if err := f(x); err != nil {
32123 return err
32124 }
32125 if x.NextPageToken == "" {
32126 return nil
32127 }
32128 c.PageToken(x.NextPageToken)
32129 }
32130 }
32131
32132 type InventorySourceGroupsPatchCall struct {
32133 s *Service
32134 inventorySourceGroupId int64
32135 inventorysourcegroup *InventorySourceGroup
32136 urlParams_ gensupport.URLParams
32137 ctx_ context.Context
32138 header_ http.Header
32139 }
32140
32141
32142
32143
32144
32145
32146 func (r *InventorySourceGroupsService) Patch(inventorySourceGroupId int64, inventorysourcegroup *InventorySourceGroup) *InventorySourceGroupsPatchCall {
32147 c := &InventorySourceGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32148 c.inventorySourceGroupId = inventorySourceGroupId
32149 c.inventorysourcegroup = inventorysourcegroup
32150 return c
32151 }
32152
32153
32154
32155
32156 func (c *InventorySourceGroupsPatchCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsPatchCall {
32157 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32158 return c
32159 }
32160
32161
32162
32163
32164 func (c *InventorySourceGroupsPatchCall) PartnerId(partnerId int64) *InventorySourceGroupsPatchCall {
32165 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32166 return c
32167 }
32168
32169
32170
32171 func (c *InventorySourceGroupsPatchCall) UpdateMask(updateMask string) *InventorySourceGroupsPatchCall {
32172 c.urlParams_.Set("updateMask", updateMask)
32173 return c
32174 }
32175
32176
32177
32178
32179 func (c *InventorySourceGroupsPatchCall) Fields(s ...googleapi.Field) *InventorySourceGroupsPatchCall {
32180 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32181 return c
32182 }
32183
32184
32185 func (c *InventorySourceGroupsPatchCall) Context(ctx context.Context) *InventorySourceGroupsPatchCall {
32186 c.ctx_ = ctx
32187 return c
32188 }
32189
32190
32191
32192 func (c *InventorySourceGroupsPatchCall) Header() http.Header {
32193 if c.header_ == nil {
32194 c.header_ = make(http.Header)
32195 }
32196 return c.header_
32197 }
32198
32199 func (c *InventorySourceGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
32200 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32201 var body io.Reader = nil
32202 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysourcegroup)
32203 if err != nil {
32204 return nil, err
32205 }
32206 c.urlParams_.Set("alt", alt)
32207 c.urlParams_.Set("prettyPrint", "false")
32208 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups/{inventorySourceGroupId}")
32209 urls += "?" + c.urlParams_.Encode()
32210 req, err := http.NewRequest("PATCH", urls, body)
32211 if err != nil {
32212 return nil, err
32213 }
32214 req.Header = reqHeaders
32215 googleapi.Expand(req.URL, map[string]string{
32216 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
32217 })
32218 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32219 }
32220
32221
32222
32223
32224
32225
32226
32227 func (c *InventorySourceGroupsPatchCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) {
32228 gensupport.SetOptions(c.urlParams_, opts...)
32229 res, err := c.doRequest("json")
32230 if res != nil && res.StatusCode == http.StatusNotModified {
32231 if res.Body != nil {
32232 res.Body.Close()
32233 }
32234 return nil, gensupport.WrapError(&googleapi.Error{
32235 Code: res.StatusCode,
32236 Header: res.Header,
32237 })
32238 }
32239 if err != nil {
32240 return nil, err
32241 }
32242 defer googleapi.CloseBody(res)
32243 if err := googleapi.CheckResponse(res); err != nil {
32244 return nil, gensupport.WrapError(err)
32245 }
32246 ret := &InventorySourceGroup{
32247 ServerResponse: googleapi.ServerResponse{
32248 Header: res.Header,
32249 HTTPStatusCode: res.StatusCode,
32250 },
32251 }
32252 target := &ret
32253 if err := gensupport.DecodeResponse(target, res); err != nil {
32254 return nil, err
32255 }
32256 return ret, nil
32257 }
32258
32259 type InventorySourceGroupsAssignedInventorySourcesBulkEditCall struct {
32260 s *Service
32261 inventorySourceGroupId int64
32262 bulkeditassignedinventorysourcesrequest *BulkEditAssignedInventorySourcesRequest
32263 urlParams_ gensupport.URLParams
32264 ctx_ context.Context
32265 header_ http.Header
32266 }
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277 func (r *InventorySourceGroupsAssignedInventorySourcesService) BulkEdit(inventorySourceGroupId int64, bulkeditassignedinventorysourcesrequest *BulkEditAssignedInventorySourcesRequest) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall {
32278 c := &InventorySourceGroupsAssignedInventorySourcesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32279 c.inventorySourceGroupId = inventorySourceGroupId
32280 c.bulkeditassignedinventorysourcesrequest = bulkeditassignedinventorysourcesrequest
32281 return c
32282 }
32283
32284
32285
32286
32287 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall {
32288 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32289 return c
32290 }
32291
32292
32293 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall {
32294 c.ctx_ = ctx
32295 return c
32296 }
32297
32298
32299
32300 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Header() http.Header {
32301 if c.header_ == nil {
32302 c.header_ = make(http.Header)
32303 }
32304 return c.header_
32305 }
32306
32307 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) doRequest(alt string) (*http.Response, error) {
32308 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32309 var body io.Reader = nil
32310 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassignedinventorysourcesrequest)
32311 if err != nil {
32312 return nil, err
32313 }
32314 c.urlParams_.Set("alt", alt)
32315 c.urlParams_.Set("prettyPrint", "false")
32316 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources:bulkEdit")
32317 urls += "?" + c.urlParams_.Encode()
32318 req, err := http.NewRequest("POST", urls, body)
32319 if err != nil {
32320 return nil, err
32321 }
32322 req.Header = reqHeaders
32323 googleapi.Expand(req.URL, map[string]string{
32324 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
32325 })
32326 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32327 }
32328
32329
32330
32331
32332
32333
32334
32335 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedInventorySourcesResponse, error) {
32336 gensupport.SetOptions(c.urlParams_, opts...)
32337 res, err := c.doRequest("json")
32338 if res != nil && res.StatusCode == http.StatusNotModified {
32339 if res.Body != nil {
32340 res.Body.Close()
32341 }
32342 return nil, gensupport.WrapError(&googleapi.Error{
32343 Code: res.StatusCode,
32344 Header: res.Header,
32345 })
32346 }
32347 if err != nil {
32348 return nil, err
32349 }
32350 defer googleapi.CloseBody(res)
32351 if err := googleapi.CheckResponse(res); err != nil {
32352 return nil, gensupport.WrapError(err)
32353 }
32354 ret := &BulkEditAssignedInventorySourcesResponse{
32355 ServerResponse: googleapi.ServerResponse{
32356 Header: res.Header,
32357 HTTPStatusCode: res.StatusCode,
32358 },
32359 }
32360 target := &ret
32361 if err := gensupport.DecodeResponse(target, res); err != nil {
32362 return nil, err
32363 }
32364 return ret, nil
32365 }
32366
32367 type InventorySourceGroupsAssignedInventorySourcesCreateCall struct {
32368 s *Service
32369 inventorySourceGroupId int64
32370 assignedinventorysource *AssignedInventorySource
32371 urlParams_ gensupport.URLParams
32372 ctx_ context.Context
32373 header_ http.Header
32374 }
32375
32376
32377
32378
32379
32380
32381 func (r *InventorySourceGroupsAssignedInventorySourcesService) Create(inventorySourceGroupId int64, assignedinventorysource *AssignedInventorySource) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
32382 c := &InventorySourceGroupsAssignedInventorySourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32383 c.inventorySourceGroupId = inventorySourceGroupId
32384 c.assignedinventorysource = assignedinventorysource
32385 return c
32386 }
32387
32388
32389
32390
32391 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
32392 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32393 return c
32394 }
32395
32396
32397
32398
32399 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
32400 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32401 return c
32402 }
32403
32404
32405
32406
32407 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
32408 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32409 return c
32410 }
32411
32412
32413 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesCreateCall {
32414 c.ctx_ = ctx
32415 return c
32416 }
32417
32418
32419
32420 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Header() http.Header {
32421 if c.header_ == nil {
32422 c.header_ = make(http.Header)
32423 }
32424 return c.header_
32425 }
32426
32427 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) doRequest(alt string) (*http.Response, error) {
32428 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32429 var body io.Reader = nil
32430 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedinventorysource)
32431 if err != nil {
32432 return nil, err
32433 }
32434 c.urlParams_.Set("alt", alt)
32435 c.urlParams_.Set("prettyPrint", "false")
32436 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources")
32437 urls += "?" + c.urlParams_.Encode()
32438 req, err := http.NewRequest("POST", urls, body)
32439 if err != nil {
32440 return nil, err
32441 }
32442 req.Header = reqHeaders
32443 googleapi.Expand(req.URL, map[string]string{
32444 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
32445 })
32446 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32447 }
32448
32449
32450
32451
32452
32453
32454
32455 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Do(opts ...googleapi.CallOption) (*AssignedInventorySource, error) {
32456 gensupport.SetOptions(c.urlParams_, opts...)
32457 res, err := c.doRequest("json")
32458 if res != nil && res.StatusCode == http.StatusNotModified {
32459 if res.Body != nil {
32460 res.Body.Close()
32461 }
32462 return nil, gensupport.WrapError(&googleapi.Error{
32463 Code: res.StatusCode,
32464 Header: res.Header,
32465 })
32466 }
32467 if err != nil {
32468 return nil, err
32469 }
32470 defer googleapi.CloseBody(res)
32471 if err := googleapi.CheckResponse(res); err != nil {
32472 return nil, gensupport.WrapError(err)
32473 }
32474 ret := &AssignedInventorySource{
32475 ServerResponse: googleapi.ServerResponse{
32476 Header: res.Header,
32477 HTTPStatusCode: res.StatusCode,
32478 },
32479 }
32480 target := &ret
32481 if err := gensupport.DecodeResponse(target, res); err != nil {
32482 return nil, err
32483 }
32484 return ret, nil
32485 }
32486
32487 type InventorySourceGroupsAssignedInventorySourcesDeleteCall struct {
32488 s *Service
32489 inventorySourceGroupId int64
32490 assignedInventorySourceId int64
32491 urlParams_ gensupport.URLParams
32492 ctx_ context.Context
32493 header_ http.Header
32494 }
32495
32496
32497
32498
32499
32500
32501
32502
32503 func (r *InventorySourceGroupsAssignedInventorySourcesService) Delete(inventorySourceGroupId int64, assignedInventorySourceId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32504 c := &InventorySourceGroupsAssignedInventorySourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32505 c.inventorySourceGroupId = inventorySourceGroupId
32506 c.assignedInventorySourceId = assignedInventorySourceId
32507 return c
32508 }
32509
32510
32511
32512
32513 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32514 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32515 return c
32516 }
32517
32518
32519
32520
32521 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32522 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32523 return c
32524 }
32525
32526
32527
32528
32529 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32530 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32531 return c
32532 }
32533
32534
32535 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesDeleteCall {
32536 c.ctx_ = ctx
32537 return c
32538 }
32539
32540
32541
32542 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Header() http.Header {
32543 if c.header_ == nil {
32544 c.header_ = make(http.Header)
32545 }
32546 return c.header_
32547 }
32548
32549 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
32550 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32551 var body io.Reader = nil
32552 c.urlParams_.Set("alt", alt)
32553 c.urlParams_.Set("prettyPrint", "false")
32554 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources/{+assignedInventorySourceId}")
32555 urls += "?" + c.urlParams_.Encode()
32556 req, err := http.NewRequest("DELETE", urls, body)
32557 if err != nil {
32558 return nil, err
32559 }
32560 req.Header = reqHeaders
32561 googleapi.Expand(req.URL, map[string]string{
32562 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
32563 "assignedInventorySourceId": strconv.FormatInt(c.assignedInventorySourceId, 10),
32564 })
32565 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32566 }
32567
32568
32569
32570
32571
32572
32573 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
32574 gensupport.SetOptions(c.urlParams_, opts...)
32575 res, err := c.doRequest("json")
32576 if res != nil && res.StatusCode == http.StatusNotModified {
32577 if res.Body != nil {
32578 res.Body.Close()
32579 }
32580 return nil, gensupport.WrapError(&googleapi.Error{
32581 Code: res.StatusCode,
32582 Header: res.Header,
32583 })
32584 }
32585 if err != nil {
32586 return nil, err
32587 }
32588 defer googleapi.CloseBody(res)
32589 if err := googleapi.CheckResponse(res); err != nil {
32590 return nil, gensupport.WrapError(err)
32591 }
32592 ret := &Empty{
32593 ServerResponse: googleapi.ServerResponse{
32594 Header: res.Header,
32595 HTTPStatusCode: res.StatusCode,
32596 },
32597 }
32598 target := &ret
32599 if err := gensupport.DecodeResponse(target, res); err != nil {
32600 return nil, err
32601 }
32602 return ret, nil
32603 }
32604
32605 type InventorySourceGroupsAssignedInventorySourcesListCall struct {
32606 s *Service
32607 inventorySourceGroupId int64
32608 urlParams_ gensupport.URLParams
32609 ifNoneMatch_ string
32610 ctx_ context.Context
32611 header_ http.Header
32612 }
32613
32614
32615
32616
32617
32618 func (r *InventorySourceGroupsAssignedInventorySourcesService) List(inventorySourceGroupId int64) *InventorySourceGroupsAssignedInventorySourcesListCall {
32619 c := &InventorySourceGroupsAssignedInventorySourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32620 c.inventorySourceGroupId = inventorySourceGroupId
32621 return c
32622 }
32623
32624
32625
32626
32627
32628 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesListCall {
32629 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32630 return c
32631 }
32632
32633
32634
32635
32636
32637
32638
32639
32640
32641 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Filter(filter string) *InventorySourceGroupsAssignedInventorySourcesListCall {
32642 c.urlParams_.Set("filter", filter)
32643 return c
32644 }
32645
32646
32647
32648
32649
32650
32651 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) OrderBy(orderBy string) *InventorySourceGroupsAssignedInventorySourcesListCall {
32652 c.urlParams_.Set("orderBy", orderBy)
32653 return c
32654 }
32655
32656
32657
32658
32659 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PageSize(pageSize int64) *InventorySourceGroupsAssignedInventorySourcesListCall {
32660 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
32661 return c
32662 }
32663
32664
32665
32666
32667
32668
32669 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PageToken(pageToken string) *InventorySourceGroupsAssignedInventorySourcesListCall {
32670 c.urlParams_.Set("pageToken", pageToken)
32671 return c
32672 }
32673
32674
32675
32676
32677 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesListCall {
32678 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32679 return c
32680 }
32681
32682
32683
32684
32685 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesListCall {
32686 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32687 return c
32688 }
32689
32690
32691
32692
32693 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) IfNoneMatch(entityTag string) *InventorySourceGroupsAssignedInventorySourcesListCall {
32694 c.ifNoneMatch_ = entityTag
32695 return c
32696 }
32697
32698
32699 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesListCall {
32700 c.ctx_ = ctx
32701 return c
32702 }
32703
32704
32705
32706 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Header() http.Header {
32707 if c.header_ == nil {
32708 c.header_ = make(http.Header)
32709 }
32710 return c.header_
32711 }
32712
32713 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) doRequest(alt string) (*http.Response, error) {
32714 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32715 if c.ifNoneMatch_ != "" {
32716 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32717 }
32718 var body io.Reader = nil
32719 c.urlParams_.Set("alt", alt)
32720 c.urlParams_.Set("prettyPrint", "false")
32721 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources")
32722 urls += "?" + c.urlParams_.Encode()
32723 req, err := http.NewRequest("GET", urls, body)
32724 if err != nil {
32725 return nil, err
32726 }
32727 req.Header = reqHeaders
32728 googleapi.Expand(req.URL, map[string]string{
32729 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10),
32730 })
32731 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32732 }
32733
32734
32735
32736
32737
32738
32739
32740 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListAssignedInventorySourcesResponse, error) {
32741 gensupport.SetOptions(c.urlParams_, opts...)
32742 res, err := c.doRequest("json")
32743 if res != nil && res.StatusCode == http.StatusNotModified {
32744 if res.Body != nil {
32745 res.Body.Close()
32746 }
32747 return nil, gensupport.WrapError(&googleapi.Error{
32748 Code: res.StatusCode,
32749 Header: res.Header,
32750 })
32751 }
32752 if err != nil {
32753 return nil, err
32754 }
32755 defer googleapi.CloseBody(res)
32756 if err := googleapi.CheckResponse(res); err != nil {
32757 return nil, gensupport.WrapError(err)
32758 }
32759 ret := &ListAssignedInventorySourcesResponse{
32760 ServerResponse: googleapi.ServerResponse{
32761 Header: res.Header,
32762 HTTPStatusCode: res.StatusCode,
32763 },
32764 }
32765 target := &ret
32766 if err := gensupport.DecodeResponse(target, res); err != nil {
32767 return nil, err
32768 }
32769 return ret, nil
32770 }
32771
32772
32773
32774
32775 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Pages(ctx context.Context, f func(*ListAssignedInventorySourcesResponse) error) error {
32776 c.ctx_ = ctx
32777 defer c.PageToken(c.urlParams_.Get("pageToken"))
32778 for {
32779 x, err := c.Do()
32780 if err != nil {
32781 return err
32782 }
32783 if err := f(x); err != nil {
32784 return err
32785 }
32786 if x.NextPageToken == "" {
32787 return nil
32788 }
32789 c.PageToken(x.NextPageToken)
32790 }
32791 }
32792
32793 type InventorySourcesCreateCall struct {
32794 s *Service
32795 inventorysource *InventorySource
32796 urlParams_ gensupport.URLParams
32797 ctx_ context.Context
32798 header_ http.Header
32799 }
32800
32801
32802
32803 func (r *InventorySourcesService) Create(inventorysource *InventorySource) *InventorySourcesCreateCall {
32804 c := &InventorySourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32805 c.inventorysource = inventorysource
32806 return c
32807 }
32808
32809
32810
32811 func (c *InventorySourcesCreateCall) AdvertiserId(advertiserId int64) *InventorySourcesCreateCall {
32812 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32813 return c
32814 }
32815
32816
32817
32818 func (c *InventorySourcesCreateCall) PartnerId(partnerId int64) *InventorySourcesCreateCall {
32819 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
32820 return c
32821 }
32822
32823
32824
32825
32826 func (c *InventorySourcesCreateCall) Fields(s ...googleapi.Field) *InventorySourcesCreateCall {
32827 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32828 return c
32829 }
32830
32831
32832 func (c *InventorySourcesCreateCall) Context(ctx context.Context) *InventorySourcesCreateCall {
32833 c.ctx_ = ctx
32834 return c
32835 }
32836
32837
32838
32839 func (c *InventorySourcesCreateCall) Header() http.Header {
32840 if c.header_ == nil {
32841 c.header_ = make(http.Header)
32842 }
32843 return c.header_
32844 }
32845
32846 func (c *InventorySourcesCreateCall) doRequest(alt string) (*http.Response, error) {
32847 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32848 var body io.Reader = nil
32849 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysource)
32850 if err != nil {
32851 return nil, err
32852 }
32853 c.urlParams_.Set("alt", alt)
32854 c.urlParams_.Set("prettyPrint", "false")
32855 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySources")
32856 urls += "?" + c.urlParams_.Encode()
32857 req, err := http.NewRequest("POST", urls, body)
32858 if err != nil {
32859 return nil, err
32860 }
32861 req.Header = reqHeaders
32862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32863 }
32864
32865
32866
32867
32868
32869
32870
32871 func (c *InventorySourcesCreateCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) {
32872 gensupport.SetOptions(c.urlParams_, opts...)
32873 res, err := c.doRequest("json")
32874 if res != nil && res.StatusCode == http.StatusNotModified {
32875 if res.Body != nil {
32876 res.Body.Close()
32877 }
32878 return nil, gensupport.WrapError(&googleapi.Error{
32879 Code: res.StatusCode,
32880 Header: res.Header,
32881 })
32882 }
32883 if err != nil {
32884 return nil, err
32885 }
32886 defer googleapi.CloseBody(res)
32887 if err := googleapi.CheckResponse(res); err != nil {
32888 return nil, gensupport.WrapError(err)
32889 }
32890 ret := &InventorySource{
32891 ServerResponse: googleapi.ServerResponse{
32892 Header: res.Header,
32893 HTTPStatusCode: res.StatusCode,
32894 },
32895 }
32896 target := &ret
32897 if err := gensupport.DecodeResponse(target, res); err != nil {
32898 return nil, err
32899 }
32900 return ret, nil
32901 }
32902
32903 type InventorySourcesEditInventorySourceReadWriteAccessorsCall struct {
32904 s *Service
32905 inventorySourceId int64
32906 editinventorysourcereadwriteaccessorsrequest *EditInventorySourceReadWriteAccessorsRequest
32907 urlParams_ gensupport.URLParams
32908 ctx_ context.Context
32909 header_ http.Header
32910 }
32911
32912
32913
32914
32915
32916
32917 func (r *InventorySourcesService) EditInventorySourceReadWriteAccessors(inventorySourceId int64, editinventorysourcereadwriteaccessorsrequest *EditInventorySourceReadWriteAccessorsRequest) *InventorySourcesEditInventorySourceReadWriteAccessorsCall {
32918 c := &InventorySourcesEditInventorySourceReadWriteAccessorsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32919 c.inventorySourceId = inventorySourceId
32920 c.editinventorysourcereadwriteaccessorsrequest = editinventorysourcereadwriteaccessorsrequest
32921 return c
32922 }
32923
32924
32925
32926
32927 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Fields(s ...googleapi.Field) *InventorySourcesEditInventorySourceReadWriteAccessorsCall {
32928 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32929 return c
32930 }
32931
32932
32933 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Context(ctx context.Context) *InventorySourcesEditInventorySourceReadWriteAccessorsCall {
32934 c.ctx_ = ctx
32935 return c
32936 }
32937
32938
32939
32940 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Header() http.Header {
32941 if c.header_ == nil {
32942 c.header_ = make(http.Header)
32943 }
32944 return c.header_
32945 }
32946
32947 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) doRequest(alt string) (*http.Response, error) {
32948 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32949 var body io.Reader = nil
32950 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editinventorysourcereadwriteaccessorsrequest)
32951 if err != nil {
32952 return nil, err
32953 }
32954 c.urlParams_.Set("alt", alt)
32955 c.urlParams_.Set("prettyPrint", "false")
32956 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySources/{+inventorySourceId}:editInventorySourceReadWriteAccessors")
32957 urls += "?" + c.urlParams_.Encode()
32958 req, err := http.NewRequest("POST", urls, body)
32959 if err != nil {
32960 return nil, err
32961 }
32962 req.Header = reqHeaders
32963 googleapi.Expand(req.URL, map[string]string{
32964 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10),
32965 })
32966 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32967 }
32968
32969
32970
32971
32972
32973
32974
32975 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Do(opts ...googleapi.CallOption) (*InventorySourceAccessors, error) {
32976 gensupport.SetOptions(c.urlParams_, opts...)
32977 res, err := c.doRequest("json")
32978 if res != nil && res.StatusCode == http.StatusNotModified {
32979 if res.Body != nil {
32980 res.Body.Close()
32981 }
32982 return nil, gensupport.WrapError(&googleapi.Error{
32983 Code: res.StatusCode,
32984 Header: res.Header,
32985 })
32986 }
32987 if err != nil {
32988 return nil, err
32989 }
32990 defer googleapi.CloseBody(res)
32991 if err := googleapi.CheckResponse(res); err != nil {
32992 return nil, gensupport.WrapError(err)
32993 }
32994 ret := &InventorySourceAccessors{
32995 ServerResponse: googleapi.ServerResponse{
32996 Header: res.Header,
32997 HTTPStatusCode: res.StatusCode,
32998 },
32999 }
33000 target := &ret
33001 if err := gensupport.DecodeResponse(target, res); err != nil {
33002 return nil, err
33003 }
33004 return ret, nil
33005 }
33006
33007 type InventorySourcesGetCall struct {
33008 s *Service
33009 inventorySourceId int64
33010 urlParams_ gensupport.URLParams
33011 ifNoneMatch_ string
33012 ctx_ context.Context
33013 header_ http.Header
33014 }
33015
33016
33017
33018
33019 func (r *InventorySourcesService) Get(inventorySourceId int64) *InventorySourcesGetCall {
33020 c := &InventorySourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33021 c.inventorySourceId = inventorySourceId
33022 return c
33023 }
33024
33025
33026
33027
33028
33029 func (c *InventorySourcesGetCall) AdvertiserId(advertiserId int64) *InventorySourcesGetCall {
33030 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33031 return c
33032 }
33033
33034
33035
33036 func (c *InventorySourcesGetCall) PartnerId(partnerId int64) *InventorySourcesGetCall {
33037 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
33038 return c
33039 }
33040
33041
33042
33043
33044 func (c *InventorySourcesGetCall) Fields(s ...googleapi.Field) *InventorySourcesGetCall {
33045 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33046 return c
33047 }
33048
33049
33050
33051
33052 func (c *InventorySourcesGetCall) IfNoneMatch(entityTag string) *InventorySourcesGetCall {
33053 c.ifNoneMatch_ = entityTag
33054 return c
33055 }
33056
33057
33058 func (c *InventorySourcesGetCall) Context(ctx context.Context) *InventorySourcesGetCall {
33059 c.ctx_ = ctx
33060 return c
33061 }
33062
33063
33064
33065 func (c *InventorySourcesGetCall) Header() http.Header {
33066 if c.header_ == nil {
33067 c.header_ = make(http.Header)
33068 }
33069 return c.header_
33070 }
33071
33072 func (c *InventorySourcesGetCall) doRequest(alt string) (*http.Response, error) {
33073 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33074 if c.ifNoneMatch_ != "" {
33075 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33076 }
33077 var body io.Reader = nil
33078 c.urlParams_.Set("alt", alt)
33079 c.urlParams_.Set("prettyPrint", "false")
33080 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySources/{+inventorySourceId}")
33081 urls += "?" + c.urlParams_.Encode()
33082 req, err := http.NewRequest("GET", urls, body)
33083 if err != nil {
33084 return nil, err
33085 }
33086 req.Header = reqHeaders
33087 googleapi.Expand(req.URL, map[string]string{
33088 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10),
33089 })
33090 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33091 }
33092
33093
33094
33095
33096
33097
33098
33099 func (c *InventorySourcesGetCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) {
33100 gensupport.SetOptions(c.urlParams_, opts...)
33101 res, err := c.doRequest("json")
33102 if res != nil && res.StatusCode == http.StatusNotModified {
33103 if res.Body != nil {
33104 res.Body.Close()
33105 }
33106 return nil, gensupport.WrapError(&googleapi.Error{
33107 Code: res.StatusCode,
33108 Header: res.Header,
33109 })
33110 }
33111 if err != nil {
33112 return nil, err
33113 }
33114 defer googleapi.CloseBody(res)
33115 if err := googleapi.CheckResponse(res); err != nil {
33116 return nil, gensupport.WrapError(err)
33117 }
33118 ret := &InventorySource{
33119 ServerResponse: googleapi.ServerResponse{
33120 Header: res.Header,
33121 HTTPStatusCode: res.StatusCode,
33122 },
33123 }
33124 target := &ret
33125 if err := gensupport.DecodeResponse(target, res); err != nil {
33126 return nil, err
33127 }
33128 return ret, nil
33129 }
33130
33131 type InventorySourcesListCall struct {
33132 s *Service
33133 urlParams_ gensupport.URLParams
33134 ifNoneMatch_ string
33135 ctx_ context.Context
33136 header_ http.Header
33137 }
33138
33139
33140
33141
33142
33143 func (r *InventorySourcesService) List() *InventorySourcesListCall {
33144 c := &InventorySourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33145 return c
33146 }
33147
33148
33149
33150 func (c *InventorySourcesListCall) AdvertiserId(advertiserId int64) *InventorySourcesListCall {
33151 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33152 return c
33153 }
33154
33155
33156
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169 func (c *InventorySourcesListCall) Filter(filter string) *InventorySourcesListCall {
33170 c.urlParams_.Set("filter", filter)
33171 return c
33172 }
33173
33174
33175
33176
33177
33178 func (c *InventorySourcesListCall) OrderBy(orderBy string) *InventorySourcesListCall {
33179 c.urlParams_.Set("orderBy", orderBy)
33180 return c
33181 }
33182
33183
33184
33185 func (c *InventorySourcesListCall) PageSize(pageSize int64) *InventorySourcesListCall {
33186 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
33187 return c
33188 }
33189
33190
33191
33192
33193
33194 func (c *InventorySourcesListCall) PageToken(pageToken string) *InventorySourcesListCall {
33195 c.urlParams_.Set("pageToken", pageToken)
33196 return c
33197 }
33198
33199
33200
33201 func (c *InventorySourcesListCall) PartnerId(partnerId int64) *InventorySourcesListCall {
33202 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
33203 return c
33204 }
33205
33206
33207
33208
33209 func (c *InventorySourcesListCall) Fields(s ...googleapi.Field) *InventorySourcesListCall {
33210 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33211 return c
33212 }
33213
33214
33215
33216
33217 func (c *InventorySourcesListCall) IfNoneMatch(entityTag string) *InventorySourcesListCall {
33218 c.ifNoneMatch_ = entityTag
33219 return c
33220 }
33221
33222
33223 func (c *InventorySourcesListCall) Context(ctx context.Context) *InventorySourcesListCall {
33224 c.ctx_ = ctx
33225 return c
33226 }
33227
33228
33229
33230 func (c *InventorySourcesListCall) Header() http.Header {
33231 if c.header_ == nil {
33232 c.header_ = make(http.Header)
33233 }
33234 return c.header_
33235 }
33236
33237 func (c *InventorySourcesListCall) doRequest(alt string) (*http.Response, error) {
33238 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33239 if c.ifNoneMatch_ != "" {
33240 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33241 }
33242 var body io.Reader = nil
33243 c.urlParams_.Set("alt", alt)
33244 c.urlParams_.Set("prettyPrint", "false")
33245 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySources")
33246 urls += "?" + c.urlParams_.Encode()
33247 req, err := http.NewRequest("GET", urls, body)
33248 if err != nil {
33249 return nil, err
33250 }
33251 req.Header = reqHeaders
33252 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33253 }
33254
33255
33256
33257
33258
33259
33260
33261 func (c *InventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListInventorySourcesResponse, error) {
33262 gensupport.SetOptions(c.urlParams_, opts...)
33263 res, err := c.doRequest("json")
33264 if res != nil && res.StatusCode == http.StatusNotModified {
33265 if res.Body != nil {
33266 res.Body.Close()
33267 }
33268 return nil, gensupport.WrapError(&googleapi.Error{
33269 Code: res.StatusCode,
33270 Header: res.Header,
33271 })
33272 }
33273 if err != nil {
33274 return nil, err
33275 }
33276 defer googleapi.CloseBody(res)
33277 if err := googleapi.CheckResponse(res); err != nil {
33278 return nil, gensupport.WrapError(err)
33279 }
33280 ret := &ListInventorySourcesResponse{
33281 ServerResponse: googleapi.ServerResponse{
33282 Header: res.Header,
33283 HTTPStatusCode: res.StatusCode,
33284 },
33285 }
33286 target := &ret
33287 if err := gensupport.DecodeResponse(target, res); err != nil {
33288 return nil, err
33289 }
33290 return ret, nil
33291 }
33292
33293
33294
33295
33296 func (c *InventorySourcesListCall) Pages(ctx context.Context, f func(*ListInventorySourcesResponse) error) error {
33297 c.ctx_ = ctx
33298 defer c.PageToken(c.urlParams_.Get("pageToken"))
33299 for {
33300 x, err := c.Do()
33301 if err != nil {
33302 return err
33303 }
33304 if err := f(x); err != nil {
33305 return err
33306 }
33307 if x.NextPageToken == "" {
33308 return nil
33309 }
33310 c.PageToken(x.NextPageToken)
33311 }
33312 }
33313
33314 type InventorySourcesPatchCall struct {
33315 s *Service
33316 inventorySourceId int64
33317 inventorysource *InventorySource
33318 urlParams_ gensupport.URLParams
33319 ctx_ context.Context
33320 header_ http.Header
33321 }
33322
33323
33324
33325
33326
33327
33328 func (r *InventorySourcesService) Patch(inventorySourceId int64, inventorysource *InventorySource) *InventorySourcesPatchCall {
33329 c := &InventorySourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33330 c.inventorySourceId = inventorySourceId
33331 c.inventorysource = inventorysource
33332 return c
33333 }
33334
33335
33336
33337 func (c *InventorySourcesPatchCall) AdvertiserId(advertiserId int64) *InventorySourcesPatchCall {
33338 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33339 return c
33340 }
33341
33342
33343
33344 func (c *InventorySourcesPatchCall) PartnerId(partnerId int64) *InventorySourcesPatchCall {
33345 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId))
33346 return c
33347 }
33348
33349
33350
33351 func (c *InventorySourcesPatchCall) UpdateMask(updateMask string) *InventorySourcesPatchCall {
33352 c.urlParams_.Set("updateMask", updateMask)
33353 return c
33354 }
33355
33356
33357
33358
33359 func (c *InventorySourcesPatchCall) Fields(s ...googleapi.Field) *InventorySourcesPatchCall {
33360 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33361 return c
33362 }
33363
33364
33365 func (c *InventorySourcesPatchCall) Context(ctx context.Context) *InventorySourcesPatchCall {
33366 c.ctx_ = ctx
33367 return c
33368 }
33369
33370
33371
33372 func (c *InventorySourcesPatchCall) Header() http.Header {
33373 if c.header_ == nil {
33374 c.header_ = make(http.Header)
33375 }
33376 return c.header_
33377 }
33378
33379 func (c *InventorySourcesPatchCall) doRequest(alt string) (*http.Response, error) {
33380 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33381 var body io.Reader = nil
33382 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysource)
33383 if err != nil {
33384 return nil, err
33385 }
33386 c.urlParams_.Set("alt", alt)
33387 c.urlParams_.Set("prettyPrint", "false")
33388 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/inventorySources/{+inventorySourceId}")
33389 urls += "?" + c.urlParams_.Encode()
33390 req, err := http.NewRequest("PATCH", urls, body)
33391 if err != nil {
33392 return nil, err
33393 }
33394 req.Header = reqHeaders
33395 googleapi.Expand(req.URL, map[string]string{
33396 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10),
33397 })
33398 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33399 }
33400
33401
33402
33403
33404
33405
33406
33407 func (c *InventorySourcesPatchCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) {
33408 gensupport.SetOptions(c.urlParams_, opts...)
33409 res, err := c.doRequest("json")
33410 if res != nil && res.StatusCode == http.StatusNotModified {
33411 if res.Body != nil {
33412 res.Body.Close()
33413 }
33414 return nil, gensupport.WrapError(&googleapi.Error{
33415 Code: res.StatusCode,
33416 Header: res.Header,
33417 })
33418 }
33419 if err != nil {
33420 return nil, err
33421 }
33422 defer googleapi.CloseBody(res)
33423 if err := googleapi.CheckResponse(res); err != nil {
33424 return nil, gensupport.WrapError(err)
33425 }
33426 ret := &InventorySource{
33427 ServerResponse: googleapi.ServerResponse{
33428 Header: res.Header,
33429 HTTPStatusCode: res.StatusCode,
33430 },
33431 }
33432 target := &ret
33433 if err := gensupport.DecodeResponse(target, res); err != nil {
33434 return nil, err
33435 }
33436 return ret, nil
33437 }
33438
33439 type MediaDownloadCall struct {
33440 s *Service
33441 resourceName string
33442 urlParams_ gensupport.URLParams
33443 ifNoneMatch_ string
33444 ctx_ context.Context
33445 header_ http.Header
33446 }
33447
33448
33449
33450
33451
33452
33453
33454 func (r *MediaService) Download(resourceName string) *MediaDownloadCall {
33455 c := &MediaDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33456 c.resourceName = resourceName
33457 return c
33458 }
33459
33460
33461
33462
33463 func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall {
33464 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33465 return c
33466 }
33467
33468
33469
33470
33471 func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall {
33472 c.ifNoneMatch_ = entityTag
33473 return c
33474 }
33475
33476
33477 func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall {
33478 c.ctx_ = ctx
33479 return c
33480 }
33481
33482
33483
33484 func (c *MediaDownloadCall) Header() http.Header {
33485 if c.header_ == nil {
33486 c.header_ = make(http.Header)
33487 }
33488 return c.header_
33489 }
33490
33491 func (c *MediaDownloadCall) doRequest(alt string) (*http.Response, error) {
33492 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33493 if c.ifNoneMatch_ != "" {
33494 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33495 }
33496 var body io.Reader = nil
33497 c.urlParams_.Set("alt", alt)
33498 c.urlParams_.Set("prettyPrint", "false")
33499 urls := googleapi.ResolveRelative(c.s.BasePath, "download/{+resourceName}")
33500 urls += "?" + c.urlParams_.Encode()
33501 req, err := http.NewRequest("GET", urls, body)
33502 if err != nil {
33503 return nil, err
33504 }
33505 req.Header = reqHeaders
33506 googleapi.Expand(req.URL, map[string]string{
33507 "resourceName": c.resourceName,
33508 })
33509 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33510 }
33511
33512
33513
33514
33515 func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
33516 gensupport.SetOptions(c.urlParams_, opts...)
33517 res, err := c.doRequest("media")
33518 if err != nil {
33519 return nil, err
33520 }
33521 if err := googleapi.CheckResponse(res); err != nil {
33522 res.Body.Close()
33523 return nil, gensupport.WrapError(err)
33524 }
33525 return res, nil
33526 }
33527
33528
33529
33530
33531
33532
33533
33534 func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) {
33535 gensupport.SetOptions(c.urlParams_, opts...)
33536 res, err := c.doRequest("json")
33537 if res != nil && res.StatusCode == http.StatusNotModified {
33538 if res.Body != nil {
33539 res.Body.Close()
33540 }
33541 return nil, gensupport.WrapError(&googleapi.Error{
33542 Code: res.StatusCode,
33543 Header: res.Header,
33544 })
33545 }
33546 if err != nil {
33547 return nil, err
33548 }
33549 defer googleapi.CloseBody(res)
33550 if err := googleapi.CheckResponse(res); err != nil {
33551 return nil, gensupport.WrapError(err)
33552 }
33553 ret := &GoogleBytestreamMedia{
33554 ServerResponse: googleapi.ServerResponse{
33555 Header: res.Header,
33556 HTTPStatusCode: res.StatusCode,
33557 },
33558 }
33559 target := &ret
33560 if err := gensupport.DecodeResponse(target, res); err != nil {
33561 return nil, err
33562 }
33563 return ret, nil
33564 }
33565
33566 type MediaUploadCall struct {
33567 s *Service
33568 resourceName string
33569 googlebytestreammedia *GoogleBytestreamMedia
33570 urlParams_ gensupport.URLParams
33571 mediaInfo_ *gensupport.MediaInfo
33572 ctx_ context.Context
33573 header_ http.Header
33574 }
33575
33576
33577
33578
33579
33580
33581
33582
33583 func (r *MediaService) Upload(resourceName string, googlebytestreammedia *GoogleBytestreamMedia) *MediaUploadCall {
33584 c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33585 c.resourceName = resourceName
33586 c.googlebytestreammedia = googlebytestreammedia
33587 return c
33588 }
33589
33590
33591
33592
33593
33594
33595
33596
33597 func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall {
33598 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
33599 return c
33600 }
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611 func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall {
33612 c.ctx_ = ctx
33613 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
33614 return c
33615 }
33616
33617
33618
33619
33620
33621 func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall {
33622 c.mediaInfo_.SetProgressUpdater(pu)
33623 return c
33624 }
33625
33626
33627
33628
33629 func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall {
33630 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33631 return c
33632 }
33633
33634
33635
33636
33637 func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall {
33638 c.ctx_ = ctx
33639 return c
33640 }
33641
33642
33643
33644 func (c *MediaUploadCall) Header() http.Header {
33645 if c.header_ == nil {
33646 c.header_ = make(http.Header)
33647 }
33648 return c.header_
33649 }
33650
33651 func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) {
33652 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33653 var body io.Reader = nil
33654 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlebytestreammedia)
33655 if err != nil {
33656 return nil, err
33657 }
33658 c.urlParams_.Set("alt", alt)
33659 c.urlParams_.Set("prettyPrint", "false")
33660 urls := googleapi.ResolveRelative(c.s.BasePath, "media/{+resourceName}")
33661 if c.mediaInfo_ != nil {
33662 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/media/{+resourceName}")
33663 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
33664 }
33665 if body == nil {
33666 body = new(bytes.Buffer)
33667 reqHeaders.Set("Content-Type", "application/json")
33668 }
33669 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
33670 defer cleanup()
33671 urls += "?" + c.urlParams_.Encode()
33672 req, err := http.NewRequest("POST", urls, body)
33673 if err != nil {
33674 return nil, err
33675 }
33676 req.Header = reqHeaders
33677 req.GetBody = getBody
33678 googleapi.Expand(req.URL, map[string]string{
33679 "resourceName": c.resourceName,
33680 })
33681 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33682 }
33683
33684
33685
33686
33687
33688
33689
33690 func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) {
33691 gensupport.SetOptions(c.urlParams_, opts...)
33692 res, err := c.doRequest("json")
33693 if res != nil && res.StatusCode == http.StatusNotModified {
33694 if res.Body != nil {
33695 res.Body.Close()
33696 }
33697 return nil, gensupport.WrapError(&googleapi.Error{
33698 Code: res.StatusCode,
33699 Header: res.Header,
33700 })
33701 }
33702 if err != nil {
33703 return nil, err
33704 }
33705 defer googleapi.CloseBody(res)
33706 if err := googleapi.CheckResponse(res); err != nil {
33707 return nil, gensupport.WrapError(err)
33708 }
33709 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
33710 if rx != nil {
33711 rx.Client = c.s.client
33712 rx.UserAgent = c.s.userAgent()
33713 ctx := c.ctx_
33714 if ctx == nil {
33715 ctx = context.TODO()
33716 }
33717 res, err = rx.Upload(ctx)
33718 if err != nil {
33719 return nil, err
33720 }
33721 defer res.Body.Close()
33722 if err := googleapi.CheckResponse(res); err != nil {
33723 return nil, gensupport.WrapError(err)
33724 }
33725 }
33726 ret := &GoogleBytestreamMedia{
33727 ServerResponse: googleapi.ServerResponse{
33728 Header: res.Header,
33729 HTTPStatusCode: res.StatusCode,
33730 },
33731 }
33732 target := &ret
33733 if err := gensupport.DecodeResponse(target, res); err != nil {
33734 return nil, err
33735 }
33736 return ret, nil
33737 }
33738
33739 type PartnersEditAssignedTargetingOptionsCall struct {
33740 s *Service
33741 partnerId int64
33742 bulkeditpartnerassignedtargetingoptionsrequest *BulkEditPartnerAssignedTargetingOptionsRequest
33743 urlParams_ gensupport.URLParams
33744 ctx_ context.Context
33745 header_ http.Header
33746 }
33747
33748
33749
33750
33751
33752
33753
33754
33755 func (r *PartnersService) EditAssignedTargetingOptions(partnerId int64, bulkeditpartnerassignedtargetingoptionsrequest *BulkEditPartnerAssignedTargetingOptionsRequest) *PartnersEditAssignedTargetingOptionsCall {
33756 c := &PartnersEditAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33757 c.partnerId = partnerId
33758 c.bulkeditpartnerassignedtargetingoptionsrequest = bulkeditpartnerassignedtargetingoptionsrequest
33759 return c
33760 }
33761
33762
33763
33764
33765 func (c *PartnersEditAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *PartnersEditAssignedTargetingOptionsCall {
33766 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33767 return c
33768 }
33769
33770
33771 func (c *PartnersEditAssignedTargetingOptionsCall) Context(ctx context.Context) *PartnersEditAssignedTargetingOptionsCall {
33772 c.ctx_ = ctx
33773 return c
33774 }
33775
33776
33777
33778 func (c *PartnersEditAssignedTargetingOptionsCall) Header() http.Header {
33779 if c.header_ == nil {
33780 c.header_ = make(http.Header)
33781 }
33782 return c.header_
33783 }
33784
33785 func (c *PartnersEditAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) {
33786 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33787 var body io.Reader = nil
33788 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditpartnerassignedtargetingoptionsrequest)
33789 if err != nil {
33790 return nil, err
33791 }
33792 c.urlParams_.Set("alt", alt)
33793 c.urlParams_.Set("prettyPrint", "false")
33794 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}:editAssignedTargetingOptions")
33795 urls += "?" + c.urlParams_.Encode()
33796 req, err := http.NewRequest("POST", urls, body)
33797 if err != nil {
33798 return nil, err
33799 }
33800 req.Header = reqHeaders
33801 googleapi.Expand(req.URL, map[string]string{
33802 "partnerId": strconv.FormatInt(c.partnerId, 10),
33803 })
33804 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33805 }
33806
33807
33808
33809
33810
33811
33812
33813 func (c *PartnersEditAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditPartnerAssignedTargetingOptionsResponse, error) {
33814 gensupport.SetOptions(c.urlParams_, opts...)
33815 res, err := c.doRequest("json")
33816 if res != nil && res.StatusCode == http.StatusNotModified {
33817 if res.Body != nil {
33818 res.Body.Close()
33819 }
33820 return nil, gensupport.WrapError(&googleapi.Error{
33821 Code: res.StatusCode,
33822 Header: res.Header,
33823 })
33824 }
33825 if err != nil {
33826 return nil, err
33827 }
33828 defer googleapi.CloseBody(res)
33829 if err := googleapi.CheckResponse(res); err != nil {
33830 return nil, gensupport.WrapError(err)
33831 }
33832 ret := &BulkEditPartnerAssignedTargetingOptionsResponse{
33833 ServerResponse: googleapi.ServerResponse{
33834 Header: res.Header,
33835 HTTPStatusCode: res.StatusCode,
33836 },
33837 }
33838 target := &ret
33839 if err := gensupport.DecodeResponse(target, res); err != nil {
33840 return nil, err
33841 }
33842 return ret, nil
33843 }
33844
33845 type PartnersGetCall struct {
33846 s *Service
33847 partnerId int64
33848 urlParams_ gensupport.URLParams
33849 ifNoneMatch_ string
33850 ctx_ context.Context
33851 header_ http.Header
33852 }
33853
33854
33855
33856
33857 func (r *PartnersService) Get(partnerId int64) *PartnersGetCall {
33858 c := &PartnersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33859 c.partnerId = partnerId
33860 return c
33861 }
33862
33863
33864
33865
33866 func (c *PartnersGetCall) Fields(s ...googleapi.Field) *PartnersGetCall {
33867 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33868 return c
33869 }
33870
33871
33872
33873
33874 func (c *PartnersGetCall) IfNoneMatch(entityTag string) *PartnersGetCall {
33875 c.ifNoneMatch_ = entityTag
33876 return c
33877 }
33878
33879
33880 func (c *PartnersGetCall) Context(ctx context.Context) *PartnersGetCall {
33881 c.ctx_ = ctx
33882 return c
33883 }
33884
33885
33886
33887 func (c *PartnersGetCall) Header() http.Header {
33888 if c.header_ == nil {
33889 c.header_ = make(http.Header)
33890 }
33891 return c.header_
33892 }
33893
33894 func (c *PartnersGetCall) doRequest(alt string) (*http.Response, error) {
33895 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33896 if c.ifNoneMatch_ != "" {
33897 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33898 }
33899 var body io.Reader = nil
33900 c.urlParams_.Set("alt", alt)
33901 c.urlParams_.Set("prettyPrint", "false")
33902 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}")
33903 urls += "?" + c.urlParams_.Encode()
33904 req, err := http.NewRequest("GET", urls, body)
33905 if err != nil {
33906 return nil, err
33907 }
33908 req.Header = reqHeaders
33909 googleapi.Expand(req.URL, map[string]string{
33910 "partnerId": strconv.FormatInt(c.partnerId, 10),
33911 })
33912 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33913 }
33914
33915
33916
33917
33918
33919
33920 func (c *PartnersGetCall) Do(opts ...googleapi.CallOption) (*Partner, error) {
33921 gensupport.SetOptions(c.urlParams_, opts...)
33922 res, err := c.doRequest("json")
33923 if res != nil && res.StatusCode == http.StatusNotModified {
33924 if res.Body != nil {
33925 res.Body.Close()
33926 }
33927 return nil, gensupport.WrapError(&googleapi.Error{
33928 Code: res.StatusCode,
33929 Header: res.Header,
33930 })
33931 }
33932 if err != nil {
33933 return nil, err
33934 }
33935 defer googleapi.CloseBody(res)
33936 if err := googleapi.CheckResponse(res); err != nil {
33937 return nil, gensupport.WrapError(err)
33938 }
33939 ret := &Partner{
33940 ServerResponse: googleapi.ServerResponse{
33941 Header: res.Header,
33942 HTTPStatusCode: res.StatusCode,
33943 },
33944 }
33945 target := &ret
33946 if err := gensupport.DecodeResponse(target, res); err != nil {
33947 return nil, err
33948 }
33949 return ret, nil
33950 }
33951
33952 type PartnersListCall struct {
33953 s *Service
33954 urlParams_ gensupport.URLParams
33955 ifNoneMatch_ string
33956 ctx_ context.Context
33957 header_ http.Header
33958 }
33959
33960
33961
33962 func (r *PartnersService) List() *PartnersListCall {
33963 c := &PartnersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33964 return c
33965 }
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975
33976
33977 func (c *PartnersListCall) Filter(filter string) *PartnersListCall {
33978 c.urlParams_.Set("filter", filter)
33979 return c
33980 }
33981
33982
33983
33984
33985
33986 func (c *PartnersListCall) OrderBy(orderBy string) *PartnersListCall {
33987 c.urlParams_.Set("orderBy", orderBy)
33988 return c
33989 }
33990
33991
33992
33993 func (c *PartnersListCall) PageSize(pageSize int64) *PartnersListCall {
33994 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
33995 return c
33996 }
33997
33998
33999
34000
34001
34002 func (c *PartnersListCall) PageToken(pageToken string) *PartnersListCall {
34003 c.urlParams_.Set("pageToken", pageToken)
34004 return c
34005 }
34006
34007
34008
34009
34010 func (c *PartnersListCall) Fields(s ...googleapi.Field) *PartnersListCall {
34011 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34012 return c
34013 }
34014
34015
34016
34017
34018 func (c *PartnersListCall) IfNoneMatch(entityTag string) *PartnersListCall {
34019 c.ifNoneMatch_ = entityTag
34020 return c
34021 }
34022
34023
34024 func (c *PartnersListCall) Context(ctx context.Context) *PartnersListCall {
34025 c.ctx_ = ctx
34026 return c
34027 }
34028
34029
34030
34031 func (c *PartnersListCall) Header() http.Header {
34032 if c.header_ == nil {
34033 c.header_ = make(http.Header)
34034 }
34035 return c.header_
34036 }
34037
34038 func (c *PartnersListCall) doRequest(alt string) (*http.Response, error) {
34039 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34040 if c.ifNoneMatch_ != "" {
34041 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34042 }
34043 var body io.Reader = nil
34044 c.urlParams_.Set("alt", alt)
34045 c.urlParams_.Set("prettyPrint", "false")
34046 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners")
34047 urls += "?" + c.urlParams_.Encode()
34048 req, err := http.NewRequest("GET", urls, body)
34049 if err != nil {
34050 return nil, err
34051 }
34052 req.Header = reqHeaders
34053 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34054 }
34055
34056
34057
34058
34059
34060
34061
34062 func (c *PartnersListCall) Do(opts ...googleapi.CallOption) (*ListPartnersResponse, error) {
34063 gensupport.SetOptions(c.urlParams_, opts...)
34064 res, err := c.doRequest("json")
34065 if res != nil && res.StatusCode == http.StatusNotModified {
34066 if res.Body != nil {
34067 res.Body.Close()
34068 }
34069 return nil, gensupport.WrapError(&googleapi.Error{
34070 Code: res.StatusCode,
34071 Header: res.Header,
34072 })
34073 }
34074 if err != nil {
34075 return nil, err
34076 }
34077 defer googleapi.CloseBody(res)
34078 if err := googleapi.CheckResponse(res); err != nil {
34079 return nil, gensupport.WrapError(err)
34080 }
34081 ret := &ListPartnersResponse{
34082 ServerResponse: googleapi.ServerResponse{
34083 Header: res.Header,
34084 HTTPStatusCode: res.StatusCode,
34085 },
34086 }
34087 target := &ret
34088 if err := gensupport.DecodeResponse(target, res); err != nil {
34089 return nil, err
34090 }
34091 return ret, nil
34092 }
34093
34094
34095
34096
34097 func (c *PartnersListCall) Pages(ctx context.Context, f func(*ListPartnersResponse) error) error {
34098 c.ctx_ = ctx
34099 defer c.PageToken(c.urlParams_.Get("pageToken"))
34100 for {
34101 x, err := c.Do()
34102 if err != nil {
34103 return err
34104 }
34105 if err := f(x); err != nil {
34106 return err
34107 }
34108 if x.NextPageToken == "" {
34109 return nil
34110 }
34111 c.PageToken(x.NextPageToken)
34112 }
34113 }
34114
34115 type PartnersChannelsCreateCall struct {
34116 s *Service
34117 partnerId int64
34118 channel *Channel
34119 urlParams_ gensupport.URLParams
34120 ctx_ context.Context
34121 header_ http.Header
34122 }
34123
34124
34125
34126
34127
34128 func (r *PartnersChannelsService) Create(partnerId int64, channel *Channel) *PartnersChannelsCreateCall {
34129 c := &PartnersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34130 c.partnerId = partnerId
34131 c.channel = channel
34132 return c
34133 }
34134
34135
34136
34137 func (c *PartnersChannelsCreateCall) AdvertiserId(advertiserId int64) *PartnersChannelsCreateCall {
34138 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34139 return c
34140 }
34141
34142
34143
34144
34145 func (c *PartnersChannelsCreateCall) Fields(s ...googleapi.Field) *PartnersChannelsCreateCall {
34146 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34147 return c
34148 }
34149
34150
34151 func (c *PartnersChannelsCreateCall) Context(ctx context.Context) *PartnersChannelsCreateCall {
34152 c.ctx_ = ctx
34153 return c
34154 }
34155
34156
34157
34158 func (c *PartnersChannelsCreateCall) Header() http.Header {
34159 if c.header_ == nil {
34160 c.header_ = make(http.Header)
34161 }
34162 return c.header_
34163 }
34164
34165 func (c *PartnersChannelsCreateCall) 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, "v3/partners/{+partnerId}/channels")
34175 urls += "?" + c.urlParams_.Encode()
34176 req, err := http.NewRequest("POST", 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 })
34184 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34185 }
34186
34187
34188
34189
34190
34191
34192 func (c *PartnersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
34193 gensupport.SetOptions(c.urlParams_, opts...)
34194 res, err := c.doRequest("json")
34195 if res != nil && res.StatusCode == http.StatusNotModified {
34196 if res.Body != nil {
34197 res.Body.Close()
34198 }
34199 return nil, gensupport.WrapError(&googleapi.Error{
34200 Code: res.StatusCode,
34201 Header: res.Header,
34202 })
34203 }
34204 if err != nil {
34205 return nil, err
34206 }
34207 defer googleapi.CloseBody(res)
34208 if err := googleapi.CheckResponse(res); err != nil {
34209 return nil, gensupport.WrapError(err)
34210 }
34211 ret := &Channel{
34212 ServerResponse: googleapi.ServerResponse{
34213 Header: res.Header,
34214 HTTPStatusCode: res.StatusCode,
34215 },
34216 }
34217 target := &ret
34218 if err := gensupport.DecodeResponse(target, res); err != nil {
34219 return nil, err
34220 }
34221 return ret, nil
34222 }
34223
34224 type PartnersChannelsGetCall struct {
34225 s *Service
34226 partnerId int64
34227 channelId int64
34228 urlParams_ gensupport.URLParams
34229 ifNoneMatch_ string
34230 ctx_ context.Context
34231 header_ http.Header
34232 }
34233
34234
34235
34236
34237
34238 func (r *PartnersChannelsService) Get(partnerId int64, channelId int64) *PartnersChannelsGetCall {
34239 c := &PartnersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34240 c.partnerId = partnerId
34241 c.channelId = channelId
34242 return c
34243 }
34244
34245
34246
34247 func (c *PartnersChannelsGetCall) AdvertiserId(advertiserId int64) *PartnersChannelsGetCall {
34248 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34249 return c
34250 }
34251
34252
34253
34254
34255 func (c *PartnersChannelsGetCall) Fields(s ...googleapi.Field) *PartnersChannelsGetCall {
34256 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34257 return c
34258 }
34259
34260
34261
34262
34263 func (c *PartnersChannelsGetCall) IfNoneMatch(entityTag string) *PartnersChannelsGetCall {
34264 c.ifNoneMatch_ = entityTag
34265 return c
34266 }
34267
34268
34269 func (c *PartnersChannelsGetCall) Context(ctx context.Context) *PartnersChannelsGetCall {
34270 c.ctx_ = ctx
34271 return c
34272 }
34273
34274
34275
34276 func (c *PartnersChannelsGetCall) Header() http.Header {
34277 if c.header_ == nil {
34278 c.header_ = make(http.Header)
34279 }
34280 return c.header_
34281 }
34282
34283 func (c *PartnersChannelsGetCall) doRequest(alt string) (*http.Response, error) {
34284 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34285 if c.ifNoneMatch_ != "" {
34286 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34287 }
34288 var body io.Reader = nil
34289 c.urlParams_.Set("alt", alt)
34290 c.urlParams_.Set("prettyPrint", "false")
34291 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}/channels/{+channelId}")
34292 urls += "?" + c.urlParams_.Encode()
34293 req, err := http.NewRequest("GET", urls, body)
34294 if err != nil {
34295 return nil, err
34296 }
34297 req.Header = reqHeaders
34298 googleapi.Expand(req.URL, map[string]string{
34299 "partnerId": strconv.FormatInt(c.partnerId, 10),
34300 "channelId": strconv.FormatInt(c.channelId, 10),
34301 })
34302 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34303 }
34304
34305
34306
34307
34308
34309
34310 func (c *PartnersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
34311 gensupport.SetOptions(c.urlParams_, opts...)
34312 res, err := c.doRequest("json")
34313 if res != nil && res.StatusCode == http.StatusNotModified {
34314 if res.Body != nil {
34315 res.Body.Close()
34316 }
34317 return nil, gensupport.WrapError(&googleapi.Error{
34318 Code: res.StatusCode,
34319 Header: res.Header,
34320 })
34321 }
34322 if err != nil {
34323 return nil, err
34324 }
34325 defer googleapi.CloseBody(res)
34326 if err := googleapi.CheckResponse(res); err != nil {
34327 return nil, gensupport.WrapError(err)
34328 }
34329 ret := &Channel{
34330 ServerResponse: googleapi.ServerResponse{
34331 Header: res.Header,
34332 HTTPStatusCode: res.StatusCode,
34333 },
34334 }
34335 target := &ret
34336 if err := gensupport.DecodeResponse(target, res); err != nil {
34337 return nil, err
34338 }
34339 return ret, nil
34340 }
34341
34342 type PartnersChannelsListCall struct {
34343 s *Service
34344 partnerId int64
34345 urlParams_ gensupport.URLParams
34346 ifNoneMatch_ string
34347 ctx_ context.Context
34348 header_ http.Header
34349 }
34350
34351
34352
34353
34354 func (r *PartnersChannelsService) List(partnerId int64) *PartnersChannelsListCall {
34355 c := &PartnersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34356 c.partnerId = partnerId
34357 return c
34358 }
34359
34360
34361
34362 func (c *PartnersChannelsListCall) AdvertiserId(advertiserId int64) *PartnersChannelsListCall {
34363 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34364 return c
34365 }
34366
34367
34368
34369
34370
34371
34372
34373
34374
34375 func (c *PartnersChannelsListCall) Filter(filter string) *PartnersChannelsListCall {
34376 c.urlParams_.Set("filter", filter)
34377 return c
34378 }
34379
34380
34381
34382
34383
34384
34385 func (c *PartnersChannelsListCall) OrderBy(orderBy string) *PartnersChannelsListCall {
34386 c.urlParams_.Set("orderBy", orderBy)
34387 return c
34388 }
34389
34390
34391
34392
34393 func (c *PartnersChannelsListCall) PageSize(pageSize int64) *PartnersChannelsListCall {
34394 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
34395 return c
34396 }
34397
34398
34399
34400
34401
34402 func (c *PartnersChannelsListCall) PageToken(pageToken string) *PartnersChannelsListCall {
34403 c.urlParams_.Set("pageToken", pageToken)
34404 return c
34405 }
34406
34407
34408
34409
34410 func (c *PartnersChannelsListCall) Fields(s ...googleapi.Field) *PartnersChannelsListCall {
34411 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34412 return c
34413 }
34414
34415
34416
34417
34418 func (c *PartnersChannelsListCall) IfNoneMatch(entityTag string) *PartnersChannelsListCall {
34419 c.ifNoneMatch_ = entityTag
34420 return c
34421 }
34422
34423
34424 func (c *PartnersChannelsListCall) Context(ctx context.Context) *PartnersChannelsListCall {
34425 c.ctx_ = ctx
34426 return c
34427 }
34428
34429
34430
34431 func (c *PartnersChannelsListCall) Header() http.Header {
34432 if c.header_ == nil {
34433 c.header_ = make(http.Header)
34434 }
34435 return c.header_
34436 }
34437
34438 func (c *PartnersChannelsListCall) doRequest(alt string) (*http.Response, error) {
34439 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34440 if c.ifNoneMatch_ != "" {
34441 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34442 }
34443 var body io.Reader = nil
34444 c.urlParams_.Set("alt", alt)
34445 c.urlParams_.Set("prettyPrint", "false")
34446 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}/channels")
34447 urls += "?" + c.urlParams_.Encode()
34448 req, err := http.NewRequest("GET", urls, body)
34449 if err != nil {
34450 return nil, err
34451 }
34452 req.Header = reqHeaders
34453 googleapi.Expand(req.URL, map[string]string{
34454 "partnerId": strconv.FormatInt(c.partnerId, 10),
34455 })
34456 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34457 }
34458
34459
34460
34461
34462
34463
34464
34465 func (c *PartnersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) {
34466 gensupport.SetOptions(c.urlParams_, opts...)
34467 res, err := c.doRequest("json")
34468 if res != nil && res.StatusCode == http.StatusNotModified {
34469 if res.Body != nil {
34470 res.Body.Close()
34471 }
34472 return nil, gensupport.WrapError(&googleapi.Error{
34473 Code: res.StatusCode,
34474 Header: res.Header,
34475 })
34476 }
34477 if err != nil {
34478 return nil, err
34479 }
34480 defer googleapi.CloseBody(res)
34481 if err := googleapi.CheckResponse(res); err != nil {
34482 return nil, gensupport.WrapError(err)
34483 }
34484 ret := &ListChannelsResponse{
34485 ServerResponse: googleapi.ServerResponse{
34486 Header: res.Header,
34487 HTTPStatusCode: res.StatusCode,
34488 },
34489 }
34490 target := &ret
34491 if err := gensupport.DecodeResponse(target, res); err != nil {
34492 return nil, err
34493 }
34494 return ret, nil
34495 }
34496
34497
34498
34499
34500 func (c *PartnersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error {
34501 c.ctx_ = ctx
34502 defer c.PageToken(c.urlParams_.Get("pageToken"))
34503 for {
34504 x, err := c.Do()
34505 if err != nil {
34506 return err
34507 }
34508 if err := f(x); err != nil {
34509 return err
34510 }
34511 if x.NextPageToken == "" {
34512 return nil
34513 }
34514 c.PageToken(x.NextPageToken)
34515 }
34516 }
34517
34518 type PartnersChannelsPatchCall struct {
34519 s *Service
34520 partnerId int64
34521 channelId int64
34522 channel *Channel
34523 urlParams_ gensupport.URLParams
34524 ctx_ context.Context
34525 header_ http.Header
34526 }
34527
34528
34529
34530
34531
34532
34533 func (r *PartnersChannelsService) Patch(partnerId int64, channelId int64, channel *Channel) *PartnersChannelsPatchCall {
34534 c := &PartnersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34535 c.partnerId = partnerId
34536 c.channelId = channelId
34537 c.channel = channel
34538 return c
34539 }
34540
34541
34542
34543 func (c *PartnersChannelsPatchCall) AdvertiserId(advertiserId int64) *PartnersChannelsPatchCall {
34544 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34545 return c
34546 }
34547
34548
34549
34550 func (c *PartnersChannelsPatchCall) UpdateMask(updateMask string) *PartnersChannelsPatchCall {
34551 c.urlParams_.Set("updateMask", updateMask)
34552 return c
34553 }
34554
34555
34556
34557
34558 func (c *PartnersChannelsPatchCall) Fields(s ...googleapi.Field) *PartnersChannelsPatchCall {
34559 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34560 return c
34561 }
34562
34563
34564 func (c *PartnersChannelsPatchCall) Context(ctx context.Context) *PartnersChannelsPatchCall {
34565 c.ctx_ = ctx
34566 return c
34567 }
34568
34569
34570
34571 func (c *PartnersChannelsPatchCall) Header() http.Header {
34572 if c.header_ == nil {
34573 c.header_ = make(http.Header)
34574 }
34575 return c.header_
34576 }
34577
34578 func (c *PartnersChannelsPatchCall) doRequest(alt string) (*http.Response, error) {
34579 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34580 var body io.Reader = nil
34581 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
34582 if err != nil {
34583 return nil, err
34584 }
34585 c.urlParams_.Set("alt", alt)
34586 c.urlParams_.Set("prettyPrint", "false")
34587 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}/channels/{channelId}")
34588 urls += "?" + c.urlParams_.Encode()
34589 req, err := http.NewRequest("PATCH", urls, body)
34590 if err != nil {
34591 return nil, err
34592 }
34593 req.Header = reqHeaders
34594 googleapi.Expand(req.URL, map[string]string{
34595 "partnerId": strconv.FormatInt(c.partnerId, 10),
34596 "channelId": strconv.FormatInt(c.channelId, 10),
34597 })
34598 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34599 }
34600
34601
34602
34603
34604
34605
34606 func (c *PartnersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
34607 gensupport.SetOptions(c.urlParams_, opts...)
34608 res, err := c.doRequest("json")
34609 if res != nil && res.StatusCode == http.StatusNotModified {
34610 if res.Body != nil {
34611 res.Body.Close()
34612 }
34613 return nil, gensupport.WrapError(&googleapi.Error{
34614 Code: res.StatusCode,
34615 Header: res.Header,
34616 })
34617 }
34618 if err != nil {
34619 return nil, err
34620 }
34621 defer googleapi.CloseBody(res)
34622 if err := googleapi.CheckResponse(res); err != nil {
34623 return nil, gensupport.WrapError(err)
34624 }
34625 ret := &Channel{
34626 ServerResponse: googleapi.ServerResponse{
34627 Header: res.Header,
34628 HTTPStatusCode: res.StatusCode,
34629 },
34630 }
34631 target := &ret
34632 if err := gensupport.DecodeResponse(target, res); err != nil {
34633 return nil, err
34634 }
34635 return ret, nil
34636 }
34637
34638 type PartnersChannelsSitesBulkEditCall struct {
34639 s *Service
34640 partnerId int64
34641 channelId int64
34642 bulkeditsitesrequest *BulkEditSitesRequest
34643 urlParams_ gensupport.URLParams
34644 ctx_ context.Context
34645 header_ http.Header
34646 }
34647
34648
34649
34650
34651
34652
34653
34654 func (r *PartnersChannelsSitesService) BulkEdit(partnerId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *PartnersChannelsSitesBulkEditCall {
34655 c := &PartnersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34656 c.partnerId = partnerId
34657 c.channelId = channelId
34658 c.bulkeditsitesrequest = bulkeditsitesrequest
34659 return c
34660 }
34661
34662
34663
34664
34665 func (c *PartnersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesBulkEditCall {
34666 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34667 return c
34668 }
34669
34670
34671 func (c *PartnersChannelsSitesBulkEditCall) Context(ctx context.Context) *PartnersChannelsSitesBulkEditCall {
34672 c.ctx_ = ctx
34673 return c
34674 }
34675
34676
34677
34678 func (c *PartnersChannelsSitesBulkEditCall) Header() http.Header {
34679 if c.header_ == nil {
34680 c.header_ = make(http.Header)
34681 }
34682 return c.header_
34683 }
34684
34685 func (c *PartnersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) {
34686 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34687 var body io.Reader = nil
34688 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditsitesrequest)
34689 if err != nil {
34690 return nil, err
34691 }
34692 c.urlParams_.Set("alt", alt)
34693 c.urlParams_.Set("prettyPrint", "false")
34694 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{partnerId}/channels/{+channelId}/sites:bulkEdit")
34695 urls += "?" + c.urlParams_.Encode()
34696 req, err := http.NewRequest("POST", urls, body)
34697 if err != nil {
34698 return nil, err
34699 }
34700 req.Header = reqHeaders
34701 googleapi.Expand(req.URL, map[string]string{
34702 "partnerId": strconv.FormatInt(c.partnerId, 10),
34703 "channelId": strconv.FormatInt(c.channelId, 10),
34704 })
34705 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34706 }
34707
34708
34709
34710
34711
34712
34713
34714 func (c *PartnersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) {
34715 gensupport.SetOptions(c.urlParams_, opts...)
34716 res, err := c.doRequest("json")
34717 if res != nil && res.StatusCode == http.StatusNotModified {
34718 if res.Body != nil {
34719 res.Body.Close()
34720 }
34721 return nil, gensupport.WrapError(&googleapi.Error{
34722 Code: res.StatusCode,
34723 Header: res.Header,
34724 })
34725 }
34726 if err != nil {
34727 return nil, err
34728 }
34729 defer googleapi.CloseBody(res)
34730 if err := googleapi.CheckResponse(res); err != nil {
34731 return nil, gensupport.WrapError(err)
34732 }
34733 ret := &BulkEditSitesResponse{
34734 ServerResponse: googleapi.ServerResponse{
34735 Header: res.Header,
34736 HTTPStatusCode: res.StatusCode,
34737 },
34738 }
34739 target := &ret
34740 if err := gensupport.DecodeResponse(target, res); err != nil {
34741 return nil, err
34742 }
34743 return ret, nil
34744 }
34745
34746 type PartnersChannelsSitesCreateCall struct {
34747 s *Service
34748 partnerId int64
34749 channelId int64
34750 site *Site
34751 urlParams_ gensupport.URLParams
34752 ctx_ context.Context
34753 header_ http.Header
34754 }
34755
34756
34757
34758
34759
34760 func (r *PartnersChannelsSitesService) Create(partnerId int64, channelId int64, site *Site) *PartnersChannelsSitesCreateCall {
34761 c := &PartnersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34762 c.partnerId = partnerId
34763 c.channelId = channelId
34764 c.site = site
34765 return c
34766 }
34767
34768
34769
34770 func (c *PartnersChannelsSitesCreateCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesCreateCall {
34771 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34772 return c
34773 }
34774
34775
34776
34777
34778 func (c *PartnersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesCreateCall {
34779 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34780 return c
34781 }
34782
34783
34784 func (c *PartnersChannelsSitesCreateCall) Context(ctx context.Context) *PartnersChannelsSitesCreateCall {
34785 c.ctx_ = ctx
34786 return c
34787 }
34788
34789
34790
34791 func (c *PartnersChannelsSitesCreateCall) Header() http.Header {
34792 if c.header_ == nil {
34793 c.header_ = make(http.Header)
34794 }
34795 return c.header_
34796 }
34797
34798 func (c *PartnersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) {
34799 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34800 var body io.Reader = nil
34801 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
34802 if err != nil {
34803 return nil, err
34804 }
34805 c.urlParams_.Set("alt", alt)
34806 c.urlParams_.Set("prettyPrint", "false")
34807 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{partnerId}/channels/{+channelId}/sites")
34808 urls += "?" + c.urlParams_.Encode()
34809 req, err := http.NewRequest("POST", urls, body)
34810 if err != nil {
34811 return nil, err
34812 }
34813 req.Header = reqHeaders
34814 googleapi.Expand(req.URL, map[string]string{
34815 "partnerId": strconv.FormatInt(c.partnerId, 10),
34816 "channelId": strconv.FormatInt(c.channelId, 10),
34817 })
34818 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34819 }
34820
34821
34822
34823
34824
34825
34826 func (c *PartnersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
34827 gensupport.SetOptions(c.urlParams_, opts...)
34828 res, err := c.doRequest("json")
34829 if res != nil && res.StatusCode == http.StatusNotModified {
34830 if res.Body != nil {
34831 res.Body.Close()
34832 }
34833 return nil, gensupport.WrapError(&googleapi.Error{
34834 Code: res.StatusCode,
34835 Header: res.Header,
34836 })
34837 }
34838 if err != nil {
34839 return nil, err
34840 }
34841 defer googleapi.CloseBody(res)
34842 if err := googleapi.CheckResponse(res); err != nil {
34843 return nil, gensupport.WrapError(err)
34844 }
34845 ret := &Site{
34846 ServerResponse: googleapi.ServerResponse{
34847 Header: res.Header,
34848 HTTPStatusCode: res.StatusCode,
34849 },
34850 }
34851 target := &ret
34852 if err := gensupport.DecodeResponse(target, res); err != nil {
34853 return nil, err
34854 }
34855 return ret, nil
34856 }
34857
34858 type PartnersChannelsSitesDeleteCall struct {
34859 s *Service
34860 partnerId int64
34861 channelId int64
34862 urlOrAppId string
34863 urlParams_ gensupport.URLParams
34864 ctx_ context.Context
34865 header_ http.Header
34866 }
34867
34868
34869
34870
34871
34872
34873 func (r *PartnersChannelsSitesService) Delete(partnerId int64, channelId int64, urlOrAppId string) *PartnersChannelsSitesDeleteCall {
34874 c := &PartnersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34875 c.partnerId = partnerId
34876 c.channelId = channelId
34877 c.urlOrAppId = urlOrAppId
34878 return c
34879 }
34880
34881
34882
34883 func (c *PartnersChannelsSitesDeleteCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesDeleteCall {
34884 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34885 return c
34886 }
34887
34888
34889
34890
34891 func (c *PartnersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesDeleteCall {
34892 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34893 return c
34894 }
34895
34896
34897 func (c *PartnersChannelsSitesDeleteCall) Context(ctx context.Context) *PartnersChannelsSitesDeleteCall {
34898 c.ctx_ = ctx
34899 return c
34900 }
34901
34902
34903
34904 func (c *PartnersChannelsSitesDeleteCall) Header() http.Header {
34905 if c.header_ == nil {
34906 c.header_ = make(http.Header)
34907 }
34908 return c.header_
34909 }
34910
34911 func (c *PartnersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) {
34912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34913 var body io.Reader = nil
34914 c.urlParams_.Set("alt", alt)
34915 c.urlParams_.Set("prettyPrint", "false")
34916 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{partnerId}/channels/{+channelId}/sites/{+urlOrAppId}")
34917 urls += "?" + c.urlParams_.Encode()
34918 req, err := http.NewRequest("DELETE", urls, body)
34919 if err != nil {
34920 return nil, err
34921 }
34922 req.Header = reqHeaders
34923 googleapi.Expand(req.URL, map[string]string{
34924 "partnerId": strconv.FormatInt(c.partnerId, 10),
34925 "channelId": strconv.FormatInt(c.channelId, 10),
34926 "urlOrAppId": c.urlOrAppId,
34927 })
34928 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34929 }
34930
34931
34932
34933
34934
34935
34936 func (c *PartnersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
34937 gensupport.SetOptions(c.urlParams_, opts...)
34938 res, err := c.doRequest("json")
34939 if res != nil && res.StatusCode == http.StatusNotModified {
34940 if res.Body != nil {
34941 res.Body.Close()
34942 }
34943 return nil, gensupport.WrapError(&googleapi.Error{
34944 Code: res.StatusCode,
34945 Header: res.Header,
34946 })
34947 }
34948 if err != nil {
34949 return nil, err
34950 }
34951 defer googleapi.CloseBody(res)
34952 if err := googleapi.CheckResponse(res); err != nil {
34953 return nil, gensupport.WrapError(err)
34954 }
34955 ret := &Empty{
34956 ServerResponse: googleapi.ServerResponse{
34957 Header: res.Header,
34958 HTTPStatusCode: res.StatusCode,
34959 },
34960 }
34961 target := &ret
34962 if err := gensupport.DecodeResponse(target, res); err != nil {
34963 return nil, err
34964 }
34965 return ret, nil
34966 }
34967
34968 type PartnersChannelsSitesListCall struct {
34969 s *Service
34970 partnerId int64
34971 channelId int64
34972 urlParams_ gensupport.URLParams
34973 ifNoneMatch_ string
34974 ctx_ context.Context
34975 header_ http.Header
34976 }
34977
34978
34979
34980
34981
34982
34983 func (r *PartnersChannelsSitesService) List(partnerId int64, channelId int64) *PartnersChannelsSitesListCall {
34984 c := &PartnersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34985 c.partnerId = partnerId
34986 c.channelId = channelId
34987 return c
34988 }
34989
34990
34991
34992 func (c *PartnersChannelsSitesListCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesListCall {
34993 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
34994 return c
34995 }
34996
34997
34998
34999
35000
35001
35002
35003
35004
35005 func (c *PartnersChannelsSitesListCall) Filter(filter string) *PartnersChannelsSitesListCall {
35006 c.urlParams_.Set("filter", filter)
35007 return c
35008 }
35009
35010
35011
35012
35013
35014 func (c *PartnersChannelsSitesListCall) OrderBy(orderBy string) *PartnersChannelsSitesListCall {
35015 c.urlParams_.Set("orderBy", orderBy)
35016 return c
35017 }
35018
35019
35020
35021
35022 func (c *PartnersChannelsSitesListCall) PageSize(pageSize int64) *PartnersChannelsSitesListCall {
35023 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
35024 return c
35025 }
35026
35027
35028
35029
35030
35031 func (c *PartnersChannelsSitesListCall) PageToken(pageToken string) *PartnersChannelsSitesListCall {
35032 c.urlParams_.Set("pageToken", pageToken)
35033 return c
35034 }
35035
35036
35037
35038
35039 func (c *PartnersChannelsSitesListCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesListCall {
35040 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35041 return c
35042 }
35043
35044
35045
35046
35047 func (c *PartnersChannelsSitesListCall) IfNoneMatch(entityTag string) *PartnersChannelsSitesListCall {
35048 c.ifNoneMatch_ = entityTag
35049 return c
35050 }
35051
35052
35053 func (c *PartnersChannelsSitesListCall) Context(ctx context.Context) *PartnersChannelsSitesListCall {
35054 c.ctx_ = ctx
35055 return c
35056 }
35057
35058
35059
35060 func (c *PartnersChannelsSitesListCall) Header() http.Header {
35061 if c.header_ == nil {
35062 c.header_ = make(http.Header)
35063 }
35064 return c.header_
35065 }
35066
35067 func (c *PartnersChannelsSitesListCall) doRequest(alt string) (*http.Response, error) {
35068 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35069 if c.ifNoneMatch_ != "" {
35070 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35071 }
35072 var body io.Reader = nil
35073 c.urlParams_.Set("alt", alt)
35074 c.urlParams_.Set("prettyPrint", "false")
35075 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}/channels/{+channelId}/sites")
35076 urls += "?" + c.urlParams_.Encode()
35077 req, err := http.NewRequest("GET", urls, body)
35078 if err != nil {
35079 return nil, err
35080 }
35081 req.Header = reqHeaders
35082 googleapi.Expand(req.URL, map[string]string{
35083 "partnerId": strconv.FormatInt(c.partnerId, 10),
35084 "channelId": strconv.FormatInt(c.channelId, 10),
35085 })
35086 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35087 }
35088
35089
35090
35091
35092
35093
35094
35095 func (c *PartnersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) {
35096 gensupport.SetOptions(c.urlParams_, opts...)
35097 res, err := c.doRequest("json")
35098 if res != nil && res.StatusCode == http.StatusNotModified {
35099 if res.Body != nil {
35100 res.Body.Close()
35101 }
35102 return nil, gensupport.WrapError(&googleapi.Error{
35103 Code: res.StatusCode,
35104 Header: res.Header,
35105 })
35106 }
35107 if err != nil {
35108 return nil, err
35109 }
35110 defer googleapi.CloseBody(res)
35111 if err := googleapi.CheckResponse(res); err != nil {
35112 return nil, gensupport.WrapError(err)
35113 }
35114 ret := &ListSitesResponse{
35115 ServerResponse: googleapi.ServerResponse{
35116 Header: res.Header,
35117 HTTPStatusCode: res.StatusCode,
35118 },
35119 }
35120 target := &ret
35121 if err := gensupport.DecodeResponse(target, res); err != nil {
35122 return nil, err
35123 }
35124 return ret, nil
35125 }
35126
35127
35128
35129
35130 func (c *PartnersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) error) error {
35131 c.ctx_ = ctx
35132 defer c.PageToken(c.urlParams_.Get("pageToken"))
35133 for {
35134 x, err := c.Do()
35135 if err != nil {
35136 return err
35137 }
35138 if err := f(x); err != nil {
35139 return err
35140 }
35141 if x.NextPageToken == "" {
35142 return nil
35143 }
35144 c.PageToken(x.NextPageToken)
35145 }
35146 }
35147
35148 type PartnersChannelsSitesReplaceCall struct {
35149 s *Service
35150 partnerId int64
35151 channelId int64
35152 replacesitesrequest *ReplaceSitesRequest
35153 urlParams_ gensupport.URLParams
35154 ctx_ context.Context
35155 header_ http.Header
35156 }
35157
35158
35159
35160
35161
35162
35163
35164
35165
35166
35167 func (r *PartnersChannelsSitesService) Replace(partnerId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *PartnersChannelsSitesReplaceCall {
35168 c := &PartnersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35169 c.partnerId = partnerId
35170 c.channelId = channelId
35171 c.replacesitesrequest = replacesitesrequest
35172 return c
35173 }
35174
35175
35176
35177
35178 func (c *PartnersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesReplaceCall {
35179 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35180 return c
35181 }
35182
35183
35184 func (c *PartnersChannelsSitesReplaceCall) Context(ctx context.Context) *PartnersChannelsSitesReplaceCall {
35185 c.ctx_ = ctx
35186 return c
35187 }
35188
35189
35190
35191 func (c *PartnersChannelsSitesReplaceCall) Header() http.Header {
35192 if c.header_ == nil {
35193 c.header_ = make(http.Header)
35194 }
35195 return c.header_
35196 }
35197
35198 func (c *PartnersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) {
35199 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35200 var body io.Reader = nil
35201 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacesitesrequest)
35202 if err != nil {
35203 return nil, err
35204 }
35205 c.urlParams_.Set("alt", alt)
35206 c.urlParams_.Set("prettyPrint", "false")
35207 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{partnerId}/channels/{+channelId}/sites:replace")
35208 urls += "?" + c.urlParams_.Encode()
35209 req, err := http.NewRequest("POST", urls, body)
35210 if err != nil {
35211 return nil, err
35212 }
35213 req.Header = reqHeaders
35214 googleapi.Expand(req.URL, map[string]string{
35215 "partnerId": strconv.FormatInt(c.partnerId, 10),
35216 "channelId": strconv.FormatInt(c.channelId, 10),
35217 })
35218 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35219 }
35220
35221
35222
35223
35224
35225
35226
35227 func (c *PartnersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, error) {
35228 gensupport.SetOptions(c.urlParams_, opts...)
35229 res, err := c.doRequest("json")
35230 if res != nil && res.StatusCode == http.StatusNotModified {
35231 if res.Body != nil {
35232 res.Body.Close()
35233 }
35234 return nil, gensupport.WrapError(&googleapi.Error{
35235 Code: res.StatusCode,
35236 Header: res.Header,
35237 })
35238 }
35239 if err != nil {
35240 return nil, err
35241 }
35242 defer googleapi.CloseBody(res)
35243 if err := googleapi.CheckResponse(res); err != nil {
35244 return nil, gensupport.WrapError(err)
35245 }
35246 ret := &ReplaceSitesResponse{
35247 ServerResponse: googleapi.ServerResponse{
35248 Header: res.Header,
35249 HTTPStatusCode: res.StatusCode,
35250 },
35251 }
35252 target := &ret
35253 if err := gensupport.DecodeResponse(target, res); err != nil {
35254 return nil, err
35255 }
35256 return ret, nil
35257 }
35258
35259 type PartnersTargetingTypesAssignedTargetingOptionsCreateCall struct {
35260 s *Service
35261 partnerId int64
35262 targetingType string
35263 assignedtargetingoption *AssignedTargetingOption
35264 urlParams_ gensupport.URLParams
35265 ctx_ context.Context
35266 header_ http.Header
35267 }
35268
35269
35270
35271
35272
35273
35274
35275 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Create(partnerId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall {
35276 c := &PartnersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35277 c.partnerId = partnerId
35278 c.targetingType = targetingType
35279 c.assignedtargetingoption = assignedtargetingoption
35280 return c
35281 }
35282
35283
35284
35285
35286 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall {
35287 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35288 return c
35289 }
35290
35291
35292 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall {
35293 c.ctx_ = ctx
35294 return c
35295 }
35296
35297
35298
35299 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header {
35300 if c.header_ == nil {
35301 c.header_ = make(http.Header)
35302 }
35303 return c.header_
35304 }
35305
35306 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) {
35307 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35308 var body io.Reader = nil
35309 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption)
35310 if err != nil {
35311 return nil, err
35312 }
35313 c.urlParams_.Set("alt", alt)
35314 c.urlParams_.Set("prettyPrint", "false")
35315 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
35316 urls += "?" + c.urlParams_.Encode()
35317 req, err := http.NewRequest("POST", urls, body)
35318 if err != nil {
35319 return nil, err
35320 }
35321 req.Header = reqHeaders
35322 googleapi.Expand(req.URL, map[string]string{
35323 "partnerId": strconv.FormatInt(c.partnerId, 10),
35324 "targetingType": c.targetingType,
35325 })
35326 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35327 }
35328
35329
35330
35331
35332
35333
35334
35335 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
35336 gensupport.SetOptions(c.urlParams_, opts...)
35337 res, err := c.doRequest("json")
35338 if res != nil && res.StatusCode == http.StatusNotModified {
35339 if res.Body != nil {
35340 res.Body.Close()
35341 }
35342 return nil, gensupport.WrapError(&googleapi.Error{
35343 Code: res.StatusCode,
35344 Header: res.Header,
35345 })
35346 }
35347 if err != nil {
35348 return nil, err
35349 }
35350 defer googleapi.CloseBody(res)
35351 if err := googleapi.CheckResponse(res); err != nil {
35352 return nil, gensupport.WrapError(err)
35353 }
35354 ret := &AssignedTargetingOption{
35355 ServerResponse: googleapi.ServerResponse{
35356 Header: res.Header,
35357 HTTPStatusCode: res.StatusCode,
35358 },
35359 }
35360 target := &ret
35361 if err := gensupport.DecodeResponse(target, res); err != nil {
35362 return nil, err
35363 }
35364 return ret, nil
35365 }
35366
35367 type PartnersTargetingTypesAssignedTargetingOptionsDeleteCall struct {
35368 s *Service
35369 partnerId int64
35370 targetingType string
35371 assignedTargetingOptionId string
35372 urlParams_ gensupport.URLParams
35373 ctx_ context.Context
35374 header_ http.Header
35375 }
35376
35377
35378
35379
35380
35381
35382
35383
35384 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Delete(partnerId int64, targetingType string, assignedTargetingOptionId string) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall {
35385 c := &PartnersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35386 c.partnerId = partnerId
35387 c.targetingType = targetingType
35388 c.assignedTargetingOptionId = assignedTargetingOptionId
35389 return c
35390 }
35391
35392
35393
35394
35395 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall {
35396 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35397 return c
35398 }
35399
35400
35401 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall {
35402 c.ctx_ = ctx
35403 return c
35404 }
35405
35406
35407
35408 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header {
35409 if c.header_ == nil {
35410 c.header_ = make(http.Header)
35411 }
35412 return c.header_
35413 }
35414
35415 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
35416 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35417 var body io.Reader = nil
35418 c.urlParams_.Set("alt", alt)
35419 c.urlParams_.Set("prettyPrint", "false")
35420 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
35421 urls += "?" + c.urlParams_.Encode()
35422 req, err := http.NewRequest("DELETE", urls, body)
35423 if err != nil {
35424 return nil, err
35425 }
35426 req.Header = reqHeaders
35427 googleapi.Expand(req.URL, map[string]string{
35428 "partnerId": strconv.FormatInt(c.partnerId, 10),
35429 "targetingType": c.targetingType,
35430 "assignedTargetingOptionId": c.assignedTargetingOptionId,
35431 })
35432 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35433 }
35434
35435
35436
35437
35438
35439
35440 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
35441 gensupport.SetOptions(c.urlParams_, opts...)
35442 res, err := c.doRequest("json")
35443 if res != nil && res.StatusCode == http.StatusNotModified {
35444 if res.Body != nil {
35445 res.Body.Close()
35446 }
35447 return nil, gensupport.WrapError(&googleapi.Error{
35448 Code: res.StatusCode,
35449 Header: res.Header,
35450 })
35451 }
35452 if err != nil {
35453 return nil, err
35454 }
35455 defer googleapi.CloseBody(res)
35456 if err := googleapi.CheckResponse(res); err != nil {
35457 return nil, gensupport.WrapError(err)
35458 }
35459 ret := &Empty{
35460 ServerResponse: googleapi.ServerResponse{
35461 Header: res.Header,
35462 HTTPStatusCode: res.StatusCode,
35463 },
35464 }
35465 target := &ret
35466 if err := gensupport.DecodeResponse(target, res); err != nil {
35467 return nil, err
35468 }
35469 return ret, nil
35470 }
35471
35472 type PartnersTargetingTypesAssignedTargetingOptionsGetCall struct {
35473 s *Service
35474 partnerId int64
35475 targetingType string
35476 assignedTargetingOptionId string
35477 urlParams_ gensupport.URLParams
35478 ifNoneMatch_ string
35479 ctx_ context.Context
35480 header_ http.Header
35481 }
35482
35483
35484
35485
35486
35487
35488
35489
35490
35491 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Get(partnerId int64, targetingType string, assignedTargetingOptionId string) *PartnersTargetingTypesAssignedTargetingOptionsGetCall {
35492 c := &PartnersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35493 c.partnerId = partnerId
35494 c.targetingType = targetingType
35495 c.assignedTargetingOptionId = assignedTargetingOptionId
35496 return c
35497 }
35498
35499
35500
35501
35502 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsGetCall {
35503 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35504 return c
35505 }
35506
35507
35508
35509
35510 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *PartnersTargetingTypesAssignedTargetingOptionsGetCall {
35511 c.ifNoneMatch_ = entityTag
35512 return c
35513 }
35514
35515
35516 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsGetCall {
35517 c.ctx_ = ctx
35518 return c
35519 }
35520
35521
35522
35523 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header {
35524 if c.header_ == nil {
35525 c.header_ = make(http.Header)
35526 }
35527 return c.header_
35528 }
35529
35530 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
35531 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35532 if c.ifNoneMatch_ != "" {
35533 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35534 }
35535 var body io.Reader = nil
35536 c.urlParams_.Set("alt", alt)
35537 c.urlParams_.Set("prettyPrint", "false")
35538 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}")
35539 urls += "?" + c.urlParams_.Encode()
35540 req, err := http.NewRequest("GET", urls, body)
35541 if err != nil {
35542 return nil, err
35543 }
35544 req.Header = reqHeaders
35545 googleapi.Expand(req.URL, map[string]string{
35546 "partnerId": strconv.FormatInt(c.partnerId, 10),
35547 "targetingType": c.targetingType,
35548 "assignedTargetingOptionId": c.assignedTargetingOptionId,
35549 })
35550 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35551 }
35552
35553
35554
35555
35556
35557
35558
35559 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) {
35560 gensupport.SetOptions(c.urlParams_, opts...)
35561 res, err := c.doRequest("json")
35562 if res != nil && res.StatusCode == http.StatusNotModified {
35563 if res.Body != nil {
35564 res.Body.Close()
35565 }
35566 return nil, gensupport.WrapError(&googleapi.Error{
35567 Code: res.StatusCode,
35568 Header: res.Header,
35569 })
35570 }
35571 if err != nil {
35572 return nil, err
35573 }
35574 defer googleapi.CloseBody(res)
35575 if err := googleapi.CheckResponse(res); err != nil {
35576 return nil, gensupport.WrapError(err)
35577 }
35578 ret := &AssignedTargetingOption{
35579 ServerResponse: googleapi.ServerResponse{
35580 Header: res.Header,
35581 HTTPStatusCode: res.StatusCode,
35582 },
35583 }
35584 target := &ret
35585 if err := gensupport.DecodeResponse(target, res); err != nil {
35586 return nil, err
35587 }
35588 return ret, nil
35589 }
35590
35591 type PartnersTargetingTypesAssignedTargetingOptionsListCall struct {
35592 s *Service
35593 partnerId int64
35594 targetingType string
35595 urlParams_ gensupport.URLParams
35596 ifNoneMatch_ string
35597 ctx_ context.Context
35598 header_ http.Header
35599 }
35600
35601
35602
35603
35604
35605
35606 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) List(partnerId int64, targetingType string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35607 c := &PartnersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35608 c.partnerId = partnerId
35609 c.targetingType = targetingType
35610 return c
35611 }
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621
35622
35623 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35624 c.urlParams_.Set("filter", filter)
35625 return c
35626 }
35627
35628
35629
35630
35631
35632
35633 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35634 c.urlParams_.Set("orderBy", orderBy)
35635 return c
35636 }
35637
35638
35639
35640
35641 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35642 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
35643 return c
35644 }
35645
35646
35647
35648
35649
35650
35651 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35652 c.urlParams_.Set("pageToken", pageToken)
35653 return c
35654 }
35655
35656
35657
35658
35659 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35660 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35661 return c
35662 }
35663
35664
35665
35666
35667 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35668 c.ifNoneMatch_ = entityTag
35669 return c
35670 }
35671
35672
35673 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsListCall {
35674 c.ctx_ = ctx
35675 return c
35676 }
35677
35678
35679
35680 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header {
35681 if c.header_ == nil {
35682 c.header_ = make(http.Header)
35683 }
35684 return c.header_
35685 }
35686
35687 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
35688 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35689 if c.ifNoneMatch_ != "" {
35690 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35691 }
35692 var body io.Reader = nil
35693 c.urlParams_.Set("alt", alt)
35694 c.urlParams_.Set("prettyPrint", "false")
35695 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions")
35696 urls += "?" + c.urlParams_.Encode()
35697 req, err := http.NewRequest("GET", urls, body)
35698 if err != nil {
35699 return nil, err
35700 }
35701 req.Header = reqHeaders
35702 googleapi.Expand(req.URL, map[string]string{
35703 "partnerId": strconv.FormatInt(c.partnerId, 10),
35704 "targetingType": c.targetingType,
35705 })
35706 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35707 }
35708
35709
35710
35711
35712
35713
35714
35715 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListPartnerAssignedTargetingOptionsResponse, error) {
35716 gensupport.SetOptions(c.urlParams_, opts...)
35717 res, err := c.doRequest("json")
35718 if res != nil && res.StatusCode == http.StatusNotModified {
35719 if res.Body != nil {
35720 res.Body.Close()
35721 }
35722 return nil, gensupport.WrapError(&googleapi.Error{
35723 Code: res.StatusCode,
35724 Header: res.Header,
35725 })
35726 }
35727 if err != nil {
35728 return nil, err
35729 }
35730 defer googleapi.CloseBody(res)
35731 if err := googleapi.CheckResponse(res); err != nil {
35732 return nil, gensupport.WrapError(err)
35733 }
35734 ret := &ListPartnerAssignedTargetingOptionsResponse{
35735 ServerResponse: googleapi.ServerResponse{
35736 Header: res.Header,
35737 HTTPStatusCode: res.StatusCode,
35738 },
35739 }
35740 target := &ret
35741 if err := gensupport.DecodeResponse(target, res); err != nil {
35742 return nil, err
35743 }
35744 return ret, nil
35745 }
35746
35747
35748
35749
35750 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListPartnerAssignedTargetingOptionsResponse) error) error {
35751 c.ctx_ = ctx
35752 defer c.PageToken(c.urlParams_.Get("pageToken"))
35753 for {
35754 x, err := c.Do()
35755 if err != nil {
35756 return err
35757 }
35758 if err := f(x); err != nil {
35759 return err
35760 }
35761 if x.NextPageToken == "" {
35762 return nil
35763 }
35764 c.PageToken(x.NextPageToken)
35765 }
35766 }
35767
35768 type SdfdownloadtasksCreateCall struct {
35769 s *Service
35770 createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest
35771 urlParams_ gensupport.URLParams
35772 ctx_ context.Context
35773 header_ http.Header
35774 }
35775
35776
35777
35778
35779
35780
35781
35782
35783
35784 func (r *SdfdownloadtasksService) Create(createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest) *SdfdownloadtasksCreateCall {
35785 c := &SdfdownloadtasksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35786 c.createsdfdownloadtaskrequest = createsdfdownloadtaskrequest
35787 return c
35788 }
35789
35790
35791
35792
35793 func (c *SdfdownloadtasksCreateCall) Fields(s ...googleapi.Field) *SdfdownloadtasksCreateCall {
35794 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35795 return c
35796 }
35797
35798
35799 func (c *SdfdownloadtasksCreateCall) Context(ctx context.Context) *SdfdownloadtasksCreateCall {
35800 c.ctx_ = ctx
35801 return c
35802 }
35803
35804
35805
35806 func (c *SdfdownloadtasksCreateCall) Header() http.Header {
35807 if c.header_ == nil {
35808 c.header_ = make(http.Header)
35809 }
35810 return c.header_
35811 }
35812
35813 func (c *SdfdownloadtasksCreateCall) doRequest(alt string) (*http.Response, error) {
35814 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35815 var body io.Reader = nil
35816 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createsdfdownloadtaskrequest)
35817 if err != nil {
35818 return nil, err
35819 }
35820 c.urlParams_.Set("alt", alt)
35821 c.urlParams_.Set("prettyPrint", "false")
35822 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/sdfdownloadtasks")
35823 urls += "?" + c.urlParams_.Encode()
35824 req, err := http.NewRequest("POST", urls, body)
35825 if err != nil {
35826 return nil, err
35827 }
35828 req.Header = reqHeaders
35829 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35830 }
35831
35832
35833
35834
35835
35836
35837 func (c *SdfdownloadtasksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35838 gensupport.SetOptions(c.urlParams_, opts...)
35839 res, err := c.doRequest("json")
35840 if res != nil && res.StatusCode == http.StatusNotModified {
35841 if res.Body != nil {
35842 res.Body.Close()
35843 }
35844 return nil, gensupport.WrapError(&googleapi.Error{
35845 Code: res.StatusCode,
35846 Header: res.Header,
35847 })
35848 }
35849 if err != nil {
35850 return nil, err
35851 }
35852 defer googleapi.CloseBody(res)
35853 if err := googleapi.CheckResponse(res); err != nil {
35854 return nil, gensupport.WrapError(err)
35855 }
35856 ret := &Operation{
35857 ServerResponse: googleapi.ServerResponse{
35858 Header: res.Header,
35859 HTTPStatusCode: res.StatusCode,
35860 },
35861 }
35862 target := &ret
35863 if err := gensupport.DecodeResponse(target, res); err != nil {
35864 return nil, err
35865 }
35866 return ret, nil
35867 }
35868
35869 type SdfdownloadtasksOperationsGetCall struct {
35870 s *Service
35871 name string
35872 urlParams_ gensupport.URLParams
35873 ifNoneMatch_ string
35874 ctx_ context.Context
35875 header_ http.Header
35876 }
35877
35878
35879
35880
35881
35882 func (r *SdfdownloadtasksOperationsService) Get(name string) *SdfdownloadtasksOperationsGetCall {
35883 c := &SdfdownloadtasksOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35884 c.name = name
35885 return c
35886 }
35887
35888
35889
35890
35891 func (c *SdfdownloadtasksOperationsGetCall) Fields(s ...googleapi.Field) *SdfdownloadtasksOperationsGetCall {
35892 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35893 return c
35894 }
35895
35896
35897
35898
35899 func (c *SdfdownloadtasksOperationsGetCall) IfNoneMatch(entityTag string) *SdfdownloadtasksOperationsGetCall {
35900 c.ifNoneMatch_ = entityTag
35901 return c
35902 }
35903
35904
35905 func (c *SdfdownloadtasksOperationsGetCall) Context(ctx context.Context) *SdfdownloadtasksOperationsGetCall {
35906 c.ctx_ = ctx
35907 return c
35908 }
35909
35910
35911
35912 func (c *SdfdownloadtasksOperationsGetCall) Header() http.Header {
35913 if c.header_ == nil {
35914 c.header_ = make(http.Header)
35915 }
35916 return c.header_
35917 }
35918
35919 func (c *SdfdownloadtasksOperationsGetCall) doRequest(alt string) (*http.Response, error) {
35920 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35921 if c.ifNoneMatch_ != "" {
35922 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35923 }
35924 var body io.Reader = nil
35925 c.urlParams_.Set("alt", alt)
35926 c.urlParams_.Set("prettyPrint", "false")
35927 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/{+name}")
35928 urls += "?" + c.urlParams_.Encode()
35929 req, err := http.NewRequest("GET", urls, body)
35930 if err != nil {
35931 return nil, err
35932 }
35933 req.Header = reqHeaders
35934 googleapi.Expand(req.URL, map[string]string{
35935 "name": c.name,
35936 })
35937 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35938 }
35939
35940
35941
35942
35943
35944
35945 func (c *SdfdownloadtasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35946 gensupport.SetOptions(c.urlParams_, opts...)
35947 res, err := c.doRequest("json")
35948 if res != nil && res.StatusCode == http.StatusNotModified {
35949 if res.Body != nil {
35950 res.Body.Close()
35951 }
35952 return nil, gensupport.WrapError(&googleapi.Error{
35953 Code: res.StatusCode,
35954 Header: res.Header,
35955 })
35956 }
35957 if err != nil {
35958 return nil, err
35959 }
35960 defer googleapi.CloseBody(res)
35961 if err := googleapi.CheckResponse(res); err != nil {
35962 return nil, gensupport.WrapError(err)
35963 }
35964 ret := &Operation{
35965 ServerResponse: googleapi.ServerResponse{
35966 Header: res.Header,
35967 HTTPStatusCode: res.StatusCode,
35968 },
35969 }
35970 target := &ret
35971 if err := gensupport.DecodeResponse(target, res); err != nil {
35972 return nil, err
35973 }
35974 return ret, nil
35975 }
35976
35977 type TargetingTypesTargetingOptionsGetCall struct {
35978 s *Service
35979 targetingType string
35980 targetingOptionId string
35981 urlParams_ gensupport.URLParams
35982 ifNoneMatch_ string
35983 ctx_ context.Context
35984 header_ http.Header
35985 }
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006 func (r *TargetingTypesTargetingOptionsService) Get(targetingType string, targetingOptionId string) *TargetingTypesTargetingOptionsGetCall {
36007 c := &TargetingTypesTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36008 c.targetingType = targetingType
36009 c.targetingOptionId = targetingOptionId
36010 return c
36011 }
36012
36013
36014
36015 func (c *TargetingTypesTargetingOptionsGetCall) AdvertiserId(advertiserId int64) *TargetingTypesTargetingOptionsGetCall {
36016 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
36017 return c
36018 }
36019
36020
36021
36022
36023 func (c *TargetingTypesTargetingOptionsGetCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsGetCall {
36024 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36025 return c
36026 }
36027
36028
36029
36030
36031 func (c *TargetingTypesTargetingOptionsGetCall) IfNoneMatch(entityTag string) *TargetingTypesTargetingOptionsGetCall {
36032 c.ifNoneMatch_ = entityTag
36033 return c
36034 }
36035
36036
36037 func (c *TargetingTypesTargetingOptionsGetCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsGetCall {
36038 c.ctx_ = ctx
36039 return c
36040 }
36041
36042
36043
36044 func (c *TargetingTypesTargetingOptionsGetCall) Header() http.Header {
36045 if c.header_ == nil {
36046 c.header_ = make(http.Header)
36047 }
36048 return c.header_
36049 }
36050
36051 func (c *TargetingTypesTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) {
36052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36053 if c.ifNoneMatch_ != "" {
36054 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36055 }
36056 var body io.Reader = nil
36057 c.urlParams_.Set("alt", alt)
36058 c.urlParams_.Set("prettyPrint", "false")
36059 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/targetingTypes/{+targetingType}/targetingOptions/{+targetingOptionId}")
36060 urls += "?" + c.urlParams_.Encode()
36061 req, err := http.NewRequest("GET", urls, body)
36062 if err != nil {
36063 return nil, err
36064 }
36065 req.Header = reqHeaders
36066 googleapi.Expand(req.URL, map[string]string{
36067 "targetingType": c.targetingType,
36068 "targetingOptionId": c.targetingOptionId,
36069 })
36070 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36071 }
36072
36073
36074
36075
36076
36077
36078
36079 func (c *TargetingTypesTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*TargetingOption, error) {
36080 gensupport.SetOptions(c.urlParams_, opts...)
36081 res, err := c.doRequest("json")
36082 if res != nil && res.StatusCode == http.StatusNotModified {
36083 if res.Body != nil {
36084 res.Body.Close()
36085 }
36086 return nil, gensupport.WrapError(&googleapi.Error{
36087 Code: res.StatusCode,
36088 Header: res.Header,
36089 })
36090 }
36091 if err != nil {
36092 return nil, err
36093 }
36094 defer googleapi.CloseBody(res)
36095 if err := googleapi.CheckResponse(res); err != nil {
36096 return nil, gensupport.WrapError(err)
36097 }
36098 ret := &TargetingOption{
36099 ServerResponse: googleapi.ServerResponse{
36100 Header: res.Header,
36101 HTTPStatusCode: res.StatusCode,
36102 },
36103 }
36104 target := &ret
36105 if err := gensupport.DecodeResponse(target, res); err != nil {
36106 return nil, err
36107 }
36108 return ret, nil
36109 }
36110
36111 type TargetingTypesTargetingOptionsListCall struct {
36112 s *Service
36113 targetingType string
36114 urlParams_ gensupport.URLParams
36115 ifNoneMatch_ string
36116 ctx_ context.Context
36117 header_ http.Header
36118 }
36119
36120
36121
36122
36123
36124
36125
36126
36127
36128
36129
36130
36131
36132
36133
36134
36135
36136
36137
36138 func (r *TargetingTypesTargetingOptionsService) List(targetingType string) *TargetingTypesTargetingOptionsListCall {
36139 c := &TargetingTypesTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36140 c.targetingType = targetingType
36141 return c
36142 }
36143
36144
36145
36146 func (c *TargetingTypesTargetingOptionsListCall) AdvertiserId(advertiserId int64) *TargetingTypesTargetingOptionsListCall {
36147 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
36148 return c
36149 }
36150
36151
36152
36153
36154
36155
36156
36157
36158
36159
36160
36161
36162
36163
36164
36165
36166
36167 func (c *TargetingTypesTargetingOptionsListCall) Filter(filter string) *TargetingTypesTargetingOptionsListCall {
36168 c.urlParams_.Set("filter", filter)
36169 return c
36170 }
36171
36172
36173
36174
36175
36176
36177 func (c *TargetingTypesTargetingOptionsListCall) OrderBy(orderBy string) *TargetingTypesTargetingOptionsListCall {
36178 c.urlParams_.Set("orderBy", orderBy)
36179 return c
36180 }
36181
36182
36183
36184
36185 func (c *TargetingTypesTargetingOptionsListCall) PageSize(pageSize int64) *TargetingTypesTargetingOptionsListCall {
36186 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
36187 return c
36188 }
36189
36190
36191
36192
36193
36194 func (c *TargetingTypesTargetingOptionsListCall) PageToken(pageToken string) *TargetingTypesTargetingOptionsListCall {
36195 c.urlParams_.Set("pageToken", pageToken)
36196 return c
36197 }
36198
36199
36200
36201
36202 func (c *TargetingTypesTargetingOptionsListCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsListCall {
36203 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36204 return c
36205 }
36206
36207
36208
36209
36210 func (c *TargetingTypesTargetingOptionsListCall) IfNoneMatch(entityTag string) *TargetingTypesTargetingOptionsListCall {
36211 c.ifNoneMatch_ = entityTag
36212 return c
36213 }
36214
36215
36216 func (c *TargetingTypesTargetingOptionsListCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsListCall {
36217 c.ctx_ = ctx
36218 return c
36219 }
36220
36221
36222
36223 func (c *TargetingTypesTargetingOptionsListCall) Header() http.Header {
36224 if c.header_ == nil {
36225 c.header_ = make(http.Header)
36226 }
36227 return c.header_
36228 }
36229
36230 func (c *TargetingTypesTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) {
36231 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36232 if c.ifNoneMatch_ != "" {
36233 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36234 }
36235 var body io.Reader = nil
36236 c.urlParams_.Set("alt", alt)
36237 c.urlParams_.Set("prettyPrint", "false")
36238 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/targetingTypes/{+targetingType}/targetingOptions")
36239 urls += "?" + c.urlParams_.Encode()
36240 req, err := http.NewRequest("GET", urls, body)
36241 if err != nil {
36242 return nil, err
36243 }
36244 req.Header = reqHeaders
36245 googleapi.Expand(req.URL, map[string]string{
36246 "targetingType": c.targetingType,
36247 })
36248 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36249 }
36250
36251
36252
36253
36254
36255
36256
36257 func (c *TargetingTypesTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListTargetingOptionsResponse, error) {
36258 gensupport.SetOptions(c.urlParams_, opts...)
36259 res, err := c.doRequest("json")
36260 if res != nil && res.StatusCode == http.StatusNotModified {
36261 if res.Body != nil {
36262 res.Body.Close()
36263 }
36264 return nil, gensupport.WrapError(&googleapi.Error{
36265 Code: res.StatusCode,
36266 Header: res.Header,
36267 })
36268 }
36269 if err != nil {
36270 return nil, err
36271 }
36272 defer googleapi.CloseBody(res)
36273 if err := googleapi.CheckResponse(res); err != nil {
36274 return nil, gensupport.WrapError(err)
36275 }
36276 ret := &ListTargetingOptionsResponse{
36277 ServerResponse: googleapi.ServerResponse{
36278 Header: res.Header,
36279 HTTPStatusCode: res.StatusCode,
36280 },
36281 }
36282 target := &ret
36283 if err := gensupport.DecodeResponse(target, res); err != nil {
36284 return nil, err
36285 }
36286 return ret, nil
36287 }
36288
36289
36290
36291
36292 func (c *TargetingTypesTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListTargetingOptionsResponse) error) error {
36293 c.ctx_ = ctx
36294 defer c.PageToken(c.urlParams_.Get("pageToken"))
36295 for {
36296 x, err := c.Do()
36297 if err != nil {
36298 return err
36299 }
36300 if err := f(x); err != nil {
36301 return err
36302 }
36303 if x.NextPageToken == "" {
36304 return nil
36305 }
36306 c.PageToken(x.NextPageToken)
36307 }
36308 }
36309
36310 type TargetingTypesTargetingOptionsSearchCall struct {
36311 s *Service
36312 targetingType string
36313 searchtargetingoptionsrequest *SearchTargetingOptionsRequest
36314 urlParams_ gensupport.URLParams
36315 ctx_ context.Context
36316 header_ http.Header
36317 }
36318
36319
36320
36321
36322
36323
36324
36325 func (r *TargetingTypesTargetingOptionsService) Search(targetingType string, searchtargetingoptionsrequest *SearchTargetingOptionsRequest) *TargetingTypesTargetingOptionsSearchCall {
36326 c := &TargetingTypesTargetingOptionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36327 c.targetingType = targetingType
36328 c.searchtargetingoptionsrequest = searchtargetingoptionsrequest
36329 return c
36330 }
36331
36332
36333
36334
36335 func (c *TargetingTypesTargetingOptionsSearchCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsSearchCall {
36336 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36337 return c
36338 }
36339
36340
36341 func (c *TargetingTypesTargetingOptionsSearchCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsSearchCall {
36342 c.ctx_ = ctx
36343 return c
36344 }
36345
36346
36347
36348 func (c *TargetingTypesTargetingOptionsSearchCall) Header() http.Header {
36349 if c.header_ == nil {
36350 c.header_ = make(http.Header)
36351 }
36352 return c.header_
36353 }
36354
36355 func (c *TargetingTypesTargetingOptionsSearchCall) doRequest(alt string) (*http.Response, error) {
36356 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36357 var body io.Reader = nil
36358 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchtargetingoptionsrequest)
36359 if err != nil {
36360 return nil, err
36361 }
36362 c.urlParams_.Set("alt", alt)
36363 c.urlParams_.Set("prettyPrint", "false")
36364 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/targetingTypes/{+targetingType}/targetingOptions:search")
36365 urls += "?" + c.urlParams_.Encode()
36366 req, err := http.NewRequest("POST", urls, body)
36367 if err != nil {
36368 return nil, err
36369 }
36370 req.Header = reqHeaders
36371 googleapi.Expand(req.URL, map[string]string{
36372 "targetingType": c.targetingType,
36373 })
36374 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36375 }
36376
36377
36378
36379
36380
36381
36382
36383 func (c *TargetingTypesTargetingOptionsSearchCall) Do(opts ...googleapi.CallOption) (*SearchTargetingOptionsResponse, error) {
36384 gensupport.SetOptions(c.urlParams_, opts...)
36385 res, err := c.doRequest("json")
36386 if res != nil && res.StatusCode == http.StatusNotModified {
36387 if res.Body != nil {
36388 res.Body.Close()
36389 }
36390 return nil, gensupport.WrapError(&googleapi.Error{
36391 Code: res.StatusCode,
36392 Header: res.Header,
36393 })
36394 }
36395 if err != nil {
36396 return nil, err
36397 }
36398 defer googleapi.CloseBody(res)
36399 if err := googleapi.CheckResponse(res); err != nil {
36400 return nil, gensupport.WrapError(err)
36401 }
36402 ret := &SearchTargetingOptionsResponse{
36403 ServerResponse: googleapi.ServerResponse{
36404 Header: res.Header,
36405 HTTPStatusCode: res.StatusCode,
36406 },
36407 }
36408 target := &ret
36409 if err := gensupport.DecodeResponse(target, res); err != nil {
36410 return nil, err
36411 }
36412 return ret, nil
36413 }
36414
36415
36416
36417
36418 func (c *TargetingTypesTargetingOptionsSearchCall) Pages(ctx context.Context, f func(*SearchTargetingOptionsResponse) error) error {
36419 c.ctx_ = ctx
36420 defer func(pt string) { c.searchtargetingoptionsrequest.PageToken = pt }(c.searchtargetingoptionsrequest.PageToken)
36421 for {
36422 x, err := c.Do()
36423 if err != nil {
36424 return err
36425 }
36426 if err := f(x); err != nil {
36427 return err
36428 }
36429 if x.NextPageToken == "" {
36430 return nil
36431 }
36432 c.searchtargetingoptionsrequest.PageToken = x.NextPageToken
36433 }
36434 }
36435
36436 type UsersBulkEditAssignedUserRolesCall struct {
36437 s *Service
36438 userId int64
36439 bulkeditassigneduserrolesrequest *BulkEditAssignedUserRolesRequest
36440 urlParams_ gensupport.URLParams
36441 ctx_ context.Context
36442 header_ http.Header
36443 }
36444
36445
36446
36447
36448
36449
36450
36451
36452
36453
36454
36455
36456 func (r *UsersService) BulkEditAssignedUserRoles(userId int64, bulkeditassigneduserrolesrequest *BulkEditAssignedUserRolesRequest) *UsersBulkEditAssignedUserRolesCall {
36457 c := &UsersBulkEditAssignedUserRolesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36458 c.userId = userId
36459 c.bulkeditassigneduserrolesrequest = bulkeditassigneduserrolesrequest
36460 return c
36461 }
36462
36463
36464
36465
36466 func (c *UsersBulkEditAssignedUserRolesCall) Fields(s ...googleapi.Field) *UsersBulkEditAssignedUserRolesCall {
36467 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36468 return c
36469 }
36470
36471
36472 func (c *UsersBulkEditAssignedUserRolesCall) Context(ctx context.Context) *UsersBulkEditAssignedUserRolesCall {
36473 c.ctx_ = ctx
36474 return c
36475 }
36476
36477
36478
36479 func (c *UsersBulkEditAssignedUserRolesCall) Header() http.Header {
36480 if c.header_ == nil {
36481 c.header_ = make(http.Header)
36482 }
36483 return c.header_
36484 }
36485
36486 func (c *UsersBulkEditAssignedUserRolesCall) doRequest(alt string) (*http.Response, error) {
36487 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36488 var body io.Reader = nil
36489 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassigneduserrolesrequest)
36490 if err != nil {
36491 return nil, err
36492 }
36493 c.urlParams_.Set("alt", alt)
36494 c.urlParams_.Set("prettyPrint", "false")
36495 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{+userId}:bulkEditAssignedUserRoles")
36496 urls += "?" + c.urlParams_.Encode()
36497 req, err := http.NewRequest("POST", urls, body)
36498 if err != nil {
36499 return nil, err
36500 }
36501 req.Header = reqHeaders
36502 googleapi.Expand(req.URL, map[string]string{
36503 "userId": strconv.FormatInt(c.userId, 10),
36504 })
36505 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36506 }
36507
36508
36509
36510
36511
36512
36513
36514 func (c *UsersBulkEditAssignedUserRolesCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedUserRolesResponse, error) {
36515 gensupport.SetOptions(c.urlParams_, opts...)
36516 res, err := c.doRequest("json")
36517 if res != nil && res.StatusCode == http.StatusNotModified {
36518 if res.Body != nil {
36519 res.Body.Close()
36520 }
36521 return nil, gensupport.WrapError(&googleapi.Error{
36522 Code: res.StatusCode,
36523 Header: res.Header,
36524 })
36525 }
36526 if err != nil {
36527 return nil, err
36528 }
36529 defer googleapi.CloseBody(res)
36530 if err := googleapi.CheckResponse(res); err != nil {
36531 return nil, gensupport.WrapError(err)
36532 }
36533 ret := &BulkEditAssignedUserRolesResponse{
36534 ServerResponse: googleapi.ServerResponse{
36535 Header: res.Header,
36536 HTTPStatusCode: res.StatusCode,
36537 },
36538 }
36539 target := &ret
36540 if err := gensupport.DecodeResponse(target, res); err != nil {
36541 return nil, err
36542 }
36543 return ret, nil
36544 }
36545
36546 type UsersCreateCall struct {
36547 s *Service
36548 user *User
36549 urlParams_ gensupport.URLParams
36550 ctx_ context.Context
36551 header_ http.Header
36552 }
36553
36554
36555
36556
36557
36558
36559 func (r *UsersService) Create(user *User) *UsersCreateCall {
36560 c := &UsersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36561 c.user = user
36562 return c
36563 }
36564
36565
36566
36567
36568 func (c *UsersCreateCall) Fields(s ...googleapi.Field) *UsersCreateCall {
36569 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36570 return c
36571 }
36572
36573
36574 func (c *UsersCreateCall) Context(ctx context.Context) *UsersCreateCall {
36575 c.ctx_ = ctx
36576 return c
36577 }
36578
36579
36580
36581 func (c *UsersCreateCall) Header() http.Header {
36582 if c.header_ == nil {
36583 c.header_ = make(http.Header)
36584 }
36585 return c.header_
36586 }
36587
36588 func (c *UsersCreateCall) doRequest(alt string) (*http.Response, error) {
36589 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36590 var body io.Reader = nil
36591 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
36592 if err != nil {
36593 return nil, err
36594 }
36595 c.urlParams_.Set("alt", alt)
36596 c.urlParams_.Set("prettyPrint", "false")
36597 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users")
36598 urls += "?" + c.urlParams_.Encode()
36599 req, err := http.NewRequest("POST", urls, body)
36600 if err != nil {
36601 return nil, err
36602 }
36603 req.Header = reqHeaders
36604 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36605 }
36606
36607
36608
36609
36610
36611
36612 func (c *UsersCreateCall) Do(opts ...googleapi.CallOption) (*User, error) {
36613 gensupport.SetOptions(c.urlParams_, opts...)
36614 res, err := c.doRequest("json")
36615 if res != nil && res.StatusCode == http.StatusNotModified {
36616 if res.Body != nil {
36617 res.Body.Close()
36618 }
36619 return nil, gensupport.WrapError(&googleapi.Error{
36620 Code: res.StatusCode,
36621 Header: res.Header,
36622 })
36623 }
36624 if err != nil {
36625 return nil, err
36626 }
36627 defer googleapi.CloseBody(res)
36628 if err := googleapi.CheckResponse(res); err != nil {
36629 return nil, gensupport.WrapError(err)
36630 }
36631 ret := &User{
36632 ServerResponse: googleapi.ServerResponse{
36633 Header: res.Header,
36634 HTTPStatusCode: res.StatusCode,
36635 },
36636 }
36637 target := &ret
36638 if err := gensupport.DecodeResponse(target, res); err != nil {
36639 return nil, err
36640 }
36641 return ret, nil
36642 }
36643
36644 type UsersDeleteCall struct {
36645 s *Service
36646 userId int64
36647 urlParams_ gensupport.URLParams
36648 ctx_ context.Context
36649 header_ http.Header
36650 }
36651
36652
36653
36654
36655
36656
36657
36658 func (r *UsersService) Delete(userId int64) *UsersDeleteCall {
36659 c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36660 c.userId = userId
36661 return c
36662 }
36663
36664
36665
36666
36667 func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
36668 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36669 return c
36670 }
36671
36672
36673 func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
36674 c.ctx_ = ctx
36675 return c
36676 }
36677
36678
36679
36680 func (c *UsersDeleteCall) Header() http.Header {
36681 if c.header_ == nil {
36682 c.header_ = make(http.Header)
36683 }
36684 return c.header_
36685 }
36686
36687 func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
36688 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36689 var body io.Reader = nil
36690 c.urlParams_.Set("alt", alt)
36691 c.urlParams_.Set("prettyPrint", "false")
36692 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{+userId}")
36693 urls += "?" + c.urlParams_.Encode()
36694 req, err := http.NewRequest("DELETE", urls, body)
36695 if err != nil {
36696 return nil, err
36697 }
36698 req.Header = reqHeaders
36699 googleapi.Expand(req.URL, map[string]string{
36700 "userId": strconv.FormatInt(c.userId, 10),
36701 })
36702 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36703 }
36704
36705
36706
36707
36708
36709
36710 func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
36711 gensupport.SetOptions(c.urlParams_, opts...)
36712 res, err := c.doRequest("json")
36713 if res != nil && res.StatusCode == http.StatusNotModified {
36714 if res.Body != nil {
36715 res.Body.Close()
36716 }
36717 return nil, gensupport.WrapError(&googleapi.Error{
36718 Code: res.StatusCode,
36719 Header: res.Header,
36720 })
36721 }
36722 if err != nil {
36723 return nil, err
36724 }
36725 defer googleapi.CloseBody(res)
36726 if err := googleapi.CheckResponse(res); err != nil {
36727 return nil, gensupport.WrapError(err)
36728 }
36729 ret := &Empty{
36730 ServerResponse: googleapi.ServerResponse{
36731 Header: res.Header,
36732 HTTPStatusCode: res.StatusCode,
36733 },
36734 }
36735 target := &ret
36736 if err := gensupport.DecodeResponse(target, res); err != nil {
36737 return nil, err
36738 }
36739 return ret, nil
36740 }
36741
36742 type UsersGetCall struct {
36743 s *Service
36744 userId int64
36745 urlParams_ gensupport.URLParams
36746 ifNoneMatch_ string
36747 ctx_ context.Context
36748 header_ http.Header
36749 }
36750
36751
36752
36753
36754
36755
36756
36757 func (r *UsersService) Get(userId int64) *UsersGetCall {
36758 c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36759 c.userId = userId
36760 return c
36761 }
36762
36763
36764
36765
36766 func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall {
36767 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36768 return c
36769 }
36770
36771
36772
36773
36774 func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall {
36775 c.ifNoneMatch_ = entityTag
36776 return c
36777 }
36778
36779
36780 func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
36781 c.ctx_ = ctx
36782 return c
36783 }
36784
36785
36786
36787 func (c *UsersGetCall) Header() http.Header {
36788 if c.header_ == nil {
36789 c.header_ = make(http.Header)
36790 }
36791 return c.header_
36792 }
36793
36794 func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
36795 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36796 if c.ifNoneMatch_ != "" {
36797 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36798 }
36799 var body io.Reader = nil
36800 c.urlParams_.Set("alt", alt)
36801 c.urlParams_.Set("prettyPrint", "false")
36802 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{+userId}")
36803 urls += "?" + c.urlParams_.Encode()
36804 req, err := http.NewRequest("GET", urls, body)
36805 if err != nil {
36806 return nil, err
36807 }
36808 req.Header = reqHeaders
36809 googleapi.Expand(req.URL, map[string]string{
36810 "userId": strconv.FormatInt(c.userId, 10),
36811 })
36812 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36813 }
36814
36815
36816
36817
36818
36819
36820 func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) {
36821 gensupport.SetOptions(c.urlParams_, opts...)
36822 res, err := c.doRequest("json")
36823 if res != nil && res.StatusCode == http.StatusNotModified {
36824 if res.Body != nil {
36825 res.Body.Close()
36826 }
36827 return nil, gensupport.WrapError(&googleapi.Error{
36828 Code: res.StatusCode,
36829 Header: res.Header,
36830 })
36831 }
36832 if err != nil {
36833 return nil, err
36834 }
36835 defer googleapi.CloseBody(res)
36836 if err := googleapi.CheckResponse(res); err != nil {
36837 return nil, gensupport.WrapError(err)
36838 }
36839 ret := &User{
36840 ServerResponse: googleapi.ServerResponse{
36841 Header: res.Header,
36842 HTTPStatusCode: res.StatusCode,
36843 },
36844 }
36845 target := &ret
36846 if err := gensupport.DecodeResponse(target, res); err != nil {
36847 return nil, err
36848 }
36849 return ret, nil
36850 }
36851
36852 type UsersListCall struct {
36853 s *Service
36854 urlParams_ gensupport.URLParams
36855 ifNoneMatch_ string
36856 ctx_ context.Context
36857 header_ http.Header
36858 }
36859
36860
36861
36862
36863
36864
36865
36866 func (r *UsersService) List() *UsersListCall {
36867 c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36868 return c
36869 }
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899 func (c *UsersListCall) Filter(filter string) *UsersListCall {
36900 c.urlParams_.Set("filter", filter)
36901 return c
36902 }
36903
36904
36905
36906
36907
36908 func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall {
36909 c.urlParams_.Set("orderBy", orderBy)
36910 return c
36911 }
36912
36913
36914
36915 func (c *UsersListCall) PageSize(pageSize int64) *UsersListCall {
36916 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
36917 return c
36918 }
36919
36920
36921
36922
36923
36924 func (c *UsersListCall) PageToken(pageToken string) *UsersListCall {
36925 c.urlParams_.Set("pageToken", pageToken)
36926 return c
36927 }
36928
36929
36930
36931
36932 func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
36933 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36934 return c
36935 }
36936
36937
36938
36939
36940 func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
36941 c.ifNoneMatch_ = entityTag
36942 return c
36943 }
36944
36945
36946 func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
36947 c.ctx_ = ctx
36948 return c
36949 }
36950
36951
36952
36953 func (c *UsersListCall) Header() http.Header {
36954 if c.header_ == nil {
36955 c.header_ = make(http.Header)
36956 }
36957 return c.header_
36958 }
36959
36960 func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
36961 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36962 if c.ifNoneMatch_ != "" {
36963 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36964 }
36965 var body io.Reader = nil
36966 c.urlParams_.Set("alt", alt)
36967 c.urlParams_.Set("prettyPrint", "false")
36968 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users")
36969 urls += "?" + c.urlParams_.Encode()
36970 req, err := http.NewRequest("GET", urls, body)
36971 if err != nil {
36972 return nil, err
36973 }
36974 req.Header = reqHeaders
36975 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36976 }
36977
36978
36979
36980
36981
36982
36983
36984 func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error) {
36985 gensupport.SetOptions(c.urlParams_, opts...)
36986 res, err := c.doRequest("json")
36987 if res != nil && res.StatusCode == http.StatusNotModified {
36988 if res.Body != nil {
36989 res.Body.Close()
36990 }
36991 return nil, gensupport.WrapError(&googleapi.Error{
36992 Code: res.StatusCode,
36993 Header: res.Header,
36994 })
36995 }
36996 if err != nil {
36997 return nil, err
36998 }
36999 defer googleapi.CloseBody(res)
37000 if err := googleapi.CheckResponse(res); err != nil {
37001 return nil, gensupport.WrapError(err)
37002 }
37003 ret := &ListUsersResponse{
37004 ServerResponse: googleapi.ServerResponse{
37005 Header: res.Header,
37006 HTTPStatusCode: res.StatusCode,
37007 },
37008 }
37009 target := &ret
37010 if err := gensupport.DecodeResponse(target, res); err != nil {
37011 return nil, err
37012 }
37013 return ret, nil
37014 }
37015
37016
37017
37018
37019 func (c *UsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) error) error {
37020 c.ctx_ = ctx
37021 defer c.PageToken(c.urlParams_.Get("pageToken"))
37022 for {
37023 x, err := c.Do()
37024 if err != nil {
37025 return err
37026 }
37027 if err := f(x); err != nil {
37028 return err
37029 }
37030 if x.NextPageToken == "" {
37031 return nil
37032 }
37033 c.PageToken(x.NextPageToken)
37034 }
37035 }
37036
37037 type UsersPatchCall struct {
37038 s *Service
37039 userId int64
37040 user *User
37041 urlParams_ gensupport.URLParams
37042 ctx_ context.Context
37043 header_ http.Header
37044 }
37045
37046
37047
37048
37049
37050
37051
37052
37053 func (r *UsersService) Patch(userId int64, user *User) *UsersPatchCall {
37054 c := &UsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37055 c.userId = userId
37056 c.user = user
37057 return c
37058 }
37059
37060
37061
37062 func (c *UsersPatchCall) UpdateMask(updateMask string) *UsersPatchCall {
37063 c.urlParams_.Set("updateMask", updateMask)
37064 return c
37065 }
37066
37067
37068
37069
37070 func (c *UsersPatchCall) Fields(s ...googleapi.Field) *UsersPatchCall {
37071 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37072 return c
37073 }
37074
37075
37076 func (c *UsersPatchCall) Context(ctx context.Context) *UsersPatchCall {
37077 c.ctx_ = ctx
37078 return c
37079 }
37080
37081
37082
37083 func (c *UsersPatchCall) Header() http.Header {
37084 if c.header_ == nil {
37085 c.header_ = make(http.Header)
37086 }
37087 return c.header_
37088 }
37089
37090 func (c *UsersPatchCall) doRequest(alt string) (*http.Response, error) {
37091 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
37092 var body io.Reader = nil
37093 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
37094 if err != nil {
37095 return nil, err
37096 }
37097 c.urlParams_.Set("alt", alt)
37098 c.urlParams_.Set("prettyPrint", "false")
37099 urls := googleapi.ResolveRelative(c.s.BasePath, "v3/users/{+userId}")
37100 urls += "?" + c.urlParams_.Encode()
37101 req, err := http.NewRequest("PATCH", urls, body)
37102 if err != nil {
37103 return nil, err
37104 }
37105 req.Header = reqHeaders
37106 googleapi.Expand(req.URL, map[string]string{
37107 "userId": strconv.FormatInt(c.userId, 10),
37108 })
37109 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37110 }
37111
37112
37113
37114
37115
37116
37117 func (c *UsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) {
37118 gensupport.SetOptions(c.urlParams_, opts...)
37119 res, err := c.doRequest("json")
37120 if res != nil && res.StatusCode == http.StatusNotModified {
37121 if res.Body != nil {
37122 res.Body.Close()
37123 }
37124 return nil, gensupport.WrapError(&googleapi.Error{
37125 Code: res.StatusCode,
37126 Header: res.Header,
37127 })
37128 }
37129 if err != nil {
37130 return nil, err
37131 }
37132 defer googleapi.CloseBody(res)
37133 if err := googleapi.CheckResponse(res); err != nil {
37134 return nil, gensupport.WrapError(err)
37135 }
37136 ret := &User{
37137 ServerResponse: googleapi.ServerResponse{
37138 Header: res.Header,
37139 HTTPStatusCode: res.StatusCode,
37140 },
37141 }
37142 target := &ret
37143 if err := gensupport.DecodeResponse(target, res); err != nil {
37144 return nil, err
37145 }
37146 return ret, nil
37147 }
37148
View as plain text