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 package realtimebidding
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "net/http"
61 "net/url"
62 "strconv"
63 "strings"
64
65 googleapi "google.golang.org/api/googleapi"
66 internal "google.golang.org/api/internal"
67 gensupport "google.golang.org/api/internal/gensupport"
68 option "google.golang.org/api/option"
69 internaloption "google.golang.org/api/option/internaloption"
70 htransport "google.golang.org/api/transport/http"
71 )
72
73
74
75 var _ = bytes.NewBuffer
76 var _ = strconv.Itoa
77 var _ = fmt.Sprintf
78 var _ = json.NewDecoder
79 var _ = io.Copy
80 var _ = url.Parse
81 var _ = gensupport.MarshalJSON
82 var _ = googleapi.Version
83 var _ = errors.New
84 var _ = strings.Replace
85 var _ = context.Canceled
86 var _ = internaloption.WithDefaultEndpoint
87 var _ = internal.Version
88
89 const apiId = "realtimebidding:v1"
90 const apiName = "realtimebidding"
91 const apiVersion = "v1"
92 const basePath = "https://realtimebidding.googleapis.com/"
93 const basePathTemplate = "https://realtimebidding.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://realtimebidding.mtls.googleapis.com/"
95
96
97 const (
98
99
100 RealtimeBiddingScope = "https://www.googleapis.com/auth/realtime-bidding"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/realtime-bidding",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Bidders = NewBiddersService(s)
139 s.Buyers = NewBuyersService(s)
140 return s, nil
141 }
142
143 type Service struct {
144 client *http.Client
145 BasePath string
146 UserAgent string
147
148 Bidders *BiddersService
149
150 Buyers *BuyersService
151 }
152
153 func (s *Service) userAgent() string {
154 if s.UserAgent == "" {
155 return googleapi.UserAgent
156 }
157 return googleapi.UserAgent + " " + s.UserAgent
158 }
159
160 func NewBiddersService(s *Service) *BiddersService {
161 rs := &BiddersService{s: s}
162 rs.Creatives = NewBiddersCreativesService(s)
163 rs.Endpoints = NewBiddersEndpointsService(s)
164 rs.PretargetingConfigs = NewBiddersPretargetingConfigsService(s)
165 rs.PublisherConnections = NewBiddersPublisherConnectionsService(s)
166 return rs
167 }
168
169 type BiddersService struct {
170 s *Service
171
172 Creatives *BiddersCreativesService
173
174 Endpoints *BiddersEndpointsService
175
176 PretargetingConfigs *BiddersPretargetingConfigsService
177
178 PublisherConnections *BiddersPublisherConnectionsService
179 }
180
181 func NewBiddersCreativesService(s *Service) *BiddersCreativesService {
182 rs := &BiddersCreativesService{s: s}
183 return rs
184 }
185
186 type BiddersCreativesService struct {
187 s *Service
188 }
189
190 func NewBiddersEndpointsService(s *Service) *BiddersEndpointsService {
191 rs := &BiddersEndpointsService{s: s}
192 return rs
193 }
194
195 type BiddersEndpointsService struct {
196 s *Service
197 }
198
199 func NewBiddersPretargetingConfigsService(s *Service) *BiddersPretargetingConfigsService {
200 rs := &BiddersPretargetingConfigsService{s: s}
201 return rs
202 }
203
204 type BiddersPretargetingConfigsService struct {
205 s *Service
206 }
207
208 func NewBiddersPublisherConnectionsService(s *Service) *BiddersPublisherConnectionsService {
209 rs := &BiddersPublisherConnectionsService{s: s}
210 return rs
211 }
212
213 type BiddersPublisherConnectionsService struct {
214 s *Service
215 }
216
217 func NewBuyersService(s *Service) *BuyersService {
218 rs := &BuyersService{s: s}
219 rs.Creatives = NewBuyersCreativesService(s)
220 rs.UserLists = NewBuyersUserListsService(s)
221 return rs
222 }
223
224 type BuyersService struct {
225 s *Service
226
227 Creatives *BuyersCreativesService
228
229 UserLists *BuyersUserListsService
230 }
231
232 func NewBuyersCreativesService(s *Service) *BuyersCreativesService {
233 rs := &BuyersCreativesService{s: s}
234 return rs
235 }
236
237 type BuyersCreativesService struct {
238 s *Service
239 }
240
241 func NewBuyersUserListsService(s *Service) *BuyersUserListsService {
242 rs := &BuyersUserListsService{s: s}
243 return rs
244 }
245
246 type BuyersUserListsService struct {
247 s *Service
248 }
249
250
251
252 type ActivatePretargetingConfigRequest struct {
253 }
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270 type AdTechnologyProviders struct {
271
272
273
274
275 DetectedGvlIds googleapi.Int64s `json:"detectedGvlIds,omitempty"`
276
277
278
279
280
281 DetectedProviderIds googleapi.Int64s `json:"detectedProviderIds,omitempty"`
282
283
284
285
286
287 UnidentifiedProviderDomains []string `json:"unidentifiedProviderDomains,omitempty"`
288
289
290
291
292
293 ForceSendFields []string `json:"-"`
294
295
296
297
298 NullFields []string `json:"-"`
299 }
300
301 func (s *AdTechnologyProviders) MarshalJSON() ([]byte, error) {
302 type NoMethod AdTechnologyProviders
303 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
304 }
305
306
307
308
309
310 type AddTargetedAppsRequest struct {
311
312
313
314 AppIds []string `json:"appIds,omitempty"`
315
316
317
318
319
320
321
322
323
324
325
326
327 TargetingMode string `json:"targetingMode,omitempty"`
328
329
330
331
332
333 ForceSendFields []string `json:"-"`
334
335
336
337
338 NullFields []string `json:"-"`
339 }
340
341 func (s *AddTargetedAppsRequest) MarshalJSON() ([]byte, error) {
342 type NoMethod AddTargetedAppsRequest
343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
344 }
345
346
347
348
349
350 type AddTargetedPublishersRequest struct {
351
352
353
354
355
356
357 PublisherIds []string `json:"publisherIds,omitempty"`
358
359
360
361
362
363
364
365
366
367
368
369 TargetingMode string `json:"targetingMode,omitempty"`
370
371
372
373
374
375 ForceSendFields []string `json:"-"`
376
377
378
379
380 NullFields []string `json:"-"`
381 }
382
383 func (s *AddTargetedPublishersRequest) MarshalJSON() ([]byte, error) {
384 type NoMethod AddTargetedPublishersRequest
385 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
386 }
387
388
389
390
391 type AddTargetedSitesRequest struct {
392
393
394
395 Sites []string `json:"sites,omitempty"`
396
397
398
399
400
401
402
403
404
405
406
407 TargetingMode string `json:"targetingMode,omitempty"`
408
409
410
411
412
413 ForceSendFields []string `json:"-"`
414
415
416
417
418 NullFields []string `json:"-"`
419 }
420
421 func (s *AddTargetedSitesRequest) MarshalJSON() ([]byte, error) {
422 type NoMethod AddTargetedSitesRequest
423 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
424 }
425
426
427 type AdvertiserAndBrand struct {
428
429
430
431
432 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
433
434
435 AdvertiserName string `json:"advertiserName,omitempty"`
436
437
438
439
440 BrandId int64 `json:"brandId,omitempty,string"`
441
442
443 BrandName string `json:"brandName,omitempty"`
444
445
446
447
448
449 ForceSendFields []string `json:"-"`
450
451
452
453
454 NullFields []string `json:"-"`
455 }
456
457 func (s *AdvertiserAndBrand) MarshalJSON() ([]byte, error) {
458 type NoMethod AdvertiserAndBrand
459 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
460 }
461
462
463
464 type AppTargeting struct {
465
466
467
468 MobileAppCategoryTargeting *NumericTargetingDimension `json:"mobileAppCategoryTargeting,omitempty"`
469
470
471
472 MobileAppTargeting *StringTargetingDimension `json:"mobileAppTargeting,omitempty"`
473
474
475
476
477
478 ForceSendFields []string `json:"-"`
479
480
481
482
483 NullFields []string `json:"-"`
484 }
485
486 func (s *AppTargeting) MarshalJSON() ([]byte, error) {
487 type NoMethod AppTargeting
488 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
489 }
490
491
492
493 type BatchApprovePublisherConnectionsRequest struct {
494
495
496
497
498 Names []string `json:"names,omitempty"`
499
500
501
502
503
504 ForceSendFields []string `json:"-"`
505
506
507
508
509 NullFields []string `json:"-"`
510 }
511
512 func (s *BatchApprovePublisherConnectionsRequest) MarshalJSON() ([]byte, error) {
513 type NoMethod BatchApprovePublisherConnectionsRequest
514 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
515 }
516
517
518
519 type BatchApprovePublisherConnectionsResponse struct {
520
521 PublisherConnections []*PublisherConnection `json:"publisherConnections,omitempty"`
522
523
524 googleapi.ServerResponse `json:"-"`
525
526
527
528
529
530 ForceSendFields []string `json:"-"`
531
532
533
534
535 NullFields []string `json:"-"`
536 }
537
538 func (s *BatchApprovePublisherConnectionsResponse) MarshalJSON() ([]byte, error) {
539 type NoMethod BatchApprovePublisherConnectionsResponse
540 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
541 }
542
543
544
545 type BatchRejectPublisherConnectionsRequest struct {
546
547
548
549
550 Names []string `json:"names,omitempty"`
551
552
553
554
555
556 ForceSendFields []string `json:"-"`
557
558
559
560
561 NullFields []string `json:"-"`
562 }
563
564 func (s *BatchRejectPublisherConnectionsRequest) MarshalJSON() ([]byte, error) {
565 type NoMethod BatchRejectPublisherConnectionsRequest
566 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
567 }
568
569
570
571 type BatchRejectPublisherConnectionsResponse struct {
572
573 PublisherConnections []*PublisherConnection `json:"publisherConnections,omitempty"`
574
575
576 googleapi.ServerResponse `json:"-"`
577
578
579
580
581
582 ForceSendFields []string `json:"-"`
583
584
585
586
587 NullFields []string `json:"-"`
588 }
589
590 func (s *BatchRejectPublisherConnectionsResponse) MarshalJSON() ([]byte, error) {
591 type NoMethod BatchRejectPublisherConnectionsResponse
592 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
593 }
594
595
596 type Bidder struct {
597
598
599
600
601
602
603
604 BypassNonguaranteedDealsPretargeting bool `json:"bypassNonguaranteedDealsPretargeting,omitempty"`
605
606
607
608
609
610 CookieMatchingNetworkId string `json:"cookieMatchingNetworkId,omitempty"`
611
612
613
614 CookieMatchingUrl string `json:"cookieMatchingUrl,omitempty"`
615
616
617
618 DealsBillingId string `json:"dealsBillingId,omitempty"`
619
620
621
622
623
624 Name string `json:"name,omitempty"`
625
626
627 googleapi.ServerResponse `json:"-"`
628
629
630
631
632
633
634 ForceSendFields []string `json:"-"`
635
636
637
638
639
640 NullFields []string `json:"-"`
641 }
642
643 func (s *Bidder) MarshalJSON() ([]byte, error) {
644 type NoMethod Bidder
645 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
646 }
647
648
649 type Buyer struct {
650
651
652
653 ActiveCreativeCount int64 `json:"activeCreativeCount,omitempty,string"`
654
655
656
657
658 Bidder string `json:"bidder,omitempty"`
659
660
661
662
663
664
665 BillingIds []string `json:"billingIds,omitempty"`
666
667
668 DisplayName string `json:"displayName,omitempty"`
669
670
671 MaximumActiveCreativeCount int64 `json:"maximumActiveCreativeCount,omitempty,string"`
672
673
674
675
676
677 Name string `json:"name,omitempty"`
678
679
680 googleapi.ServerResponse `json:"-"`
681
682
683
684
685
686 ForceSendFields []string `json:"-"`
687
688
689
690
691 NullFields []string `json:"-"`
692 }
693
694 func (s *Buyer) MarshalJSON() ([]byte, error) {
695 type NoMethod Buyer
696 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
697 }
698
699
700 type CloseUserListRequest struct {
701 }
702
703
704 type Creative struct {
705
706
707
708 AccountId int64 `json:"accountId,omitempty,string"`
709
710
711 AdChoicesDestinationUrl string `json:"adChoicesDestinationUrl,omitempty"`
712
713
714 AdvertiserName string `json:"advertiserName,omitempty"`
715
716 AgencyId int64 `json:"agencyId,omitempty,string"`
717
718
719 ApiUpdateTime string `json:"apiUpdateTime,omitempty"`
720
721
722
723
724
725
726
727
728 CreativeFormat string `json:"creativeFormat,omitempty"`
729
730
731
732
733 CreativeId string `json:"creativeId,omitempty"`
734
735
736
737
738 CreativeServingDecision *CreativeServingDecision `json:"creativeServingDecision,omitempty"`
739
740
741
742 DealIds []string `json:"dealIds,omitempty"`
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804 DeclaredAttributes []string `json:"declaredAttributes,omitempty"`
805
806
807 DeclaredClickThroughUrls []string `json:"declaredClickThroughUrls,omitempty"`
808
809
810
811
812
813
814
815
816 DeclaredRestrictedCategories []string `json:"declaredRestrictedCategories,omitempty"`
817
818
819
820
821 DeclaredVendorIds []int64 `json:"declaredVendorIds,omitempty"`
822
823 Html *HtmlContent `json:"html,omitempty"`
824
825
826 ImpressionTrackingUrls []string `json:"impressionTrackingUrls,omitempty"`
827
828
829
830
831
832 Name string `json:"name,omitempty"`
833
834 Native *NativeContent `json:"native,omitempty"`
835
836
837
838
839
840
841
842 RenderUrl string `json:"renderUrl,omitempty"`
843
844
845
846
847
848
849
850 RestrictedCategories []string `json:"restrictedCategories,omitempty"`
851
852
853 Version int64 `json:"version,omitempty"`
854
855 Video *VideoContent `json:"video,omitempty"`
856
857
858 googleapi.ServerResponse `json:"-"`
859
860
861
862
863
864 ForceSendFields []string `json:"-"`
865
866
867
868
869 NullFields []string `json:"-"`
870 }
871
872 func (s *Creative) MarshalJSON() ([]byte, error) {
873 type NoMethod Creative
874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
875 }
876
877
878
879 type CreativeDimensions struct {
880
881 Height int64 `json:"height,omitempty,string"`
882
883 Width int64 `json:"width,omitempty,string"`
884
885
886
887
888
889 ForceSendFields []string `json:"-"`
890
891
892
893
894 NullFields []string `json:"-"`
895 }
896
897 func (s *CreativeDimensions) MarshalJSON() ([]byte, error) {
898 type NoMethod CreativeDimensions
899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
900 }
901
902
903
904 type CreativeServingDecision struct {
905
906 AdTechnologyProviders *AdTechnologyProviders `json:"adTechnologyProviders,omitempty"`
907
908
909
910
911 ChinaPolicyCompliance *PolicyCompliance `json:"chinaPolicyCompliance,omitempty"`
912
913
914 DealsPolicyCompliance *PolicyCompliance `json:"dealsPolicyCompliance,omitempty"`
915
916 DetectedAdvertisers []*AdvertiserAndBrand `json:"detectedAdvertisers,omitempty"`
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978 DetectedAttributes []string `json:"detectedAttributes,omitempty"`
979
980
981 DetectedClickThroughUrls []string `json:"detectedClickThroughUrls,omitempty"`
982
983 DetectedDomains []string `json:"detectedDomains,omitempty"`
984
985
986
987
988 DetectedLanguages []string `json:"detectedLanguages,omitempty"`
989
990
991
992 DetectedProductCategories []int64 `json:"detectedProductCategories,omitempty"`
993
994
995
996
997
998 DetectedSensitiveCategories []int64 `json:"detectedSensitiveCategories,omitempty"`
999
1000
1001
1002
1003
1004
1005
1006
1007
1008 DetectedVendorIds []int64 `json:"detectedVendorIds,omitempty"`
1009
1010
1011 LastStatusUpdate string `json:"lastStatusUpdate,omitempty"`
1012
1013
1014
1015 NetworkPolicyCompliance *PolicyCompliance `json:"networkPolicyCompliance,omitempty"`
1016
1017
1018
1019 PlatformPolicyCompliance *PolicyCompliance `json:"platformPolicyCompliance,omitempty"`
1020
1021
1022
1023
1024 RussiaPolicyCompliance *PolicyCompliance `json:"russiaPolicyCompliance,omitempty"`
1025
1026
1027
1028
1029
1030 ForceSendFields []string `json:"-"`
1031
1032
1033
1034
1035 NullFields []string `json:"-"`
1036 }
1037
1038 func (s *CreativeServingDecision) MarshalJSON() ([]byte, error) {
1039 type NoMethod CreativeServingDecision
1040 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1041 }
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052 type Date struct {
1053
1054
1055
1056 Day int64 `json:"day,omitempty"`
1057
1058
1059 Month int64 `json:"month,omitempty"`
1060
1061
1062 Year int64 `json:"year,omitempty"`
1063
1064
1065
1066
1067
1068 ForceSendFields []string `json:"-"`
1069
1070
1071
1072
1073 NullFields []string `json:"-"`
1074 }
1075
1076 func (s *Date) MarshalJSON() ([]byte, error) {
1077 type NoMethod Date
1078 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1079 }
1080
1081
1082
1083 type DestinationNotCrawlableEvidence struct {
1084
1085 CrawlTime string `json:"crawlTime,omitempty"`
1086
1087 CrawledUrl string `json:"crawledUrl,omitempty"`
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099 Reason string `json:"reason,omitempty"`
1100
1101
1102
1103
1104
1105 ForceSendFields []string `json:"-"`
1106
1107
1108
1109
1110 NullFields []string `json:"-"`
1111 }
1112
1113 func (s *DestinationNotCrawlableEvidence) MarshalJSON() ([]byte, error) {
1114 type NoMethod DestinationNotCrawlableEvidence
1115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1116 }
1117
1118
1119
1120 type DestinationNotWorkingEvidence struct {
1121
1122
1123
1124
1125
1126
1127
1128
1129 DnsError string `json:"dnsError,omitempty"`
1130
1131 ExpandedUrl string `json:"expandedUrl,omitempty"`
1132
1133 HttpError int64 `json:"httpError,omitempty"`
1134
1135
1136
1137
1138
1139
1140 InvalidPage string `json:"invalidPage,omitempty"`
1141
1142 LastCheckTime string `json:"lastCheckTime,omitempty"`
1143
1144
1145
1146
1147
1148
1149
1150 Platform string `json:"platform,omitempty"`
1151
1152
1153
1154
1155
1156
1157
1158
1159 RedirectionError string `json:"redirectionError,omitempty"`
1160
1161
1162
1163
1164
1165
1166
1167 UrlRejected string `json:"urlRejected,omitempty"`
1168
1169
1170
1171
1172
1173 ForceSendFields []string `json:"-"`
1174
1175
1176
1177
1178 NullFields []string `json:"-"`
1179 }
1180
1181 func (s *DestinationNotWorkingEvidence) MarshalJSON() ([]byte, error) {
1182 type NoMethod DestinationNotWorkingEvidence
1183 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1184 }
1185
1186
1187 type DestinationUrlEvidence struct {
1188
1189 DestinationUrl string `json:"destinationUrl,omitempty"`
1190
1191
1192
1193
1194
1195 ForceSendFields []string `json:"-"`
1196
1197
1198
1199
1200 NullFields []string `json:"-"`
1201 }
1202
1203 func (s *DestinationUrlEvidence) MarshalJSON() ([]byte, error) {
1204 type NoMethod DestinationUrlEvidence
1205 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1206 }
1207
1208
1209
1210 type DomainCallEvidence struct {
1211
1212
1213 TopHttpCallDomains []*DomainCalls `json:"topHttpCallDomains,omitempty"`
1214
1215
1216
1217 TotalHttpCallCount int64 `json:"totalHttpCallCount,omitempty"`
1218
1219
1220
1221
1222
1223 ForceSendFields []string `json:"-"`
1224
1225
1226
1227
1228 NullFields []string `json:"-"`
1229 }
1230
1231 func (s *DomainCallEvidence) MarshalJSON() ([]byte, error) {
1232 type NoMethod DomainCallEvidence
1233 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1234 }
1235
1236
1237 type DomainCalls struct {
1238
1239 Domain string `json:"domain,omitempty"`
1240
1241 HttpCallCount int64 `json:"httpCallCount,omitempty"`
1242
1243
1244
1245
1246
1247 ForceSendFields []string `json:"-"`
1248
1249
1250
1251
1252 NullFields []string `json:"-"`
1253 }
1254
1255 func (s *DomainCalls) MarshalJSON() ([]byte, error) {
1256 type NoMethod DomainCalls
1257 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1258 }
1259
1260
1261
1262 type DownloadSizeEvidence struct {
1263
1264
1265 TopUrlDownloadSizeBreakdowns []*UrlDownloadSize `json:"topUrlDownloadSizeBreakdowns,omitempty"`
1266
1267
1268 TotalDownloadSizeKb int64 `json:"totalDownloadSizeKb,omitempty"`
1269
1270
1271
1272
1273
1274 ForceSendFields []string `json:"-"`
1275
1276
1277
1278
1279 NullFields []string `json:"-"`
1280 }
1281
1282 func (s *DownloadSizeEvidence) MarshalJSON() ([]byte, error) {
1283 type NoMethod DownloadSizeEvidence
1284 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1285 }
1286
1287
1288
1289
1290
1291 type Empty struct {
1292
1293 googleapi.ServerResponse `json:"-"`
1294 }
1295
1296
1297 type Endpoint struct {
1298
1299
1300
1301
1302
1303
1304
1305
1306 BidProtocol string `json:"bidProtocol,omitempty"`
1307
1308
1309 MaximumQps int64 `json:"maximumQps,omitempty,string"`
1310
1311
1312
1313
1314 Name string `json:"name,omitempty"`
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327 TradingLocation string `json:"tradingLocation,omitempty"`
1328
1329 Url string `json:"url,omitempty"`
1330
1331
1332 googleapi.ServerResponse `json:"-"`
1333
1334
1335
1336
1337
1338 ForceSendFields []string `json:"-"`
1339
1340
1341
1342
1343 NullFields []string `json:"-"`
1344 }
1345
1346 func (s *Endpoint) MarshalJSON() ([]byte, error) {
1347 type NoMethod Endpoint
1348 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1349 }
1350
1351
1352
1353
1354
1355
1356 type GetRemarketingTagResponse struct {
1357
1358
1359
1360
1361 Snippet string `json:"snippet,omitempty"`
1362
1363
1364 googleapi.ServerResponse `json:"-"`
1365
1366
1367
1368
1369
1370 ForceSendFields []string `json:"-"`
1371
1372
1373
1374
1375 NullFields []string `json:"-"`
1376 }
1377
1378 func (s *GetRemarketingTagResponse) MarshalJSON() ([]byte, error) {
1379 type NoMethod GetRemarketingTagResponse
1380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1381 }
1382
1383
1384 type HtmlContent struct {
1385
1386
1387 Height int64 `json:"height,omitempty"`
1388
1389
1390 Snippet string `json:"snippet,omitempty"`
1391
1392
1393 Width int64 `json:"width,omitempty"`
1394
1395
1396
1397
1398
1399 ForceSendFields []string `json:"-"`
1400
1401
1402
1403
1404 NullFields []string `json:"-"`
1405 }
1406
1407 func (s *HtmlContent) MarshalJSON() ([]byte, error) {
1408 type NoMethod HtmlContent
1409 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1410 }
1411
1412
1413
1414 type HttpCallEvidence struct {
1415
1416 Urls []string `json:"urls,omitempty"`
1417
1418
1419
1420
1421
1422 ForceSendFields []string `json:"-"`
1423
1424
1425
1426
1427 NullFields []string `json:"-"`
1428 }
1429
1430 func (s *HttpCallEvidence) MarshalJSON() ([]byte, error) {
1431 type NoMethod HttpCallEvidence
1432 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1433 }
1434
1435
1436 type HttpCookieEvidence struct {
1437
1438
1439
1440
1441 CookieNames []string `json:"cookieNames,omitempty"`
1442
1443
1444
1445
1446 MaxCookieCount int64 `json:"maxCookieCount,omitempty"`
1447
1448
1449
1450
1451
1452 ForceSendFields []string `json:"-"`
1453
1454
1455
1456
1457 NullFields []string `json:"-"`
1458 }
1459
1460 func (s *HttpCookieEvidence) MarshalJSON() ([]byte, error) {
1461 type NoMethod HttpCookieEvidence
1462 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1463 }
1464
1465
1466
1467 type Image struct {
1468
1469 Height int64 `json:"height,omitempty"`
1470
1471 Url string `json:"url,omitempty"`
1472
1473 Width int64 `json:"width,omitempty"`
1474
1475
1476
1477
1478
1479 ForceSendFields []string `json:"-"`
1480
1481
1482
1483
1484 NullFields []string `json:"-"`
1485 }
1486
1487 func (s *Image) MarshalJSON() ([]byte, error) {
1488 type NoMethod Image
1489 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1490 }
1491
1492
1493 type ListBiddersResponse struct {
1494
1495 Bidders []*Bidder `json:"bidders,omitempty"`
1496
1497
1498
1499 NextPageToken string `json:"nextPageToken,omitempty"`
1500
1501
1502 googleapi.ServerResponse `json:"-"`
1503
1504
1505
1506
1507
1508 ForceSendFields []string `json:"-"`
1509
1510
1511
1512
1513 NullFields []string `json:"-"`
1514 }
1515
1516 func (s *ListBiddersResponse) MarshalJSON() ([]byte, error) {
1517 type NoMethod ListBiddersResponse
1518 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1519 }
1520
1521
1522 type ListBuyersResponse struct {
1523
1524 Buyers []*Buyer `json:"buyers,omitempty"`
1525
1526
1527
1528 NextPageToken string `json:"nextPageToken,omitempty"`
1529
1530
1531 googleapi.ServerResponse `json:"-"`
1532
1533
1534
1535
1536
1537 ForceSendFields []string `json:"-"`
1538
1539
1540
1541
1542 NullFields []string `json:"-"`
1543 }
1544
1545 func (s *ListBuyersResponse) MarshalJSON() ([]byte, error) {
1546 type NoMethod ListBuyersResponse
1547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1548 }
1549
1550
1551 type ListCreativesResponse struct {
1552
1553 Creatives []*Creative `json:"creatives,omitempty"`
1554
1555
1556
1557 NextPageToken string `json:"nextPageToken,omitempty"`
1558
1559
1560 googleapi.ServerResponse `json:"-"`
1561
1562
1563
1564
1565
1566 ForceSendFields []string `json:"-"`
1567
1568
1569
1570
1571 NullFields []string `json:"-"`
1572 }
1573
1574 func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) {
1575 type NoMethod ListCreativesResponse
1576 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1577 }
1578
1579
1580 type ListEndpointsResponse struct {
1581
1582 Endpoints []*Endpoint `json:"endpoints,omitempty"`
1583
1584
1585
1586 NextPageToken string `json:"nextPageToken,omitempty"`
1587
1588
1589 googleapi.ServerResponse `json:"-"`
1590
1591
1592
1593
1594
1595 ForceSendFields []string `json:"-"`
1596
1597
1598
1599
1600 NullFields []string `json:"-"`
1601 }
1602
1603 func (s *ListEndpointsResponse) MarshalJSON() ([]byte, error) {
1604 type NoMethod ListEndpointsResponse
1605 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1606 }
1607
1608
1609
1610 type ListPretargetingConfigsResponse struct {
1611
1612
1613
1614 NextPageToken string `json:"nextPageToken,omitempty"`
1615
1616 PretargetingConfigs []*PretargetingConfig `json:"pretargetingConfigs,omitempty"`
1617
1618
1619 googleapi.ServerResponse `json:"-"`
1620
1621
1622
1623
1624
1625 ForceSendFields []string `json:"-"`
1626
1627
1628
1629
1630 NullFields []string `json:"-"`
1631 }
1632
1633 func (s *ListPretargetingConfigsResponse) MarshalJSON() ([]byte, error) {
1634 type NoMethod ListPretargetingConfigsResponse
1635 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1636 }
1637
1638
1639
1640 type ListPublisherConnectionsResponse struct {
1641
1642
1643
1644
1645 NextPageToken string `json:"nextPageToken,omitempty"`
1646
1647 PublisherConnections []*PublisherConnection `json:"publisherConnections,omitempty"`
1648
1649
1650 googleapi.ServerResponse `json:"-"`
1651
1652
1653
1654
1655
1656 ForceSendFields []string `json:"-"`
1657
1658
1659
1660
1661 NullFields []string `json:"-"`
1662 }
1663
1664 func (s *ListPublisherConnectionsResponse) MarshalJSON() ([]byte, error) {
1665 type NoMethod ListPublisherConnectionsResponse
1666 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1667 }
1668
1669
1670 type ListUserListsResponse struct {
1671
1672
1673
1674
1675 NextPageToken string `json:"nextPageToken,omitempty"`
1676
1677 UserLists []*UserList `json:"userLists,omitempty"`
1678
1679
1680 googleapi.ServerResponse `json:"-"`
1681
1682
1683
1684
1685
1686 ForceSendFields []string `json:"-"`
1687
1688
1689
1690
1691 NullFields []string `json:"-"`
1692 }
1693
1694 func (s *ListUserListsResponse) MarshalJSON() ([]byte, error) {
1695 type NoMethod ListUserListsResponse
1696 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1697 }
1698
1699
1700 type MediaFile struct {
1701
1702
1703 Bitrate int64 `json:"bitrate,omitempty,string"`
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726 MimeType string `json:"mimeType,omitempty"`
1727
1728
1729
1730
1731
1732 ForceSendFields []string `json:"-"`
1733
1734
1735
1736
1737 NullFields []string `json:"-"`
1738 }
1739
1740 func (s *MediaFile) MarshalJSON() ([]byte, error) {
1741 type NoMethod MediaFile
1742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1743 }
1744
1745
1746 type NativeContent struct {
1747
1748
1749 AdvertiserName string `json:"advertiserName,omitempty"`
1750
1751 AppIcon *Image `json:"appIcon,omitempty"`
1752
1753 Body string `json:"body,omitempty"`
1754
1755 CallToAction string `json:"callToAction,omitempty"`
1756
1757
1758 ClickLinkUrl string `json:"clickLinkUrl,omitempty"`
1759
1760 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
1761
1762 Headline string `json:"headline,omitempty"`
1763
1764 Image *Image `json:"image,omitempty"`
1765
1766 Logo *Image `json:"logo,omitempty"`
1767
1768 PriceDisplayText string `json:"priceDisplayText,omitempty"`
1769
1770 StarRating float64 `json:"starRating,omitempty"`
1771
1772 VideoUrl string `json:"videoUrl,omitempty"`
1773
1774 VideoVastXml string `json:"videoVastXml,omitempty"`
1775
1776
1777
1778
1779
1780 ForceSendFields []string `json:"-"`
1781
1782
1783
1784
1785 NullFields []string `json:"-"`
1786 }
1787
1788 func (s *NativeContent) MarshalJSON() ([]byte, error) {
1789 type NoMethod NativeContent
1790 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1791 }
1792
1793 func (s *NativeContent) UnmarshalJSON(data []byte) error {
1794 type NoMethod NativeContent
1795 var s1 struct {
1796 StarRating gensupport.JSONFloat64 `json:"starRating"`
1797 *NoMethod
1798 }
1799 s1.NoMethod = (*NoMethod)(s)
1800 if err := json.Unmarshal(data, &s1); err != nil {
1801 return err
1802 }
1803 s.StarRating = float64(s1.StarRating)
1804 return nil
1805 }
1806
1807
1808
1809
1810 type NumericTargetingDimension struct {
1811
1812 ExcludedIds googleapi.Int64s `json:"excludedIds,omitempty"`
1813
1814 IncludedIds googleapi.Int64s `json:"includedIds,omitempty"`
1815
1816
1817
1818
1819
1820 ForceSendFields []string `json:"-"`
1821
1822
1823
1824
1825 NullFields []string `json:"-"`
1826 }
1827
1828 func (s *NumericTargetingDimension) MarshalJSON() ([]byte, error) {
1829 type NoMethod NumericTargetingDimension
1830 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1831 }
1832
1833
1834 type OpenUserListRequest struct {
1835 }
1836
1837
1838
1839 type PolicyCompliance struct {
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852 Status string `json:"status,omitempty"`
1853
1854
1855
1856 Topics []*PolicyTopicEntry `json:"topics,omitempty"`
1857
1858
1859
1860
1861
1862 ForceSendFields []string `json:"-"`
1863
1864
1865
1866
1867 NullFields []string `json:"-"`
1868 }
1869
1870 func (s *PolicyCompliance) MarshalJSON() ([]byte, error) {
1871 type NoMethod PolicyCompliance
1872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1873 }
1874
1875
1876
1877
1878 type PolicyTopicEntry struct {
1879
1880 Evidences []*PolicyTopicEvidence `json:"evidences,omitempty"`
1881
1882 HelpCenterUrl string `json:"helpCenterUrl,omitempty"`
1883
1884
1885
1886
1887 MissingCertificate bool `json:"missingCertificate,omitempty"`
1888
1889
1890
1891
1892 PolicyTopic string `json:"policyTopic,omitempty"`
1893
1894
1895
1896
1897
1898 ForceSendFields []string `json:"-"`
1899
1900
1901
1902
1903 NullFields []string `json:"-"`
1904 }
1905
1906 func (s *PolicyTopicEntry) MarshalJSON() ([]byte, error) {
1907 type NoMethod PolicyTopicEntry
1908 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1909 }
1910
1911
1912 type PolicyTopicEvidence struct {
1913
1914
1915 DestinationNotCrawlable *DestinationNotCrawlableEvidence `json:"destinationNotCrawlable,omitempty"`
1916
1917
1918 DestinationNotWorking *DestinationNotWorkingEvidence `json:"destinationNotWorking,omitempty"`
1919
1920 DestinationUrl *DestinationUrlEvidence `json:"destinationUrl,omitempty"`
1921
1922
1923 DomainCall *DomainCallEvidence `json:"domainCall,omitempty"`
1924
1925
1926 DownloadSize *DownloadSizeEvidence `json:"downloadSize,omitempty"`
1927
1928
1929 HttpCall *HttpCallEvidence `json:"httpCall,omitempty"`
1930
1931 HttpCookie *HttpCookieEvidence `json:"httpCookie,omitempty"`
1932
1933
1934
1935
1936
1937 ForceSendFields []string `json:"-"`
1938
1939
1940
1941
1942 NullFields []string `json:"-"`
1943 }
1944
1945 func (s *PolicyTopicEvidence) MarshalJSON() ([]byte, error) {
1946 type NoMethod PolicyTopicEvidence
1947 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1948 }
1949
1950
1951
1952
1953 type PretargetingConfig struct {
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965 AllowedUserTargetingModes []string `json:"allowedUserTargetingModes,omitempty"`
1966
1967
1968
1969
1970
1971
1972
1973 AppTargeting *AppTargeting `json:"appTargeting,omitempty"`
1974
1975
1976
1977
1978
1979 BillingId int64 `json:"billingId,omitempty,string"`
1980
1981
1982 DisplayName string `json:"displayName,omitempty"`
1983
1984
1985
1986
1987
1988 ExcludedContentLabelIds googleapi.Int64s `json:"excludedContentLabelIds,omitempty"`
1989
1990
1991 GeoTargeting *NumericTargetingDimension `json:"geoTargeting,omitempty"`
1992
1993
1994
1995
1996 IncludedCreativeDimensions []*CreativeDimensions `json:"includedCreativeDimensions,omitempty"`
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007 IncludedEnvironments []string `json:"includedEnvironments,omitempty"`
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019 IncludedFormats []string `json:"includedFormats,omitempty"`
2020
2021
2022
2023 IncludedLanguages []string `json:"includedLanguages,omitempty"`
2024
2025
2026
2027 IncludedMobileOperatingSystemIds googleapi.Int64s `json:"includedMobileOperatingSystemIds,omitempty"`
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039 IncludedPlatforms []string `json:"includedPlatforms,omitempty"`
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053 IncludedUserIdTypes []string `json:"includedUserIdTypes,omitempty"`
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065 InterstitialTargeting string `json:"interstitialTargeting,omitempty"`
2066
2067
2068
2069 InvalidGeoIds googleapi.Int64s `json:"invalidGeoIds,omitempty"`
2070
2071
2072
2073
2074
2075 MaximumQps int64 `json:"maximumQps,omitempty,string"`
2076
2077
2078
2079
2080
2081 MinimumViewabilityDecile int64 `json:"minimumViewabilityDecile,omitempty"`
2082
2083
2084 Name string `json:"name,omitempty"`
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098 PublisherTargeting *StringTargetingDimension `json:"publisherTargeting,omitempty"`
2099
2100
2101
2102
2103
2104
2105
2106
2107 State string `json:"state,omitempty"`
2108
2109
2110 UserListTargeting *NumericTargetingDimension `json:"userListTargeting,omitempty"`
2111
2112
2113
2114 VerticalTargeting *NumericTargetingDimension `json:"verticalTargeting,omitempty"`
2115
2116
2117
2118
2119
2120
2121
2122 WebTargeting *StringTargetingDimension `json:"webTargeting,omitempty"`
2123
2124
2125 googleapi.ServerResponse `json:"-"`
2126
2127
2128
2129
2130
2131 ForceSendFields []string `json:"-"`
2132
2133
2134
2135
2136 NullFields []string `json:"-"`
2137 }
2138
2139 func (s *PretargetingConfig) MarshalJSON() ([]byte, error) {
2140 type NoMethod PretargetingConfig
2141 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2142 }
2143
2144
2145
2146
2147
2148 type PublisherConnection struct {
2149
2150
2151
2152
2153
2154
2155
2156
2157 BiddingState string `json:"biddingState,omitempty"`
2158
2159
2160
2161
2162 CreateTime string `json:"createTime,omitempty"`
2163
2164 DisplayName string `json:"displayName,omitempty"`
2165
2166
2167
2168
2169 Name string `json:"name,omitempty"`
2170
2171
2172
2173
2174
2175
2176
2177 PublisherPlatform string `json:"publisherPlatform,omitempty"`
2178
2179
2180 googleapi.ServerResponse `json:"-"`
2181
2182
2183
2184
2185
2186 ForceSendFields []string `json:"-"`
2187
2188
2189
2190
2191 NullFields []string `json:"-"`
2192 }
2193
2194 func (s *PublisherConnection) MarshalJSON() ([]byte, error) {
2195 type NoMethod PublisherConnection
2196 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2197 }
2198
2199
2200
2201
2202
2203 type RemoveTargetedAppsRequest struct {
2204
2205
2206
2207 AppIds []string `json:"appIds,omitempty"`
2208
2209
2210
2211
2212
2213 ForceSendFields []string `json:"-"`
2214
2215
2216
2217
2218 NullFields []string `json:"-"`
2219 }
2220
2221 func (s *RemoveTargetedAppsRequest) MarshalJSON() ([]byte, error) {
2222 type NoMethod RemoveTargetedAppsRequest
2223 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2224 }
2225
2226
2227
2228
2229 type RemoveTargetedPublishersRequest struct {
2230
2231
2232
2233
2234
2235
2236 PublisherIds []string `json:"publisherIds,omitempty"`
2237
2238
2239
2240
2241
2242 ForceSendFields []string `json:"-"`
2243
2244
2245
2246
2247 NullFields []string `json:"-"`
2248 }
2249
2250 func (s *RemoveTargetedPublishersRequest) MarshalJSON() ([]byte, error) {
2251 type NoMethod RemoveTargetedPublishersRequest
2252 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2253 }
2254
2255
2256
2257
2258 type RemoveTargetedSitesRequest struct {
2259
2260
2261
2262 Sites []string `json:"sites,omitempty"`
2263
2264
2265
2266
2267
2268 ForceSendFields []string `json:"-"`
2269
2270
2271
2272
2273 NullFields []string `json:"-"`
2274 }
2275
2276 func (s *RemoveTargetedSitesRequest) MarshalJSON() ([]byte, error) {
2277 type NoMethod RemoveTargetedSitesRequest
2278 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2279 }
2280
2281
2282
2283 type StringTargetingDimension struct {
2284
2285
2286
2287
2288
2289
2290
2291
2292 TargetingMode string `json:"targetingMode,omitempty"`
2293
2294 Values []string `json:"values,omitempty"`
2295
2296
2297
2298
2299
2300 ForceSendFields []string `json:"-"`
2301
2302
2303
2304
2305 NullFields []string `json:"-"`
2306 }
2307
2308 func (s *StringTargetingDimension) MarshalJSON() ([]byte, error) {
2309 type NoMethod StringTargetingDimension
2310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2311 }
2312
2313
2314
2315 type SuspendPretargetingConfigRequest struct {
2316 }
2317
2318
2319 type UrlDownloadSize struct {
2320
2321 DownloadSizeKb int64 `json:"downloadSizeKb,omitempty"`
2322
2323
2324 NormalizedUrl string `json:"normalizedUrl,omitempty"`
2325
2326
2327
2328
2329
2330 ForceSendFields []string `json:"-"`
2331
2332
2333
2334
2335 NullFields []string `json:"-"`
2336 }
2337
2338 func (s *UrlDownloadSize) MarshalJSON() ([]byte, error) {
2339 type NoMethod UrlDownloadSize
2340 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2341 }
2342
2343
2344
2345
2346
2347
2348 type UrlRestriction struct {
2349
2350
2351 EndDate *Date `json:"endDate,omitempty"`
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372 RestrictionType string `json:"restrictionType,omitempty"`
2373
2374 StartDate *Date `json:"startDate,omitempty"`
2375
2376 Url string `json:"url,omitempty"`
2377
2378
2379
2380
2381
2382 ForceSendFields []string `json:"-"`
2383
2384
2385
2386
2387 NullFields []string `json:"-"`
2388 }
2389
2390 func (s *UrlRestriction) MarshalJSON() ([]byte, error) {
2391 type NoMethod UrlRestriction
2392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2393 }
2394
2395
2396
2397
2398
2399
2400 type UserList struct {
2401
2402 Description string `json:"description,omitempty"`
2403
2404
2405 DisplayName string `json:"displayName,omitempty"`
2406
2407
2408 MembershipDurationDays int64 `json:"membershipDurationDays,omitempty,string"`
2409
2410
2411
2412
2413
2414
2415 Name string `json:"name,omitempty"`
2416
2417
2418
2419
2420
2421
2422
2423 Status string `json:"status,omitempty"`
2424
2425
2426
2427
2428 UrlRestriction *UrlRestriction `json:"urlRestriction,omitempty"`
2429
2430
2431 googleapi.ServerResponse `json:"-"`
2432
2433
2434
2435
2436
2437 ForceSendFields []string `json:"-"`
2438
2439
2440
2441
2442 NullFields []string `json:"-"`
2443 }
2444
2445 func (s *UserList) MarshalJSON() ([]byte, error) {
2446 type NoMethod UserList
2447 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2448 }
2449
2450
2451 type VideoContent struct {
2452
2453 VideoMetadata *VideoMetadata `json:"videoMetadata,omitempty"`
2454
2455 VideoUrl string `json:"videoUrl,omitempty"`
2456
2457
2458 VideoVastXml string `json:"videoVastXml,omitempty"`
2459
2460
2461
2462
2463
2464 ForceSendFields []string `json:"-"`
2465
2466
2467
2468
2469 NullFields []string `json:"-"`
2470 }
2471
2472 func (s *VideoContent) MarshalJSON() ([]byte, error) {
2473 type NoMethod VideoContent
2474 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2475 }
2476
2477
2478 type VideoMetadata struct {
2479
2480
2481 Duration string `json:"duration,omitempty"`
2482
2483
2484 IsValidVast bool `json:"isValidVast,omitempty"`
2485
2486
2487 IsVpaid bool `json:"isVpaid,omitempty"`
2488
2489
2490
2491 MediaFiles []*MediaFile `json:"mediaFiles,omitempty"`
2492
2493
2494
2495
2496 SkipOffset string `json:"skipOffset,omitempty"`
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506 VastVersion string `json:"vastVersion,omitempty"`
2507
2508
2509
2510
2511
2512 ForceSendFields []string `json:"-"`
2513
2514
2515
2516
2517 NullFields []string `json:"-"`
2518 }
2519
2520 func (s *VideoMetadata) MarshalJSON() ([]byte, error) {
2521 type NoMethod VideoMetadata
2522 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2523 }
2524
2525
2526
2527 type WatchCreativesRequest struct {
2528 }
2529
2530
2531
2532 type WatchCreativesResponse struct {
2533
2534
2535
2536
2537
2538
2539
2540 Subscription string `json:"subscription,omitempty"`
2541
2542
2543
2544 Topic string `json:"topic,omitempty"`
2545
2546
2547 googleapi.ServerResponse `json:"-"`
2548
2549
2550
2551
2552
2553 ForceSendFields []string `json:"-"`
2554
2555
2556
2557
2558 NullFields []string `json:"-"`
2559 }
2560
2561 func (s *WatchCreativesResponse) MarshalJSON() ([]byte, error) {
2562 type NoMethod WatchCreativesResponse
2563 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2564 }
2565
2566 type BiddersGetCall struct {
2567 s *Service
2568 name string
2569 urlParams_ gensupport.URLParams
2570 ifNoneMatch_ string
2571 ctx_ context.Context
2572 header_ http.Header
2573 }
2574
2575
2576
2577
2578 func (r *BiddersService) Get(name string) *BiddersGetCall {
2579 c := &BiddersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2580 c.name = name
2581 return c
2582 }
2583
2584
2585
2586
2587 func (c *BiddersGetCall) Fields(s ...googleapi.Field) *BiddersGetCall {
2588 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2589 return c
2590 }
2591
2592
2593
2594
2595 func (c *BiddersGetCall) IfNoneMatch(entityTag string) *BiddersGetCall {
2596 c.ifNoneMatch_ = entityTag
2597 return c
2598 }
2599
2600
2601 func (c *BiddersGetCall) Context(ctx context.Context) *BiddersGetCall {
2602 c.ctx_ = ctx
2603 return c
2604 }
2605
2606
2607
2608 func (c *BiddersGetCall) Header() http.Header {
2609 if c.header_ == nil {
2610 c.header_ = make(http.Header)
2611 }
2612 return c.header_
2613 }
2614
2615 func (c *BiddersGetCall) doRequest(alt string) (*http.Response, error) {
2616 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2617 if c.ifNoneMatch_ != "" {
2618 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2619 }
2620 var body io.Reader = nil
2621 c.urlParams_.Set("alt", alt)
2622 c.urlParams_.Set("prettyPrint", "false")
2623 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2624 urls += "?" + c.urlParams_.Encode()
2625 req, err := http.NewRequest("GET", urls, body)
2626 if err != nil {
2627 return nil, err
2628 }
2629 req.Header = reqHeaders
2630 googleapi.Expand(req.URL, map[string]string{
2631 "name": c.name,
2632 })
2633 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2634 }
2635
2636
2637
2638
2639
2640
2641 func (c *BiddersGetCall) Do(opts ...googleapi.CallOption) (*Bidder, error) {
2642 gensupport.SetOptions(c.urlParams_, opts...)
2643 res, err := c.doRequest("json")
2644 if res != nil && res.StatusCode == http.StatusNotModified {
2645 if res.Body != nil {
2646 res.Body.Close()
2647 }
2648 return nil, gensupport.WrapError(&googleapi.Error{
2649 Code: res.StatusCode,
2650 Header: res.Header,
2651 })
2652 }
2653 if err != nil {
2654 return nil, err
2655 }
2656 defer googleapi.CloseBody(res)
2657 if err := googleapi.CheckResponse(res); err != nil {
2658 return nil, gensupport.WrapError(err)
2659 }
2660 ret := &Bidder{
2661 ServerResponse: googleapi.ServerResponse{
2662 Header: res.Header,
2663 HTTPStatusCode: res.StatusCode,
2664 },
2665 }
2666 target := &ret
2667 if err := gensupport.DecodeResponse(target, res); err != nil {
2668 return nil, err
2669 }
2670 return ret, nil
2671 }
2672
2673 type BiddersListCall struct {
2674 s *Service
2675 urlParams_ gensupport.URLParams
2676 ifNoneMatch_ string
2677 ctx_ context.Context
2678 header_ http.Header
2679 }
2680
2681
2682 func (r *BiddersService) List() *BiddersListCall {
2683 c := &BiddersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2684 return c
2685 }
2686
2687
2688
2689
2690 func (c *BiddersListCall) PageSize(pageSize int64) *BiddersListCall {
2691 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2692 return c
2693 }
2694
2695
2696
2697
2698 func (c *BiddersListCall) PageToken(pageToken string) *BiddersListCall {
2699 c.urlParams_.Set("pageToken", pageToken)
2700 return c
2701 }
2702
2703
2704
2705
2706 func (c *BiddersListCall) Fields(s ...googleapi.Field) *BiddersListCall {
2707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2708 return c
2709 }
2710
2711
2712
2713
2714 func (c *BiddersListCall) IfNoneMatch(entityTag string) *BiddersListCall {
2715 c.ifNoneMatch_ = entityTag
2716 return c
2717 }
2718
2719
2720 func (c *BiddersListCall) Context(ctx context.Context) *BiddersListCall {
2721 c.ctx_ = ctx
2722 return c
2723 }
2724
2725
2726
2727 func (c *BiddersListCall) Header() http.Header {
2728 if c.header_ == nil {
2729 c.header_ = make(http.Header)
2730 }
2731 return c.header_
2732 }
2733
2734 func (c *BiddersListCall) doRequest(alt string) (*http.Response, error) {
2735 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2736 if c.ifNoneMatch_ != "" {
2737 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2738 }
2739 var body io.Reader = nil
2740 c.urlParams_.Set("alt", alt)
2741 c.urlParams_.Set("prettyPrint", "false")
2742 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/bidders")
2743 urls += "?" + c.urlParams_.Encode()
2744 req, err := http.NewRequest("GET", urls, body)
2745 if err != nil {
2746 return nil, err
2747 }
2748 req.Header = reqHeaders
2749 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2750 }
2751
2752
2753
2754
2755
2756
2757
2758 func (c *BiddersListCall) Do(opts ...googleapi.CallOption) (*ListBiddersResponse, error) {
2759 gensupport.SetOptions(c.urlParams_, opts...)
2760 res, err := c.doRequest("json")
2761 if res != nil && res.StatusCode == http.StatusNotModified {
2762 if res.Body != nil {
2763 res.Body.Close()
2764 }
2765 return nil, gensupport.WrapError(&googleapi.Error{
2766 Code: res.StatusCode,
2767 Header: res.Header,
2768 })
2769 }
2770 if err != nil {
2771 return nil, err
2772 }
2773 defer googleapi.CloseBody(res)
2774 if err := googleapi.CheckResponse(res); err != nil {
2775 return nil, gensupport.WrapError(err)
2776 }
2777 ret := &ListBiddersResponse{
2778 ServerResponse: googleapi.ServerResponse{
2779 Header: res.Header,
2780 HTTPStatusCode: res.StatusCode,
2781 },
2782 }
2783 target := &ret
2784 if err := gensupport.DecodeResponse(target, res); err != nil {
2785 return nil, err
2786 }
2787 return ret, nil
2788 }
2789
2790
2791
2792
2793 func (c *BiddersListCall) Pages(ctx context.Context, f func(*ListBiddersResponse) error) error {
2794 c.ctx_ = ctx
2795 defer c.PageToken(c.urlParams_.Get("pageToken"))
2796 for {
2797 x, err := c.Do()
2798 if err != nil {
2799 return err
2800 }
2801 if err := f(x); err != nil {
2802 return err
2803 }
2804 if x.NextPageToken == "" {
2805 return nil
2806 }
2807 c.PageToken(x.NextPageToken)
2808 }
2809 }
2810
2811 type BiddersCreativesListCall struct {
2812 s *Service
2813 parent string
2814 urlParams_ gensupport.URLParams
2815 ifNoneMatch_ string
2816 ctx_ context.Context
2817 header_ http.Header
2818 }
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839 func (r *BiddersCreativesService) List(parent string) *BiddersCreativesListCall {
2840 c := &BiddersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2841 c.parent = parent
2842 return c
2843 }
2844
2845
2846
2847
2848
2849
2850 func (c *BiddersCreativesListCall) Filter(filter string) *BiddersCreativesListCall {
2851 c.urlParams_.Set("filter", filter)
2852 return c
2853 }
2854
2855
2856
2857
2858
2859 func (c *BiddersCreativesListCall) PageSize(pageSize int64) *BiddersCreativesListCall {
2860 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2861 return c
2862 }
2863
2864
2865
2866
2867
2868
2869 func (c *BiddersCreativesListCall) PageToken(pageToken string) *BiddersCreativesListCall {
2870 c.urlParams_.Set("pageToken", pageToken)
2871 return c
2872 }
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892 func (c *BiddersCreativesListCall) View(view string) *BiddersCreativesListCall {
2893 c.urlParams_.Set("view", view)
2894 return c
2895 }
2896
2897
2898
2899
2900 func (c *BiddersCreativesListCall) Fields(s ...googleapi.Field) *BiddersCreativesListCall {
2901 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2902 return c
2903 }
2904
2905
2906
2907
2908 func (c *BiddersCreativesListCall) IfNoneMatch(entityTag string) *BiddersCreativesListCall {
2909 c.ifNoneMatch_ = entityTag
2910 return c
2911 }
2912
2913
2914 func (c *BiddersCreativesListCall) Context(ctx context.Context) *BiddersCreativesListCall {
2915 c.ctx_ = ctx
2916 return c
2917 }
2918
2919
2920
2921 func (c *BiddersCreativesListCall) Header() http.Header {
2922 if c.header_ == nil {
2923 c.header_ = make(http.Header)
2924 }
2925 return c.header_
2926 }
2927
2928 func (c *BiddersCreativesListCall) doRequest(alt string) (*http.Response, error) {
2929 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2930 if c.ifNoneMatch_ != "" {
2931 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2932 }
2933 var body io.Reader = nil
2934 c.urlParams_.Set("alt", alt)
2935 c.urlParams_.Set("prettyPrint", "false")
2936 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/creatives")
2937 urls += "?" + c.urlParams_.Encode()
2938 req, err := http.NewRequest("GET", urls, body)
2939 if err != nil {
2940 return nil, err
2941 }
2942 req.Header = reqHeaders
2943 googleapi.Expand(req.URL, map[string]string{
2944 "parent": c.parent,
2945 })
2946 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2947 }
2948
2949
2950
2951
2952
2953
2954
2955 func (c *BiddersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) {
2956 gensupport.SetOptions(c.urlParams_, opts...)
2957 res, err := c.doRequest("json")
2958 if res != nil && res.StatusCode == http.StatusNotModified {
2959 if res.Body != nil {
2960 res.Body.Close()
2961 }
2962 return nil, gensupport.WrapError(&googleapi.Error{
2963 Code: res.StatusCode,
2964 Header: res.Header,
2965 })
2966 }
2967 if err != nil {
2968 return nil, err
2969 }
2970 defer googleapi.CloseBody(res)
2971 if err := googleapi.CheckResponse(res); err != nil {
2972 return nil, gensupport.WrapError(err)
2973 }
2974 ret := &ListCreativesResponse{
2975 ServerResponse: googleapi.ServerResponse{
2976 Header: res.Header,
2977 HTTPStatusCode: res.StatusCode,
2978 },
2979 }
2980 target := &ret
2981 if err := gensupport.DecodeResponse(target, res); err != nil {
2982 return nil, err
2983 }
2984 return ret, nil
2985 }
2986
2987
2988
2989
2990 func (c *BiddersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error {
2991 c.ctx_ = ctx
2992 defer c.PageToken(c.urlParams_.Get("pageToken"))
2993 for {
2994 x, err := c.Do()
2995 if err != nil {
2996 return err
2997 }
2998 if err := f(x); err != nil {
2999 return err
3000 }
3001 if x.NextPageToken == "" {
3002 return nil
3003 }
3004 c.PageToken(x.NextPageToken)
3005 }
3006 }
3007
3008 type BiddersCreativesWatchCall struct {
3009 s *Service
3010 parent string
3011 watchcreativesrequest *WatchCreativesRequest
3012 urlParams_ gensupport.URLParams
3013 ctx_ context.Context
3014 header_ http.Header
3015 }
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027 func (r *BiddersCreativesService) Watch(parent string, watchcreativesrequest *WatchCreativesRequest) *BiddersCreativesWatchCall {
3028 c := &BiddersCreativesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3029 c.parent = parent
3030 c.watchcreativesrequest = watchcreativesrequest
3031 return c
3032 }
3033
3034
3035
3036
3037 func (c *BiddersCreativesWatchCall) Fields(s ...googleapi.Field) *BiddersCreativesWatchCall {
3038 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3039 return c
3040 }
3041
3042
3043 func (c *BiddersCreativesWatchCall) Context(ctx context.Context) *BiddersCreativesWatchCall {
3044 c.ctx_ = ctx
3045 return c
3046 }
3047
3048
3049
3050 func (c *BiddersCreativesWatchCall) Header() http.Header {
3051 if c.header_ == nil {
3052 c.header_ = make(http.Header)
3053 }
3054 return c.header_
3055 }
3056
3057 func (c *BiddersCreativesWatchCall) doRequest(alt string) (*http.Response, error) {
3058 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3059 var body io.Reader = nil
3060 body, err := googleapi.WithoutDataWrapper.JSONReader(c.watchcreativesrequest)
3061 if err != nil {
3062 return nil, err
3063 }
3064 c.urlParams_.Set("alt", alt)
3065 c.urlParams_.Set("prettyPrint", "false")
3066 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/creatives:watch")
3067 urls += "?" + c.urlParams_.Encode()
3068 req, err := http.NewRequest("POST", urls, body)
3069 if err != nil {
3070 return nil, err
3071 }
3072 req.Header = reqHeaders
3073 googleapi.Expand(req.URL, map[string]string{
3074 "parent": c.parent,
3075 })
3076 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3077 }
3078
3079
3080
3081
3082
3083
3084
3085 func (c *BiddersCreativesWatchCall) Do(opts ...googleapi.CallOption) (*WatchCreativesResponse, error) {
3086 gensupport.SetOptions(c.urlParams_, opts...)
3087 res, err := c.doRequest("json")
3088 if res != nil && res.StatusCode == http.StatusNotModified {
3089 if res.Body != nil {
3090 res.Body.Close()
3091 }
3092 return nil, gensupport.WrapError(&googleapi.Error{
3093 Code: res.StatusCode,
3094 Header: res.Header,
3095 })
3096 }
3097 if err != nil {
3098 return nil, err
3099 }
3100 defer googleapi.CloseBody(res)
3101 if err := googleapi.CheckResponse(res); err != nil {
3102 return nil, gensupport.WrapError(err)
3103 }
3104 ret := &WatchCreativesResponse{
3105 ServerResponse: googleapi.ServerResponse{
3106 Header: res.Header,
3107 HTTPStatusCode: res.StatusCode,
3108 },
3109 }
3110 target := &ret
3111 if err := gensupport.DecodeResponse(target, res); err != nil {
3112 return nil, err
3113 }
3114 return ret, nil
3115 }
3116
3117 type BiddersEndpointsGetCall struct {
3118 s *Service
3119 name string
3120 urlParams_ gensupport.URLParams
3121 ifNoneMatch_ string
3122 ctx_ context.Context
3123 header_ http.Header
3124 }
3125
3126
3127
3128
3129
3130 func (r *BiddersEndpointsService) Get(name string) *BiddersEndpointsGetCall {
3131 c := &BiddersEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3132 c.name = name
3133 return c
3134 }
3135
3136
3137
3138
3139 func (c *BiddersEndpointsGetCall) Fields(s ...googleapi.Field) *BiddersEndpointsGetCall {
3140 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3141 return c
3142 }
3143
3144
3145
3146
3147 func (c *BiddersEndpointsGetCall) IfNoneMatch(entityTag string) *BiddersEndpointsGetCall {
3148 c.ifNoneMatch_ = entityTag
3149 return c
3150 }
3151
3152
3153 func (c *BiddersEndpointsGetCall) Context(ctx context.Context) *BiddersEndpointsGetCall {
3154 c.ctx_ = ctx
3155 return c
3156 }
3157
3158
3159
3160 func (c *BiddersEndpointsGetCall) Header() http.Header {
3161 if c.header_ == nil {
3162 c.header_ = make(http.Header)
3163 }
3164 return c.header_
3165 }
3166
3167 func (c *BiddersEndpointsGetCall) doRequest(alt string) (*http.Response, error) {
3168 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3169 if c.ifNoneMatch_ != "" {
3170 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3171 }
3172 var body io.Reader = nil
3173 c.urlParams_.Set("alt", alt)
3174 c.urlParams_.Set("prettyPrint", "false")
3175 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3176 urls += "?" + c.urlParams_.Encode()
3177 req, err := http.NewRequest("GET", urls, body)
3178 if err != nil {
3179 return nil, err
3180 }
3181 req.Header = reqHeaders
3182 googleapi.Expand(req.URL, map[string]string{
3183 "name": c.name,
3184 })
3185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3186 }
3187
3188
3189
3190
3191
3192
3193 func (c *BiddersEndpointsGetCall) Do(opts ...googleapi.CallOption) (*Endpoint, error) {
3194 gensupport.SetOptions(c.urlParams_, opts...)
3195 res, err := c.doRequest("json")
3196 if res != nil && res.StatusCode == http.StatusNotModified {
3197 if res.Body != nil {
3198 res.Body.Close()
3199 }
3200 return nil, gensupport.WrapError(&googleapi.Error{
3201 Code: res.StatusCode,
3202 Header: res.Header,
3203 })
3204 }
3205 if err != nil {
3206 return nil, err
3207 }
3208 defer googleapi.CloseBody(res)
3209 if err := googleapi.CheckResponse(res); err != nil {
3210 return nil, gensupport.WrapError(err)
3211 }
3212 ret := &Endpoint{
3213 ServerResponse: googleapi.ServerResponse{
3214 Header: res.Header,
3215 HTTPStatusCode: res.StatusCode,
3216 },
3217 }
3218 target := &ret
3219 if err := gensupport.DecodeResponse(target, res); err != nil {
3220 return nil, err
3221 }
3222 return ret, nil
3223 }
3224
3225 type BiddersEndpointsListCall struct {
3226 s *Service
3227 parent string
3228 urlParams_ gensupport.URLParams
3229 ifNoneMatch_ string
3230 ctx_ context.Context
3231 header_ http.Header
3232 }
3233
3234
3235
3236
3237
3238 func (r *BiddersEndpointsService) List(parent string) *BiddersEndpointsListCall {
3239 c := &BiddersEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3240 c.parent = parent
3241 return c
3242 }
3243
3244
3245
3246
3247 func (c *BiddersEndpointsListCall) PageSize(pageSize int64) *BiddersEndpointsListCall {
3248 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3249 return c
3250 }
3251
3252
3253
3254
3255 func (c *BiddersEndpointsListCall) PageToken(pageToken string) *BiddersEndpointsListCall {
3256 c.urlParams_.Set("pageToken", pageToken)
3257 return c
3258 }
3259
3260
3261
3262
3263 func (c *BiddersEndpointsListCall) Fields(s ...googleapi.Field) *BiddersEndpointsListCall {
3264 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3265 return c
3266 }
3267
3268
3269
3270
3271 func (c *BiddersEndpointsListCall) IfNoneMatch(entityTag string) *BiddersEndpointsListCall {
3272 c.ifNoneMatch_ = entityTag
3273 return c
3274 }
3275
3276
3277 func (c *BiddersEndpointsListCall) Context(ctx context.Context) *BiddersEndpointsListCall {
3278 c.ctx_ = ctx
3279 return c
3280 }
3281
3282
3283
3284 func (c *BiddersEndpointsListCall) Header() http.Header {
3285 if c.header_ == nil {
3286 c.header_ = make(http.Header)
3287 }
3288 return c.header_
3289 }
3290
3291 func (c *BiddersEndpointsListCall) doRequest(alt string) (*http.Response, error) {
3292 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3293 if c.ifNoneMatch_ != "" {
3294 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3295 }
3296 var body io.Reader = nil
3297 c.urlParams_.Set("alt", alt)
3298 c.urlParams_.Set("prettyPrint", "false")
3299 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints")
3300 urls += "?" + c.urlParams_.Encode()
3301 req, err := http.NewRequest("GET", urls, body)
3302 if err != nil {
3303 return nil, err
3304 }
3305 req.Header = reqHeaders
3306 googleapi.Expand(req.URL, map[string]string{
3307 "parent": c.parent,
3308 })
3309 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3310 }
3311
3312
3313
3314
3315
3316
3317
3318 func (c *BiddersEndpointsListCall) Do(opts ...googleapi.CallOption) (*ListEndpointsResponse, error) {
3319 gensupport.SetOptions(c.urlParams_, opts...)
3320 res, err := c.doRequest("json")
3321 if res != nil && res.StatusCode == http.StatusNotModified {
3322 if res.Body != nil {
3323 res.Body.Close()
3324 }
3325 return nil, gensupport.WrapError(&googleapi.Error{
3326 Code: res.StatusCode,
3327 Header: res.Header,
3328 })
3329 }
3330 if err != nil {
3331 return nil, err
3332 }
3333 defer googleapi.CloseBody(res)
3334 if err := googleapi.CheckResponse(res); err != nil {
3335 return nil, gensupport.WrapError(err)
3336 }
3337 ret := &ListEndpointsResponse{
3338 ServerResponse: googleapi.ServerResponse{
3339 Header: res.Header,
3340 HTTPStatusCode: res.StatusCode,
3341 },
3342 }
3343 target := &ret
3344 if err := gensupport.DecodeResponse(target, res); err != nil {
3345 return nil, err
3346 }
3347 return ret, nil
3348 }
3349
3350
3351
3352
3353 func (c *BiddersEndpointsListCall) Pages(ctx context.Context, f func(*ListEndpointsResponse) error) error {
3354 c.ctx_ = ctx
3355 defer c.PageToken(c.urlParams_.Get("pageToken"))
3356 for {
3357 x, err := c.Do()
3358 if err != nil {
3359 return err
3360 }
3361 if err := f(x); err != nil {
3362 return err
3363 }
3364 if x.NextPageToken == "" {
3365 return nil
3366 }
3367 c.PageToken(x.NextPageToken)
3368 }
3369 }
3370
3371 type BiddersEndpointsPatchCall struct {
3372 s *Service
3373 name string
3374 endpoint *Endpoint
3375 urlParams_ gensupport.URLParams
3376 ctx_ context.Context
3377 header_ http.Header
3378 }
3379
3380
3381
3382
3383
3384
3385
3386 func (r *BiddersEndpointsService) Patch(name string, endpoint *Endpoint) *BiddersEndpointsPatchCall {
3387 c := &BiddersEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3388 c.name = name
3389 c.endpoint = endpoint
3390 return c
3391 }
3392
3393
3394
3395 func (c *BiddersEndpointsPatchCall) UpdateMask(updateMask string) *BiddersEndpointsPatchCall {
3396 c.urlParams_.Set("updateMask", updateMask)
3397 return c
3398 }
3399
3400
3401
3402
3403 func (c *BiddersEndpointsPatchCall) Fields(s ...googleapi.Field) *BiddersEndpointsPatchCall {
3404 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3405 return c
3406 }
3407
3408
3409 func (c *BiddersEndpointsPatchCall) Context(ctx context.Context) *BiddersEndpointsPatchCall {
3410 c.ctx_ = ctx
3411 return c
3412 }
3413
3414
3415
3416 func (c *BiddersEndpointsPatchCall) Header() http.Header {
3417 if c.header_ == nil {
3418 c.header_ = make(http.Header)
3419 }
3420 return c.header_
3421 }
3422
3423 func (c *BiddersEndpointsPatchCall) doRequest(alt string) (*http.Response, error) {
3424 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3425 var body io.Reader = nil
3426 body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpoint)
3427 if err != nil {
3428 return nil, err
3429 }
3430 c.urlParams_.Set("alt", alt)
3431 c.urlParams_.Set("prettyPrint", "false")
3432 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3433 urls += "?" + c.urlParams_.Encode()
3434 req, err := http.NewRequest("PATCH", urls, body)
3435 if err != nil {
3436 return nil, err
3437 }
3438 req.Header = reqHeaders
3439 googleapi.Expand(req.URL, map[string]string{
3440 "name": c.name,
3441 })
3442 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3443 }
3444
3445
3446
3447
3448
3449
3450 func (c *BiddersEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*Endpoint, error) {
3451 gensupport.SetOptions(c.urlParams_, opts...)
3452 res, err := c.doRequest("json")
3453 if res != nil && res.StatusCode == http.StatusNotModified {
3454 if res.Body != nil {
3455 res.Body.Close()
3456 }
3457 return nil, gensupport.WrapError(&googleapi.Error{
3458 Code: res.StatusCode,
3459 Header: res.Header,
3460 })
3461 }
3462 if err != nil {
3463 return nil, err
3464 }
3465 defer googleapi.CloseBody(res)
3466 if err := googleapi.CheckResponse(res); err != nil {
3467 return nil, gensupport.WrapError(err)
3468 }
3469 ret := &Endpoint{
3470 ServerResponse: googleapi.ServerResponse{
3471 Header: res.Header,
3472 HTTPStatusCode: res.StatusCode,
3473 },
3474 }
3475 target := &ret
3476 if err := gensupport.DecodeResponse(target, res); err != nil {
3477 return nil, err
3478 }
3479 return ret, nil
3480 }
3481
3482 type BiddersPretargetingConfigsActivateCall struct {
3483 s *Service
3484 name string
3485 activatepretargetingconfigrequest *ActivatePretargetingConfigRequest
3486 urlParams_ gensupport.URLParams
3487 ctx_ context.Context
3488 header_ http.Header
3489 }
3490
3491
3492
3493
3494
3495 func (r *BiddersPretargetingConfigsService) Activate(name string, activatepretargetingconfigrequest *ActivatePretargetingConfigRequest) *BiddersPretargetingConfigsActivateCall {
3496 c := &BiddersPretargetingConfigsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3497 c.name = name
3498 c.activatepretargetingconfigrequest = activatepretargetingconfigrequest
3499 return c
3500 }
3501
3502
3503
3504
3505 func (c *BiddersPretargetingConfigsActivateCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsActivateCall {
3506 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3507 return c
3508 }
3509
3510
3511 func (c *BiddersPretargetingConfigsActivateCall) Context(ctx context.Context) *BiddersPretargetingConfigsActivateCall {
3512 c.ctx_ = ctx
3513 return c
3514 }
3515
3516
3517
3518 func (c *BiddersPretargetingConfigsActivateCall) Header() http.Header {
3519 if c.header_ == nil {
3520 c.header_ = make(http.Header)
3521 }
3522 return c.header_
3523 }
3524
3525 func (c *BiddersPretargetingConfigsActivateCall) doRequest(alt string) (*http.Response, error) {
3526 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3527 var body io.Reader = nil
3528 body, err := googleapi.WithoutDataWrapper.JSONReader(c.activatepretargetingconfigrequest)
3529 if err != nil {
3530 return nil, err
3531 }
3532 c.urlParams_.Set("alt", alt)
3533 c.urlParams_.Set("prettyPrint", "false")
3534 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate")
3535 urls += "?" + c.urlParams_.Encode()
3536 req, err := http.NewRequest("POST", urls, body)
3537 if err != nil {
3538 return nil, err
3539 }
3540 req.Header = reqHeaders
3541 googleapi.Expand(req.URL, map[string]string{
3542 "name": c.name,
3543 })
3544 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3545 }
3546
3547
3548
3549
3550
3551
3552
3553 func (c *BiddersPretargetingConfigsActivateCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
3554 gensupport.SetOptions(c.urlParams_, opts...)
3555 res, err := c.doRequest("json")
3556 if res != nil && res.StatusCode == http.StatusNotModified {
3557 if res.Body != nil {
3558 res.Body.Close()
3559 }
3560 return nil, gensupport.WrapError(&googleapi.Error{
3561 Code: res.StatusCode,
3562 Header: res.Header,
3563 })
3564 }
3565 if err != nil {
3566 return nil, err
3567 }
3568 defer googleapi.CloseBody(res)
3569 if err := googleapi.CheckResponse(res); err != nil {
3570 return nil, gensupport.WrapError(err)
3571 }
3572 ret := &PretargetingConfig{
3573 ServerResponse: googleapi.ServerResponse{
3574 Header: res.Header,
3575 HTTPStatusCode: res.StatusCode,
3576 },
3577 }
3578 target := &ret
3579 if err := gensupport.DecodeResponse(target, res); err != nil {
3580 return nil, err
3581 }
3582 return ret, nil
3583 }
3584
3585 type BiddersPretargetingConfigsAddTargetedAppsCall struct {
3586 s *Service
3587 pretargetingConfig string
3588 addtargetedappsrequest *AddTargetedAppsRequest
3589 urlParams_ gensupport.URLParams
3590 ctx_ context.Context
3591 header_ http.Header
3592 }
3593
3594
3595
3596
3597
3598 func (r *BiddersPretargetingConfigsService) AddTargetedApps(pretargetingConfig string, addtargetedappsrequest *AddTargetedAppsRequest) *BiddersPretargetingConfigsAddTargetedAppsCall {
3599 c := &BiddersPretargetingConfigsAddTargetedAppsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3600 c.pretargetingConfig = pretargetingConfig
3601 c.addtargetedappsrequest = addtargetedappsrequest
3602 return c
3603 }
3604
3605
3606
3607
3608 func (c *BiddersPretargetingConfigsAddTargetedAppsCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsAddTargetedAppsCall {
3609 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3610 return c
3611 }
3612
3613
3614 func (c *BiddersPretargetingConfigsAddTargetedAppsCall) Context(ctx context.Context) *BiddersPretargetingConfigsAddTargetedAppsCall {
3615 c.ctx_ = ctx
3616 return c
3617 }
3618
3619
3620
3621 func (c *BiddersPretargetingConfigsAddTargetedAppsCall) Header() http.Header {
3622 if c.header_ == nil {
3623 c.header_ = make(http.Header)
3624 }
3625 return c.header_
3626 }
3627
3628 func (c *BiddersPretargetingConfigsAddTargetedAppsCall) doRequest(alt string) (*http.Response, error) {
3629 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3630 var body io.Reader = nil
3631 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addtargetedappsrequest)
3632 if err != nil {
3633 return nil, err
3634 }
3635 c.urlParams_.Set("alt", alt)
3636 c.urlParams_.Set("prettyPrint", "false")
3637 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:addTargetedApps")
3638 urls += "?" + c.urlParams_.Encode()
3639 req, err := http.NewRequest("POST", urls, body)
3640 if err != nil {
3641 return nil, err
3642 }
3643 req.Header = reqHeaders
3644 googleapi.Expand(req.URL, map[string]string{
3645 "pretargetingConfig": c.pretargetingConfig,
3646 })
3647 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3648 }
3649
3650
3651
3652
3653
3654
3655
3656 func (c *BiddersPretargetingConfigsAddTargetedAppsCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
3657 gensupport.SetOptions(c.urlParams_, opts...)
3658 res, err := c.doRequest("json")
3659 if res != nil && res.StatusCode == http.StatusNotModified {
3660 if res.Body != nil {
3661 res.Body.Close()
3662 }
3663 return nil, gensupport.WrapError(&googleapi.Error{
3664 Code: res.StatusCode,
3665 Header: res.Header,
3666 })
3667 }
3668 if err != nil {
3669 return nil, err
3670 }
3671 defer googleapi.CloseBody(res)
3672 if err := googleapi.CheckResponse(res); err != nil {
3673 return nil, gensupport.WrapError(err)
3674 }
3675 ret := &PretargetingConfig{
3676 ServerResponse: googleapi.ServerResponse{
3677 Header: res.Header,
3678 HTTPStatusCode: res.StatusCode,
3679 },
3680 }
3681 target := &ret
3682 if err := gensupport.DecodeResponse(target, res); err != nil {
3683 return nil, err
3684 }
3685 return ret, nil
3686 }
3687
3688 type BiddersPretargetingConfigsAddTargetedPublishersCall struct {
3689 s *Service
3690 pretargetingConfig string
3691 addtargetedpublishersrequest *AddTargetedPublishersRequest
3692 urlParams_ gensupport.URLParams
3693 ctx_ context.Context
3694 header_ http.Header
3695 }
3696
3697
3698
3699
3700
3701 func (r *BiddersPretargetingConfigsService) AddTargetedPublishers(pretargetingConfig string, addtargetedpublishersrequest *AddTargetedPublishersRequest) *BiddersPretargetingConfigsAddTargetedPublishersCall {
3702 c := &BiddersPretargetingConfigsAddTargetedPublishersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3703 c.pretargetingConfig = pretargetingConfig
3704 c.addtargetedpublishersrequest = addtargetedpublishersrequest
3705 return c
3706 }
3707
3708
3709
3710
3711 func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsAddTargetedPublishersCall {
3712 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3713 return c
3714 }
3715
3716
3717 func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) Context(ctx context.Context) *BiddersPretargetingConfigsAddTargetedPublishersCall {
3718 c.ctx_ = ctx
3719 return c
3720 }
3721
3722
3723
3724 func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) Header() http.Header {
3725 if c.header_ == nil {
3726 c.header_ = make(http.Header)
3727 }
3728 return c.header_
3729 }
3730
3731 func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) doRequest(alt string) (*http.Response, error) {
3732 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3733 var body io.Reader = nil
3734 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addtargetedpublishersrequest)
3735 if err != nil {
3736 return nil, err
3737 }
3738 c.urlParams_.Set("alt", alt)
3739 c.urlParams_.Set("prettyPrint", "false")
3740 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:addTargetedPublishers")
3741 urls += "?" + c.urlParams_.Encode()
3742 req, err := http.NewRequest("POST", urls, body)
3743 if err != nil {
3744 return nil, err
3745 }
3746 req.Header = reqHeaders
3747 googleapi.Expand(req.URL, map[string]string{
3748 "pretargetingConfig": c.pretargetingConfig,
3749 })
3750 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3751 }
3752
3753
3754
3755
3756
3757
3758
3759 func (c *BiddersPretargetingConfigsAddTargetedPublishersCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
3760 gensupport.SetOptions(c.urlParams_, opts...)
3761 res, err := c.doRequest("json")
3762 if res != nil && res.StatusCode == http.StatusNotModified {
3763 if res.Body != nil {
3764 res.Body.Close()
3765 }
3766 return nil, gensupport.WrapError(&googleapi.Error{
3767 Code: res.StatusCode,
3768 Header: res.Header,
3769 })
3770 }
3771 if err != nil {
3772 return nil, err
3773 }
3774 defer googleapi.CloseBody(res)
3775 if err := googleapi.CheckResponse(res); err != nil {
3776 return nil, gensupport.WrapError(err)
3777 }
3778 ret := &PretargetingConfig{
3779 ServerResponse: googleapi.ServerResponse{
3780 Header: res.Header,
3781 HTTPStatusCode: res.StatusCode,
3782 },
3783 }
3784 target := &ret
3785 if err := gensupport.DecodeResponse(target, res); err != nil {
3786 return nil, err
3787 }
3788 return ret, nil
3789 }
3790
3791 type BiddersPretargetingConfigsAddTargetedSitesCall struct {
3792 s *Service
3793 pretargetingConfig string
3794 addtargetedsitesrequest *AddTargetedSitesRequest
3795 urlParams_ gensupport.URLParams
3796 ctx_ context.Context
3797 header_ http.Header
3798 }
3799
3800
3801
3802
3803
3804 func (r *BiddersPretargetingConfigsService) AddTargetedSites(pretargetingConfig string, addtargetedsitesrequest *AddTargetedSitesRequest) *BiddersPretargetingConfigsAddTargetedSitesCall {
3805 c := &BiddersPretargetingConfigsAddTargetedSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3806 c.pretargetingConfig = pretargetingConfig
3807 c.addtargetedsitesrequest = addtargetedsitesrequest
3808 return c
3809 }
3810
3811
3812
3813
3814 func (c *BiddersPretargetingConfigsAddTargetedSitesCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsAddTargetedSitesCall {
3815 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3816 return c
3817 }
3818
3819
3820 func (c *BiddersPretargetingConfigsAddTargetedSitesCall) Context(ctx context.Context) *BiddersPretargetingConfigsAddTargetedSitesCall {
3821 c.ctx_ = ctx
3822 return c
3823 }
3824
3825
3826
3827 func (c *BiddersPretargetingConfigsAddTargetedSitesCall) Header() http.Header {
3828 if c.header_ == nil {
3829 c.header_ = make(http.Header)
3830 }
3831 return c.header_
3832 }
3833
3834 func (c *BiddersPretargetingConfigsAddTargetedSitesCall) doRequest(alt string) (*http.Response, error) {
3835 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3836 var body io.Reader = nil
3837 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addtargetedsitesrequest)
3838 if err != nil {
3839 return nil, err
3840 }
3841 c.urlParams_.Set("alt", alt)
3842 c.urlParams_.Set("prettyPrint", "false")
3843 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:addTargetedSites")
3844 urls += "?" + c.urlParams_.Encode()
3845 req, err := http.NewRequest("POST", urls, body)
3846 if err != nil {
3847 return nil, err
3848 }
3849 req.Header = reqHeaders
3850 googleapi.Expand(req.URL, map[string]string{
3851 "pretargetingConfig": c.pretargetingConfig,
3852 })
3853 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3854 }
3855
3856
3857
3858
3859
3860
3861
3862 func (c *BiddersPretargetingConfigsAddTargetedSitesCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
3863 gensupport.SetOptions(c.urlParams_, opts...)
3864 res, err := c.doRequest("json")
3865 if res != nil && res.StatusCode == http.StatusNotModified {
3866 if res.Body != nil {
3867 res.Body.Close()
3868 }
3869 return nil, gensupport.WrapError(&googleapi.Error{
3870 Code: res.StatusCode,
3871 Header: res.Header,
3872 })
3873 }
3874 if err != nil {
3875 return nil, err
3876 }
3877 defer googleapi.CloseBody(res)
3878 if err := googleapi.CheckResponse(res); err != nil {
3879 return nil, gensupport.WrapError(err)
3880 }
3881 ret := &PretargetingConfig{
3882 ServerResponse: googleapi.ServerResponse{
3883 Header: res.Header,
3884 HTTPStatusCode: res.StatusCode,
3885 },
3886 }
3887 target := &ret
3888 if err := gensupport.DecodeResponse(target, res); err != nil {
3889 return nil, err
3890 }
3891 return ret, nil
3892 }
3893
3894 type BiddersPretargetingConfigsCreateCall struct {
3895 s *Service
3896 parent string
3897 pretargetingconfig *PretargetingConfig
3898 urlParams_ gensupport.URLParams
3899 ctx_ context.Context
3900 header_ http.Header
3901 }
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911 func (r *BiddersPretargetingConfigsService) Create(parent string, pretargetingconfig *PretargetingConfig) *BiddersPretargetingConfigsCreateCall {
3912 c := &BiddersPretargetingConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3913 c.parent = parent
3914 c.pretargetingconfig = pretargetingconfig
3915 return c
3916 }
3917
3918
3919
3920
3921 func (c *BiddersPretargetingConfigsCreateCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsCreateCall {
3922 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3923 return c
3924 }
3925
3926
3927 func (c *BiddersPretargetingConfigsCreateCall) Context(ctx context.Context) *BiddersPretargetingConfigsCreateCall {
3928 c.ctx_ = ctx
3929 return c
3930 }
3931
3932
3933
3934 func (c *BiddersPretargetingConfigsCreateCall) Header() http.Header {
3935 if c.header_ == nil {
3936 c.header_ = make(http.Header)
3937 }
3938 return c.header_
3939 }
3940
3941 func (c *BiddersPretargetingConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
3942 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3943 var body io.Reader = nil
3944 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
3945 if err != nil {
3946 return nil, err
3947 }
3948 c.urlParams_.Set("alt", alt)
3949 c.urlParams_.Set("prettyPrint", "false")
3950 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pretargetingConfigs")
3951 urls += "?" + c.urlParams_.Encode()
3952 req, err := http.NewRequest("POST", urls, body)
3953 if err != nil {
3954 return nil, err
3955 }
3956 req.Header = reqHeaders
3957 googleapi.Expand(req.URL, map[string]string{
3958 "parent": c.parent,
3959 })
3960 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3961 }
3962
3963
3964
3965
3966
3967
3968
3969 func (c *BiddersPretargetingConfigsCreateCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
3970 gensupport.SetOptions(c.urlParams_, opts...)
3971 res, err := c.doRequest("json")
3972 if res != nil && res.StatusCode == http.StatusNotModified {
3973 if res.Body != nil {
3974 res.Body.Close()
3975 }
3976 return nil, gensupport.WrapError(&googleapi.Error{
3977 Code: res.StatusCode,
3978 Header: res.Header,
3979 })
3980 }
3981 if err != nil {
3982 return nil, err
3983 }
3984 defer googleapi.CloseBody(res)
3985 if err := googleapi.CheckResponse(res); err != nil {
3986 return nil, gensupport.WrapError(err)
3987 }
3988 ret := &PretargetingConfig{
3989 ServerResponse: googleapi.ServerResponse{
3990 Header: res.Header,
3991 HTTPStatusCode: res.StatusCode,
3992 },
3993 }
3994 target := &ret
3995 if err := gensupport.DecodeResponse(target, res); err != nil {
3996 return nil, err
3997 }
3998 return ret, nil
3999 }
4000
4001 type BiddersPretargetingConfigsDeleteCall struct {
4002 s *Service
4003 name string
4004 urlParams_ gensupport.URLParams
4005 ctx_ context.Context
4006 header_ http.Header
4007 }
4008
4009
4010
4011
4012
4013 func (r *BiddersPretargetingConfigsService) Delete(name string) *BiddersPretargetingConfigsDeleteCall {
4014 c := &BiddersPretargetingConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4015 c.name = name
4016 return c
4017 }
4018
4019
4020
4021
4022 func (c *BiddersPretargetingConfigsDeleteCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsDeleteCall {
4023 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4024 return c
4025 }
4026
4027
4028 func (c *BiddersPretargetingConfigsDeleteCall) Context(ctx context.Context) *BiddersPretargetingConfigsDeleteCall {
4029 c.ctx_ = ctx
4030 return c
4031 }
4032
4033
4034
4035 func (c *BiddersPretargetingConfigsDeleteCall) Header() http.Header {
4036 if c.header_ == nil {
4037 c.header_ = make(http.Header)
4038 }
4039 return c.header_
4040 }
4041
4042 func (c *BiddersPretargetingConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
4043 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4044 var body io.Reader = nil
4045 c.urlParams_.Set("alt", alt)
4046 c.urlParams_.Set("prettyPrint", "false")
4047 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4048 urls += "?" + c.urlParams_.Encode()
4049 req, err := http.NewRequest("DELETE", urls, body)
4050 if err != nil {
4051 return nil, err
4052 }
4053 req.Header = reqHeaders
4054 googleapi.Expand(req.URL, map[string]string{
4055 "name": c.name,
4056 })
4057 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4058 }
4059
4060
4061
4062
4063
4064
4065 func (c *BiddersPretargetingConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4066 gensupport.SetOptions(c.urlParams_, opts...)
4067 res, err := c.doRequest("json")
4068 if res != nil && res.StatusCode == http.StatusNotModified {
4069 if res.Body != nil {
4070 res.Body.Close()
4071 }
4072 return nil, gensupport.WrapError(&googleapi.Error{
4073 Code: res.StatusCode,
4074 Header: res.Header,
4075 })
4076 }
4077 if err != nil {
4078 return nil, err
4079 }
4080 defer googleapi.CloseBody(res)
4081 if err := googleapi.CheckResponse(res); err != nil {
4082 return nil, gensupport.WrapError(err)
4083 }
4084 ret := &Empty{
4085 ServerResponse: googleapi.ServerResponse{
4086 Header: res.Header,
4087 HTTPStatusCode: res.StatusCode,
4088 },
4089 }
4090 target := &ret
4091 if err := gensupport.DecodeResponse(target, res); err != nil {
4092 return nil, err
4093 }
4094 return ret, nil
4095 }
4096
4097 type BiddersPretargetingConfigsGetCall struct {
4098 s *Service
4099 name string
4100 urlParams_ gensupport.URLParams
4101 ifNoneMatch_ string
4102 ctx_ context.Context
4103 header_ http.Header
4104 }
4105
4106
4107
4108
4109
4110 func (r *BiddersPretargetingConfigsService) Get(name string) *BiddersPretargetingConfigsGetCall {
4111 c := &BiddersPretargetingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4112 c.name = name
4113 return c
4114 }
4115
4116
4117
4118
4119 func (c *BiddersPretargetingConfigsGetCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsGetCall {
4120 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4121 return c
4122 }
4123
4124
4125
4126
4127 func (c *BiddersPretargetingConfigsGetCall) IfNoneMatch(entityTag string) *BiddersPretargetingConfigsGetCall {
4128 c.ifNoneMatch_ = entityTag
4129 return c
4130 }
4131
4132
4133 func (c *BiddersPretargetingConfigsGetCall) Context(ctx context.Context) *BiddersPretargetingConfigsGetCall {
4134 c.ctx_ = ctx
4135 return c
4136 }
4137
4138
4139
4140 func (c *BiddersPretargetingConfigsGetCall) Header() http.Header {
4141 if c.header_ == nil {
4142 c.header_ = make(http.Header)
4143 }
4144 return c.header_
4145 }
4146
4147 func (c *BiddersPretargetingConfigsGetCall) doRequest(alt string) (*http.Response, error) {
4148 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4149 if c.ifNoneMatch_ != "" {
4150 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4151 }
4152 var body io.Reader = nil
4153 c.urlParams_.Set("alt", alt)
4154 c.urlParams_.Set("prettyPrint", "false")
4155 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4156 urls += "?" + c.urlParams_.Encode()
4157 req, err := http.NewRequest("GET", urls, body)
4158 if err != nil {
4159 return nil, err
4160 }
4161 req.Header = reqHeaders
4162 googleapi.Expand(req.URL, map[string]string{
4163 "name": c.name,
4164 })
4165 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4166 }
4167
4168
4169
4170
4171
4172
4173
4174 func (c *BiddersPretargetingConfigsGetCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
4175 gensupport.SetOptions(c.urlParams_, opts...)
4176 res, err := c.doRequest("json")
4177 if res != nil && res.StatusCode == http.StatusNotModified {
4178 if res.Body != nil {
4179 res.Body.Close()
4180 }
4181 return nil, gensupport.WrapError(&googleapi.Error{
4182 Code: res.StatusCode,
4183 Header: res.Header,
4184 })
4185 }
4186 if err != nil {
4187 return nil, err
4188 }
4189 defer googleapi.CloseBody(res)
4190 if err := googleapi.CheckResponse(res); err != nil {
4191 return nil, gensupport.WrapError(err)
4192 }
4193 ret := &PretargetingConfig{
4194 ServerResponse: googleapi.ServerResponse{
4195 Header: res.Header,
4196 HTTPStatusCode: res.StatusCode,
4197 },
4198 }
4199 target := &ret
4200 if err := gensupport.DecodeResponse(target, res); err != nil {
4201 return nil, err
4202 }
4203 return ret, nil
4204 }
4205
4206 type BiddersPretargetingConfigsListCall struct {
4207 s *Service
4208 parent string
4209 urlParams_ gensupport.URLParams
4210 ifNoneMatch_ string
4211 ctx_ context.Context
4212 header_ http.Header
4213 }
4214
4215
4216
4217
4218
4219 func (r *BiddersPretargetingConfigsService) List(parent string) *BiddersPretargetingConfigsListCall {
4220 c := &BiddersPretargetingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4221 c.parent = parent
4222 return c
4223 }
4224
4225
4226
4227
4228
4229 func (c *BiddersPretargetingConfigsListCall) PageSize(pageSize int64) *BiddersPretargetingConfigsListCall {
4230 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4231 return c
4232 }
4233
4234
4235
4236
4237
4238 func (c *BiddersPretargetingConfigsListCall) PageToken(pageToken string) *BiddersPretargetingConfigsListCall {
4239 c.urlParams_.Set("pageToken", pageToken)
4240 return c
4241 }
4242
4243
4244
4245
4246 func (c *BiddersPretargetingConfigsListCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsListCall {
4247 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4248 return c
4249 }
4250
4251
4252
4253
4254 func (c *BiddersPretargetingConfigsListCall) IfNoneMatch(entityTag string) *BiddersPretargetingConfigsListCall {
4255 c.ifNoneMatch_ = entityTag
4256 return c
4257 }
4258
4259
4260 func (c *BiddersPretargetingConfigsListCall) Context(ctx context.Context) *BiddersPretargetingConfigsListCall {
4261 c.ctx_ = ctx
4262 return c
4263 }
4264
4265
4266
4267 func (c *BiddersPretargetingConfigsListCall) Header() http.Header {
4268 if c.header_ == nil {
4269 c.header_ = make(http.Header)
4270 }
4271 return c.header_
4272 }
4273
4274 func (c *BiddersPretargetingConfigsListCall) doRequest(alt string) (*http.Response, error) {
4275 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4276 if c.ifNoneMatch_ != "" {
4277 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4278 }
4279 var body io.Reader = nil
4280 c.urlParams_.Set("alt", alt)
4281 c.urlParams_.Set("prettyPrint", "false")
4282 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pretargetingConfigs")
4283 urls += "?" + c.urlParams_.Encode()
4284 req, err := http.NewRequest("GET", urls, body)
4285 if err != nil {
4286 return nil, err
4287 }
4288 req.Header = reqHeaders
4289 googleapi.Expand(req.URL, map[string]string{
4290 "parent": c.parent,
4291 })
4292 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4293 }
4294
4295
4296
4297
4298
4299
4300
4301 func (c *BiddersPretargetingConfigsListCall) Do(opts ...googleapi.CallOption) (*ListPretargetingConfigsResponse, error) {
4302 gensupport.SetOptions(c.urlParams_, opts...)
4303 res, err := c.doRequest("json")
4304 if res != nil && res.StatusCode == http.StatusNotModified {
4305 if res.Body != nil {
4306 res.Body.Close()
4307 }
4308 return nil, gensupport.WrapError(&googleapi.Error{
4309 Code: res.StatusCode,
4310 Header: res.Header,
4311 })
4312 }
4313 if err != nil {
4314 return nil, err
4315 }
4316 defer googleapi.CloseBody(res)
4317 if err := googleapi.CheckResponse(res); err != nil {
4318 return nil, gensupport.WrapError(err)
4319 }
4320 ret := &ListPretargetingConfigsResponse{
4321 ServerResponse: googleapi.ServerResponse{
4322 Header: res.Header,
4323 HTTPStatusCode: res.StatusCode,
4324 },
4325 }
4326 target := &ret
4327 if err := gensupport.DecodeResponse(target, res); err != nil {
4328 return nil, err
4329 }
4330 return ret, nil
4331 }
4332
4333
4334
4335
4336 func (c *BiddersPretargetingConfigsListCall) Pages(ctx context.Context, f func(*ListPretargetingConfigsResponse) error) error {
4337 c.ctx_ = ctx
4338 defer c.PageToken(c.urlParams_.Get("pageToken"))
4339 for {
4340 x, err := c.Do()
4341 if err != nil {
4342 return err
4343 }
4344 if err := f(x); err != nil {
4345 return err
4346 }
4347 if x.NextPageToken == "" {
4348 return nil
4349 }
4350 c.PageToken(x.NextPageToken)
4351 }
4352 }
4353
4354 type BiddersPretargetingConfigsPatchCall struct {
4355 s *Service
4356 name string
4357 pretargetingconfig *PretargetingConfig
4358 urlParams_ gensupport.URLParams
4359 ctx_ context.Context
4360 header_ http.Header
4361 }
4362
4363
4364
4365
4366
4367 func (r *BiddersPretargetingConfigsService) Patch(name string, pretargetingconfig *PretargetingConfig) *BiddersPretargetingConfigsPatchCall {
4368 c := &BiddersPretargetingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4369 c.name = name
4370 c.pretargetingconfig = pretargetingconfig
4371 return c
4372 }
4373
4374
4375
4376 func (c *BiddersPretargetingConfigsPatchCall) UpdateMask(updateMask string) *BiddersPretargetingConfigsPatchCall {
4377 c.urlParams_.Set("updateMask", updateMask)
4378 return c
4379 }
4380
4381
4382
4383
4384 func (c *BiddersPretargetingConfigsPatchCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsPatchCall {
4385 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4386 return c
4387 }
4388
4389
4390 func (c *BiddersPretargetingConfigsPatchCall) Context(ctx context.Context) *BiddersPretargetingConfigsPatchCall {
4391 c.ctx_ = ctx
4392 return c
4393 }
4394
4395
4396
4397 func (c *BiddersPretargetingConfigsPatchCall) Header() http.Header {
4398 if c.header_ == nil {
4399 c.header_ = make(http.Header)
4400 }
4401 return c.header_
4402 }
4403
4404 func (c *BiddersPretargetingConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
4405 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4406 var body io.Reader = nil
4407 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
4408 if err != nil {
4409 return nil, err
4410 }
4411 c.urlParams_.Set("alt", alt)
4412 c.urlParams_.Set("prettyPrint", "false")
4413 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4414 urls += "?" + c.urlParams_.Encode()
4415 req, err := http.NewRequest("PATCH", urls, body)
4416 if err != nil {
4417 return nil, err
4418 }
4419 req.Header = reqHeaders
4420 googleapi.Expand(req.URL, map[string]string{
4421 "name": c.name,
4422 })
4423 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4424 }
4425
4426
4427
4428
4429
4430
4431
4432 func (c *BiddersPretargetingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
4433 gensupport.SetOptions(c.urlParams_, opts...)
4434 res, err := c.doRequest("json")
4435 if res != nil && res.StatusCode == http.StatusNotModified {
4436 if res.Body != nil {
4437 res.Body.Close()
4438 }
4439 return nil, gensupport.WrapError(&googleapi.Error{
4440 Code: res.StatusCode,
4441 Header: res.Header,
4442 })
4443 }
4444 if err != nil {
4445 return nil, err
4446 }
4447 defer googleapi.CloseBody(res)
4448 if err := googleapi.CheckResponse(res); err != nil {
4449 return nil, gensupport.WrapError(err)
4450 }
4451 ret := &PretargetingConfig{
4452 ServerResponse: googleapi.ServerResponse{
4453 Header: res.Header,
4454 HTTPStatusCode: res.StatusCode,
4455 },
4456 }
4457 target := &ret
4458 if err := gensupport.DecodeResponse(target, res); err != nil {
4459 return nil, err
4460 }
4461 return ret, nil
4462 }
4463
4464 type BiddersPretargetingConfigsRemoveTargetedAppsCall struct {
4465 s *Service
4466 pretargetingConfig string
4467 removetargetedappsrequest *RemoveTargetedAppsRequest
4468 urlParams_ gensupport.URLParams
4469 ctx_ context.Context
4470 header_ http.Header
4471 }
4472
4473
4474
4475
4476
4477
4478 func (r *BiddersPretargetingConfigsService) RemoveTargetedApps(pretargetingConfig string, removetargetedappsrequest *RemoveTargetedAppsRequest) *BiddersPretargetingConfigsRemoveTargetedAppsCall {
4479 c := &BiddersPretargetingConfigsRemoveTargetedAppsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4480 c.pretargetingConfig = pretargetingConfig
4481 c.removetargetedappsrequest = removetargetedappsrequest
4482 return c
4483 }
4484
4485
4486
4487
4488 func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsRemoveTargetedAppsCall {
4489 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4490 return c
4491 }
4492
4493
4494 func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) Context(ctx context.Context) *BiddersPretargetingConfigsRemoveTargetedAppsCall {
4495 c.ctx_ = ctx
4496 return c
4497 }
4498
4499
4500
4501 func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) Header() http.Header {
4502 if c.header_ == nil {
4503 c.header_ = make(http.Header)
4504 }
4505 return c.header_
4506 }
4507
4508 func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) doRequest(alt string) (*http.Response, error) {
4509 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4510 var body io.Reader = nil
4511 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removetargetedappsrequest)
4512 if err != nil {
4513 return nil, err
4514 }
4515 c.urlParams_.Set("alt", alt)
4516 c.urlParams_.Set("prettyPrint", "false")
4517 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:removeTargetedApps")
4518 urls += "?" + c.urlParams_.Encode()
4519 req, err := http.NewRequest("POST", urls, body)
4520 if err != nil {
4521 return nil, err
4522 }
4523 req.Header = reqHeaders
4524 googleapi.Expand(req.URL, map[string]string{
4525 "pretargetingConfig": c.pretargetingConfig,
4526 })
4527 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4528 }
4529
4530
4531
4532
4533
4534
4535
4536 func (c *BiddersPretargetingConfigsRemoveTargetedAppsCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
4537 gensupport.SetOptions(c.urlParams_, opts...)
4538 res, err := c.doRequest("json")
4539 if res != nil && res.StatusCode == http.StatusNotModified {
4540 if res.Body != nil {
4541 res.Body.Close()
4542 }
4543 return nil, gensupport.WrapError(&googleapi.Error{
4544 Code: res.StatusCode,
4545 Header: res.Header,
4546 })
4547 }
4548 if err != nil {
4549 return nil, err
4550 }
4551 defer googleapi.CloseBody(res)
4552 if err := googleapi.CheckResponse(res); err != nil {
4553 return nil, gensupport.WrapError(err)
4554 }
4555 ret := &PretargetingConfig{
4556 ServerResponse: googleapi.ServerResponse{
4557 Header: res.Header,
4558 HTTPStatusCode: res.StatusCode,
4559 },
4560 }
4561 target := &ret
4562 if err := gensupport.DecodeResponse(target, res); err != nil {
4563 return nil, err
4564 }
4565 return ret, nil
4566 }
4567
4568 type BiddersPretargetingConfigsRemoveTargetedPublishersCall struct {
4569 s *Service
4570 pretargetingConfig string
4571 removetargetedpublishersrequest *RemoveTargetedPublishersRequest
4572 urlParams_ gensupport.URLParams
4573 ctx_ context.Context
4574 header_ http.Header
4575 }
4576
4577
4578
4579
4580
4581
4582 func (r *BiddersPretargetingConfigsService) RemoveTargetedPublishers(pretargetingConfig string, removetargetedpublishersrequest *RemoveTargetedPublishersRequest) *BiddersPretargetingConfigsRemoveTargetedPublishersCall {
4583 c := &BiddersPretargetingConfigsRemoveTargetedPublishersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4584 c.pretargetingConfig = pretargetingConfig
4585 c.removetargetedpublishersrequest = removetargetedpublishersrequest
4586 return c
4587 }
4588
4589
4590
4591
4592 func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsRemoveTargetedPublishersCall {
4593 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4594 return c
4595 }
4596
4597
4598 func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) Context(ctx context.Context) *BiddersPretargetingConfigsRemoveTargetedPublishersCall {
4599 c.ctx_ = ctx
4600 return c
4601 }
4602
4603
4604
4605 func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) Header() http.Header {
4606 if c.header_ == nil {
4607 c.header_ = make(http.Header)
4608 }
4609 return c.header_
4610 }
4611
4612 func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) doRequest(alt string) (*http.Response, error) {
4613 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4614 var body io.Reader = nil
4615 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removetargetedpublishersrequest)
4616 if err != nil {
4617 return nil, err
4618 }
4619 c.urlParams_.Set("alt", alt)
4620 c.urlParams_.Set("prettyPrint", "false")
4621 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:removeTargetedPublishers")
4622 urls += "?" + c.urlParams_.Encode()
4623 req, err := http.NewRequest("POST", urls, body)
4624 if err != nil {
4625 return nil, err
4626 }
4627 req.Header = reqHeaders
4628 googleapi.Expand(req.URL, map[string]string{
4629 "pretargetingConfig": c.pretargetingConfig,
4630 })
4631 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4632 }
4633
4634
4635
4636
4637
4638
4639
4640 func (c *BiddersPretargetingConfigsRemoveTargetedPublishersCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
4641 gensupport.SetOptions(c.urlParams_, opts...)
4642 res, err := c.doRequest("json")
4643 if res != nil && res.StatusCode == http.StatusNotModified {
4644 if res.Body != nil {
4645 res.Body.Close()
4646 }
4647 return nil, gensupport.WrapError(&googleapi.Error{
4648 Code: res.StatusCode,
4649 Header: res.Header,
4650 })
4651 }
4652 if err != nil {
4653 return nil, err
4654 }
4655 defer googleapi.CloseBody(res)
4656 if err := googleapi.CheckResponse(res); err != nil {
4657 return nil, gensupport.WrapError(err)
4658 }
4659 ret := &PretargetingConfig{
4660 ServerResponse: googleapi.ServerResponse{
4661 Header: res.Header,
4662 HTTPStatusCode: res.StatusCode,
4663 },
4664 }
4665 target := &ret
4666 if err := gensupport.DecodeResponse(target, res); err != nil {
4667 return nil, err
4668 }
4669 return ret, nil
4670 }
4671
4672 type BiddersPretargetingConfigsRemoveTargetedSitesCall struct {
4673 s *Service
4674 pretargetingConfig string
4675 removetargetedsitesrequest *RemoveTargetedSitesRequest
4676 urlParams_ gensupport.URLParams
4677 ctx_ context.Context
4678 header_ http.Header
4679 }
4680
4681
4682
4683
4684
4685
4686 func (r *BiddersPretargetingConfigsService) RemoveTargetedSites(pretargetingConfig string, removetargetedsitesrequest *RemoveTargetedSitesRequest) *BiddersPretargetingConfigsRemoveTargetedSitesCall {
4687 c := &BiddersPretargetingConfigsRemoveTargetedSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4688 c.pretargetingConfig = pretargetingConfig
4689 c.removetargetedsitesrequest = removetargetedsitesrequest
4690 return c
4691 }
4692
4693
4694
4695
4696 func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsRemoveTargetedSitesCall {
4697 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4698 return c
4699 }
4700
4701
4702 func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) Context(ctx context.Context) *BiddersPretargetingConfigsRemoveTargetedSitesCall {
4703 c.ctx_ = ctx
4704 return c
4705 }
4706
4707
4708
4709 func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) Header() http.Header {
4710 if c.header_ == nil {
4711 c.header_ = make(http.Header)
4712 }
4713 return c.header_
4714 }
4715
4716 func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) doRequest(alt string) (*http.Response, error) {
4717 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4718 var body io.Reader = nil
4719 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removetargetedsitesrequest)
4720 if err != nil {
4721 return nil, err
4722 }
4723 c.urlParams_.Set("alt", alt)
4724 c.urlParams_.Set("prettyPrint", "false")
4725 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+pretargetingConfig}:removeTargetedSites")
4726 urls += "?" + c.urlParams_.Encode()
4727 req, err := http.NewRequest("POST", urls, body)
4728 if err != nil {
4729 return nil, err
4730 }
4731 req.Header = reqHeaders
4732 googleapi.Expand(req.URL, map[string]string{
4733 "pretargetingConfig": c.pretargetingConfig,
4734 })
4735 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4736 }
4737
4738
4739
4740
4741
4742
4743
4744 func (c *BiddersPretargetingConfigsRemoveTargetedSitesCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
4745 gensupport.SetOptions(c.urlParams_, opts...)
4746 res, err := c.doRequest("json")
4747 if res != nil && res.StatusCode == http.StatusNotModified {
4748 if res.Body != nil {
4749 res.Body.Close()
4750 }
4751 return nil, gensupport.WrapError(&googleapi.Error{
4752 Code: res.StatusCode,
4753 Header: res.Header,
4754 })
4755 }
4756 if err != nil {
4757 return nil, err
4758 }
4759 defer googleapi.CloseBody(res)
4760 if err := googleapi.CheckResponse(res); err != nil {
4761 return nil, gensupport.WrapError(err)
4762 }
4763 ret := &PretargetingConfig{
4764 ServerResponse: googleapi.ServerResponse{
4765 Header: res.Header,
4766 HTTPStatusCode: res.StatusCode,
4767 },
4768 }
4769 target := &ret
4770 if err := gensupport.DecodeResponse(target, res); err != nil {
4771 return nil, err
4772 }
4773 return ret, nil
4774 }
4775
4776 type BiddersPretargetingConfigsSuspendCall struct {
4777 s *Service
4778 name string
4779 suspendpretargetingconfigrequest *SuspendPretargetingConfigRequest
4780 urlParams_ gensupport.URLParams
4781 ctx_ context.Context
4782 header_ http.Header
4783 }
4784
4785
4786
4787
4788
4789 func (r *BiddersPretargetingConfigsService) Suspend(name string, suspendpretargetingconfigrequest *SuspendPretargetingConfigRequest) *BiddersPretargetingConfigsSuspendCall {
4790 c := &BiddersPretargetingConfigsSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4791 c.name = name
4792 c.suspendpretargetingconfigrequest = suspendpretargetingconfigrequest
4793 return c
4794 }
4795
4796
4797
4798
4799 func (c *BiddersPretargetingConfigsSuspendCall) Fields(s ...googleapi.Field) *BiddersPretargetingConfigsSuspendCall {
4800 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4801 return c
4802 }
4803
4804
4805 func (c *BiddersPretargetingConfigsSuspendCall) Context(ctx context.Context) *BiddersPretargetingConfigsSuspendCall {
4806 c.ctx_ = ctx
4807 return c
4808 }
4809
4810
4811
4812 func (c *BiddersPretargetingConfigsSuspendCall) Header() http.Header {
4813 if c.header_ == nil {
4814 c.header_ = make(http.Header)
4815 }
4816 return c.header_
4817 }
4818
4819 func (c *BiddersPretargetingConfigsSuspendCall) doRequest(alt string) (*http.Response, error) {
4820 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4821 var body io.Reader = nil
4822 body, err := googleapi.WithoutDataWrapper.JSONReader(c.suspendpretargetingconfigrequest)
4823 if err != nil {
4824 return nil, err
4825 }
4826 c.urlParams_.Set("alt", alt)
4827 c.urlParams_.Set("prettyPrint", "false")
4828 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:suspend")
4829 urls += "?" + c.urlParams_.Encode()
4830 req, err := http.NewRequest("POST", urls, body)
4831 if err != nil {
4832 return nil, err
4833 }
4834 req.Header = reqHeaders
4835 googleapi.Expand(req.URL, map[string]string{
4836 "name": c.name,
4837 })
4838 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4839 }
4840
4841
4842
4843
4844
4845
4846
4847 func (c *BiddersPretargetingConfigsSuspendCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
4848 gensupport.SetOptions(c.urlParams_, opts...)
4849 res, err := c.doRequest("json")
4850 if res != nil && res.StatusCode == http.StatusNotModified {
4851 if res.Body != nil {
4852 res.Body.Close()
4853 }
4854 return nil, gensupport.WrapError(&googleapi.Error{
4855 Code: res.StatusCode,
4856 Header: res.Header,
4857 })
4858 }
4859 if err != nil {
4860 return nil, err
4861 }
4862 defer googleapi.CloseBody(res)
4863 if err := googleapi.CheckResponse(res); err != nil {
4864 return nil, gensupport.WrapError(err)
4865 }
4866 ret := &PretargetingConfig{
4867 ServerResponse: googleapi.ServerResponse{
4868 Header: res.Header,
4869 HTTPStatusCode: res.StatusCode,
4870 },
4871 }
4872 target := &ret
4873 if err := gensupport.DecodeResponse(target, res); err != nil {
4874 return nil, err
4875 }
4876 return ret, nil
4877 }
4878
4879 type BiddersPublisherConnectionsBatchApproveCall struct {
4880 s *Service
4881 parent string
4882 batchapprovepublisherconnectionsrequest *BatchApprovePublisherConnectionsRequest
4883 urlParams_ gensupport.URLParams
4884 ctx_ context.Context
4885 header_ http.Header
4886 }
4887
4888
4889
4890
4891
4892
4893 func (r *BiddersPublisherConnectionsService) BatchApprove(parent string, batchapprovepublisherconnectionsrequest *BatchApprovePublisherConnectionsRequest) *BiddersPublisherConnectionsBatchApproveCall {
4894 c := &BiddersPublisherConnectionsBatchApproveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4895 c.parent = parent
4896 c.batchapprovepublisherconnectionsrequest = batchapprovepublisherconnectionsrequest
4897 return c
4898 }
4899
4900
4901
4902
4903 func (c *BiddersPublisherConnectionsBatchApproveCall) Fields(s ...googleapi.Field) *BiddersPublisherConnectionsBatchApproveCall {
4904 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4905 return c
4906 }
4907
4908
4909 func (c *BiddersPublisherConnectionsBatchApproveCall) Context(ctx context.Context) *BiddersPublisherConnectionsBatchApproveCall {
4910 c.ctx_ = ctx
4911 return c
4912 }
4913
4914
4915
4916 func (c *BiddersPublisherConnectionsBatchApproveCall) Header() http.Header {
4917 if c.header_ == nil {
4918 c.header_ = make(http.Header)
4919 }
4920 return c.header_
4921 }
4922
4923 func (c *BiddersPublisherConnectionsBatchApproveCall) doRequest(alt string) (*http.Response, error) {
4924 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4925 var body io.Reader = nil
4926 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchapprovepublisherconnectionsrequest)
4927 if err != nil {
4928 return nil, err
4929 }
4930 c.urlParams_.Set("alt", alt)
4931 c.urlParams_.Set("prettyPrint", "false")
4932 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/publisherConnections:batchApprove")
4933 urls += "?" + c.urlParams_.Encode()
4934 req, err := http.NewRequest("POST", urls, body)
4935 if err != nil {
4936 return nil, err
4937 }
4938 req.Header = reqHeaders
4939 googleapi.Expand(req.URL, map[string]string{
4940 "parent": c.parent,
4941 })
4942 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4943 }
4944
4945
4946
4947
4948
4949
4950
4951 func (c *BiddersPublisherConnectionsBatchApproveCall) Do(opts ...googleapi.CallOption) (*BatchApprovePublisherConnectionsResponse, error) {
4952 gensupport.SetOptions(c.urlParams_, opts...)
4953 res, err := c.doRequest("json")
4954 if res != nil && res.StatusCode == http.StatusNotModified {
4955 if res.Body != nil {
4956 res.Body.Close()
4957 }
4958 return nil, gensupport.WrapError(&googleapi.Error{
4959 Code: res.StatusCode,
4960 Header: res.Header,
4961 })
4962 }
4963 if err != nil {
4964 return nil, err
4965 }
4966 defer googleapi.CloseBody(res)
4967 if err := googleapi.CheckResponse(res); err != nil {
4968 return nil, gensupport.WrapError(err)
4969 }
4970 ret := &BatchApprovePublisherConnectionsResponse{
4971 ServerResponse: googleapi.ServerResponse{
4972 Header: res.Header,
4973 HTTPStatusCode: res.StatusCode,
4974 },
4975 }
4976 target := &ret
4977 if err := gensupport.DecodeResponse(target, res); err != nil {
4978 return nil, err
4979 }
4980 return ret, nil
4981 }
4982
4983 type BiddersPublisherConnectionsBatchRejectCall struct {
4984 s *Service
4985 parent string
4986 batchrejectpublisherconnectionsrequest *BatchRejectPublisherConnectionsRequest
4987 urlParams_ gensupport.URLParams
4988 ctx_ context.Context
4989 header_ http.Header
4990 }
4991
4992
4993
4994
4995
4996
4997 func (r *BiddersPublisherConnectionsService) BatchReject(parent string, batchrejectpublisherconnectionsrequest *BatchRejectPublisherConnectionsRequest) *BiddersPublisherConnectionsBatchRejectCall {
4998 c := &BiddersPublisherConnectionsBatchRejectCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4999 c.parent = parent
5000 c.batchrejectpublisherconnectionsrequest = batchrejectpublisherconnectionsrequest
5001 return c
5002 }
5003
5004
5005
5006
5007 func (c *BiddersPublisherConnectionsBatchRejectCall) Fields(s ...googleapi.Field) *BiddersPublisherConnectionsBatchRejectCall {
5008 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5009 return c
5010 }
5011
5012
5013 func (c *BiddersPublisherConnectionsBatchRejectCall) Context(ctx context.Context) *BiddersPublisherConnectionsBatchRejectCall {
5014 c.ctx_ = ctx
5015 return c
5016 }
5017
5018
5019
5020 func (c *BiddersPublisherConnectionsBatchRejectCall) Header() http.Header {
5021 if c.header_ == nil {
5022 c.header_ = make(http.Header)
5023 }
5024 return c.header_
5025 }
5026
5027 func (c *BiddersPublisherConnectionsBatchRejectCall) doRequest(alt string) (*http.Response, error) {
5028 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5029 var body io.Reader = nil
5030 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchrejectpublisherconnectionsrequest)
5031 if err != nil {
5032 return nil, err
5033 }
5034 c.urlParams_.Set("alt", alt)
5035 c.urlParams_.Set("prettyPrint", "false")
5036 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/publisherConnections:batchReject")
5037 urls += "?" + c.urlParams_.Encode()
5038 req, err := http.NewRequest("POST", urls, body)
5039 if err != nil {
5040 return nil, err
5041 }
5042 req.Header = reqHeaders
5043 googleapi.Expand(req.URL, map[string]string{
5044 "parent": c.parent,
5045 })
5046 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5047 }
5048
5049
5050
5051
5052
5053
5054
5055 func (c *BiddersPublisherConnectionsBatchRejectCall) Do(opts ...googleapi.CallOption) (*BatchRejectPublisherConnectionsResponse, error) {
5056 gensupport.SetOptions(c.urlParams_, opts...)
5057 res, err := c.doRequest("json")
5058 if res != nil && res.StatusCode == http.StatusNotModified {
5059 if res.Body != nil {
5060 res.Body.Close()
5061 }
5062 return nil, gensupport.WrapError(&googleapi.Error{
5063 Code: res.StatusCode,
5064 Header: res.Header,
5065 })
5066 }
5067 if err != nil {
5068 return nil, err
5069 }
5070 defer googleapi.CloseBody(res)
5071 if err := googleapi.CheckResponse(res); err != nil {
5072 return nil, gensupport.WrapError(err)
5073 }
5074 ret := &BatchRejectPublisherConnectionsResponse{
5075 ServerResponse: googleapi.ServerResponse{
5076 Header: res.Header,
5077 HTTPStatusCode: res.StatusCode,
5078 },
5079 }
5080 target := &ret
5081 if err := gensupport.DecodeResponse(target, res); err != nil {
5082 return nil, err
5083 }
5084 return ret, nil
5085 }
5086
5087 type BiddersPublisherConnectionsGetCall struct {
5088 s *Service
5089 name string
5090 urlParams_ gensupport.URLParams
5091 ifNoneMatch_ string
5092 ctx_ context.Context
5093 header_ http.Header
5094 }
5095
5096
5097
5098
5099
5100
5101
5102
5103 func (r *BiddersPublisherConnectionsService) Get(name string) *BiddersPublisherConnectionsGetCall {
5104 c := &BiddersPublisherConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5105 c.name = name
5106 return c
5107 }
5108
5109
5110
5111
5112 func (c *BiddersPublisherConnectionsGetCall) Fields(s ...googleapi.Field) *BiddersPublisherConnectionsGetCall {
5113 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5114 return c
5115 }
5116
5117
5118
5119
5120 func (c *BiddersPublisherConnectionsGetCall) IfNoneMatch(entityTag string) *BiddersPublisherConnectionsGetCall {
5121 c.ifNoneMatch_ = entityTag
5122 return c
5123 }
5124
5125
5126 func (c *BiddersPublisherConnectionsGetCall) Context(ctx context.Context) *BiddersPublisherConnectionsGetCall {
5127 c.ctx_ = ctx
5128 return c
5129 }
5130
5131
5132
5133 func (c *BiddersPublisherConnectionsGetCall) Header() http.Header {
5134 if c.header_ == nil {
5135 c.header_ = make(http.Header)
5136 }
5137 return c.header_
5138 }
5139
5140 func (c *BiddersPublisherConnectionsGetCall) doRequest(alt string) (*http.Response, error) {
5141 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5142 if c.ifNoneMatch_ != "" {
5143 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5144 }
5145 var body io.Reader = nil
5146 c.urlParams_.Set("alt", alt)
5147 c.urlParams_.Set("prettyPrint", "false")
5148 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5149 urls += "?" + c.urlParams_.Encode()
5150 req, err := http.NewRequest("GET", urls, body)
5151 if err != nil {
5152 return nil, err
5153 }
5154 req.Header = reqHeaders
5155 googleapi.Expand(req.URL, map[string]string{
5156 "name": c.name,
5157 })
5158 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5159 }
5160
5161
5162
5163
5164
5165
5166
5167 func (c *BiddersPublisherConnectionsGetCall) Do(opts ...googleapi.CallOption) (*PublisherConnection, error) {
5168 gensupport.SetOptions(c.urlParams_, opts...)
5169 res, err := c.doRequest("json")
5170 if res != nil && res.StatusCode == http.StatusNotModified {
5171 if res.Body != nil {
5172 res.Body.Close()
5173 }
5174 return nil, gensupport.WrapError(&googleapi.Error{
5175 Code: res.StatusCode,
5176 Header: res.Header,
5177 })
5178 }
5179 if err != nil {
5180 return nil, err
5181 }
5182 defer googleapi.CloseBody(res)
5183 if err := googleapi.CheckResponse(res); err != nil {
5184 return nil, gensupport.WrapError(err)
5185 }
5186 ret := &PublisherConnection{
5187 ServerResponse: googleapi.ServerResponse{
5188 Header: res.Header,
5189 HTTPStatusCode: res.StatusCode,
5190 },
5191 }
5192 target := &ret
5193 if err := gensupport.DecodeResponse(target, res); err != nil {
5194 return nil, err
5195 }
5196 return ret, nil
5197 }
5198
5199 type BiddersPublisherConnectionsListCall struct {
5200 s *Service
5201 parent string
5202 urlParams_ gensupport.URLParams
5203 ifNoneMatch_ string
5204 ctx_ context.Context
5205 header_ http.Header
5206 }
5207
5208
5209
5210
5211
5212
5213 func (r *BiddersPublisherConnectionsService) List(parent string) *BiddersPublisherConnectionsListCall {
5214 c := &BiddersPublisherConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5215 c.parent = parent
5216 return c
5217 }
5218
5219
5220
5221
5222
5223
5224
5225 func (c *BiddersPublisherConnectionsListCall) Filter(filter string) *BiddersPublisherConnectionsListCall {
5226 c.urlParams_.Set("filter", filter)
5227 return c
5228 }
5229
5230
5231
5232
5233
5234 func (c *BiddersPublisherConnectionsListCall) OrderBy(orderBy string) *BiddersPublisherConnectionsListCall {
5235 c.urlParams_.Set("orderBy", orderBy)
5236 return c
5237 }
5238
5239
5240
5241
5242
5243
5244 func (c *BiddersPublisherConnectionsListCall) PageSize(pageSize int64) *BiddersPublisherConnectionsListCall {
5245 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5246 return c
5247 }
5248
5249
5250
5251
5252
5253 func (c *BiddersPublisherConnectionsListCall) PageToken(pageToken string) *BiddersPublisherConnectionsListCall {
5254 c.urlParams_.Set("pageToken", pageToken)
5255 return c
5256 }
5257
5258
5259
5260
5261 func (c *BiddersPublisherConnectionsListCall) Fields(s ...googleapi.Field) *BiddersPublisherConnectionsListCall {
5262 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5263 return c
5264 }
5265
5266
5267
5268
5269 func (c *BiddersPublisherConnectionsListCall) IfNoneMatch(entityTag string) *BiddersPublisherConnectionsListCall {
5270 c.ifNoneMatch_ = entityTag
5271 return c
5272 }
5273
5274
5275 func (c *BiddersPublisherConnectionsListCall) Context(ctx context.Context) *BiddersPublisherConnectionsListCall {
5276 c.ctx_ = ctx
5277 return c
5278 }
5279
5280
5281
5282 func (c *BiddersPublisherConnectionsListCall) Header() http.Header {
5283 if c.header_ == nil {
5284 c.header_ = make(http.Header)
5285 }
5286 return c.header_
5287 }
5288
5289 func (c *BiddersPublisherConnectionsListCall) doRequest(alt string) (*http.Response, error) {
5290 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5291 if c.ifNoneMatch_ != "" {
5292 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5293 }
5294 var body io.Reader = nil
5295 c.urlParams_.Set("alt", alt)
5296 c.urlParams_.Set("prettyPrint", "false")
5297 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/publisherConnections")
5298 urls += "?" + c.urlParams_.Encode()
5299 req, err := http.NewRequest("GET", urls, body)
5300 if err != nil {
5301 return nil, err
5302 }
5303 req.Header = reqHeaders
5304 googleapi.Expand(req.URL, map[string]string{
5305 "parent": c.parent,
5306 })
5307 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5308 }
5309
5310
5311
5312
5313
5314
5315
5316 func (c *BiddersPublisherConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListPublisherConnectionsResponse, error) {
5317 gensupport.SetOptions(c.urlParams_, opts...)
5318 res, err := c.doRequest("json")
5319 if res != nil && res.StatusCode == http.StatusNotModified {
5320 if res.Body != nil {
5321 res.Body.Close()
5322 }
5323 return nil, gensupport.WrapError(&googleapi.Error{
5324 Code: res.StatusCode,
5325 Header: res.Header,
5326 })
5327 }
5328 if err != nil {
5329 return nil, err
5330 }
5331 defer googleapi.CloseBody(res)
5332 if err := googleapi.CheckResponse(res); err != nil {
5333 return nil, gensupport.WrapError(err)
5334 }
5335 ret := &ListPublisherConnectionsResponse{
5336 ServerResponse: googleapi.ServerResponse{
5337 Header: res.Header,
5338 HTTPStatusCode: res.StatusCode,
5339 },
5340 }
5341 target := &ret
5342 if err := gensupport.DecodeResponse(target, res); err != nil {
5343 return nil, err
5344 }
5345 return ret, nil
5346 }
5347
5348
5349
5350
5351 func (c *BiddersPublisherConnectionsListCall) Pages(ctx context.Context, f func(*ListPublisherConnectionsResponse) error) error {
5352 c.ctx_ = ctx
5353 defer c.PageToken(c.urlParams_.Get("pageToken"))
5354 for {
5355 x, err := c.Do()
5356 if err != nil {
5357 return err
5358 }
5359 if err := f(x); err != nil {
5360 return err
5361 }
5362 if x.NextPageToken == "" {
5363 return nil
5364 }
5365 c.PageToken(x.NextPageToken)
5366 }
5367 }
5368
5369 type BuyersGetCall struct {
5370 s *Service
5371 name string
5372 urlParams_ gensupport.URLParams
5373 ifNoneMatch_ string
5374 ctx_ context.Context
5375 header_ http.Header
5376 }
5377
5378
5379
5380
5381 func (r *BuyersService) Get(name string) *BuyersGetCall {
5382 c := &BuyersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5383 c.name = name
5384 return c
5385 }
5386
5387
5388
5389
5390 func (c *BuyersGetCall) Fields(s ...googleapi.Field) *BuyersGetCall {
5391 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5392 return c
5393 }
5394
5395
5396
5397
5398 func (c *BuyersGetCall) IfNoneMatch(entityTag string) *BuyersGetCall {
5399 c.ifNoneMatch_ = entityTag
5400 return c
5401 }
5402
5403
5404 func (c *BuyersGetCall) Context(ctx context.Context) *BuyersGetCall {
5405 c.ctx_ = ctx
5406 return c
5407 }
5408
5409
5410
5411 func (c *BuyersGetCall) Header() http.Header {
5412 if c.header_ == nil {
5413 c.header_ = make(http.Header)
5414 }
5415 return c.header_
5416 }
5417
5418 func (c *BuyersGetCall) doRequest(alt string) (*http.Response, error) {
5419 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5420 if c.ifNoneMatch_ != "" {
5421 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5422 }
5423 var body io.Reader = nil
5424 c.urlParams_.Set("alt", alt)
5425 c.urlParams_.Set("prettyPrint", "false")
5426 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5427 urls += "?" + c.urlParams_.Encode()
5428 req, err := http.NewRequest("GET", urls, body)
5429 if err != nil {
5430 return nil, err
5431 }
5432 req.Header = reqHeaders
5433 googleapi.Expand(req.URL, map[string]string{
5434 "name": c.name,
5435 })
5436 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5437 }
5438
5439
5440
5441
5442
5443
5444 func (c *BuyersGetCall) Do(opts ...googleapi.CallOption) (*Buyer, error) {
5445 gensupport.SetOptions(c.urlParams_, opts...)
5446 res, err := c.doRequest("json")
5447 if res != nil && res.StatusCode == http.StatusNotModified {
5448 if res.Body != nil {
5449 res.Body.Close()
5450 }
5451 return nil, gensupport.WrapError(&googleapi.Error{
5452 Code: res.StatusCode,
5453 Header: res.Header,
5454 })
5455 }
5456 if err != nil {
5457 return nil, err
5458 }
5459 defer googleapi.CloseBody(res)
5460 if err := googleapi.CheckResponse(res); err != nil {
5461 return nil, gensupport.WrapError(err)
5462 }
5463 ret := &Buyer{
5464 ServerResponse: googleapi.ServerResponse{
5465 Header: res.Header,
5466 HTTPStatusCode: res.StatusCode,
5467 },
5468 }
5469 target := &ret
5470 if err := gensupport.DecodeResponse(target, res); err != nil {
5471 return nil, err
5472 }
5473 return ret, nil
5474 }
5475
5476 type BuyersGetRemarketingTagCall struct {
5477 s *Service
5478 name string
5479 urlParams_ gensupport.URLParams
5480 ifNoneMatch_ string
5481 ctx_ context.Context
5482 header_ http.Header
5483 }
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499 func (r *BuyersService) GetRemarketingTag(name string) *BuyersGetRemarketingTagCall {
5500 c := &BuyersGetRemarketingTagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5501 c.name = name
5502 return c
5503 }
5504
5505
5506
5507
5508 func (c *BuyersGetRemarketingTagCall) Fields(s ...googleapi.Field) *BuyersGetRemarketingTagCall {
5509 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5510 return c
5511 }
5512
5513
5514
5515
5516 func (c *BuyersGetRemarketingTagCall) IfNoneMatch(entityTag string) *BuyersGetRemarketingTagCall {
5517 c.ifNoneMatch_ = entityTag
5518 return c
5519 }
5520
5521
5522 func (c *BuyersGetRemarketingTagCall) Context(ctx context.Context) *BuyersGetRemarketingTagCall {
5523 c.ctx_ = ctx
5524 return c
5525 }
5526
5527
5528
5529 func (c *BuyersGetRemarketingTagCall) Header() http.Header {
5530 if c.header_ == nil {
5531 c.header_ = make(http.Header)
5532 }
5533 return c.header_
5534 }
5535
5536 func (c *BuyersGetRemarketingTagCall) doRequest(alt string) (*http.Response, error) {
5537 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5538 if c.ifNoneMatch_ != "" {
5539 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5540 }
5541 var body io.Reader = nil
5542 c.urlParams_.Set("alt", alt)
5543 c.urlParams_.Set("prettyPrint", "false")
5544 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getRemarketingTag")
5545 urls += "?" + c.urlParams_.Encode()
5546 req, err := http.NewRequest("GET", urls, body)
5547 if err != nil {
5548 return nil, err
5549 }
5550 req.Header = reqHeaders
5551 googleapi.Expand(req.URL, map[string]string{
5552 "name": c.name,
5553 })
5554 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5555 }
5556
5557
5558
5559
5560
5561
5562
5563 func (c *BuyersGetRemarketingTagCall) Do(opts ...googleapi.CallOption) (*GetRemarketingTagResponse, error) {
5564 gensupport.SetOptions(c.urlParams_, opts...)
5565 res, err := c.doRequest("json")
5566 if res != nil && res.StatusCode == http.StatusNotModified {
5567 if res.Body != nil {
5568 res.Body.Close()
5569 }
5570 return nil, gensupport.WrapError(&googleapi.Error{
5571 Code: res.StatusCode,
5572 Header: res.Header,
5573 })
5574 }
5575 if err != nil {
5576 return nil, err
5577 }
5578 defer googleapi.CloseBody(res)
5579 if err := googleapi.CheckResponse(res); err != nil {
5580 return nil, gensupport.WrapError(err)
5581 }
5582 ret := &GetRemarketingTagResponse{
5583 ServerResponse: googleapi.ServerResponse{
5584 Header: res.Header,
5585 HTTPStatusCode: res.StatusCode,
5586 },
5587 }
5588 target := &ret
5589 if err := gensupport.DecodeResponse(target, res); err != nil {
5590 return nil, err
5591 }
5592 return ret, nil
5593 }
5594
5595 type BuyersListCall struct {
5596 s *Service
5597 urlParams_ gensupport.URLParams
5598 ifNoneMatch_ string
5599 ctx_ context.Context
5600 header_ http.Header
5601 }
5602
5603
5604
5605 func (r *BuyersService) List() *BuyersListCall {
5606 c := &BuyersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5607 return c
5608 }
5609
5610
5611
5612
5613 func (c *BuyersListCall) PageSize(pageSize int64) *BuyersListCall {
5614 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5615 return c
5616 }
5617
5618
5619
5620
5621 func (c *BuyersListCall) PageToken(pageToken string) *BuyersListCall {
5622 c.urlParams_.Set("pageToken", pageToken)
5623 return c
5624 }
5625
5626
5627
5628
5629 func (c *BuyersListCall) Fields(s ...googleapi.Field) *BuyersListCall {
5630 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5631 return c
5632 }
5633
5634
5635
5636
5637 func (c *BuyersListCall) IfNoneMatch(entityTag string) *BuyersListCall {
5638 c.ifNoneMatch_ = entityTag
5639 return c
5640 }
5641
5642
5643 func (c *BuyersListCall) Context(ctx context.Context) *BuyersListCall {
5644 c.ctx_ = ctx
5645 return c
5646 }
5647
5648
5649
5650 func (c *BuyersListCall) Header() http.Header {
5651 if c.header_ == nil {
5652 c.header_ = make(http.Header)
5653 }
5654 return c.header_
5655 }
5656
5657 func (c *BuyersListCall) doRequest(alt string) (*http.Response, error) {
5658 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5659 if c.ifNoneMatch_ != "" {
5660 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5661 }
5662 var body io.Reader = nil
5663 c.urlParams_.Set("alt", alt)
5664 c.urlParams_.Set("prettyPrint", "false")
5665 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/buyers")
5666 urls += "?" + c.urlParams_.Encode()
5667 req, err := http.NewRequest("GET", urls, body)
5668 if err != nil {
5669 return nil, err
5670 }
5671 req.Header = reqHeaders
5672 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5673 }
5674
5675
5676
5677
5678
5679
5680
5681 func (c *BuyersListCall) Do(opts ...googleapi.CallOption) (*ListBuyersResponse, error) {
5682 gensupport.SetOptions(c.urlParams_, opts...)
5683 res, err := c.doRequest("json")
5684 if res != nil && res.StatusCode == http.StatusNotModified {
5685 if res.Body != nil {
5686 res.Body.Close()
5687 }
5688 return nil, gensupport.WrapError(&googleapi.Error{
5689 Code: res.StatusCode,
5690 Header: res.Header,
5691 })
5692 }
5693 if err != nil {
5694 return nil, err
5695 }
5696 defer googleapi.CloseBody(res)
5697 if err := googleapi.CheckResponse(res); err != nil {
5698 return nil, gensupport.WrapError(err)
5699 }
5700 ret := &ListBuyersResponse{
5701 ServerResponse: googleapi.ServerResponse{
5702 Header: res.Header,
5703 HTTPStatusCode: res.StatusCode,
5704 },
5705 }
5706 target := &ret
5707 if err := gensupport.DecodeResponse(target, res); err != nil {
5708 return nil, err
5709 }
5710 return ret, nil
5711 }
5712
5713
5714
5715
5716 func (c *BuyersListCall) Pages(ctx context.Context, f func(*ListBuyersResponse) error) error {
5717 c.ctx_ = ctx
5718 defer c.PageToken(c.urlParams_.Get("pageToken"))
5719 for {
5720 x, err := c.Do()
5721 if err != nil {
5722 return err
5723 }
5724 if err := f(x); err != nil {
5725 return err
5726 }
5727 if x.NextPageToken == "" {
5728 return nil
5729 }
5730 c.PageToken(x.NextPageToken)
5731 }
5732 }
5733
5734 type BuyersCreativesCreateCall struct {
5735 s *Service
5736 parent string
5737 creative *Creative
5738 urlParams_ gensupport.URLParams
5739 ctx_ context.Context
5740 header_ http.Header
5741 }
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751 func (r *BuyersCreativesService) Create(parent string, creative *Creative) *BuyersCreativesCreateCall {
5752 c := &BuyersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5753 c.parent = parent
5754 c.creative = creative
5755 return c
5756 }
5757
5758
5759
5760
5761 func (c *BuyersCreativesCreateCall) Fields(s ...googleapi.Field) *BuyersCreativesCreateCall {
5762 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5763 return c
5764 }
5765
5766
5767 func (c *BuyersCreativesCreateCall) Context(ctx context.Context) *BuyersCreativesCreateCall {
5768 c.ctx_ = ctx
5769 return c
5770 }
5771
5772
5773
5774 func (c *BuyersCreativesCreateCall) Header() http.Header {
5775 if c.header_ == nil {
5776 c.header_ = make(http.Header)
5777 }
5778 return c.header_
5779 }
5780
5781 func (c *BuyersCreativesCreateCall) doRequest(alt string) (*http.Response, error) {
5782 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5783 var body io.Reader = nil
5784 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
5785 if err != nil {
5786 return nil, err
5787 }
5788 c.urlParams_.Set("alt", alt)
5789 c.urlParams_.Set("prettyPrint", "false")
5790 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/creatives")
5791 urls += "?" + c.urlParams_.Encode()
5792 req, err := http.NewRequest("POST", urls, body)
5793 if err != nil {
5794 return nil, err
5795 }
5796 req.Header = reqHeaders
5797 googleapi.Expand(req.URL, map[string]string{
5798 "parent": c.parent,
5799 })
5800 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5801 }
5802
5803
5804
5805
5806
5807
5808 func (c *BuyersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
5809 gensupport.SetOptions(c.urlParams_, opts...)
5810 res, err := c.doRequest("json")
5811 if res != nil && res.StatusCode == http.StatusNotModified {
5812 if res.Body != nil {
5813 res.Body.Close()
5814 }
5815 return nil, gensupport.WrapError(&googleapi.Error{
5816 Code: res.StatusCode,
5817 Header: res.Header,
5818 })
5819 }
5820 if err != nil {
5821 return nil, err
5822 }
5823 defer googleapi.CloseBody(res)
5824 if err := googleapi.CheckResponse(res); err != nil {
5825 return nil, gensupport.WrapError(err)
5826 }
5827 ret := &Creative{
5828 ServerResponse: googleapi.ServerResponse{
5829 Header: res.Header,
5830 HTTPStatusCode: res.StatusCode,
5831 },
5832 }
5833 target := &ret
5834 if err := gensupport.DecodeResponse(target, res); err != nil {
5835 return nil, err
5836 }
5837 return ret, nil
5838 }
5839
5840 type BuyersCreativesGetCall struct {
5841 s *Service
5842 name string
5843 urlParams_ gensupport.URLParams
5844 ifNoneMatch_ string
5845 ctx_ context.Context
5846 header_ http.Header
5847 }
5848
5849
5850
5851
5852 func (r *BuyersCreativesService) Get(name string) *BuyersCreativesGetCall {
5853 c := &BuyersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5854 c.name = name
5855 return c
5856 }
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876 func (c *BuyersCreativesGetCall) View(view string) *BuyersCreativesGetCall {
5877 c.urlParams_.Set("view", view)
5878 return c
5879 }
5880
5881
5882
5883
5884 func (c *BuyersCreativesGetCall) Fields(s ...googleapi.Field) *BuyersCreativesGetCall {
5885 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5886 return c
5887 }
5888
5889
5890
5891
5892 func (c *BuyersCreativesGetCall) IfNoneMatch(entityTag string) *BuyersCreativesGetCall {
5893 c.ifNoneMatch_ = entityTag
5894 return c
5895 }
5896
5897
5898 func (c *BuyersCreativesGetCall) Context(ctx context.Context) *BuyersCreativesGetCall {
5899 c.ctx_ = ctx
5900 return c
5901 }
5902
5903
5904
5905 func (c *BuyersCreativesGetCall) Header() http.Header {
5906 if c.header_ == nil {
5907 c.header_ = make(http.Header)
5908 }
5909 return c.header_
5910 }
5911
5912 func (c *BuyersCreativesGetCall) doRequest(alt string) (*http.Response, error) {
5913 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5914 if c.ifNoneMatch_ != "" {
5915 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5916 }
5917 var body io.Reader = nil
5918 c.urlParams_.Set("alt", alt)
5919 c.urlParams_.Set("prettyPrint", "false")
5920 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5921 urls += "?" + c.urlParams_.Encode()
5922 req, err := http.NewRequest("GET", urls, body)
5923 if err != nil {
5924 return nil, err
5925 }
5926 req.Header = reqHeaders
5927 googleapi.Expand(req.URL, map[string]string{
5928 "name": c.name,
5929 })
5930 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5931 }
5932
5933
5934
5935
5936
5937
5938 func (c *BuyersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
5939 gensupport.SetOptions(c.urlParams_, opts...)
5940 res, err := c.doRequest("json")
5941 if res != nil && res.StatusCode == http.StatusNotModified {
5942 if res.Body != nil {
5943 res.Body.Close()
5944 }
5945 return nil, gensupport.WrapError(&googleapi.Error{
5946 Code: res.StatusCode,
5947 Header: res.Header,
5948 })
5949 }
5950 if err != nil {
5951 return nil, err
5952 }
5953 defer googleapi.CloseBody(res)
5954 if err := googleapi.CheckResponse(res); err != nil {
5955 return nil, gensupport.WrapError(err)
5956 }
5957 ret := &Creative{
5958 ServerResponse: googleapi.ServerResponse{
5959 Header: res.Header,
5960 HTTPStatusCode: res.StatusCode,
5961 },
5962 }
5963 target := &ret
5964 if err := gensupport.DecodeResponse(target, res); err != nil {
5965 return nil, err
5966 }
5967 return ret, nil
5968 }
5969
5970 type BuyersCreativesListCall struct {
5971 s *Service
5972 parent string
5973 urlParams_ gensupport.URLParams
5974 ifNoneMatch_ string
5975 ctx_ context.Context
5976 header_ http.Header
5977 }
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998 func (r *BuyersCreativesService) List(parent string) *BuyersCreativesListCall {
5999 c := &BuyersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6000 c.parent = parent
6001 return c
6002 }
6003
6004
6005
6006
6007
6008
6009 func (c *BuyersCreativesListCall) Filter(filter string) *BuyersCreativesListCall {
6010 c.urlParams_.Set("filter", filter)
6011 return c
6012 }
6013
6014
6015
6016
6017
6018 func (c *BuyersCreativesListCall) PageSize(pageSize int64) *BuyersCreativesListCall {
6019 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6020 return c
6021 }
6022
6023
6024
6025
6026
6027
6028 func (c *BuyersCreativesListCall) PageToken(pageToken string) *BuyersCreativesListCall {
6029 c.urlParams_.Set("pageToken", pageToken)
6030 return c
6031 }
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051 func (c *BuyersCreativesListCall) View(view string) *BuyersCreativesListCall {
6052 c.urlParams_.Set("view", view)
6053 return c
6054 }
6055
6056
6057
6058
6059 func (c *BuyersCreativesListCall) Fields(s ...googleapi.Field) *BuyersCreativesListCall {
6060 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6061 return c
6062 }
6063
6064
6065
6066
6067 func (c *BuyersCreativesListCall) IfNoneMatch(entityTag string) *BuyersCreativesListCall {
6068 c.ifNoneMatch_ = entityTag
6069 return c
6070 }
6071
6072
6073 func (c *BuyersCreativesListCall) Context(ctx context.Context) *BuyersCreativesListCall {
6074 c.ctx_ = ctx
6075 return c
6076 }
6077
6078
6079
6080 func (c *BuyersCreativesListCall) Header() http.Header {
6081 if c.header_ == nil {
6082 c.header_ = make(http.Header)
6083 }
6084 return c.header_
6085 }
6086
6087 func (c *BuyersCreativesListCall) doRequest(alt string) (*http.Response, error) {
6088 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6089 if c.ifNoneMatch_ != "" {
6090 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6091 }
6092 var body io.Reader = nil
6093 c.urlParams_.Set("alt", alt)
6094 c.urlParams_.Set("prettyPrint", "false")
6095 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/creatives")
6096 urls += "?" + c.urlParams_.Encode()
6097 req, err := http.NewRequest("GET", urls, body)
6098 if err != nil {
6099 return nil, err
6100 }
6101 req.Header = reqHeaders
6102 googleapi.Expand(req.URL, map[string]string{
6103 "parent": c.parent,
6104 })
6105 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6106 }
6107
6108
6109
6110
6111
6112
6113
6114 func (c *BuyersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) {
6115 gensupport.SetOptions(c.urlParams_, opts...)
6116 res, err := c.doRequest("json")
6117 if res != nil && res.StatusCode == http.StatusNotModified {
6118 if res.Body != nil {
6119 res.Body.Close()
6120 }
6121 return nil, gensupport.WrapError(&googleapi.Error{
6122 Code: res.StatusCode,
6123 Header: res.Header,
6124 })
6125 }
6126 if err != nil {
6127 return nil, err
6128 }
6129 defer googleapi.CloseBody(res)
6130 if err := googleapi.CheckResponse(res); err != nil {
6131 return nil, gensupport.WrapError(err)
6132 }
6133 ret := &ListCreativesResponse{
6134 ServerResponse: googleapi.ServerResponse{
6135 Header: res.Header,
6136 HTTPStatusCode: res.StatusCode,
6137 },
6138 }
6139 target := &ret
6140 if err := gensupport.DecodeResponse(target, res); err != nil {
6141 return nil, err
6142 }
6143 return ret, nil
6144 }
6145
6146
6147
6148
6149 func (c *BuyersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error {
6150 c.ctx_ = ctx
6151 defer c.PageToken(c.urlParams_.Get("pageToken"))
6152 for {
6153 x, err := c.Do()
6154 if err != nil {
6155 return err
6156 }
6157 if err := f(x); err != nil {
6158 return err
6159 }
6160 if x.NextPageToken == "" {
6161 return nil
6162 }
6163 c.PageToken(x.NextPageToken)
6164 }
6165 }
6166
6167 type BuyersCreativesPatchCall struct {
6168 s *Service
6169 name string
6170 creative *Creative
6171 urlParams_ gensupport.URLParams
6172 ctx_ context.Context
6173 header_ http.Header
6174 }
6175
6176
6177
6178
6179
6180
6181
6182
6183 func (r *BuyersCreativesService) Patch(name string, creative *Creative) *BuyersCreativesPatchCall {
6184 c := &BuyersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6185 c.name = name
6186 c.creative = creative
6187 return c
6188 }
6189
6190
6191
6192 func (c *BuyersCreativesPatchCall) UpdateMask(updateMask string) *BuyersCreativesPatchCall {
6193 c.urlParams_.Set("updateMask", updateMask)
6194 return c
6195 }
6196
6197
6198
6199
6200 func (c *BuyersCreativesPatchCall) Fields(s ...googleapi.Field) *BuyersCreativesPatchCall {
6201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6202 return c
6203 }
6204
6205
6206 func (c *BuyersCreativesPatchCall) Context(ctx context.Context) *BuyersCreativesPatchCall {
6207 c.ctx_ = ctx
6208 return c
6209 }
6210
6211
6212
6213 func (c *BuyersCreativesPatchCall) Header() http.Header {
6214 if c.header_ == nil {
6215 c.header_ = make(http.Header)
6216 }
6217 return c.header_
6218 }
6219
6220 func (c *BuyersCreativesPatchCall) doRequest(alt string) (*http.Response, error) {
6221 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6222 var body io.Reader = nil
6223 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
6224 if err != nil {
6225 return nil, err
6226 }
6227 c.urlParams_.Set("alt", alt)
6228 c.urlParams_.Set("prettyPrint", "false")
6229 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6230 urls += "?" + c.urlParams_.Encode()
6231 req, err := http.NewRequest("PATCH", urls, body)
6232 if err != nil {
6233 return nil, err
6234 }
6235 req.Header = reqHeaders
6236 googleapi.Expand(req.URL, map[string]string{
6237 "name": c.name,
6238 })
6239 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6240 }
6241
6242
6243
6244
6245
6246
6247 func (c *BuyersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
6248 gensupport.SetOptions(c.urlParams_, opts...)
6249 res, err := c.doRequest("json")
6250 if res != nil && res.StatusCode == http.StatusNotModified {
6251 if res.Body != nil {
6252 res.Body.Close()
6253 }
6254 return nil, gensupport.WrapError(&googleapi.Error{
6255 Code: res.StatusCode,
6256 Header: res.Header,
6257 })
6258 }
6259 if err != nil {
6260 return nil, err
6261 }
6262 defer googleapi.CloseBody(res)
6263 if err := googleapi.CheckResponse(res); err != nil {
6264 return nil, gensupport.WrapError(err)
6265 }
6266 ret := &Creative{
6267 ServerResponse: googleapi.ServerResponse{
6268 Header: res.Header,
6269 HTTPStatusCode: res.StatusCode,
6270 },
6271 }
6272 target := &ret
6273 if err := gensupport.DecodeResponse(target, res); err != nil {
6274 return nil, err
6275 }
6276 return ret, nil
6277 }
6278
6279 type BuyersUserListsCloseCall struct {
6280 s *Service
6281 name string
6282 closeuserlistrequest *CloseUserListRequest
6283 urlParams_ gensupport.URLParams
6284 ctx_ context.Context
6285 header_ http.Header
6286 }
6287
6288
6289
6290
6291
6292 func (r *BuyersUserListsService) Close(name string, closeuserlistrequest *CloseUserListRequest) *BuyersUserListsCloseCall {
6293 c := &BuyersUserListsCloseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6294 c.name = name
6295 c.closeuserlistrequest = closeuserlistrequest
6296 return c
6297 }
6298
6299
6300
6301
6302 func (c *BuyersUserListsCloseCall) Fields(s ...googleapi.Field) *BuyersUserListsCloseCall {
6303 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6304 return c
6305 }
6306
6307
6308 func (c *BuyersUserListsCloseCall) Context(ctx context.Context) *BuyersUserListsCloseCall {
6309 c.ctx_ = ctx
6310 return c
6311 }
6312
6313
6314
6315 func (c *BuyersUserListsCloseCall) Header() http.Header {
6316 if c.header_ == nil {
6317 c.header_ = make(http.Header)
6318 }
6319 return c.header_
6320 }
6321
6322 func (c *BuyersUserListsCloseCall) doRequest(alt string) (*http.Response, error) {
6323 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6324 var body io.Reader = nil
6325 body, err := googleapi.WithoutDataWrapper.JSONReader(c.closeuserlistrequest)
6326 if err != nil {
6327 return nil, err
6328 }
6329 c.urlParams_.Set("alt", alt)
6330 c.urlParams_.Set("prettyPrint", "false")
6331 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:close")
6332 urls += "?" + c.urlParams_.Encode()
6333 req, err := http.NewRequest("POST", urls, body)
6334 if err != nil {
6335 return nil, err
6336 }
6337 req.Header = reqHeaders
6338 googleapi.Expand(req.URL, map[string]string{
6339 "name": c.name,
6340 })
6341 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6342 }
6343
6344
6345
6346
6347
6348
6349 func (c *BuyersUserListsCloseCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
6350 gensupport.SetOptions(c.urlParams_, opts...)
6351 res, err := c.doRequest("json")
6352 if res != nil && res.StatusCode == http.StatusNotModified {
6353 if res.Body != nil {
6354 res.Body.Close()
6355 }
6356 return nil, gensupport.WrapError(&googleapi.Error{
6357 Code: res.StatusCode,
6358 Header: res.Header,
6359 })
6360 }
6361 if err != nil {
6362 return nil, err
6363 }
6364 defer googleapi.CloseBody(res)
6365 if err := googleapi.CheckResponse(res); err != nil {
6366 return nil, gensupport.WrapError(err)
6367 }
6368 ret := &UserList{
6369 ServerResponse: googleapi.ServerResponse{
6370 Header: res.Header,
6371 HTTPStatusCode: res.StatusCode,
6372 },
6373 }
6374 target := &ret
6375 if err := gensupport.DecodeResponse(target, res); err != nil {
6376 return nil, err
6377 }
6378 return ret, nil
6379 }
6380
6381 type BuyersUserListsCreateCall struct {
6382 s *Service
6383 parent string
6384 userlist *UserList
6385 urlParams_ gensupport.URLParams
6386 ctx_ context.Context
6387 header_ http.Header
6388 }
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398 func (r *BuyersUserListsService) Create(parent string, userlist *UserList) *BuyersUserListsCreateCall {
6399 c := &BuyersUserListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6400 c.parent = parent
6401 c.userlist = userlist
6402 return c
6403 }
6404
6405
6406
6407
6408 func (c *BuyersUserListsCreateCall) Fields(s ...googleapi.Field) *BuyersUserListsCreateCall {
6409 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6410 return c
6411 }
6412
6413
6414 func (c *BuyersUserListsCreateCall) Context(ctx context.Context) *BuyersUserListsCreateCall {
6415 c.ctx_ = ctx
6416 return c
6417 }
6418
6419
6420
6421 func (c *BuyersUserListsCreateCall) Header() http.Header {
6422 if c.header_ == nil {
6423 c.header_ = make(http.Header)
6424 }
6425 return c.header_
6426 }
6427
6428 func (c *BuyersUserListsCreateCall) doRequest(alt string) (*http.Response, error) {
6429 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6430 var body io.Reader = nil
6431 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userlist)
6432 if err != nil {
6433 return nil, err
6434 }
6435 c.urlParams_.Set("alt", alt)
6436 c.urlParams_.Set("prettyPrint", "false")
6437 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userLists")
6438 urls += "?" + c.urlParams_.Encode()
6439 req, err := http.NewRequest("POST", urls, body)
6440 if err != nil {
6441 return nil, err
6442 }
6443 req.Header = reqHeaders
6444 googleapi.Expand(req.URL, map[string]string{
6445 "parent": c.parent,
6446 })
6447 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6448 }
6449
6450
6451
6452
6453
6454
6455 func (c *BuyersUserListsCreateCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
6456 gensupport.SetOptions(c.urlParams_, opts...)
6457 res, err := c.doRequest("json")
6458 if res != nil && res.StatusCode == http.StatusNotModified {
6459 if res.Body != nil {
6460 res.Body.Close()
6461 }
6462 return nil, gensupport.WrapError(&googleapi.Error{
6463 Code: res.StatusCode,
6464 Header: res.Header,
6465 })
6466 }
6467 if err != nil {
6468 return nil, err
6469 }
6470 defer googleapi.CloseBody(res)
6471 if err := googleapi.CheckResponse(res); err != nil {
6472 return nil, gensupport.WrapError(err)
6473 }
6474 ret := &UserList{
6475 ServerResponse: googleapi.ServerResponse{
6476 Header: res.Header,
6477 HTTPStatusCode: res.StatusCode,
6478 },
6479 }
6480 target := &ret
6481 if err := gensupport.DecodeResponse(target, res); err != nil {
6482 return nil, err
6483 }
6484 return ret, nil
6485 }
6486
6487 type BuyersUserListsGetCall struct {
6488 s *Service
6489 name string
6490 urlParams_ gensupport.URLParams
6491 ifNoneMatch_ string
6492 ctx_ context.Context
6493 header_ http.Header
6494 }
6495
6496
6497
6498
6499 func (r *BuyersUserListsService) Get(name string) *BuyersUserListsGetCall {
6500 c := &BuyersUserListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6501 c.name = name
6502 return c
6503 }
6504
6505
6506
6507
6508 func (c *BuyersUserListsGetCall) Fields(s ...googleapi.Field) *BuyersUserListsGetCall {
6509 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6510 return c
6511 }
6512
6513
6514
6515
6516 func (c *BuyersUserListsGetCall) IfNoneMatch(entityTag string) *BuyersUserListsGetCall {
6517 c.ifNoneMatch_ = entityTag
6518 return c
6519 }
6520
6521
6522 func (c *BuyersUserListsGetCall) Context(ctx context.Context) *BuyersUserListsGetCall {
6523 c.ctx_ = ctx
6524 return c
6525 }
6526
6527
6528
6529 func (c *BuyersUserListsGetCall) Header() http.Header {
6530 if c.header_ == nil {
6531 c.header_ = make(http.Header)
6532 }
6533 return c.header_
6534 }
6535
6536 func (c *BuyersUserListsGetCall) doRequest(alt string) (*http.Response, error) {
6537 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6538 if c.ifNoneMatch_ != "" {
6539 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6540 }
6541 var body io.Reader = nil
6542 c.urlParams_.Set("alt", alt)
6543 c.urlParams_.Set("prettyPrint", "false")
6544 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6545 urls += "?" + c.urlParams_.Encode()
6546 req, err := http.NewRequest("GET", urls, body)
6547 if err != nil {
6548 return nil, err
6549 }
6550 req.Header = reqHeaders
6551 googleapi.Expand(req.URL, map[string]string{
6552 "name": c.name,
6553 })
6554 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6555 }
6556
6557
6558
6559
6560
6561
6562 func (c *BuyersUserListsGetCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
6563 gensupport.SetOptions(c.urlParams_, opts...)
6564 res, err := c.doRequest("json")
6565 if res != nil && res.StatusCode == http.StatusNotModified {
6566 if res.Body != nil {
6567 res.Body.Close()
6568 }
6569 return nil, gensupport.WrapError(&googleapi.Error{
6570 Code: res.StatusCode,
6571 Header: res.Header,
6572 })
6573 }
6574 if err != nil {
6575 return nil, err
6576 }
6577 defer googleapi.CloseBody(res)
6578 if err := googleapi.CheckResponse(res); err != nil {
6579 return nil, gensupport.WrapError(err)
6580 }
6581 ret := &UserList{
6582 ServerResponse: googleapi.ServerResponse{
6583 Header: res.Header,
6584 HTTPStatusCode: res.StatusCode,
6585 },
6586 }
6587 target := &ret
6588 if err := gensupport.DecodeResponse(target, res); err != nil {
6589 return nil, err
6590 }
6591 return ret, nil
6592 }
6593
6594 type BuyersUserListsGetRemarketingTagCall struct {
6595 s *Service
6596 name string
6597 urlParams_ gensupport.URLParams
6598 ifNoneMatch_ string
6599 ctx_ context.Context
6600 header_ http.Header
6601 }
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617 func (r *BuyersUserListsService) GetRemarketingTag(name string) *BuyersUserListsGetRemarketingTagCall {
6618 c := &BuyersUserListsGetRemarketingTagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6619 c.name = name
6620 return c
6621 }
6622
6623
6624
6625
6626 func (c *BuyersUserListsGetRemarketingTagCall) Fields(s ...googleapi.Field) *BuyersUserListsGetRemarketingTagCall {
6627 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6628 return c
6629 }
6630
6631
6632
6633
6634 func (c *BuyersUserListsGetRemarketingTagCall) IfNoneMatch(entityTag string) *BuyersUserListsGetRemarketingTagCall {
6635 c.ifNoneMatch_ = entityTag
6636 return c
6637 }
6638
6639
6640 func (c *BuyersUserListsGetRemarketingTagCall) Context(ctx context.Context) *BuyersUserListsGetRemarketingTagCall {
6641 c.ctx_ = ctx
6642 return c
6643 }
6644
6645
6646
6647 func (c *BuyersUserListsGetRemarketingTagCall) Header() http.Header {
6648 if c.header_ == nil {
6649 c.header_ = make(http.Header)
6650 }
6651 return c.header_
6652 }
6653
6654 func (c *BuyersUserListsGetRemarketingTagCall) doRequest(alt string) (*http.Response, error) {
6655 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6656 if c.ifNoneMatch_ != "" {
6657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6658 }
6659 var body io.Reader = nil
6660 c.urlParams_.Set("alt", alt)
6661 c.urlParams_.Set("prettyPrint", "false")
6662 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getRemarketingTag")
6663 urls += "?" + c.urlParams_.Encode()
6664 req, err := http.NewRequest("GET", urls, body)
6665 if err != nil {
6666 return nil, err
6667 }
6668 req.Header = reqHeaders
6669 googleapi.Expand(req.URL, map[string]string{
6670 "name": c.name,
6671 })
6672 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6673 }
6674
6675
6676
6677
6678
6679
6680
6681 func (c *BuyersUserListsGetRemarketingTagCall) Do(opts ...googleapi.CallOption) (*GetRemarketingTagResponse, error) {
6682 gensupport.SetOptions(c.urlParams_, opts...)
6683 res, err := c.doRequest("json")
6684 if res != nil && res.StatusCode == http.StatusNotModified {
6685 if res.Body != nil {
6686 res.Body.Close()
6687 }
6688 return nil, gensupport.WrapError(&googleapi.Error{
6689 Code: res.StatusCode,
6690 Header: res.Header,
6691 })
6692 }
6693 if err != nil {
6694 return nil, err
6695 }
6696 defer googleapi.CloseBody(res)
6697 if err := googleapi.CheckResponse(res); err != nil {
6698 return nil, gensupport.WrapError(err)
6699 }
6700 ret := &GetRemarketingTagResponse{
6701 ServerResponse: googleapi.ServerResponse{
6702 Header: res.Header,
6703 HTTPStatusCode: res.StatusCode,
6704 },
6705 }
6706 target := &ret
6707 if err := gensupport.DecodeResponse(target, res); err != nil {
6708 return nil, err
6709 }
6710 return ret, nil
6711 }
6712
6713 type BuyersUserListsListCall struct {
6714 s *Service
6715 parent string
6716 urlParams_ gensupport.URLParams
6717 ifNoneMatch_ string
6718 ctx_ context.Context
6719 header_ http.Header
6720 }
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730 func (r *BuyersUserListsService) List(parent string) *BuyersUserListsListCall {
6731 c := &BuyersUserListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6732 c.parent = parent
6733 return c
6734 }
6735
6736
6737
6738 func (c *BuyersUserListsListCall) PageSize(pageSize int64) *BuyersUserListsListCall {
6739 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6740 return c
6741 }
6742
6743
6744
6745 func (c *BuyersUserListsListCall) PageToken(pageToken string) *BuyersUserListsListCall {
6746 c.urlParams_.Set("pageToken", pageToken)
6747 return c
6748 }
6749
6750
6751
6752
6753 func (c *BuyersUserListsListCall) Fields(s ...googleapi.Field) *BuyersUserListsListCall {
6754 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6755 return c
6756 }
6757
6758
6759
6760
6761 func (c *BuyersUserListsListCall) IfNoneMatch(entityTag string) *BuyersUserListsListCall {
6762 c.ifNoneMatch_ = entityTag
6763 return c
6764 }
6765
6766
6767 func (c *BuyersUserListsListCall) Context(ctx context.Context) *BuyersUserListsListCall {
6768 c.ctx_ = ctx
6769 return c
6770 }
6771
6772
6773
6774 func (c *BuyersUserListsListCall) Header() http.Header {
6775 if c.header_ == nil {
6776 c.header_ = make(http.Header)
6777 }
6778 return c.header_
6779 }
6780
6781 func (c *BuyersUserListsListCall) doRequest(alt string) (*http.Response, error) {
6782 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6783 if c.ifNoneMatch_ != "" {
6784 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6785 }
6786 var body io.Reader = nil
6787 c.urlParams_.Set("alt", alt)
6788 c.urlParams_.Set("prettyPrint", "false")
6789 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userLists")
6790 urls += "?" + c.urlParams_.Encode()
6791 req, err := http.NewRequest("GET", urls, body)
6792 if err != nil {
6793 return nil, err
6794 }
6795 req.Header = reqHeaders
6796 googleapi.Expand(req.URL, map[string]string{
6797 "parent": c.parent,
6798 })
6799 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6800 }
6801
6802
6803
6804
6805
6806
6807
6808 func (c *BuyersUserListsListCall) Do(opts ...googleapi.CallOption) (*ListUserListsResponse, error) {
6809 gensupport.SetOptions(c.urlParams_, opts...)
6810 res, err := c.doRequest("json")
6811 if res != nil && res.StatusCode == http.StatusNotModified {
6812 if res.Body != nil {
6813 res.Body.Close()
6814 }
6815 return nil, gensupport.WrapError(&googleapi.Error{
6816 Code: res.StatusCode,
6817 Header: res.Header,
6818 })
6819 }
6820 if err != nil {
6821 return nil, err
6822 }
6823 defer googleapi.CloseBody(res)
6824 if err := googleapi.CheckResponse(res); err != nil {
6825 return nil, gensupport.WrapError(err)
6826 }
6827 ret := &ListUserListsResponse{
6828 ServerResponse: googleapi.ServerResponse{
6829 Header: res.Header,
6830 HTTPStatusCode: res.StatusCode,
6831 },
6832 }
6833 target := &ret
6834 if err := gensupport.DecodeResponse(target, res); err != nil {
6835 return nil, err
6836 }
6837 return ret, nil
6838 }
6839
6840
6841
6842
6843 func (c *BuyersUserListsListCall) Pages(ctx context.Context, f func(*ListUserListsResponse) error) error {
6844 c.ctx_ = ctx
6845 defer c.PageToken(c.urlParams_.Get("pageToken"))
6846 for {
6847 x, err := c.Do()
6848 if err != nil {
6849 return err
6850 }
6851 if err := f(x); err != nil {
6852 return err
6853 }
6854 if x.NextPageToken == "" {
6855 return nil
6856 }
6857 c.PageToken(x.NextPageToken)
6858 }
6859 }
6860
6861 type BuyersUserListsOpenCall struct {
6862 s *Service
6863 name string
6864 openuserlistrequest *OpenUserListRequest
6865 urlParams_ gensupport.URLParams
6866 ctx_ context.Context
6867 header_ http.Header
6868 }
6869
6870
6871
6872
6873
6874 func (r *BuyersUserListsService) Open(name string, openuserlistrequest *OpenUserListRequest) *BuyersUserListsOpenCall {
6875 c := &BuyersUserListsOpenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6876 c.name = name
6877 c.openuserlistrequest = openuserlistrequest
6878 return c
6879 }
6880
6881
6882
6883
6884 func (c *BuyersUserListsOpenCall) Fields(s ...googleapi.Field) *BuyersUserListsOpenCall {
6885 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6886 return c
6887 }
6888
6889
6890 func (c *BuyersUserListsOpenCall) Context(ctx context.Context) *BuyersUserListsOpenCall {
6891 c.ctx_ = ctx
6892 return c
6893 }
6894
6895
6896
6897 func (c *BuyersUserListsOpenCall) Header() http.Header {
6898 if c.header_ == nil {
6899 c.header_ = make(http.Header)
6900 }
6901 return c.header_
6902 }
6903
6904 func (c *BuyersUserListsOpenCall) doRequest(alt string) (*http.Response, error) {
6905 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6906 var body io.Reader = nil
6907 body, err := googleapi.WithoutDataWrapper.JSONReader(c.openuserlistrequest)
6908 if err != nil {
6909 return nil, err
6910 }
6911 c.urlParams_.Set("alt", alt)
6912 c.urlParams_.Set("prettyPrint", "false")
6913 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:open")
6914 urls += "?" + c.urlParams_.Encode()
6915 req, err := http.NewRequest("POST", urls, body)
6916 if err != nil {
6917 return nil, err
6918 }
6919 req.Header = reqHeaders
6920 googleapi.Expand(req.URL, map[string]string{
6921 "name": c.name,
6922 })
6923 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6924 }
6925
6926
6927
6928
6929
6930
6931 func (c *BuyersUserListsOpenCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
6932 gensupport.SetOptions(c.urlParams_, opts...)
6933 res, err := c.doRequest("json")
6934 if res != nil && res.StatusCode == http.StatusNotModified {
6935 if res.Body != nil {
6936 res.Body.Close()
6937 }
6938 return nil, gensupport.WrapError(&googleapi.Error{
6939 Code: res.StatusCode,
6940 Header: res.Header,
6941 })
6942 }
6943 if err != nil {
6944 return nil, err
6945 }
6946 defer googleapi.CloseBody(res)
6947 if err := googleapi.CheckResponse(res); err != nil {
6948 return nil, gensupport.WrapError(err)
6949 }
6950 ret := &UserList{
6951 ServerResponse: googleapi.ServerResponse{
6952 Header: res.Header,
6953 HTTPStatusCode: res.StatusCode,
6954 },
6955 }
6956 target := &ret
6957 if err := gensupport.DecodeResponse(target, res); err != nil {
6958 return nil, err
6959 }
6960 return ret, nil
6961 }
6962
6963 type BuyersUserListsUpdateCall struct {
6964 s *Service
6965 nameid string
6966 userlist *UserList
6967 urlParams_ gensupport.URLParams
6968 ctx_ context.Context
6969 header_ http.Header
6970 }
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981 func (r *BuyersUserListsService) Update(nameid string, userlist *UserList) *BuyersUserListsUpdateCall {
6982 c := &BuyersUserListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6983 c.nameid = nameid
6984 c.userlist = userlist
6985 return c
6986 }
6987
6988
6989
6990
6991 func (c *BuyersUserListsUpdateCall) Fields(s ...googleapi.Field) *BuyersUserListsUpdateCall {
6992 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6993 return c
6994 }
6995
6996
6997 func (c *BuyersUserListsUpdateCall) Context(ctx context.Context) *BuyersUserListsUpdateCall {
6998 c.ctx_ = ctx
6999 return c
7000 }
7001
7002
7003
7004 func (c *BuyersUserListsUpdateCall) Header() http.Header {
7005 if c.header_ == nil {
7006 c.header_ = make(http.Header)
7007 }
7008 return c.header_
7009 }
7010
7011 func (c *BuyersUserListsUpdateCall) doRequest(alt string) (*http.Response, error) {
7012 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7013 var body io.Reader = nil
7014 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userlist)
7015 if err != nil {
7016 return nil, err
7017 }
7018 c.urlParams_.Set("alt", alt)
7019 c.urlParams_.Set("prettyPrint", "false")
7020 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7021 urls += "?" + c.urlParams_.Encode()
7022 req, err := http.NewRequest("PUT", urls, body)
7023 if err != nil {
7024 return nil, err
7025 }
7026 req.Header = reqHeaders
7027 googleapi.Expand(req.URL, map[string]string{
7028 "name": c.nameid,
7029 })
7030 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7031 }
7032
7033
7034
7035
7036
7037
7038 func (c *BuyersUserListsUpdateCall) Do(opts ...googleapi.CallOption) (*UserList, error) {
7039 gensupport.SetOptions(c.urlParams_, opts...)
7040 res, err := c.doRequest("json")
7041 if res != nil && res.StatusCode == http.StatusNotModified {
7042 if res.Body != nil {
7043 res.Body.Close()
7044 }
7045 return nil, gensupport.WrapError(&googleapi.Error{
7046 Code: res.StatusCode,
7047 Header: res.Header,
7048 })
7049 }
7050 if err != nil {
7051 return nil, err
7052 }
7053 defer googleapi.CloseBody(res)
7054 if err := googleapi.CheckResponse(res); err != nil {
7055 return nil, gensupport.WrapError(err)
7056 }
7057 ret := &UserList{
7058 ServerResponse: googleapi.ServerResponse{
7059 Header: res.Header,
7060 HTTPStatusCode: res.StatusCode,
7061 },
7062 }
7063 target := &ret
7064 if err := gensupport.DecodeResponse(target, res); err != nil {
7065 return nil, err
7066 }
7067 return ret, nil
7068 }
7069
View as plain text