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 package adexchangebuyer
39
40 import (
41 "bytes"
42 "context"
43 "encoding/json"
44 "errors"
45 "fmt"
46 "io"
47 "net/http"
48 "net/url"
49 "strconv"
50 "strings"
51
52 googleapi "google.golang.org/api/googleapi"
53 gensupport "google.golang.org/api/internal/gensupport"
54 option "google.golang.org/api/option"
55 internaloption "google.golang.org/api/option/internaloption"
56 htransport "google.golang.org/api/transport/http"
57 )
58
59
60
61 var _ = bytes.NewBuffer
62 var _ = strconv.Itoa
63 var _ = fmt.Sprintf
64 var _ = json.NewDecoder
65 var _ = io.Copy
66 var _ = url.Parse
67 var _ = gensupport.MarshalJSON
68 var _ = googleapi.Version
69 var _ = errors.New
70 var _ = strings.Replace
71 var _ = context.Canceled
72 var _ = internaloption.WithDefaultEndpoint
73
74 const apiId = "adexchangebuyer:v1.4"
75 const apiName = "adexchangebuyer"
76 const apiVersion = "v1.4"
77 const basePath = "https://www.googleapis.com/adexchangebuyer/v1.4/"
78
79
80 const (
81
82 AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchange.buyer"
83 )
84
85
86 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
87 scopesOption := option.WithScopes(
88 "https://www.googleapis.com/auth/adexchange.buyer",
89 )
90
91 opts = append([]option.ClientOption{scopesOption}, opts...)
92 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
93 client, endpoint, err := htransport.NewClient(ctx, opts...)
94 if err != nil {
95 return nil, err
96 }
97 s, err := New(client)
98 if err != nil {
99 return nil, err
100 }
101 if endpoint != "" {
102 s.BasePath = endpoint
103 }
104 return s, nil
105 }
106
107
108
109
110
111
112 func New(client *http.Client) (*Service, error) {
113 if client == nil {
114 return nil, errors.New("client is nil")
115 }
116 s := &Service{client: client, BasePath: basePath}
117 s.Accounts = NewAccountsService(s)
118 s.BillingInfo = NewBillingInfoService(s)
119 s.Budget = NewBudgetService(s)
120 s.Creatives = NewCreativesService(s)
121 s.Marketplacedeals = NewMarketplacedealsService(s)
122 s.Marketplacenotes = NewMarketplacenotesService(s)
123 s.Marketplaceprivateauction = NewMarketplaceprivateauctionService(s)
124 s.PerformanceReport = NewPerformanceReportService(s)
125 s.PretargetingConfig = NewPretargetingConfigService(s)
126 s.Products = NewProductsService(s)
127 s.Proposals = NewProposalsService(s)
128 s.Pubprofiles = NewPubprofilesService(s)
129 return s, nil
130 }
131
132 type Service struct {
133 client *http.Client
134 BasePath string
135 UserAgent string
136
137 Accounts *AccountsService
138
139 BillingInfo *BillingInfoService
140
141 Budget *BudgetService
142
143 Creatives *CreativesService
144
145 Marketplacedeals *MarketplacedealsService
146
147 Marketplacenotes *MarketplacenotesService
148
149 Marketplaceprivateauction *MarketplaceprivateauctionService
150
151 PerformanceReport *PerformanceReportService
152
153 PretargetingConfig *PretargetingConfigService
154
155 Products *ProductsService
156
157 Proposals *ProposalsService
158
159 Pubprofiles *PubprofilesService
160 }
161
162 func (s *Service) userAgent() string {
163 if s.UserAgent == "" {
164 return googleapi.UserAgent
165 }
166 return googleapi.UserAgent + " " + s.UserAgent
167 }
168
169 func NewAccountsService(s *Service) *AccountsService {
170 rs := &AccountsService{s: s}
171 return rs
172 }
173
174 type AccountsService struct {
175 s *Service
176 }
177
178 func NewBillingInfoService(s *Service) *BillingInfoService {
179 rs := &BillingInfoService{s: s}
180 return rs
181 }
182
183 type BillingInfoService struct {
184 s *Service
185 }
186
187 func NewBudgetService(s *Service) *BudgetService {
188 rs := &BudgetService{s: s}
189 return rs
190 }
191
192 type BudgetService struct {
193 s *Service
194 }
195
196 func NewCreativesService(s *Service) *CreativesService {
197 rs := &CreativesService{s: s}
198 return rs
199 }
200
201 type CreativesService struct {
202 s *Service
203 }
204
205 func NewMarketplacedealsService(s *Service) *MarketplacedealsService {
206 rs := &MarketplacedealsService{s: s}
207 return rs
208 }
209
210 type MarketplacedealsService struct {
211 s *Service
212 }
213
214 func NewMarketplacenotesService(s *Service) *MarketplacenotesService {
215 rs := &MarketplacenotesService{s: s}
216 return rs
217 }
218
219 type MarketplacenotesService struct {
220 s *Service
221 }
222
223 func NewMarketplaceprivateauctionService(s *Service) *MarketplaceprivateauctionService {
224 rs := &MarketplaceprivateauctionService{s: s}
225 return rs
226 }
227
228 type MarketplaceprivateauctionService struct {
229 s *Service
230 }
231
232 func NewPerformanceReportService(s *Service) *PerformanceReportService {
233 rs := &PerformanceReportService{s: s}
234 return rs
235 }
236
237 type PerformanceReportService struct {
238 s *Service
239 }
240
241 func NewPretargetingConfigService(s *Service) *PretargetingConfigService {
242 rs := &PretargetingConfigService{s: s}
243 return rs
244 }
245
246 type PretargetingConfigService struct {
247 s *Service
248 }
249
250 func NewProductsService(s *Service) *ProductsService {
251 rs := &ProductsService{s: s}
252 return rs
253 }
254
255 type ProductsService struct {
256 s *Service
257 }
258
259 func NewProposalsService(s *Service) *ProposalsService {
260 rs := &ProposalsService{s: s}
261 return rs
262 }
263
264 type ProposalsService struct {
265 s *Service
266 }
267
268 func NewPubprofilesService(s *Service) *PubprofilesService {
269 rs := &PubprofilesService{s: s}
270 return rs
271 }
272
273 type PubprofilesService struct {
274 s *Service
275 }
276
277
278 type Account struct {
279
280
281
282
283
284
285 ApplyPretargetingToNonGuaranteedDeals bool `json:"applyPretargetingToNonGuaranteedDeals,omitempty"`
286
287
288 BidderLocation []*AccountBidderLocation `json:"bidderLocation,omitempty"`
289
290
291
292
293 CookieMatchingNid string `json:"cookieMatchingNid,omitempty"`
294
295
296 CookieMatchingUrl string `json:"cookieMatchingUrl,omitempty"`
297
298
299 Id int64 `json:"id,omitempty"`
300
301
302 Kind string `json:"kind,omitempty"`
303
304
305
306
307
308 MaximumActiveCreatives int64 `json:"maximumActiveCreatives,omitempty"`
309
310
311
312
313 MaximumTotalQps int64 `json:"maximumTotalQps,omitempty"`
314
315
316
317 NumberActiveCreatives int64 `json:"numberActiveCreatives,omitempty"`
318
319
320
321 googleapi.ServerResponse `json:"-"`
322
323
324
325
326
327
328
329
330 ForceSendFields []string `json:"-"`
331
332
333
334
335
336
337
338
339 NullFields []string `json:"-"`
340 }
341
342 func (s *Account) MarshalJSON() ([]byte, error) {
343 type NoMethod Account
344 raw := NoMethod(*s)
345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
346 }
347
348 type AccountBidderLocation struct {
349
350
351
352
353
354
355
356
357
358
359
360 BidProtocol string `json:"bidProtocol,omitempty"`
361
362
363 MaximumQps int64 `json:"maximumQps,omitempty"`
364
365
366
367
368
369
370
371
372 Region string `json:"region,omitempty"`
373
374
375 Url string `json:"url,omitempty"`
376
377
378
379
380
381
382
383 ForceSendFields []string `json:"-"`
384
385
386
387
388
389
390
391 NullFields []string `json:"-"`
392 }
393
394 func (s *AccountBidderLocation) MarshalJSON() ([]byte, error) {
395 type NoMethod AccountBidderLocation
396 raw := NoMethod(*s)
397 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
398 }
399
400
401
402
403 type AccountsList struct {
404
405 Items []*Account `json:"items,omitempty"`
406
407
408 Kind string `json:"kind,omitempty"`
409
410
411
412 googleapi.ServerResponse `json:"-"`
413
414
415
416
417
418
419
420 ForceSendFields []string `json:"-"`
421
422
423
424
425
426
427
428 NullFields []string `json:"-"`
429 }
430
431 func (s *AccountsList) MarshalJSON() ([]byte, error) {
432 type NoMethod AccountsList
433 raw := NoMethod(*s)
434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
435 }
436
437 type AddOrderDealsRequest struct {
438
439 Deals []*MarketplaceDeal `json:"deals,omitempty"`
440
441
442 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"`
443
444
445 UpdateAction string `json:"updateAction,omitempty"`
446
447
448
449
450
451
452
453 ForceSendFields []string `json:"-"`
454
455
456
457
458
459
460
461 NullFields []string `json:"-"`
462 }
463
464 func (s *AddOrderDealsRequest) MarshalJSON() ([]byte, error) {
465 type NoMethod AddOrderDealsRequest
466 raw := NoMethod(*s)
467 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
468 }
469
470 type AddOrderDealsResponse struct {
471
472
473 Deals []*MarketplaceDeal `json:"deals,omitempty"`
474
475
476 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"`
477
478
479
480 googleapi.ServerResponse `json:"-"`
481
482
483
484
485
486
487
488 ForceSendFields []string `json:"-"`
489
490
491
492
493
494
495
496 NullFields []string `json:"-"`
497 }
498
499 func (s *AddOrderDealsResponse) MarshalJSON() ([]byte, error) {
500 type NoMethod AddOrderDealsResponse
501 raw := NoMethod(*s)
502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
503 }
504
505 type AddOrderNotesRequest struct {
506
507 Notes []*MarketplaceNote `json:"notes,omitempty"`
508
509
510
511
512
513
514
515 ForceSendFields []string `json:"-"`
516
517
518
519
520
521
522
523 NullFields []string `json:"-"`
524 }
525
526 func (s *AddOrderNotesRequest) MarshalJSON() ([]byte, error) {
527 type NoMethod AddOrderNotesRequest
528 raw := NoMethod(*s)
529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
530 }
531
532 type AddOrderNotesResponse struct {
533 Notes []*MarketplaceNote `json:"notes,omitempty"`
534
535
536
537 googleapi.ServerResponse `json:"-"`
538
539
540
541
542
543
544
545 ForceSendFields []string `json:"-"`
546
547
548
549
550
551
552
553 NullFields []string `json:"-"`
554 }
555
556 func (s *AddOrderNotesResponse) MarshalJSON() ([]byte, error) {
557 type NoMethod AddOrderNotesResponse
558 raw := NoMethod(*s)
559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
560 }
561
562
563 type BillingInfo struct {
564
565 AccountId int64 `json:"accountId,omitempty"`
566
567
568 AccountName string `json:"accountName,omitempty"`
569
570
571
572
573 BillingId []string `json:"billingId,omitempty"`
574
575
576 Kind string `json:"kind,omitempty"`
577
578
579
580 googleapi.ServerResponse `json:"-"`
581
582
583
584
585
586
587
588 ForceSendFields []string `json:"-"`
589
590
591
592
593
594
595
596 NullFields []string `json:"-"`
597 }
598
599 func (s *BillingInfo) MarshalJSON() ([]byte, error) {
600 type NoMethod BillingInfo
601 raw := NoMethod(*s)
602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
603 }
604
605
606
607
608 type BillingInfoList struct {
609
610 Items []*BillingInfo `json:"items,omitempty"`
611
612
613 Kind string `json:"kind,omitempty"`
614
615
616
617 googleapi.ServerResponse `json:"-"`
618
619
620
621
622
623
624
625 ForceSendFields []string `json:"-"`
626
627
628
629
630
631
632
633 NullFields []string `json:"-"`
634 }
635
636 func (s *BillingInfoList) MarshalJSON() ([]byte, error) {
637 type NoMethod BillingInfoList
638 raw := NoMethod(*s)
639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
640 }
641
642
643 type Budget struct {
644
645
646 AccountId int64 `json:"accountId,omitempty,string"`
647
648
649
650 BillingId int64 `json:"billingId,omitempty,string"`
651
652
653
654
655 BudgetAmount int64 `json:"budgetAmount,omitempty,string"`
656
657
658
659 CurrencyCode string `json:"currencyCode,omitempty"`
660
661
662 Id string `json:"id,omitempty"`
663
664
665 Kind string `json:"kind,omitempty"`
666
667
668
669 googleapi.ServerResponse `json:"-"`
670
671
672
673
674
675
676
677 ForceSendFields []string `json:"-"`
678
679
680
681
682
683
684
685 NullFields []string `json:"-"`
686 }
687
688 func (s *Budget) MarshalJSON() ([]byte, error) {
689 type NoMethod Budget
690 raw := NoMethod(*s)
691 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
692 }
693
694 type Buyer struct {
695
696 AccountId string `json:"accountId,omitempty"`
697
698
699
700
701
702
703
704 ForceSendFields []string `json:"-"`
705
706
707
708
709
710
711
712 NullFields []string `json:"-"`
713 }
714
715 func (s *Buyer) MarshalJSON() ([]byte, error) {
716 type NoMethod Buyer
717 raw := NoMethod(*s)
718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
719 }
720
721 type ContactInformation struct {
722
723 Email string `json:"email,omitempty"`
724
725
726 Name string `json:"name,omitempty"`
727
728
729
730
731
732
733
734 ForceSendFields []string `json:"-"`
735
736
737
738
739
740
741
742 NullFields []string `json:"-"`
743 }
744
745 func (s *ContactInformation) MarshalJSON() ([]byte, error) {
746 type NoMethod ContactInformation
747 raw := NoMethod(*s)
748 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
749 }
750
751 type CreateOrdersRequest struct {
752
753 Proposals []*Proposal `json:"proposals,omitempty"`
754
755
756 WebPropertyCode string `json:"webPropertyCode,omitempty"`
757
758
759
760
761
762
763
764 ForceSendFields []string `json:"-"`
765
766
767
768
769
770
771
772 NullFields []string `json:"-"`
773 }
774
775 func (s *CreateOrdersRequest) MarshalJSON() ([]byte, error) {
776 type NoMethod CreateOrdersRequest
777 raw := NoMethod(*s)
778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
779 }
780
781 type CreateOrdersResponse struct {
782
783 Proposals []*Proposal `json:"proposals,omitempty"`
784
785
786
787 googleapi.ServerResponse `json:"-"`
788
789
790
791
792
793
794
795 ForceSendFields []string `json:"-"`
796
797
798
799
800
801
802
803 NullFields []string `json:"-"`
804 }
805
806 func (s *CreateOrdersResponse) MarshalJSON() ([]byte, error) {
807 type NoMethod CreateOrdersResponse
808 raw := NoMethod(*s)
809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
810 }
811
812
813 type Creative struct {
814
815
816
817 HTMLSnippet string `json:"HTMLSnippet,omitempty"`
818
819
820 AccountId int64 `json:"accountId,omitempty"`
821
822
823
824 AdChoicesDestinationUrl string `json:"adChoicesDestinationUrl,omitempty"`
825
826 AdTechnologyProviders *CreativeAdTechnologyProviders `json:"adTechnologyProviders,omitempty"`
827
828
829
830 AdvertiserId googleapi.Int64s `json:"advertiserId,omitempty"`
831
832
833
834
835 AdvertiserName string `json:"advertiserName,omitempty"`
836
837
838 AgencyId int64 `json:"agencyId,omitempty,string"`
839
840
841
842
843
844 ApiUploadTimestamp string `json:"apiUploadTimestamp,omitempty"`
845
846
847
848
849 Attribute []int64 `json:"attribute,omitempty"`
850
851
852
853 BuyerCreativeId string `json:"buyerCreativeId,omitempty"`
854
855
856 ClickThroughUrl []string `json:"clickThroughUrl,omitempty"`
857
858
859
860 Corrections []*CreativeCorrections `json:"corrections,omitempty"`
861
862
863
864
865
866
867
868
869
870
871 CreativeStatusIdentityType string `json:"creativeStatusIdentityType,omitempty"`
872
873
874
875
876
877
878
879 DealsStatus string `json:"dealsStatus,omitempty"`
880
881
882
883 DetectedDomains []string `json:"detectedDomains,omitempty"`
884
885
886
887 FilteringReasons *CreativeFilteringReasons `json:"filteringReasons,omitempty"`
888
889
890 Height int64 `json:"height,omitempty"`
891
892
893
894 ImpressionTrackingUrl []string `json:"impressionTrackingUrl,omitempty"`
895
896
897 Kind string `json:"kind,omitempty"`
898
899
900
901 Languages []string `json:"languages,omitempty"`
902
903
904
905
906 NativeAd *CreativeNativeAd `json:"nativeAd,omitempty"`
907
908
909
910
911
912
913
914 OpenAuctionStatus string `json:"openAuctionStatus,omitempty"`
915
916
917
918
919
920 ProductCategories []int64 `json:"productCategories,omitempty"`
921
922
923
924
925 RestrictedCategories []int64 `json:"restrictedCategories,omitempty"`
926
927
928
929
930
931 SensitiveCategories []int64 `json:"sensitiveCategories,omitempty"`
932
933
934
935
936
937
938
939 ServingRestrictions []*CreativeServingRestrictions `json:"servingRestrictions,omitempty"`
940
941
942
943
944 VendorType []int64 `json:"vendorType,omitempty"`
945
946
947
948 Version int64 `json:"version,omitempty"`
949
950
951
952
953 VideoURL string `json:"videoURL,omitempty"`
954
955
956
957
958 VideoVastXML string `json:"videoVastXML,omitempty"`
959
960
961 Width int64 `json:"width,omitempty"`
962
963
964
965 googleapi.ServerResponse `json:"-"`
966
967
968
969
970
971
972
973 ForceSendFields []string `json:"-"`
974
975
976
977
978
979
980
981 NullFields []string `json:"-"`
982 }
983
984 func (s *Creative) MarshalJSON() ([]byte, error) {
985 type NoMethod Creative
986 raw := NoMethod(*s)
987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
988 }
989
990 type CreativeAdTechnologyProviders struct {
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005 DetectedProviderIds googleapi.Int64s `json:"detectedProviderIds,omitempty"`
1006
1007
1008
1009
1010
1011
1012 HasUnidentifiedProvider bool `json:"hasUnidentifiedProvider,omitempty"`
1013
1014
1015
1016
1017
1018
1019
1020 ForceSendFields []string `json:"-"`
1021
1022
1023
1024
1025
1026
1027
1028
1029 NullFields []string `json:"-"`
1030 }
1031
1032 func (s *CreativeAdTechnologyProviders) MarshalJSON() ([]byte, error) {
1033 type NoMethod CreativeAdTechnologyProviders
1034 raw := NoMethod(*s)
1035 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1036 }
1037
1038 type CreativeCorrections struct {
1039
1040
1041 Contexts []*CreativeCorrectionsContexts `json:"contexts,omitempty"`
1042
1043
1044 Details []string `json:"details,omitempty"`
1045
1046
1047 Reason string `json:"reason,omitempty"`
1048
1049
1050
1051
1052
1053
1054
1055 ForceSendFields []string `json:"-"`
1056
1057
1058
1059
1060
1061
1062
1063 NullFields []string `json:"-"`
1064 }
1065
1066 func (s *CreativeCorrections) MarshalJSON() ([]byte, error) {
1067 type NoMethod CreativeCorrections
1068 raw := NoMethod(*s)
1069 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1070 }
1071
1072 type CreativeCorrectionsContexts struct {
1073
1074
1075 AuctionType []string `json:"auctionType,omitempty"`
1076
1077
1078
1079 ContextType string `json:"contextType,omitempty"`
1080
1081
1082
1083 GeoCriteriaId []int64 `json:"geoCriteriaId,omitempty"`
1084
1085
1086
1087 Platform []string `json:"platform,omitempty"`
1088
1089
1090
1091
1092
1093
1094
1095 ForceSendFields []string `json:"-"`
1096
1097
1098
1099
1100
1101
1102
1103 NullFields []string `json:"-"`
1104 }
1105
1106 func (s *CreativeCorrectionsContexts) MarshalJSON() ([]byte, error) {
1107 type NoMethod CreativeCorrectionsContexts
1108 raw := NoMethod(*s)
1109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1110 }
1111
1112
1113
1114 type CreativeFilteringReasons struct {
1115
1116
1117 Date string `json:"date,omitempty"`
1118
1119
1120 Reasons []*CreativeFilteringReasonsReasons `json:"reasons,omitempty"`
1121
1122
1123
1124
1125
1126
1127
1128 ForceSendFields []string `json:"-"`
1129
1130
1131
1132
1133
1134
1135
1136 NullFields []string `json:"-"`
1137 }
1138
1139 func (s *CreativeFilteringReasons) MarshalJSON() ([]byte, error) {
1140 type NoMethod CreativeFilteringReasons
1141 raw := NoMethod(*s)
1142 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1143 }
1144
1145 type CreativeFilteringReasonsReasons struct {
1146
1147
1148
1149 FilteringCount int64 `json:"filteringCount,omitempty,string"`
1150
1151
1152
1153 FilteringStatus int64 `json:"filteringStatus,omitempty"`
1154
1155
1156
1157
1158
1159
1160
1161 ForceSendFields []string `json:"-"`
1162
1163
1164
1165
1166
1167
1168
1169
1170 NullFields []string `json:"-"`
1171 }
1172
1173 func (s *CreativeFilteringReasonsReasons) MarshalJSON() ([]byte, error) {
1174 type NoMethod CreativeFilteringReasonsReasons
1175 raw := NoMethod(*s)
1176 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1177 }
1178
1179
1180
1181
1182 type CreativeNativeAd struct {
1183 Advertiser string `json:"advertiser,omitempty"`
1184
1185
1186 AppIcon *CreativeNativeAdAppIcon `json:"appIcon,omitempty"`
1187
1188
1189 Body string `json:"body,omitempty"`
1190
1191
1192
1193 CallToAction string `json:"callToAction,omitempty"`
1194
1195
1196
1197 ClickLinkUrl string `json:"clickLinkUrl,omitempty"`
1198
1199
1200 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
1201
1202
1203 Headline string `json:"headline,omitempty"`
1204
1205
1206 Image *CreativeNativeAdImage `json:"image,omitempty"`
1207
1208
1209
1210 ImpressionTrackingUrl []string `json:"impressionTrackingUrl,omitempty"`
1211
1212
1213 Logo *CreativeNativeAdLogo `json:"logo,omitempty"`
1214
1215
1216 Price string `json:"price,omitempty"`
1217
1218
1219
1220 StarRating float64 `json:"starRating,omitempty"`
1221
1222
1223
1224 VideoURL string `json:"videoURL,omitempty"`
1225
1226
1227
1228
1229
1230
1231
1232 ForceSendFields []string `json:"-"`
1233
1234
1235
1236
1237
1238
1239
1240 NullFields []string `json:"-"`
1241 }
1242
1243 func (s *CreativeNativeAd) MarshalJSON() ([]byte, error) {
1244 type NoMethod CreativeNativeAd
1245 raw := NoMethod(*s)
1246 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1247 }
1248
1249 func (s *CreativeNativeAd) UnmarshalJSON(data []byte) error {
1250 type NoMethod CreativeNativeAd
1251 var s1 struct {
1252 StarRating gensupport.JSONFloat64 `json:"starRating"`
1253 *NoMethod
1254 }
1255 s1.NoMethod = (*NoMethod)(s)
1256 if err := json.Unmarshal(data, &s1); err != nil {
1257 return err
1258 }
1259 s.StarRating = float64(s1.StarRating)
1260 return nil
1261 }
1262
1263
1264 type CreativeNativeAdAppIcon struct {
1265 Height int64 `json:"height,omitempty"`
1266
1267 Url string `json:"url,omitempty"`
1268
1269 Width int64 `json:"width,omitempty"`
1270
1271
1272
1273
1274
1275
1276
1277 ForceSendFields []string `json:"-"`
1278
1279
1280
1281
1282
1283
1284
1285 NullFields []string `json:"-"`
1286 }
1287
1288 func (s *CreativeNativeAdAppIcon) MarshalJSON() ([]byte, error) {
1289 type NoMethod CreativeNativeAdAppIcon
1290 raw := NoMethod(*s)
1291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1292 }
1293
1294
1295 type CreativeNativeAdImage struct {
1296 Height int64 `json:"height,omitempty"`
1297
1298 Url string `json:"url,omitempty"`
1299
1300 Width int64 `json:"width,omitempty"`
1301
1302
1303
1304
1305
1306
1307
1308 ForceSendFields []string `json:"-"`
1309
1310
1311
1312
1313
1314
1315
1316 NullFields []string `json:"-"`
1317 }
1318
1319 func (s *CreativeNativeAdImage) MarshalJSON() ([]byte, error) {
1320 type NoMethod CreativeNativeAdImage
1321 raw := NoMethod(*s)
1322 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1323 }
1324
1325
1326 type CreativeNativeAdLogo struct {
1327 Height int64 `json:"height,omitempty"`
1328
1329 Url string `json:"url,omitempty"`
1330
1331 Width int64 `json:"width,omitempty"`
1332
1333
1334
1335
1336
1337
1338
1339 ForceSendFields []string `json:"-"`
1340
1341
1342
1343
1344
1345
1346
1347 NullFields []string `json:"-"`
1348 }
1349
1350 func (s *CreativeNativeAdLogo) MarshalJSON() ([]byte, error) {
1351 type NoMethod CreativeNativeAdLogo
1352 raw := NoMethod(*s)
1353 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1354 }
1355
1356 type CreativeServingRestrictions struct {
1357
1358 Contexts []*CreativeServingRestrictionsContexts `json:"contexts,omitempty"`
1359
1360
1361
1362
1363
1364
1365
1366 DisapprovalReasons []*CreativeServingRestrictionsDisapprovalReasons `json:"disapprovalReasons,omitempty"`
1367
1368
1369
1370 Reason string `json:"reason,omitempty"`
1371
1372
1373
1374
1375
1376
1377
1378 ForceSendFields []string `json:"-"`
1379
1380
1381
1382
1383
1384
1385
1386 NullFields []string `json:"-"`
1387 }
1388
1389 func (s *CreativeServingRestrictions) MarshalJSON() ([]byte, error) {
1390 type NoMethod CreativeServingRestrictions
1391 raw := NoMethod(*s)
1392 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1393 }
1394
1395 type CreativeServingRestrictionsContexts struct {
1396
1397
1398 AuctionType []string `json:"auctionType,omitempty"`
1399
1400
1401
1402 ContextType string `json:"contextType,omitempty"`
1403
1404
1405
1406
1407
1408 GeoCriteriaId []int64 `json:"geoCriteriaId,omitempty"`
1409
1410
1411
1412 Platform []string `json:"platform,omitempty"`
1413
1414
1415
1416
1417
1418
1419
1420 ForceSendFields []string `json:"-"`
1421
1422
1423
1424
1425
1426
1427
1428 NullFields []string `json:"-"`
1429 }
1430
1431 func (s *CreativeServingRestrictionsContexts) MarshalJSON() ([]byte, error) {
1432 type NoMethod CreativeServingRestrictionsContexts
1433 raw := NoMethod(*s)
1434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1435 }
1436
1437 type CreativeServingRestrictionsDisapprovalReasons struct {
1438
1439 Details []string `json:"details,omitempty"`
1440
1441
1442 Reason string `json:"reason,omitempty"`
1443
1444
1445
1446
1447
1448
1449
1450 ForceSendFields []string `json:"-"`
1451
1452
1453
1454
1455
1456
1457
1458 NullFields []string `json:"-"`
1459 }
1460
1461 func (s *CreativeServingRestrictionsDisapprovalReasons) MarshalJSON() ([]byte, error) {
1462 type NoMethod CreativeServingRestrictionsDisapprovalReasons
1463 raw := NoMethod(*s)
1464 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1465 }
1466
1467
1468 type CreativeDealIds struct {
1469
1470 DealStatuses []*CreativeDealIdsDealStatuses `json:"dealStatuses,omitempty"`
1471
1472
1473 Kind string `json:"kind,omitempty"`
1474
1475
1476
1477 googleapi.ServerResponse `json:"-"`
1478
1479
1480
1481
1482
1483
1484
1485 ForceSendFields []string `json:"-"`
1486
1487
1488
1489
1490
1491
1492
1493 NullFields []string `json:"-"`
1494 }
1495
1496 func (s *CreativeDealIds) MarshalJSON() ([]byte, error) {
1497 type NoMethod CreativeDealIds
1498 raw := NoMethod(*s)
1499 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1500 }
1501
1502 type CreativeDealIdsDealStatuses struct {
1503
1504 ArcStatus string `json:"arcStatus,omitempty"`
1505
1506
1507 DealId int64 `json:"dealId,omitempty,string"`
1508
1509
1510 WebPropertyId int64 `json:"webPropertyId,omitempty"`
1511
1512
1513
1514
1515
1516
1517
1518 ForceSendFields []string `json:"-"`
1519
1520
1521
1522
1523
1524
1525
1526 NullFields []string `json:"-"`
1527 }
1528
1529 func (s *CreativeDealIdsDealStatuses) MarshalJSON() ([]byte, error) {
1530 type NoMethod CreativeDealIdsDealStatuses
1531 raw := NoMethod(*s)
1532 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1533 }
1534
1535
1536
1537
1538 type CreativesList struct {
1539
1540 Items []*Creative `json:"items,omitempty"`
1541
1542
1543 Kind string `json:"kind,omitempty"`
1544
1545
1546
1547
1548 NextPageToken string `json:"nextPageToken,omitempty"`
1549
1550
1551
1552 googleapi.ServerResponse `json:"-"`
1553
1554
1555
1556
1557
1558
1559
1560 ForceSendFields []string `json:"-"`
1561
1562
1563
1564
1565
1566
1567
1568 NullFields []string `json:"-"`
1569 }
1570
1571 func (s *CreativesList) MarshalJSON() ([]byte, error) {
1572 type NoMethod CreativesList
1573 raw := NoMethod(*s)
1574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1575 }
1576
1577 type DealServingMetadata struct {
1578
1579
1580
1581 AlcoholAdsAllowed bool `json:"alcoholAdsAllowed,omitempty"`
1582
1583
1584
1585 DealPauseStatus *DealServingMetadataDealPauseStatus `json:"dealPauseStatus,omitempty"`
1586
1587
1588
1589
1590
1591
1592
1593 ForceSendFields []string `json:"-"`
1594
1595
1596
1597
1598
1599
1600
1601
1602 NullFields []string `json:"-"`
1603 }
1604
1605 func (s *DealServingMetadata) MarshalJSON() ([]byte, error) {
1606 type NoMethod DealServingMetadata
1607 raw := NoMethod(*s)
1608 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1609 }
1610
1611
1612
1613
1614
1615 type DealServingMetadataDealPauseStatus struct {
1616 BuyerPauseReason string `json:"buyerPauseReason,omitempty"`
1617
1618
1619
1620 FirstPausedBy string `json:"firstPausedBy,omitempty"`
1621
1622 HasBuyerPaused bool `json:"hasBuyerPaused,omitempty"`
1623
1624 HasSellerPaused bool `json:"hasSellerPaused,omitempty"`
1625
1626 SellerPauseReason string `json:"sellerPauseReason,omitempty"`
1627
1628
1629
1630
1631
1632
1633
1634 ForceSendFields []string `json:"-"`
1635
1636
1637
1638
1639
1640
1641
1642
1643 NullFields []string `json:"-"`
1644 }
1645
1646 func (s *DealServingMetadataDealPauseStatus) MarshalJSON() ([]byte, error) {
1647 type NoMethod DealServingMetadataDealPauseStatus
1648 raw := NoMethod(*s)
1649 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1650 }
1651
1652 type DealTerms struct {
1653
1654 BrandingType string `json:"brandingType,omitempty"`
1655
1656
1657
1658
1659
1660 CrossListedExternalDealIdType string `json:"crossListedExternalDealIdType,omitempty"`
1661
1662
1663 Description string `json:"description,omitempty"`
1664
1665
1666
1667 EstimatedGrossSpend *Price `json:"estimatedGrossSpend,omitempty"`
1668
1669
1670
1671 EstimatedImpressionsPerDay int64 `json:"estimatedImpressionsPerDay,omitempty,string"`
1672
1673
1674
1675 GuaranteedFixedPriceTerms *DealTermsGuaranteedFixedPriceTerms `json:"guaranteedFixedPriceTerms,omitempty"`
1676
1677
1678
1679 NonGuaranteedAuctionTerms *DealTermsNonGuaranteedAuctionTerms `json:"nonGuaranteedAuctionTerms,omitempty"`
1680
1681
1682
1683 NonGuaranteedFixedPriceTerms *DealTermsNonGuaranteedFixedPriceTerms `json:"nonGuaranteedFixedPriceTerms,omitempty"`
1684
1685
1686
1687 RubiconNonGuaranteedTerms *DealTermsRubiconNonGuaranteedTerms `json:"rubiconNonGuaranteedTerms,omitempty"`
1688
1689
1690
1691 SellerTimeZone string `json:"sellerTimeZone,omitempty"`
1692
1693
1694
1695
1696
1697
1698
1699 ForceSendFields []string `json:"-"`
1700
1701
1702
1703
1704
1705
1706
1707 NullFields []string `json:"-"`
1708 }
1709
1710 func (s *DealTerms) MarshalJSON() ([]byte, error) {
1711 type NoMethod DealTerms
1712 raw := NoMethod(*s)
1713 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1714 }
1715
1716 type DealTermsGuaranteedFixedPriceTerms struct {
1717
1718
1719
1720 BillingInfo *DealTermsGuaranteedFixedPriceTermsBillingInfo `json:"billingInfo,omitempty"`
1721
1722
1723 FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"`
1724
1725
1726
1727
1728 GuaranteedImpressions int64 `json:"guaranteedImpressions,omitempty,string"`
1729
1730
1731
1732
1733 GuaranteedLooks int64 `json:"guaranteedLooks,omitempty,string"`
1734
1735
1736
1737
1738 MinimumDailyLooks int64 `json:"minimumDailyLooks,omitempty,string"`
1739
1740
1741
1742
1743
1744
1745
1746 ForceSendFields []string `json:"-"`
1747
1748
1749
1750
1751
1752
1753
1754 NullFields []string `json:"-"`
1755 }
1756
1757 func (s *DealTermsGuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) {
1758 type NoMethod DealTermsGuaranteedFixedPriceTerms
1759 raw := NoMethod(*s)
1760 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1761 }
1762
1763 type DealTermsGuaranteedFixedPriceTermsBillingInfo struct {
1764
1765
1766
1767
1768 CurrencyConversionTimeMs int64 `json:"currencyConversionTimeMs,omitempty,string"`
1769
1770
1771
1772
1773 DfpLineItemId int64 `json:"dfpLineItemId,omitempty,string"`
1774
1775
1776
1777
1778
1779
1780 OriginalContractedQuantity int64 `json:"originalContractedQuantity,omitempty,string"`
1781
1782
1783
1784 Price *Price `json:"price,omitempty"`
1785
1786
1787
1788
1789
1790
1791
1792
1793 ForceSendFields []string `json:"-"`
1794
1795
1796
1797
1798
1799
1800
1801
1802 NullFields []string `json:"-"`
1803 }
1804
1805 func (s *DealTermsGuaranteedFixedPriceTermsBillingInfo) MarshalJSON() ([]byte, error) {
1806 type NoMethod DealTermsGuaranteedFixedPriceTermsBillingInfo
1807 raw := NoMethod(*s)
1808 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1809 }
1810
1811 type DealTermsNonGuaranteedAuctionTerms struct {
1812
1813
1814
1815 AutoOptimizePrivateAuction bool `json:"autoOptimizePrivateAuction,omitempty"`
1816
1817
1818 ReservePricePerBuyers []*PricePerBuyer `json:"reservePricePerBuyers,omitempty"`
1819
1820
1821
1822
1823
1824
1825
1826
1827 ForceSendFields []string `json:"-"`
1828
1829
1830
1831
1832
1833
1834
1835
1836 NullFields []string `json:"-"`
1837 }
1838
1839 func (s *DealTermsNonGuaranteedAuctionTerms) MarshalJSON() ([]byte, error) {
1840 type NoMethod DealTermsNonGuaranteedAuctionTerms
1841 raw := NoMethod(*s)
1842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1843 }
1844
1845 type DealTermsNonGuaranteedFixedPriceTerms struct {
1846
1847 FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"`
1848
1849
1850
1851
1852
1853
1854
1855 ForceSendFields []string `json:"-"`
1856
1857
1858
1859
1860
1861
1862
1863 NullFields []string `json:"-"`
1864 }
1865
1866 func (s *DealTermsNonGuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) {
1867 type NoMethod DealTermsNonGuaranteedFixedPriceTerms
1868 raw := NoMethod(*s)
1869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1870 }
1871
1872 type DealTermsRubiconNonGuaranteedTerms struct {
1873
1874
1875 PriorityPrice *Price `json:"priorityPrice,omitempty"`
1876
1877
1878
1879 StandardPrice *Price `json:"standardPrice,omitempty"`
1880
1881
1882
1883
1884
1885
1886
1887 ForceSendFields []string `json:"-"`
1888
1889
1890
1891
1892
1893
1894
1895 NullFields []string `json:"-"`
1896 }
1897
1898 func (s *DealTermsRubiconNonGuaranteedTerms) MarshalJSON() ([]byte, error) {
1899 type NoMethod DealTermsRubiconNonGuaranteedTerms
1900 raw := NoMethod(*s)
1901 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1902 }
1903
1904 type DeleteOrderDealsRequest struct {
1905
1906 DealIds []string `json:"dealIds,omitempty"`
1907
1908
1909 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"`
1910
1911
1912 UpdateAction string `json:"updateAction,omitempty"`
1913
1914
1915
1916
1917
1918
1919
1920 ForceSendFields []string `json:"-"`
1921
1922
1923
1924
1925
1926
1927
1928 NullFields []string `json:"-"`
1929 }
1930
1931 func (s *DeleteOrderDealsRequest) MarshalJSON() ([]byte, error) {
1932 type NoMethod DeleteOrderDealsRequest
1933 raw := NoMethod(*s)
1934 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1935 }
1936
1937 type DeleteOrderDealsResponse struct {
1938
1939
1940 Deals []*MarketplaceDeal `json:"deals,omitempty"`
1941
1942
1943 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"`
1944
1945
1946
1947 googleapi.ServerResponse `json:"-"`
1948
1949
1950
1951
1952
1953
1954
1955 ForceSendFields []string `json:"-"`
1956
1957
1958
1959
1960
1961
1962
1963 NullFields []string `json:"-"`
1964 }
1965
1966 func (s *DeleteOrderDealsResponse) MarshalJSON() ([]byte, error) {
1967 type NoMethod DeleteOrderDealsResponse
1968 raw := NoMethod(*s)
1969 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1970 }
1971
1972 type DeliveryControl struct {
1973 CreativeBlockingLevel string `json:"creativeBlockingLevel,omitempty"`
1974
1975 DeliveryRateType string `json:"deliveryRateType,omitempty"`
1976
1977 FrequencyCaps []*DeliveryControlFrequencyCap `json:"frequencyCaps,omitempty"`
1978
1979
1980
1981
1982
1983
1984
1985
1986 ForceSendFields []string `json:"-"`
1987
1988
1989
1990
1991
1992
1993
1994
1995 NullFields []string `json:"-"`
1996 }
1997
1998 func (s *DeliveryControl) MarshalJSON() ([]byte, error) {
1999 type NoMethod DeliveryControl
2000 raw := NoMethod(*s)
2001 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2002 }
2003
2004 type DeliveryControlFrequencyCap struct {
2005 MaxImpressions int64 `json:"maxImpressions,omitempty"`
2006
2007 NumTimeUnits int64 `json:"numTimeUnits,omitempty"`
2008
2009 TimeUnitType string `json:"timeUnitType,omitempty"`
2010
2011
2012
2013
2014
2015
2016
2017 ForceSendFields []string `json:"-"`
2018
2019
2020
2021
2022
2023
2024
2025
2026 NullFields []string `json:"-"`
2027 }
2028
2029 func (s *DeliveryControlFrequencyCap) MarshalJSON() ([]byte, error) {
2030 type NoMethod DeliveryControlFrequencyCap
2031 raw := NoMethod(*s)
2032 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2033 }
2034
2035
2036
2037
2038 type Dimension struct {
2039 DimensionType string `json:"dimensionType,omitempty"`
2040
2041 DimensionValues []*DimensionDimensionValue `json:"dimensionValues,omitempty"`
2042
2043
2044
2045
2046
2047
2048
2049 ForceSendFields []string `json:"-"`
2050
2051
2052
2053
2054
2055
2056
2057 NullFields []string `json:"-"`
2058 }
2059
2060 func (s *Dimension) MarshalJSON() ([]byte, error) {
2061 type NoMethod Dimension
2062 raw := NoMethod(*s)
2063 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2064 }
2065
2066
2067 type DimensionDimensionValue struct {
2068
2069 Id int64 `json:"id,omitempty"`
2070
2071
2072
2073
2074 Name string `json:"name,omitempty"`
2075
2076
2077
2078
2079
2080 Percentage int64 `json:"percentage,omitempty"`
2081
2082
2083
2084
2085
2086
2087
2088 ForceSendFields []string `json:"-"`
2089
2090
2091
2092
2093
2094
2095
2096 NullFields []string `json:"-"`
2097 }
2098
2099 func (s *DimensionDimensionValue) MarshalJSON() ([]byte, error) {
2100 type NoMethod DimensionDimensionValue
2101 raw := NoMethod(*s)
2102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2103 }
2104
2105 type EditAllOrderDealsRequest struct {
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118 Deals []*MarketplaceDeal `json:"deals,omitempty"`
2119
2120
2121
2122
2123 Proposal *Proposal `json:"proposal,omitempty"`
2124
2125
2126
2127 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"`
2128
2129
2130 UpdateAction string `json:"updateAction,omitempty"`
2131
2132
2133
2134
2135
2136
2137
2138 ForceSendFields []string `json:"-"`
2139
2140
2141
2142
2143
2144
2145
2146 NullFields []string `json:"-"`
2147 }
2148
2149 func (s *EditAllOrderDealsRequest) MarshalJSON() ([]byte, error) {
2150 type NoMethod EditAllOrderDealsRequest
2151 raw := NoMethod(*s)
2152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2153 }
2154
2155 type EditAllOrderDealsResponse struct {
2156
2157 Deals []*MarketplaceDeal `json:"deals,omitempty"`
2158
2159
2160
2161 OrderRevisionNumber int64 `json:"orderRevisionNumber,omitempty,string"`
2162
2163
2164
2165 googleapi.ServerResponse `json:"-"`
2166
2167
2168
2169
2170
2171
2172
2173 ForceSendFields []string `json:"-"`
2174
2175
2176
2177
2178
2179
2180
2181 NullFields []string `json:"-"`
2182 }
2183
2184 func (s *EditAllOrderDealsResponse) MarshalJSON() ([]byte, error) {
2185 type NoMethod EditAllOrderDealsResponse
2186 raw := NoMethod(*s)
2187 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2188 }
2189
2190 type GetOffersResponse struct {
2191
2192 Products []*Product `json:"products,omitempty"`
2193
2194
2195
2196 googleapi.ServerResponse `json:"-"`
2197
2198
2199
2200
2201
2202
2203
2204 ForceSendFields []string `json:"-"`
2205
2206
2207
2208
2209
2210
2211
2212 NullFields []string `json:"-"`
2213 }
2214
2215 func (s *GetOffersResponse) MarshalJSON() ([]byte, error) {
2216 type NoMethod GetOffersResponse
2217 raw := NoMethod(*s)
2218 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2219 }
2220
2221 type GetOrderDealsResponse struct {
2222
2223 Deals []*MarketplaceDeal `json:"deals,omitempty"`
2224
2225
2226
2227 googleapi.ServerResponse `json:"-"`
2228
2229
2230
2231
2232
2233
2234
2235 ForceSendFields []string `json:"-"`
2236
2237
2238
2239
2240
2241
2242
2243 NullFields []string `json:"-"`
2244 }
2245
2246 func (s *GetOrderDealsResponse) MarshalJSON() ([]byte, error) {
2247 type NoMethod GetOrderDealsResponse
2248 raw := NoMethod(*s)
2249 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2250 }
2251
2252 type GetOrderNotesResponse struct {
2253
2254
2255
2256
2257 Notes []*MarketplaceNote `json:"notes,omitempty"`
2258
2259
2260
2261 googleapi.ServerResponse `json:"-"`
2262
2263
2264
2265
2266
2267
2268
2269 ForceSendFields []string `json:"-"`
2270
2271
2272
2273
2274
2275
2276
2277 NullFields []string `json:"-"`
2278 }
2279
2280 func (s *GetOrderNotesResponse) MarshalJSON() ([]byte, error) {
2281 type NoMethod GetOrderNotesResponse
2282 raw := NoMethod(*s)
2283 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2284 }
2285
2286 type GetOrdersResponse struct {
2287
2288 Proposals []*Proposal `json:"proposals,omitempty"`
2289
2290
2291
2292 googleapi.ServerResponse `json:"-"`
2293
2294
2295
2296
2297
2298
2299
2300 ForceSendFields []string `json:"-"`
2301
2302
2303
2304
2305
2306
2307
2308 NullFields []string `json:"-"`
2309 }
2310
2311 func (s *GetOrdersResponse) MarshalJSON() ([]byte, error) {
2312 type NoMethod GetOrdersResponse
2313 raw := NoMethod(*s)
2314 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2315 }
2316
2317 type GetPublisherProfilesByAccountIdResponse struct {
2318
2319 Profiles []*PublisherProfileApiProto `json:"profiles,omitempty"`
2320
2321
2322
2323 googleapi.ServerResponse `json:"-"`
2324
2325
2326
2327
2328
2329
2330
2331 ForceSendFields []string `json:"-"`
2332
2333
2334
2335
2336
2337
2338
2339 NullFields []string `json:"-"`
2340 }
2341
2342 func (s *GetPublisherProfilesByAccountIdResponse) MarshalJSON() ([]byte, error) {
2343 type NoMethod GetPublisherProfilesByAccountIdResponse
2344 raw := NoMethod(*s)
2345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2346 }
2347
2348
2349
2350
2351 type MarketplaceDeal struct {
2352
2353 BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"`
2354
2355
2356
2357 CreationTimeMs int64 `json:"creationTimeMs,omitempty,string"`
2358
2359
2360
2361 CreativePreApprovalPolicy string `json:"creativePreApprovalPolicy,omitempty"`
2362
2363
2364
2365 CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"`
2366
2367
2368 DealId string `json:"dealId,omitempty"`
2369
2370
2371
2372 DealServingMetadata *DealServingMetadata `json:"dealServingMetadata,omitempty"`
2373
2374
2375
2376
2377
2378 DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"`
2379
2380
2381
2382
2383 ExternalDealId string `json:"externalDealId,omitempty"`
2384
2385
2386
2387
2388 FlightEndTimeMs int64 `json:"flightEndTimeMs,omitempty,string"`
2389
2390
2391
2392
2393 FlightStartTimeMs int64 `json:"flightStartTimeMs,omitempty,string"`
2394
2395
2396
2397 InventoryDescription string `json:"inventoryDescription,omitempty"`
2398
2399
2400
2401
2402 IsRfpTemplate bool `json:"isRfpTemplate,omitempty"`
2403
2404
2405
2406 IsSetupComplete bool `json:"isSetupComplete,omitempty"`
2407
2408
2409
2410 Kind string `json:"kind,omitempty"`
2411
2412
2413
2414 LastUpdateTimeMs int64 `json:"lastUpdateTimeMs,omitempty,string"`
2415
2416 MakegoodRequestedReason string `json:"makegoodRequestedReason,omitempty"`
2417
2418
2419 Name string `json:"name,omitempty"`
2420
2421
2422
2423 ProductId string `json:"productId,omitempty"`
2424
2425
2426
2427 ProductRevisionNumber int64 `json:"productRevisionNumber,omitempty,string"`
2428
2429
2430
2431
2432 ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"`
2433
2434 ProposalId string `json:"proposalId,omitempty"`
2435
2436
2437
2438 SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"`
2439
2440
2441
2442 SharedTargetings []*SharedTargeting `json:"sharedTargetings,omitempty"`
2443
2444
2445
2446 SyndicationProduct string `json:"syndicationProduct,omitempty"`
2447
2448
2449 Terms *DealTerms `json:"terms,omitempty"`
2450
2451 WebPropertyCode string `json:"webPropertyCode,omitempty"`
2452
2453
2454
2455
2456
2457
2458
2459 ForceSendFields []string `json:"-"`
2460
2461
2462
2463
2464
2465
2466
2467
2468 NullFields []string `json:"-"`
2469 }
2470
2471 func (s *MarketplaceDeal) MarshalJSON() ([]byte, error) {
2472 type NoMethod MarketplaceDeal
2473 raw := NoMethod(*s)
2474 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2475 }
2476
2477 type MarketplaceDealParty struct {
2478
2479
2480 Buyer *Buyer `json:"buyer,omitempty"`
2481
2482
2483
2484 Seller *Seller `json:"seller,omitempty"`
2485
2486
2487
2488
2489
2490
2491
2492 ForceSendFields []string `json:"-"`
2493
2494
2495
2496
2497
2498
2499
2500 NullFields []string `json:"-"`
2501 }
2502
2503 func (s *MarketplaceDealParty) MarshalJSON() ([]byte, error) {
2504 type NoMethod MarketplaceDealParty
2505 raw := NoMethod(*s)
2506 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2507 }
2508
2509 type MarketplaceLabel struct {
2510
2511 AccountId string `json:"accountId,omitempty"`
2512
2513
2514 CreateTimeMs int64 `json:"createTimeMs,omitempty,string"`
2515
2516
2517
2518 DeprecatedMarketplaceDealParty *MarketplaceDealParty `json:"deprecatedMarketplaceDealParty,omitempty"`
2519
2520
2521 Label string `json:"label,omitempty"`
2522
2523
2524
2525
2526
2527
2528
2529 ForceSendFields []string `json:"-"`
2530
2531
2532
2533
2534
2535
2536
2537 NullFields []string `json:"-"`
2538 }
2539
2540 func (s *MarketplaceLabel) MarshalJSON() ([]byte, error) {
2541 type NoMethod MarketplaceLabel
2542 raw := NoMethod(*s)
2543 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2544 }
2545
2546
2547
2548 type MarketplaceNote struct {
2549
2550
2551 CreatorRole string `json:"creatorRole,omitempty"`
2552
2553
2554
2555 DealId string `json:"dealId,omitempty"`
2556
2557
2558
2559 Kind string `json:"kind,omitempty"`
2560
2561
2562 Note string `json:"note,omitempty"`
2563
2564
2565 NoteId string `json:"noteId,omitempty"`
2566
2567
2568 ProposalId string `json:"proposalId,omitempty"`
2569
2570
2571
2572 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"`
2573
2574
2575
2576 TimestampMs int64 `json:"timestampMs,omitempty,string"`
2577
2578
2579
2580
2581
2582
2583
2584 ForceSendFields []string `json:"-"`
2585
2586
2587
2588
2589
2590
2591
2592 NullFields []string `json:"-"`
2593 }
2594
2595 func (s *MarketplaceNote) MarshalJSON() ([]byte, error) {
2596 type NoMethod MarketplaceNote
2597 raw := NoMethod(*s)
2598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2599 }
2600
2601 type MobileApplication struct {
2602 AppStore string `json:"appStore,omitempty"`
2603
2604 ExternalAppId string `json:"externalAppId,omitempty"`
2605
2606
2607
2608
2609
2610
2611
2612 ForceSendFields []string `json:"-"`
2613
2614
2615
2616
2617
2618
2619
2620 NullFields []string `json:"-"`
2621 }
2622
2623 func (s *MobileApplication) MarshalJSON() ([]byte, error) {
2624 type NoMethod MobileApplication
2625 raw := NoMethod(*s)
2626 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2627 }
2628
2629
2630
2631 type PerformanceReport struct {
2632
2633 BidRate float64 `json:"bidRate,omitempty"`
2634
2635
2636 BidRequestRate float64 `json:"bidRequestRate,omitempty"`
2637
2638
2639
2640
2641 CalloutStatusRate []interface{} `json:"calloutStatusRate,omitempty"`
2642
2643
2644 CookieMatcherStatusRate []interface{} `json:"cookieMatcherStatusRate,omitempty"`
2645
2646
2647
2648 CreativeStatusRate []interface{} `json:"creativeStatusRate,omitempty"`
2649
2650
2651
2652 FilteredBidRate float64 `json:"filteredBidRate,omitempty"`
2653
2654
2655 HostedMatchStatusRate []interface{} `json:"hostedMatchStatusRate,omitempty"`
2656
2657
2658
2659 InventoryMatchRate float64 `json:"inventoryMatchRate,omitempty"`
2660
2661
2662 Kind string `json:"kind,omitempty"`
2663
2664
2665
2666
2667 Latency50thPercentile float64 `json:"latency50thPercentile,omitempty"`
2668
2669
2670
2671
2672 Latency85thPercentile float64 `json:"latency85thPercentile,omitempty"`
2673
2674
2675
2676
2677 Latency95thPercentile float64 `json:"latency95thPercentile,omitempty"`
2678
2679
2680
2681 NoQuotaInRegion float64 `json:"noQuotaInRegion,omitempty"`
2682
2683
2684 OutOfQuota float64 `json:"outOfQuota,omitempty"`
2685
2686
2687
2688 PixelMatchRequests float64 `json:"pixelMatchRequests,omitempty"`
2689
2690
2691
2692 PixelMatchResponses float64 `json:"pixelMatchResponses,omitempty"`
2693
2694
2695 QuotaConfiguredLimit float64 `json:"quotaConfiguredLimit,omitempty"`
2696
2697
2698 QuotaThrottledLimit float64 `json:"quotaThrottledLimit,omitempty"`
2699
2700
2701 Region string `json:"region,omitempty"`
2702
2703
2704
2705 SuccessfulRequestRate float64 `json:"successfulRequestRate,omitempty"`
2706
2707
2708
2709 Timestamp int64 `json:"timestamp,omitempty,string"`
2710
2711
2712
2713 UnsuccessfulRequestRate float64 `json:"unsuccessfulRequestRate,omitempty"`
2714
2715
2716
2717
2718
2719
2720
2721 ForceSendFields []string `json:"-"`
2722
2723
2724
2725
2726
2727
2728
2729 NullFields []string `json:"-"`
2730 }
2731
2732 func (s *PerformanceReport) MarshalJSON() ([]byte, error) {
2733 type NoMethod PerformanceReport
2734 raw := NoMethod(*s)
2735 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2736 }
2737
2738 func (s *PerformanceReport) UnmarshalJSON(data []byte) error {
2739 type NoMethod PerformanceReport
2740 var s1 struct {
2741 BidRate gensupport.JSONFloat64 `json:"bidRate"`
2742 BidRequestRate gensupport.JSONFloat64 `json:"bidRequestRate"`
2743 FilteredBidRate gensupport.JSONFloat64 `json:"filteredBidRate"`
2744 InventoryMatchRate gensupport.JSONFloat64 `json:"inventoryMatchRate"`
2745 Latency50thPercentile gensupport.JSONFloat64 `json:"latency50thPercentile"`
2746 Latency85thPercentile gensupport.JSONFloat64 `json:"latency85thPercentile"`
2747 Latency95thPercentile gensupport.JSONFloat64 `json:"latency95thPercentile"`
2748 NoQuotaInRegion gensupport.JSONFloat64 `json:"noQuotaInRegion"`
2749 OutOfQuota gensupport.JSONFloat64 `json:"outOfQuota"`
2750 PixelMatchRequests gensupport.JSONFloat64 `json:"pixelMatchRequests"`
2751 PixelMatchResponses gensupport.JSONFloat64 `json:"pixelMatchResponses"`
2752 QuotaConfiguredLimit gensupport.JSONFloat64 `json:"quotaConfiguredLimit"`
2753 QuotaThrottledLimit gensupport.JSONFloat64 `json:"quotaThrottledLimit"`
2754 SuccessfulRequestRate gensupport.JSONFloat64 `json:"successfulRequestRate"`
2755 UnsuccessfulRequestRate gensupport.JSONFloat64 `json:"unsuccessfulRequestRate"`
2756 *NoMethod
2757 }
2758 s1.NoMethod = (*NoMethod)(s)
2759 if err := json.Unmarshal(data, &s1); err != nil {
2760 return err
2761 }
2762 s.BidRate = float64(s1.BidRate)
2763 s.BidRequestRate = float64(s1.BidRequestRate)
2764 s.FilteredBidRate = float64(s1.FilteredBidRate)
2765 s.InventoryMatchRate = float64(s1.InventoryMatchRate)
2766 s.Latency50thPercentile = float64(s1.Latency50thPercentile)
2767 s.Latency85thPercentile = float64(s1.Latency85thPercentile)
2768 s.Latency95thPercentile = float64(s1.Latency95thPercentile)
2769 s.NoQuotaInRegion = float64(s1.NoQuotaInRegion)
2770 s.OutOfQuota = float64(s1.OutOfQuota)
2771 s.PixelMatchRequests = float64(s1.PixelMatchRequests)
2772 s.PixelMatchResponses = float64(s1.PixelMatchResponses)
2773 s.QuotaConfiguredLimit = float64(s1.QuotaConfiguredLimit)
2774 s.QuotaThrottledLimit = float64(s1.QuotaThrottledLimit)
2775 s.SuccessfulRequestRate = float64(s1.SuccessfulRequestRate)
2776 s.UnsuccessfulRequestRate = float64(s1.UnsuccessfulRequestRate)
2777 return nil
2778 }
2779
2780
2781
2782 type PerformanceReportList struct {
2783
2784 Kind string `json:"kind,omitempty"`
2785
2786
2787
2788 PerformanceReport []*PerformanceReport `json:"performanceReport,omitempty"`
2789
2790
2791
2792 googleapi.ServerResponse `json:"-"`
2793
2794
2795
2796
2797
2798
2799
2800 ForceSendFields []string `json:"-"`
2801
2802
2803
2804
2805
2806
2807
2808 NullFields []string `json:"-"`
2809 }
2810
2811 func (s *PerformanceReportList) MarshalJSON() ([]byte, error) {
2812 type NoMethod PerformanceReportList
2813 raw := NoMethod(*s)
2814 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2815 }
2816
2817 type PretargetingConfig struct {
2818
2819
2820
2821 BillingId int64 `json:"billingId,omitempty,string"`
2822
2823
2824
2825 ConfigId int64 `json:"configId,omitempty,string"`
2826
2827
2828
2829 ConfigName string `json:"configName,omitempty"`
2830
2831
2832
2833 CreativeType []string `json:"creativeType,omitempty"`
2834
2835
2836
2837 Dimensions []*PretargetingConfigDimensions `json:"dimensions,omitempty"`
2838
2839
2840
2841
2842 ExcludedContentLabels googleapi.Int64s `json:"excludedContentLabels,omitempty"`
2843
2844
2845
2846 ExcludedGeoCriteriaIds googleapi.Int64s `json:"excludedGeoCriteriaIds,omitempty"`
2847
2848
2849
2850 ExcludedPlacements []*PretargetingConfigExcludedPlacements `json:"excludedPlacements,omitempty"`
2851
2852
2853
2854 ExcludedUserLists googleapi.Int64s `json:"excludedUserLists,omitempty"`
2855
2856
2857
2858
2859 ExcludedVerticals googleapi.Int64s `json:"excludedVerticals,omitempty"`
2860
2861
2862
2863 GeoCriteriaIds googleapi.Int64s `json:"geoCriteriaIds,omitempty"`
2864
2865
2866 IsActive bool `json:"isActive,omitempty"`
2867
2868
2869
2870 Kind string `json:"kind,omitempty"`
2871
2872
2873 Languages []string `json:"languages,omitempty"`
2874
2875
2876
2877
2878
2879
2880 MaximumQps int64 `json:"maximumQps,omitempty,string"`
2881
2882
2883
2884
2885
2886
2887 MinimumViewabilityDecile int64 `json:"minimumViewabilityDecile,omitempty"`
2888
2889
2890
2891
2892 MobileCarriers googleapi.Int64s `json:"mobileCarriers,omitempty"`
2893
2894
2895
2896
2897 MobileDevices googleapi.Int64s `json:"mobileDevices,omitempty"`
2898
2899
2900
2901
2902 MobileOperatingSystemVersions googleapi.Int64s `json:"mobileOperatingSystemVersions,omitempty"`
2903
2904
2905 Placements []*PretargetingConfigPlacements `json:"placements,omitempty"`
2906
2907
2908
2909
2910 Platforms []string `json:"platforms,omitempty"`
2911
2912
2913
2914
2915
2916
2917 SupportedCreativeAttributes googleapi.Int64s `json:"supportedCreativeAttributes,omitempty"`
2918
2919
2920
2921
2922
2923
2924 UserIdentifierDataRequired []string `json:"userIdentifierDataRequired,omitempty"`
2925
2926
2927 UserLists googleapi.Int64s `json:"userLists,omitempty"`
2928
2929
2930
2931 VendorTypes googleapi.Int64s `json:"vendorTypes,omitempty"`
2932
2933
2934 Verticals googleapi.Int64s `json:"verticals,omitempty"`
2935
2936
2937
2938 VideoPlayerSizes []*PretargetingConfigVideoPlayerSizes `json:"videoPlayerSizes,omitempty"`
2939
2940
2941
2942 googleapi.ServerResponse `json:"-"`
2943
2944
2945
2946
2947
2948
2949
2950 ForceSendFields []string `json:"-"`
2951
2952
2953
2954
2955
2956
2957
2958 NullFields []string `json:"-"`
2959 }
2960
2961 func (s *PretargetingConfig) MarshalJSON() ([]byte, error) {
2962 type NoMethod PretargetingConfig
2963 raw := NoMethod(*s)
2964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2965 }
2966
2967 type PretargetingConfigDimensions struct {
2968
2969 Height int64 `json:"height,omitempty,string"`
2970
2971
2972 Width int64 `json:"width,omitempty,string"`
2973
2974
2975
2976
2977
2978
2979
2980 ForceSendFields []string `json:"-"`
2981
2982
2983
2984
2985
2986
2987
2988 NullFields []string `json:"-"`
2989 }
2990
2991 func (s *PretargetingConfigDimensions) MarshalJSON() ([]byte, error) {
2992 type NoMethod PretargetingConfigDimensions
2993 raw := NoMethod(*s)
2994 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2995 }
2996
2997 type PretargetingConfigExcludedPlacements struct {
2998
2999
3000
3001 Token string `json:"token,omitempty"`
3002
3003
3004 Type string `json:"type,omitempty"`
3005
3006
3007
3008
3009
3010
3011
3012 ForceSendFields []string `json:"-"`
3013
3014
3015
3016
3017
3018
3019
3020 NullFields []string `json:"-"`
3021 }
3022
3023 func (s *PretargetingConfigExcludedPlacements) MarshalJSON() ([]byte, error) {
3024 type NoMethod PretargetingConfigExcludedPlacements
3025 raw := NoMethod(*s)
3026 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3027 }
3028
3029 type PretargetingConfigPlacements struct {
3030
3031
3032
3033 Token string `json:"token,omitempty"`
3034
3035
3036 Type string `json:"type,omitempty"`
3037
3038
3039
3040
3041
3042
3043
3044 ForceSendFields []string `json:"-"`
3045
3046
3047
3048
3049
3050
3051
3052 NullFields []string `json:"-"`
3053 }
3054
3055 func (s *PretargetingConfigPlacements) MarshalJSON() ([]byte, error) {
3056 type NoMethod PretargetingConfigPlacements
3057 raw := NoMethod(*s)
3058 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3059 }
3060
3061 type PretargetingConfigVideoPlayerSizes struct {
3062
3063
3064 AspectRatio string `json:"aspectRatio,omitempty"`
3065
3066
3067
3068 MinHeight int64 `json:"minHeight,omitempty,string"`
3069
3070
3071
3072 MinWidth int64 `json:"minWidth,omitempty,string"`
3073
3074
3075
3076
3077
3078
3079
3080 ForceSendFields []string `json:"-"`
3081
3082
3083
3084
3085
3086
3087
3088 NullFields []string `json:"-"`
3089 }
3090
3091 func (s *PretargetingConfigVideoPlayerSizes) MarshalJSON() ([]byte, error) {
3092 type NoMethod PretargetingConfigVideoPlayerSizes
3093 raw := NoMethod(*s)
3094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3095 }
3096
3097 type PretargetingConfigList struct {
3098
3099 Items []*PretargetingConfig `json:"items,omitempty"`
3100
3101
3102 Kind string `json:"kind,omitempty"`
3103
3104
3105
3106 googleapi.ServerResponse `json:"-"`
3107
3108
3109
3110
3111
3112
3113
3114 ForceSendFields []string `json:"-"`
3115
3116
3117
3118
3119
3120
3121
3122 NullFields []string `json:"-"`
3123 }
3124
3125 func (s *PretargetingConfigList) MarshalJSON() ([]byte, error) {
3126 type NoMethod PretargetingConfigList
3127 raw := NoMethod(*s)
3128 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3129 }
3130
3131 type Price struct {
3132
3133 AmountMicros float64 `json:"amountMicros,omitempty"`
3134
3135
3136 CurrencyCode string `json:"currencyCode,omitempty"`
3137
3138
3139 ExpectedCpmMicros float64 `json:"expectedCpmMicros,omitempty"`
3140
3141
3142 PricingType string `json:"pricingType,omitempty"`
3143
3144
3145
3146
3147
3148
3149
3150 ForceSendFields []string `json:"-"`
3151
3152
3153
3154
3155
3156
3157
3158 NullFields []string `json:"-"`
3159 }
3160
3161 func (s *Price) MarshalJSON() ([]byte, error) {
3162 type NoMethod Price
3163 raw := NoMethod(*s)
3164 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3165 }
3166
3167 func (s *Price) UnmarshalJSON(data []byte) error {
3168 type NoMethod Price
3169 var s1 struct {
3170 AmountMicros gensupport.JSONFloat64 `json:"amountMicros"`
3171 ExpectedCpmMicros gensupport.JSONFloat64 `json:"expectedCpmMicros"`
3172 *NoMethod
3173 }
3174 s1.NoMethod = (*NoMethod)(s)
3175 if err := json.Unmarshal(data, &s1); err != nil {
3176 return err
3177 }
3178 s.AmountMicros = float64(s1.AmountMicros)
3179 s.ExpectedCpmMicros = float64(s1.ExpectedCpmMicros)
3180 return nil
3181 }
3182
3183
3184
3185
3186
3187
3188 type PricePerBuyer struct {
3189
3190 AuctionTier string `json:"auctionTier,omitempty"`
3191
3192
3193 BilledBuyer *Buyer `json:"billedBuyer,omitempty"`
3194
3195
3196
3197
3198 Buyer *Buyer `json:"buyer,omitempty"`
3199
3200
3201 Price *Price `json:"price,omitempty"`
3202
3203
3204
3205
3206
3207
3208
3209 ForceSendFields []string `json:"-"`
3210
3211
3212
3213
3214
3215
3216
3217 NullFields []string `json:"-"`
3218 }
3219
3220 func (s *PricePerBuyer) MarshalJSON() ([]byte, error) {
3221 type NoMethod PricePerBuyer
3222 raw := NoMethod(*s)
3223 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3224 }
3225
3226 type PrivateData struct {
3227 ReferenceId string `json:"referenceId,omitempty"`
3228
3229 ReferencePayload string `json:"referencePayload,omitempty"`
3230
3231
3232
3233
3234
3235
3236
3237 ForceSendFields []string `json:"-"`
3238
3239
3240
3241
3242
3243
3244
3245 NullFields []string `json:"-"`
3246 }
3247
3248 func (s *PrivateData) MarshalJSON() ([]byte, error) {
3249 type NoMethod PrivateData
3250 raw := NoMethod(*s)
3251 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3252 }
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263 type Product struct {
3264
3265
3266 BilledBuyer *Buyer `json:"billedBuyer,omitempty"`
3267
3268
3269
3270 Buyer *Buyer `json:"buyer,omitempty"`
3271
3272
3273 CreationTimeMs int64 `json:"creationTimeMs,omitempty,string"`
3274
3275
3276
3277 CreatorContacts []*ContactInformation `json:"creatorContacts,omitempty"`
3278
3279
3280
3281 CreatorRole string `json:"creatorRole,omitempty"`
3282
3283
3284
3285
3286
3287 DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"`
3288
3289
3290
3291 FlightEndTimeMs int64 `json:"flightEndTimeMs,omitempty,string"`
3292
3293
3294
3295
3296 FlightStartTimeMs int64 `json:"flightStartTimeMs,omitempty,string"`
3297
3298
3299
3300
3301
3302 HasCreatorSignedOff bool `json:"hasCreatorSignedOff,omitempty"`
3303
3304
3305
3306 InventorySource string `json:"inventorySource,omitempty"`
3307
3308
3309
3310 Kind string `json:"kind,omitempty"`
3311
3312
3313
3314 Labels []*MarketplaceLabel `json:"labels,omitempty"`
3315
3316
3317 LastUpdateTimeMs int64 `json:"lastUpdateTimeMs,omitempty,string"`
3318
3319
3320
3321 LegacyOfferId string `json:"legacyOfferId,omitempty"`
3322
3323
3324
3325
3326
3327 MarketplacePublisherProfileId string `json:"marketplacePublisherProfileId,omitempty"`
3328
3329
3330
3331 Name string `json:"name,omitempty"`
3332
3333
3334
3335 PrivateAuctionId string `json:"privateAuctionId,omitempty"`
3336
3337
3338 ProductId string `json:"productId,omitempty"`
3339
3340
3341
3342
3343
3344 PublisherProfileId string `json:"publisherProfileId,omitempty"`
3345
3346
3347
3348 PublisherProvidedForecast *PublisherProvidedForecast `json:"publisherProvidedForecast,omitempty"`
3349
3350
3351 RevisionNumber int64 `json:"revisionNumber,omitempty,string"`
3352
3353
3354
3355 Seller *Seller `json:"seller,omitempty"`
3356
3357
3358
3359
3360
3361 SharedTargetings []*SharedTargeting `json:"sharedTargetings,omitempty"`
3362
3363
3364 State string `json:"state,omitempty"`
3365
3366
3367
3368 SyndicationProduct string `json:"syndicationProduct,omitempty"`
3369
3370
3371 Terms *DealTerms `json:"terms,omitempty"`
3372
3373
3374
3375 WebPropertyCode string `json:"webPropertyCode,omitempty"`
3376
3377
3378
3379 googleapi.ServerResponse `json:"-"`
3380
3381
3382
3383
3384
3385
3386
3387 ForceSendFields []string `json:"-"`
3388
3389
3390
3391
3392
3393
3394
3395 NullFields []string `json:"-"`
3396 }
3397
3398 func (s *Product) MarshalJSON() ([]byte, error) {
3399 type NoMethod Product
3400 raw := NoMethod(*s)
3401 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3402 }
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413 type Proposal struct {
3414
3415
3416 BilledBuyer *Buyer `json:"billedBuyer,omitempty"`
3417
3418
3419
3420 Buyer *Buyer `json:"buyer,omitempty"`
3421
3422
3423
3424 BuyerContacts []*ContactInformation `json:"buyerContacts,omitempty"`
3425
3426
3427 BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"`
3428
3429
3430 DbmAdvertiserIds []string `json:"dbmAdvertiserIds,omitempty"`
3431
3432
3433
3434
3435
3436 HasBuyerSignedOff bool `json:"hasBuyerSignedOff,omitempty"`
3437
3438
3439
3440
3441
3442 HasSellerSignedOff bool `json:"hasSellerSignedOff,omitempty"`
3443
3444
3445
3446 InventorySource string `json:"inventorySource,omitempty"`
3447
3448
3449
3450 IsRenegotiating bool `json:"isRenegotiating,omitempty"`
3451
3452
3453
3454
3455 IsSetupComplete bool `json:"isSetupComplete,omitempty"`
3456
3457
3458
3459 Kind string `json:"kind,omitempty"`
3460
3461
3462 Labels []*MarketplaceLabel `json:"labels,omitempty"`
3463
3464
3465
3466 LastUpdaterOrCommentorRole string `json:"lastUpdaterOrCommentorRole,omitempty"`
3467
3468
3469 Name string `json:"name,omitempty"`
3470
3471
3472
3473 NegotiationId string `json:"negotiationId,omitempty"`
3474
3475
3476
3477 OriginatorRole string `json:"originatorRole,omitempty"`
3478
3479
3480
3481 PrivateAuctionId string `json:"privateAuctionId,omitempty"`
3482
3483
3484 ProposalId string `json:"proposalId,omitempty"`
3485
3486
3487 ProposalState string `json:"proposalState,omitempty"`
3488
3489
3490 RevisionNumber int64 `json:"revisionNumber,omitempty,string"`
3491
3492
3493
3494 RevisionTimeMs int64 `json:"revisionTimeMs,omitempty,string"`
3495
3496
3497
3498 Seller *Seller `json:"seller,omitempty"`
3499
3500
3501
3502 SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"`
3503
3504
3505
3506 googleapi.ServerResponse `json:"-"`
3507
3508
3509
3510
3511
3512
3513
3514 ForceSendFields []string `json:"-"`
3515
3516
3517
3518
3519
3520
3521
3522 NullFields []string `json:"-"`
3523 }
3524
3525 func (s *Proposal) MarshalJSON() ([]byte, error) {
3526 type NoMethod Proposal
3527 raw := NoMethod(*s)
3528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3529 }
3530
3531 type PublisherProfileApiProto struct {
3532
3533 Audience string `json:"audience,omitempty"`
3534
3535
3536 BuyerPitchStatement string `json:"buyerPitchStatement,omitempty"`
3537
3538
3539 DirectContact string `json:"directContact,omitempty"`
3540
3541
3542
3543 Exchange string `json:"exchange,omitempty"`
3544
3545 ForecastInventory string `json:"forecastInventory,omitempty"`
3546
3547
3548 GooglePlusLink string `json:"googlePlusLink,omitempty"`
3549
3550
3551
3552 IsParent bool `json:"isParent,omitempty"`
3553
3554
3555
3556 IsPublished bool `json:"isPublished,omitempty"`
3557
3558
3559
3560 Kind string `json:"kind,omitempty"`
3561
3562
3563 LogoUrl string `json:"logoUrl,omitempty"`
3564
3565
3566 MediaKitLink string `json:"mediaKitLink,omitempty"`
3567
3568 Name string `json:"name,omitempty"`
3569
3570
3571 Overview string `json:"overview,omitempty"`
3572
3573
3574
3575 ProfileId int64 `json:"profileId,omitempty"`
3576
3577
3578 ProgrammaticContact string `json:"programmaticContact,omitempty"`
3579
3580
3581
3582
3583 PublisherAppIds googleapi.Int64s `json:"publisherAppIds,omitempty"`
3584
3585
3586
3587 PublisherApps []*MobileApplication `json:"publisherApps,omitempty"`
3588
3589
3590
3591 PublisherDomains []string `json:"publisherDomains,omitempty"`
3592
3593
3594 PublisherProfileId string `json:"publisherProfileId,omitempty"`
3595
3596
3597
3598 PublisherProvidedForecast *PublisherProvidedForecast `json:"publisherProvidedForecast,omitempty"`
3599
3600
3601 RateCardInfoLink string `json:"rateCardInfoLink,omitempty"`
3602
3603
3604 SamplePageLink string `json:"samplePageLink,omitempty"`
3605
3606
3607 Seller *Seller `json:"seller,omitempty"`
3608
3609
3610 State string `json:"state,omitempty"`
3611
3612
3613 TopHeadlines []string `json:"topHeadlines,omitempty"`
3614
3615
3616
3617
3618
3619
3620
3621 ForceSendFields []string `json:"-"`
3622
3623
3624
3625
3626
3627
3628
3629 NullFields []string `json:"-"`
3630 }
3631
3632 func (s *PublisherProfileApiProto) MarshalJSON() ([]byte, error) {
3633 type NoMethod PublisherProfileApiProto
3634 raw := NoMethod(*s)
3635 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3636 }
3637
3638
3639
3640 type PublisherProvidedForecast struct {
3641
3642 Dimensions []*Dimension `json:"dimensions,omitempty"`
3643
3644
3645 WeeklyImpressions int64 `json:"weeklyImpressions,omitempty,string"`
3646
3647
3648 WeeklyUniques int64 `json:"weeklyUniques,omitempty,string"`
3649
3650
3651
3652
3653
3654
3655
3656 ForceSendFields []string `json:"-"`
3657
3658
3659
3660
3661
3662
3663
3664 NullFields []string `json:"-"`
3665 }
3666
3667 func (s *PublisherProvidedForecast) MarshalJSON() ([]byte, error) {
3668 type NoMethod PublisherProvidedForecast
3669 raw := NoMethod(*s)
3670 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3671 }
3672
3673 type Seller struct {
3674
3675
3676
3677 AccountId string `json:"accountId,omitempty"`
3678
3679
3680 SubAccountId string `json:"subAccountId,omitempty"`
3681
3682
3683
3684
3685
3686
3687
3688 ForceSendFields []string `json:"-"`
3689
3690
3691
3692
3693
3694
3695
3696 NullFields []string `json:"-"`
3697 }
3698
3699 func (s *Seller) MarshalJSON() ([]byte, error) {
3700 type NoMethod Seller
3701 raw := NoMethod(*s)
3702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3703 }
3704
3705 type SharedTargeting struct {
3706
3707
3708 Exclusions []*TargetingValue `json:"exclusions,omitempty"`
3709
3710
3711
3712 Inclusions []*TargetingValue `json:"inclusions,omitempty"`
3713
3714
3715 Key string `json:"key,omitempty"`
3716
3717
3718
3719
3720
3721
3722
3723 ForceSendFields []string `json:"-"`
3724
3725
3726
3727
3728
3729
3730
3731 NullFields []string `json:"-"`
3732 }
3733
3734 func (s *SharedTargeting) MarshalJSON() ([]byte, error) {
3735 type NoMethod SharedTargeting
3736 raw := NoMethod(*s)
3737 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3738 }
3739
3740 type TargetingValue struct {
3741
3742 CreativeSizeValue *TargetingValueCreativeSize `json:"creativeSizeValue,omitempty"`
3743
3744
3745
3746 DayPartTargetingValue *TargetingValueDayPartTargeting `json:"dayPartTargetingValue,omitempty"`
3747
3748 DemogAgeCriteriaValue *TargetingValueDemogAgeCriteria `json:"demogAgeCriteriaValue,omitempty"`
3749
3750 DemogGenderCriteriaValue *TargetingValueDemogGenderCriteria `json:"demogGenderCriteriaValue,omitempty"`
3751
3752
3753 LongValue int64 `json:"longValue,omitempty,string"`
3754
3755 RequestPlatformTargetingValue *TargetingValueRequestPlatformTargeting `json:"requestPlatformTargetingValue,omitempty"`
3756
3757
3758 StringValue string `json:"stringValue,omitempty"`
3759
3760
3761
3762
3763
3764
3765
3766 ForceSendFields []string `json:"-"`
3767
3768
3769
3770
3771
3772
3773
3774
3775 NullFields []string `json:"-"`
3776 }
3777
3778 func (s *TargetingValue) MarshalJSON() ([]byte, error) {
3779 type NoMethod TargetingValue
3780 raw := NoMethod(*s)
3781 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3782 }
3783
3784
3785 type TargetingValueCreativeSize struct {
3786
3787 AllowedFormats []string `json:"allowedFormats,omitempty"`
3788
3789
3790 CompanionSizes []*TargetingValueSize `json:"companionSizes,omitempty"`
3791
3792
3793 CreativeSizeType string `json:"creativeSizeType,omitempty"`
3794
3795
3796 NativeTemplate string `json:"nativeTemplate,omitempty"`
3797
3798
3799
3800 Size *TargetingValueSize `json:"size,omitempty"`
3801
3802
3803 SkippableAdType string `json:"skippableAdType,omitempty"`
3804
3805
3806
3807
3808
3809
3810
3811 ForceSendFields []string `json:"-"`
3812
3813
3814
3815
3816
3817
3818
3819
3820 NullFields []string `json:"-"`
3821 }
3822
3823 func (s *TargetingValueCreativeSize) MarshalJSON() ([]byte, error) {
3824 type NoMethod TargetingValueCreativeSize
3825 raw := NoMethod(*s)
3826 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3827 }
3828
3829 type TargetingValueDayPartTargeting struct {
3830 DayParts []*TargetingValueDayPartTargetingDayPart `json:"dayParts,omitempty"`
3831
3832 TimeZoneType string `json:"timeZoneType,omitempty"`
3833
3834
3835
3836
3837
3838
3839
3840 ForceSendFields []string `json:"-"`
3841
3842
3843
3844
3845
3846
3847
3848 NullFields []string `json:"-"`
3849 }
3850
3851 func (s *TargetingValueDayPartTargeting) MarshalJSON() ([]byte, error) {
3852 type NoMethod TargetingValueDayPartTargeting
3853 raw := NoMethod(*s)
3854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3855 }
3856
3857 type TargetingValueDayPartTargetingDayPart struct {
3858 DayOfWeek string `json:"dayOfWeek,omitempty"`
3859
3860 EndHour int64 `json:"endHour,omitempty"`
3861
3862 EndMinute int64 `json:"endMinute,omitempty"`
3863
3864 StartHour int64 `json:"startHour,omitempty"`
3865
3866 StartMinute int64 `json:"startMinute,omitempty"`
3867
3868
3869
3870
3871
3872
3873
3874 ForceSendFields []string `json:"-"`
3875
3876
3877
3878
3879
3880
3881
3882 NullFields []string `json:"-"`
3883 }
3884
3885 func (s *TargetingValueDayPartTargetingDayPart) MarshalJSON() ([]byte, error) {
3886 type NoMethod TargetingValueDayPartTargetingDayPart
3887 raw := NoMethod(*s)
3888 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3889 }
3890
3891 type TargetingValueDemogAgeCriteria struct {
3892 DemogAgeCriteriaIds []string `json:"demogAgeCriteriaIds,omitempty"`
3893
3894
3895
3896
3897
3898
3899
3900 ForceSendFields []string `json:"-"`
3901
3902
3903
3904
3905
3906
3907
3908
3909 NullFields []string `json:"-"`
3910 }
3911
3912 func (s *TargetingValueDemogAgeCriteria) MarshalJSON() ([]byte, error) {
3913 type NoMethod TargetingValueDemogAgeCriteria
3914 raw := NoMethod(*s)
3915 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3916 }
3917
3918 type TargetingValueDemogGenderCriteria struct {
3919 DemogGenderCriteriaIds []string `json:"demogGenderCriteriaIds,omitempty"`
3920
3921
3922
3923
3924
3925
3926
3927
3928 ForceSendFields []string `json:"-"`
3929
3930
3931
3932
3933
3934
3935
3936
3937 NullFields []string `json:"-"`
3938 }
3939
3940 func (s *TargetingValueDemogGenderCriteria) MarshalJSON() ([]byte, error) {
3941 type NoMethod TargetingValueDemogGenderCriteria
3942 raw := NoMethod(*s)
3943 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3944 }
3945
3946 type TargetingValueRequestPlatformTargeting struct {
3947 RequestPlatforms []string `json:"requestPlatforms,omitempty"`
3948
3949
3950
3951
3952
3953
3954
3955 ForceSendFields []string `json:"-"`
3956
3957
3958
3959
3960
3961
3962
3963
3964 NullFields []string `json:"-"`
3965 }
3966
3967 func (s *TargetingValueRequestPlatformTargeting) MarshalJSON() ([]byte, error) {
3968 type NoMethod TargetingValueRequestPlatformTargeting
3969 raw := NoMethod(*s)
3970 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3971 }
3972
3973 type TargetingValueSize struct {
3974
3975 Height int64 `json:"height,omitempty"`
3976
3977
3978 Width int64 `json:"width,omitempty"`
3979
3980
3981
3982
3983
3984
3985
3986 ForceSendFields []string `json:"-"`
3987
3988
3989
3990
3991
3992
3993
3994 NullFields []string `json:"-"`
3995 }
3996
3997 func (s *TargetingValueSize) MarshalJSON() ([]byte, error) {
3998 type NoMethod TargetingValueSize
3999 raw := NoMethod(*s)
4000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4001 }
4002
4003 type UpdatePrivateAuctionProposalRequest struct {
4004
4005 ExternalDealId string `json:"externalDealId,omitempty"`
4006
4007
4008 Note *MarketplaceNote `json:"note,omitempty"`
4009
4010
4011
4012 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"`
4013
4014
4015 UpdateAction string `json:"updateAction,omitempty"`
4016
4017
4018
4019
4020
4021
4022
4023 ForceSendFields []string `json:"-"`
4024
4025
4026
4027
4028
4029
4030
4031
4032 NullFields []string `json:"-"`
4033 }
4034
4035 func (s *UpdatePrivateAuctionProposalRequest) MarshalJSON() ([]byte, error) {
4036 type NoMethod UpdatePrivateAuctionProposalRequest
4037 raw := NoMethod(*s)
4038 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4039 }
4040
4041
4042
4043 type AccountsGetCall struct {
4044 s *Service
4045 id int64
4046 urlParams_ gensupport.URLParams
4047 ifNoneMatch_ string
4048 ctx_ context.Context
4049 header_ http.Header
4050 }
4051
4052
4053
4054
4055 func (r *AccountsService) Get(id int64) *AccountsGetCall {
4056 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4057 c.id = id
4058 return c
4059 }
4060
4061
4062
4063
4064 func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
4065 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4066 return c
4067 }
4068
4069
4070
4071
4072
4073
4074 func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
4075 c.ifNoneMatch_ = entityTag
4076 return c
4077 }
4078
4079
4080
4081
4082 func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
4083 c.ctx_ = ctx
4084 return c
4085 }
4086
4087
4088
4089 func (c *AccountsGetCall) Header() http.Header {
4090 if c.header_ == nil {
4091 c.header_ = make(http.Header)
4092 }
4093 return c.header_
4094 }
4095
4096 func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
4097 reqHeaders := make(http.Header)
4098 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
4099 for k, v := range c.header_ {
4100 reqHeaders[k] = v
4101 }
4102 reqHeaders.Set("User-Agent", c.s.userAgent())
4103 if c.ifNoneMatch_ != "" {
4104 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4105 }
4106 var body io.Reader = nil
4107 c.urlParams_.Set("alt", alt)
4108 c.urlParams_.Set("prettyPrint", "false")
4109 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{id}")
4110 urls += "?" + c.urlParams_.Encode()
4111 req, err := http.NewRequest("GET", urls, body)
4112 if err != nil {
4113 return nil, err
4114 }
4115 req.Header = reqHeaders
4116 googleapi.Expand(req.URL, map[string]string{
4117 "id": strconv.FormatInt(c.id, 10),
4118 })
4119 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4120 }
4121
4122
4123
4124
4125
4126
4127
4128
4129 func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
4130 gensupport.SetOptions(c.urlParams_, opts...)
4131 res, err := c.doRequest("json")
4132 if res != nil && res.StatusCode == http.StatusNotModified {
4133 if res.Body != nil {
4134 res.Body.Close()
4135 }
4136 return nil, &googleapi.Error{
4137 Code: res.StatusCode,
4138 Header: res.Header,
4139 }
4140 }
4141 if err != nil {
4142 return nil, err
4143 }
4144 defer googleapi.CloseBody(res)
4145 if err := googleapi.CheckResponse(res); err != nil {
4146 return nil, err
4147 }
4148 ret := &Account{
4149 ServerResponse: googleapi.ServerResponse{
4150 Header: res.Header,
4151 HTTPStatusCode: res.StatusCode,
4152 },
4153 }
4154 target := &ret
4155 if err := gensupport.DecodeResponse(target, res); err != nil {
4156 return nil, err
4157 }
4158 return ret, nil
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184 }
4185
4186
4187
4188 type AccountsListCall struct {
4189 s *Service
4190 urlParams_ gensupport.URLParams
4191 ifNoneMatch_ string
4192 ctx_ context.Context
4193 header_ http.Header
4194 }
4195
4196
4197 func (r *AccountsService) List() *AccountsListCall {
4198 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4199 return c
4200 }
4201
4202
4203
4204
4205 func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
4206 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4207 return c
4208 }
4209
4210
4211
4212
4213
4214
4215 func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
4216 c.ifNoneMatch_ = entityTag
4217 return c
4218 }
4219
4220
4221
4222
4223 func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
4224 c.ctx_ = ctx
4225 return c
4226 }
4227
4228
4229
4230 func (c *AccountsListCall) Header() http.Header {
4231 if c.header_ == nil {
4232 c.header_ = make(http.Header)
4233 }
4234 return c.header_
4235 }
4236
4237 func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
4238 reqHeaders := make(http.Header)
4239 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
4240 for k, v := range c.header_ {
4241 reqHeaders[k] = v
4242 }
4243 reqHeaders.Set("User-Agent", c.s.userAgent())
4244 if c.ifNoneMatch_ != "" {
4245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4246 }
4247 var body io.Reader = nil
4248 c.urlParams_.Set("alt", alt)
4249 c.urlParams_.Set("prettyPrint", "false")
4250 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts")
4251 urls += "?" + c.urlParams_.Encode()
4252 req, err := http.NewRequest("GET", urls, body)
4253 if err != nil {
4254 return nil, err
4255 }
4256 req.Header = reqHeaders
4257 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4258 }
4259
4260
4261
4262
4263
4264
4265
4266
4267 func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsList, error) {
4268 gensupport.SetOptions(c.urlParams_, opts...)
4269 res, err := c.doRequest("json")
4270 if res != nil && res.StatusCode == http.StatusNotModified {
4271 if res.Body != nil {
4272 res.Body.Close()
4273 }
4274 return nil, &googleapi.Error{
4275 Code: res.StatusCode,
4276 Header: res.Header,
4277 }
4278 }
4279 if err != nil {
4280 return nil, err
4281 }
4282 defer googleapi.CloseBody(res)
4283 if err := googleapi.CheckResponse(res); err != nil {
4284 return nil, err
4285 }
4286 ret := &AccountsList{
4287 ServerResponse: googleapi.ServerResponse{
4288 Header: res.Header,
4289 HTTPStatusCode: res.StatusCode,
4290 },
4291 }
4292 target := &ret
4293 if err := gensupport.DecodeResponse(target, res); err != nil {
4294 return nil, err
4295 }
4296 return ret, nil
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310 }
4311
4312
4313
4314 type AccountsPatchCall struct {
4315 s *Service
4316 id int64
4317 account *Account
4318 urlParams_ gensupport.URLParams
4319 ctx_ context.Context
4320 header_ http.Header
4321 }
4322
4323
4324
4325
4326
4327 func (r *AccountsService) Patch(id int64, account *Account) *AccountsPatchCall {
4328 c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4329 c.id = id
4330 c.account = account
4331 return c
4332 }
4333
4334
4335
4336
4337 func (c *AccountsPatchCall) ConfirmUnsafeAccountChange(confirmUnsafeAccountChange bool) *AccountsPatchCall {
4338 c.urlParams_.Set("confirmUnsafeAccountChange", fmt.Sprint(confirmUnsafeAccountChange))
4339 return c
4340 }
4341
4342
4343
4344
4345 func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
4346 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4347 return c
4348 }
4349
4350
4351
4352
4353 func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
4354 c.ctx_ = ctx
4355 return c
4356 }
4357
4358
4359
4360 func (c *AccountsPatchCall) Header() http.Header {
4361 if c.header_ == nil {
4362 c.header_ = make(http.Header)
4363 }
4364 return c.header_
4365 }
4366
4367 func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
4368 reqHeaders := make(http.Header)
4369 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
4370 for k, v := range c.header_ {
4371 reqHeaders[k] = v
4372 }
4373 reqHeaders.Set("User-Agent", c.s.userAgent())
4374 var body io.Reader = nil
4375 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
4376 if err != nil {
4377 return nil, err
4378 }
4379 reqHeaders.Set("Content-Type", "application/json")
4380 c.urlParams_.Set("alt", alt)
4381 c.urlParams_.Set("prettyPrint", "false")
4382 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{id}")
4383 urls += "?" + c.urlParams_.Encode()
4384 req, err := http.NewRequest("PATCH", urls, body)
4385 if err != nil {
4386 return nil, err
4387 }
4388 req.Header = reqHeaders
4389 googleapi.Expand(req.URL, map[string]string{
4390 "id": strconv.FormatInt(c.id, 10),
4391 })
4392 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4393 }
4394
4395
4396
4397
4398
4399
4400
4401
4402 func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
4403 gensupport.SetOptions(c.urlParams_, opts...)
4404 res, err := c.doRequest("json")
4405 if res != nil && res.StatusCode == http.StatusNotModified {
4406 if res.Body != nil {
4407 res.Body.Close()
4408 }
4409 return nil, &googleapi.Error{
4410 Code: res.StatusCode,
4411 Header: res.Header,
4412 }
4413 }
4414 if err != nil {
4415 return nil, err
4416 }
4417 defer googleapi.CloseBody(res)
4418 if err := googleapi.CheckResponse(res); err != nil {
4419 return nil, err
4420 }
4421 ret := &Account{
4422 ServerResponse: googleapi.ServerResponse{
4423 Header: res.Header,
4424 HTTPStatusCode: res.StatusCode,
4425 },
4426 }
4427 target := &ret
4428 if err := gensupport.DecodeResponse(target, res); err != nil {
4429 return nil, err
4430 }
4431 return ret, nil
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465 }
4466
4467
4468
4469 type AccountsUpdateCall struct {
4470 s *Service
4471 id int64
4472 account *Account
4473 urlParams_ gensupport.URLParams
4474 ctx_ context.Context
4475 header_ http.Header
4476 }
4477
4478
4479
4480
4481 func (r *AccountsService) Update(id int64, account *Account) *AccountsUpdateCall {
4482 c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4483 c.id = id
4484 c.account = account
4485 return c
4486 }
4487
4488
4489
4490
4491 func (c *AccountsUpdateCall) ConfirmUnsafeAccountChange(confirmUnsafeAccountChange bool) *AccountsUpdateCall {
4492 c.urlParams_.Set("confirmUnsafeAccountChange", fmt.Sprint(confirmUnsafeAccountChange))
4493 return c
4494 }
4495
4496
4497
4498
4499 func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
4500 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4501 return c
4502 }
4503
4504
4505
4506
4507 func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
4508 c.ctx_ = ctx
4509 return c
4510 }
4511
4512
4513
4514 func (c *AccountsUpdateCall) Header() http.Header {
4515 if c.header_ == nil {
4516 c.header_ = make(http.Header)
4517 }
4518 return c.header_
4519 }
4520
4521 func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
4522 reqHeaders := make(http.Header)
4523 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
4524 for k, v := range c.header_ {
4525 reqHeaders[k] = v
4526 }
4527 reqHeaders.Set("User-Agent", c.s.userAgent())
4528 var body io.Reader = nil
4529 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
4530 if err != nil {
4531 return nil, err
4532 }
4533 reqHeaders.Set("Content-Type", "application/json")
4534 c.urlParams_.Set("alt", alt)
4535 c.urlParams_.Set("prettyPrint", "false")
4536 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{id}")
4537 urls += "?" + c.urlParams_.Encode()
4538 req, err := http.NewRequest("PUT", urls, body)
4539 if err != nil {
4540 return nil, err
4541 }
4542 req.Header = reqHeaders
4543 googleapi.Expand(req.URL, map[string]string{
4544 "id": strconv.FormatInt(c.id, 10),
4545 })
4546 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4547 }
4548
4549
4550
4551
4552
4553
4554
4555
4556 func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
4557 gensupport.SetOptions(c.urlParams_, opts...)
4558 res, err := c.doRequest("json")
4559 if res != nil && res.StatusCode == http.StatusNotModified {
4560 if res.Body != nil {
4561 res.Body.Close()
4562 }
4563 return nil, &googleapi.Error{
4564 Code: res.StatusCode,
4565 Header: res.Header,
4566 }
4567 }
4568 if err != nil {
4569 return nil, err
4570 }
4571 defer googleapi.CloseBody(res)
4572 if err := googleapi.CheckResponse(res); err != nil {
4573 return nil, err
4574 }
4575 ret := &Account{
4576 ServerResponse: googleapi.ServerResponse{
4577 Header: res.Header,
4578 HTTPStatusCode: res.StatusCode,
4579 },
4580 }
4581 target := &ret
4582 if err := gensupport.DecodeResponse(target, res); err != nil {
4583 return nil, err
4584 }
4585 return ret, nil
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619 }
4620
4621
4622
4623 type BillingInfoGetCall struct {
4624 s *Service
4625 accountId int64
4626 urlParams_ gensupport.URLParams
4627 ifNoneMatch_ string
4628 ctx_ context.Context
4629 header_ http.Header
4630 }
4631
4632
4633
4634
4635
4636 func (r *BillingInfoService) Get(accountId int64) *BillingInfoGetCall {
4637 c := &BillingInfoGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4638 c.accountId = accountId
4639 return c
4640 }
4641
4642
4643
4644
4645 func (c *BillingInfoGetCall) Fields(s ...googleapi.Field) *BillingInfoGetCall {
4646 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4647 return c
4648 }
4649
4650
4651
4652
4653
4654
4655 func (c *BillingInfoGetCall) IfNoneMatch(entityTag string) *BillingInfoGetCall {
4656 c.ifNoneMatch_ = entityTag
4657 return c
4658 }
4659
4660
4661
4662
4663 func (c *BillingInfoGetCall) Context(ctx context.Context) *BillingInfoGetCall {
4664 c.ctx_ = ctx
4665 return c
4666 }
4667
4668
4669
4670 func (c *BillingInfoGetCall) Header() http.Header {
4671 if c.header_ == nil {
4672 c.header_ = make(http.Header)
4673 }
4674 return c.header_
4675 }
4676
4677 func (c *BillingInfoGetCall) doRequest(alt string) (*http.Response, error) {
4678 reqHeaders := make(http.Header)
4679 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
4680 for k, v := range c.header_ {
4681 reqHeaders[k] = v
4682 }
4683 reqHeaders.Set("User-Agent", c.s.userAgent())
4684 if c.ifNoneMatch_ != "" {
4685 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4686 }
4687 var body io.Reader = nil
4688 c.urlParams_.Set("alt", alt)
4689 c.urlParams_.Set("prettyPrint", "false")
4690 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}")
4691 urls += "?" + c.urlParams_.Encode()
4692 req, err := http.NewRequest("GET", urls, body)
4693 if err != nil {
4694 return nil, err
4695 }
4696 req.Header = reqHeaders
4697 googleapi.Expand(req.URL, map[string]string{
4698 "accountId": strconv.FormatInt(c.accountId, 10),
4699 })
4700 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4701 }
4702
4703
4704
4705
4706
4707
4708
4709
4710 func (c *BillingInfoGetCall) Do(opts ...googleapi.CallOption) (*BillingInfo, error) {
4711 gensupport.SetOptions(c.urlParams_, opts...)
4712 res, err := c.doRequest("json")
4713 if res != nil && res.StatusCode == http.StatusNotModified {
4714 if res.Body != nil {
4715 res.Body.Close()
4716 }
4717 return nil, &googleapi.Error{
4718 Code: res.StatusCode,
4719 Header: res.Header,
4720 }
4721 }
4722 if err != nil {
4723 return nil, err
4724 }
4725 defer googleapi.CloseBody(res)
4726 if err := googleapi.CheckResponse(res); err != nil {
4727 return nil, err
4728 }
4729 ret := &BillingInfo{
4730 ServerResponse: googleapi.ServerResponse{
4731 Header: res.Header,
4732 HTTPStatusCode: res.StatusCode,
4733 },
4734 }
4735 target := &ret
4736 if err := gensupport.DecodeResponse(target, res); err != nil {
4737 return nil, err
4738 }
4739 return ret, nil
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765 }
4766
4767
4768
4769 type BillingInfoListCall struct {
4770 s *Service
4771 urlParams_ gensupport.URLParams
4772 ifNoneMatch_ string
4773 ctx_ context.Context
4774 header_ http.Header
4775 }
4776
4777
4778
4779 func (r *BillingInfoService) List() *BillingInfoListCall {
4780 c := &BillingInfoListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4781 return c
4782 }
4783
4784
4785
4786
4787 func (c *BillingInfoListCall) Fields(s ...googleapi.Field) *BillingInfoListCall {
4788 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4789 return c
4790 }
4791
4792
4793
4794
4795
4796
4797 func (c *BillingInfoListCall) IfNoneMatch(entityTag string) *BillingInfoListCall {
4798 c.ifNoneMatch_ = entityTag
4799 return c
4800 }
4801
4802
4803
4804
4805 func (c *BillingInfoListCall) Context(ctx context.Context) *BillingInfoListCall {
4806 c.ctx_ = ctx
4807 return c
4808 }
4809
4810
4811
4812 func (c *BillingInfoListCall) Header() http.Header {
4813 if c.header_ == nil {
4814 c.header_ = make(http.Header)
4815 }
4816 return c.header_
4817 }
4818
4819 func (c *BillingInfoListCall) doRequest(alt string) (*http.Response, error) {
4820 reqHeaders := make(http.Header)
4821 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
4822 for k, v := range c.header_ {
4823 reqHeaders[k] = v
4824 }
4825 reqHeaders.Set("User-Agent", c.s.userAgent())
4826 if c.ifNoneMatch_ != "" {
4827 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4828 }
4829 var body io.Reader = nil
4830 c.urlParams_.Set("alt", alt)
4831 c.urlParams_.Set("prettyPrint", "false")
4832 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo")
4833 urls += "?" + c.urlParams_.Encode()
4834 req, err := http.NewRequest("GET", urls, body)
4835 if err != nil {
4836 return nil, err
4837 }
4838 req.Header = reqHeaders
4839 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4840 }
4841
4842
4843
4844
4845
4846
4847
4848
4849 func (c *BillingInfoListCall) Do(opts ...googleapi.CallOption) (*BillingInfoList, error) {
4850 gensupport.SetOptions(c.urlParams_, opts...)
4851 res, err := c.doRequest("json")
4852 if res != nil && res.StatusCode == http.StatusNotModified {
4853 if res.Body != nil {
4854 res.Body.Close()
4855 }
4856 return nil, &googleapi.Error{
4857 Code: res.StatusCode,
4858 Header: res.Header,
4859 }
4860 }
4861 if err != nil {
4862 return nil, err
4863 }
4864 defer googleapi.CloseBody(res)
4865 if err := googleapi.CheckResponse(res); err != nil {
4866 return nil, err
4867 }
4868 ret := &BillingInfoList{
4869 ServerResponse: googleapi.ServerResponse{
4870 Header: res.Header,
4871 HTTPStatusCode: res.StatusCode,
4872 },
4873 }
4874 target := &ret
4875 if err := gensupport.DecodeResponse(target, res); err != nil {
4876 return nil, err
4877 }
4878 return ret, nil
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892 }
4893
4894
4895
4896 type BudgetGetCall struct {
4897 s *Service
4898 accountId int64
4899 billingId int64
4900 urlParams_ gensupport.URLParams
4901 ifNoneMatch_ string
4902 ctx_ context.Context
4903 header_ http.Header
4904 }
4905
4906
4907
4908
4909
4910
4911 func (r *BudgetService) Get(accountId int64, billingId int64) *BudgetGetCall {
4912 c := &BudgetGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4913 c.accountId = accountId
4914 c.billingId = billingId
4915 return c
4916 }
4917
4918
4919
4920
4921 func (c *BudgetGetCall) Fields(s ...googleapi.Field) *BudgetGetCall {
4922 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4923 return c
4924 }
4925
4926
4927
4928
4929
4930
4931 func (c *BudgetGetCall) IfNoneMatch(entityTag string) *BudgetGetCall {
4932 c.ifNoneMatch_ = entityTag
4933 return c
4934 }
4935
4936
4937
4938
4939 func (c *BudgetGetCall) Context(ctx context.Context) *BudgetGetCall {
4940 c.ctx_ = ctx
4941 return c
4942 }
4943
4944
4945
4946 func (c *BudgetGetCall) Header() http.Header {
4947 if c.header_ == nil {
4948 c.header_ = make(http.Header)
4949 }
4950 return c.header_
4951 }
4952
4953 func (c *BudgetGetCall) doRequest(alt string) (*http.Response, error) {
4954 reqHeaders := make(http.Header)
4955 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
4956 for k, v := range c.header_ {
4957 reqHeaders[k] = v
4958 }
4959 reqHeaders.Set("User-Agent", c.s.userAgent())
4960 if c.ifNoneMatch_ != "" {
4961 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4962 }
4963 var body io.Reader = nil
4964 c.urlParams_.Set("alt", alt)
4965 c.urlParams_.Set("prettyPrint", "false")
4966 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}/{billingId}")
4967 urls += "?" + c.urlParams_.Encode()
4968 req, err := http.NewRequest("GET", urls, body)
4969 if err != nil {
4970 return nil, err
4971 }
4972 req.Header = reqHeaders
4973 googleapi.Expand(req.URL, map[string]string{
4974 "accountId": strconv.FormatInt(c.accountId, 10),
4975 "billingId": strconv.FormatInt(c.billingId, 10),
4976 })
4977 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4978 }
4979
4980
4981
4982
4983
4984
4985
4986
4987 func (c *BudgetGetCall) Do(opts ...googleapi.CallOption) (*Budget, error) {
4988 gensupport.SetOptions(c.urlParams_, opts...)
4989 res, err := c.doRequest("json")
4990 if res != nil && res.StatusCode == http.StatusNotModified {
4991 if res.Body != nil {
4992 res.Body.Close()
4993 }
4994 return nil, &googleapi.Error{
4995 Code: res.StatusCode,
4996 Header: res.Header,
4997 }
4998 }
4999 if err != nil {
5000 return nil, err
5001 }
5002 defer googleapi.CloseBody(res)
5003 if err := googleapi.CheckResponse(res); err != nil {
5004 return nil, err
5005 }
5006 ret := &Budget{
5007 ServerResponse: googleapi.ServerResponse{
5008 Header: res.Header,
5009 HTTPStatusCode: res.StatusCode,
5010 },
5011 }
5012 target := &ret
5013 if err := gensupport.DecodeResponse(target, res); err != nil {
5014 return nil, err
5015 }
5016 return ret, nil
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050 }
5051
5052
5053
5054 type BudgetPatchCall struct {
5055 s *Service
5056 accountId int64
5057 billingId int64
5058 budget *Budget
5059 urlParams_ gensupport.URLParams
5060 ctx_ context.Context
5061 header_ http.Header
5062 }
5063
5064
5065
5066
5067
5068
5069
5070 func (r *BudgetService) Patch(accountId int64, billingId int64, budget *Budget) *BudgetPatchCall {
5071 c := &BudgetPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5072 c.accountId = accountId
5073 c.billingId = billingId
5074 c.budget = budget
5075 return c
5076 }
5077
5078
5079
5080
5081 func (c *BudgetPatchCall) Fields(s ...googleapi.Field) *BudgetPatchCall {
5082 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5083 return c
5084 }
5085
5086
5087
5088
5089 func (c *BudgetPatchCall) Context(ctx context.Context) *BudgetPatchCall {
5090 c.ctx_ = ctx
5091 return c
5092 }
5093
5094
5095
5096 func (c *BudgetPatchCall) Header() http.Header {
5097 if c.header_ == nil {
5098 c.header_ = make(http.Header)
5099 }
5100 return c.header_
5101 }
5102
5103 func (c *BudgetPatchCall) doRequest(alt string) (*http.Response, error) {
5104 reqHeaders := make(http.Header)
5105 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
5106 for k, v := range c.header_ {
5107 reqHeaders[k] = v
5108 }
5109 reqHeaders.Set("User-Agent", c.s.userAgent())
5110 var body io.Reader = nil
5111 body, err := googleapi.WithoutDataWrapper.JSONReader(c.budget)
5112 if err != nil {
5113 return nil, err
5114 }
5115 reqHeaders.Set("Content-Type", "application/json")
5116 c.urlParams_.Set("alt", alt)
5117 c.urlParams_.Set("prettyPrint", "false")
5118 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}/{billingId}")
5119 urls += "?" + c.urlParams_.Encode()
5120 req, err := http.NewRequest("PATCH", urls, body)
5121 if err != nil {
5122 return nil, err
5123 }
5124 req.Header = reqHeaders
5125 googleapi.Expand(req.URL, map[string]string{
5126 "accountId": strconv.FormatInt(c.accountId, 10),
5127 "billingId": strconv.FormatInt(c.billingId, 10),
5128 })
5129 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5130 }
5131
5132
5133
5134
5135
5136
5137
5138
5139 func (c *BudgetPatchCall) Do(opts ...googleapi.CallOption) (*Budget, error) {
5140 gensupport.SetOptions(c.urlParams_, opts...)
5141 res, err := c.doRequest("json")
5142 if res != nil && res.StatusCode == http.StatusNotModified {
5143 if res.Body != nil {
5144 res.Body.Close()
5145 }
5146 return nil, &googleapi.Error{
5147 Code: res.StatusCode,
5148 Header: res.Header,
5149 }
5150 }
5151 if err != nil {
5152 return nil, err
5153 }
5154 defer googleapi.CloseBody(res)
5155 if err := googleapi.CheckResponse(res); err != nil {
5156 return nil, err
5157 }
5158 ret := &Budget{
5159 ServerResponse: googleapi.ServerResponse{
5160 Header: res.Header,
5161 HTTPStatusCode: res.StatusCode,
5162 },
5163 }
5164 target := &ret
5165 if err := gensupport.DecodeResponse(target, res); err != nil {
5166 return nil, err
5167 }
5168 return ret, nil
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205 }
5206
5207
5208
5209 type BudgetUpdateCall struct {
5210 s *Service
5211 accountId int64
5212 billingId int64
5213 budget *Budget
5214 urlParams_ gensupport.URLParams
5215 ctx_ context.Context
5216 header_ http.Header
5217 }
5218
5219
5220
5221
5222
5223
5224
5225 func (r *BudgetService) Update(accountId int64, billingId int64, budget *Budget) *BudgetUpdateCall {
5226 c := &BudgetUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5227 c.accountId = accountId
5228 c.billingId = billingId
5229 c.budget = budget
5230 return c
5231 }
5232
5233
5234
5235
5236 func (c *BudgetUpdateCall) Fields(s ...googleapi.Field) *BudgetUpdateCall {
5237 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5238 return c
5239 }
5240
5241
5242
5243
5244 func (c *BudgetUpdateCall) Context(ctx context.Context) *BudgetUpdateCall {
5245 c.ctx_ = ctx
5246 return c
5247 }
5248
5249
5250
5251 func (c *BudgetUpdateCall) Header() http.Header {
5252 if c.header_ == nil {
5253 c.header_ = make(http.Header)
5254 }
5255 return c.header_
5256 }
5257
5258 func (c *BudgetUpdateCall) doRequest(alt string) (*http.Response, error) {
5259 reqHeaders := make(http.Header)
5260 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
5261 for k, v := range c.header_ {
5262 reqHeaders[k] = v
5263 }
5264 reqHeaders.Set("User-Agent", c.s.userAgent())
5265 var body io.Reader = nil
5266 body, err := googleapi.WithoutDataWrapper.JSONReader(c.budget)
5267 if err != nil {
5268 return nil, err
5269 }
5270 reqHeaders.Set("Content-Type", "application/json")
5271 c.urlParams_.Set("alt", alt)
5272 c.urlParams_.Set("prettyPrint", "false")
5273 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}/{billingId}")
5274 urls += "?" + c.urlParams_.Encode()
5275 req, err := http.NewRequest("PUT", urls, body)
5276 if err != nil {
5277 return nil, err
5278 }
5279 req.Header = reqHeaders
5280 googleapi.Expand(req.URL, map[string]string{
5281 "accountId": strconv.FormatInt(c.accountId, 10),
5282 "billingId": strconv.FormatInt(c.billingId, 10),
5283 })
5284 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5285 }
5286
5287
5288
5289
5290
5291
5292
5293
5294 func (c *BudgetUpdateCall) Do(opts ...googleapi.CallOption) (*Budget, error) {
5295 gensupport.SetOptions(c.urlParams_, opts...)
5296 res, err := c.doRequest("json")
5297 if res != nil && res.StatusCode == http.StatusNotModified {
5298 if res.Body != nil {
5299 res.Body.Close()
5300 }
5301 return nil, &googleapi.Error{
5302 Code: res.StatusCode,
5303 Header: res.Header,
5304 }
5305 }
5306 if err != nil {
5307 return nil, err
5308 }
5309 defer googleapi.CloseBody(res)
5310 if err := googleapi.CheckResponse(res); err != nil {
5311 return nil, err
5312 }
5313 ret := &Budget{
5314 ServerResponse: googleapi.ServerResponse{
5315 Header: res.Header,
5316 HTTPStatusCode: res.StatusCode,
5317 },
5318 }
5319 target := &ret
5320 if err := gensupport.DecodeResponse(target, res); err != nil {
5321 return nil, err
5322 }
5323 return ret, nil
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360 }
5361
5362
5363
5364 type CreativesAddDealCall struct {
5365 s *Service
5366 accountId int64
5367 buyerCreativeId string
5368 dealId int64
5369 urlParams_ gensupport.URLParams
5370 ctx_ context.Context
5371 header_ http.Header
5372 }
5373
5374
5375
5376
5377
5378
5379 func (r *CreativesService) AddDeal(accountId int64, buyerCreativeId string, dealId int64) *CreativesAddDealCall {
5380 c := &CreativesAddDealCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5381 c.accountId = accountId
5382 c.buyerCreativeId = buyerCreativeId
5383 c.dealId = dealId
5384 return c
5385 }
5386
5387
5388
5389
5390 func (c *CreativesAddDealCall) Fields(s ...googleapi.Field) *CreativesAddDealCall {
5391 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5392 return c
5393 }
5394
5395
5396
5397
5398 func (c *CreativesAddDealCall) Context(ctx context.Context) *CreativesAddDealCall {
5399 c.ctx_ = ctx
5400 return c
5401 }
5402
5403
5404
5405 func (c *CreativesAddDealCall) Header() http.Header {
5406 if c.header_ == nil {
5407 c.header_ = make(http.Header)
5408 }
5409 return c.header_
5410 }
5411
5412 func (c *CreativesAddDealCall) doRequest(alt string) (*http.Response, error) {
5413 reqHeaders := make(http.Header)
5414 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
5415 for k, v := range c.header_ {
5416 reqHeaders[k] = v
5417 }
5418 reqHeaders.Set("User-Agent", c.s.userAgent())
5419 var body io.Reader = nil
5420 c.urlParams_.Set("alt", alt)
5421 c.urlParams_.Set("prettyPrint", "false")
5422 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}/addDeal/{dealId}")
5423 urls += "?" + c.urlParams_.Encode()
5424 req, err := http.NewRequest("POST", urls, body)
5425 if err != nil {
5426 return nil, err
5427 }
5428 req.Header = reqHeaders
5429 googleapi.Expand(req.URL, map[string]string{
5430 "accountId": strconv.FormatInt(c.accountId, 10),
5431 "buyerCreativeId": c.buyerCreativeId,
5432 "dealId": strconv.FormatInt(c.dealId, 10),
5433 })
5434 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5435 }
5436
5437
5438 func (c *CreativesAddDealCall) Do(opts ...googleapi.CallOption) error {
5439 gensupport.SetOptions(c.urlParams_, opts...)
5440 res, err := c.doRequest("json")
5441 if err != nil {
5442 return err
5443 }
5444 defer googleapi.CloseBody(res)
5445 if err := googleapi.CheckResponse(res); err != nil {
5446 return err
5447 }
5448 return nil
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486 }
5487
5488
5489
5490 type CreativesGetCall struct {
5491 s *Service
5492 accountId int64
5493 buyerCreativeId string
5494 urlParams_ gensupport.URLParams
5495 ifNoneMatch_ string
5496 ctx_ context.Context
5497 header_ http.Header
5498 }
5499
5500
5501
5502
5503
5504
5505 func (r *CreativesService) Get(accountId int64, buyerCreativeId string) *CreativesGetCall {
5506 c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5507 c.accountId = accountId
5508 c.buyerCreativeId = buyerCreativeId
5509 return c
5510 }
5511
5512
5513
5514
5515 func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
5516 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5517 return c
5518 }
5519
5520
5521
5522
5523
5524
5525 func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
5526 c.ifNoneMatch_ = entityTag
5527 return c
5528 }
5529
5530
5531
5532
5533 func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
5534 c.ctx_ = ctx
5535 return c
5536 }
5537
5538
5539
5540 func (c *CreativesGetCall) Header() http.Header {
5541 if c.header_ == nil {
5542 c.header_ = make(http.Header)
5543 }
5544 return c.header_
5545 }
5546
5547 func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
5548 reqHeaders := make(http.Header)
5549 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
5550 for k, v := range c.header_ {
5551 reqHeaders[k] = v
5552 }
5553 reqHeaders.Set("User-Agent", c.s.userAgent())
5554 if c.ifNoneMatch_ != "" {
5555 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5556 }
5557 var body io.Reader = nil
5558 c.urlParams_.Set("alt", alt)
5559 c.urlParams_.Set("prettyPrint", "false")
5560 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}")
5561 urls += "?" + c.urlParams_.Encode()
5562 req, err := http.NewRequest("GET", urls, body)
5563 if err != nil {
5564 return nil, err
5565 }
5566 req.Header = reqHeaders
5567 googleapi.Expand(req.URL, map[string]string{
5568 "accountId": strconv.FormatInt(c.accountId, 10),
5569 "buyerCreativeId": c.buyerCreativeId,
5570 })
5571 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5572 }
5573
5574
5575
5576
5577
5578
5579
5580
5581 func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
5582 gensupport.SetOptions(c.urlParams_, opts...)
5583 res, err := c.doRequest("json")
5584 if res != nil && res.StatusCode == http.StatusNotModified {
5585 if res.Body != nil {
5586 res.Body.Close()
5587 }
5588 return nil, &googleapi.Error{
5589 Code: res.StatusCode,
5590 Header: res.Header,
5591 }
5592 }
5593 if err != nil {
5594 return nil, err
5595 }
5596 defer googleapi.CloseBody(res)
5597 if err := googleapi.CheckResponse(res); err != nil {
5598 return nil, err
5599 }
5600 ret := &Creative{
5601 ServerResponse: googleapi.ServerResponse{
5602 Header: res.Header,
5603 HTTPStatusCode: res.StatusCode,
5604 },
5605 }
5606 target := &ret
5607 if err := gensupport.DecodeResponse(target, res); err != nil {
5608 return nil, err
5609 }
5610 return ret, nil
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643 }
5644
5645
5646
5647 type CreativesInsertCall struct {
5648 s *Service
5649 creative *Creative
5650 urlParams_ gensupport.URLParams
5651 ctx_ context.Context
5652 header_ http.Header
5653 }
5654
5655
5656 func (r *CreativesService) Insert(creative *Creative) *CreativesInsertCall {
5657 c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5658 c.creative = creative
5659 return c
5660 }
5661
5662
5663
5664
5665 func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
5666 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5667 return c
5668 }
5669
5670
5671
5672
5673 func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
5674 c.ctx_ = ctx
5675 return c
5676 }
5677
5678
5679
5680 func (c *CreativesInsertCall) Header() http.Header {
5681 if c.header_ == nil {
5682 c.header_ = make(http.Header)
5683 }
5684 return c.header_
5685 }
5686
5687 func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
5688 reqHeaders := make(http.Header)
5689 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
5690 for k, v := range c.header_ {
5691 reqHeaders[k] = v
5692 }
5693 reqHeaders.Set("User-Agent", c.s.userAgent())
5694 var body io.Reader = nil
5695 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
5696 if err != nil {
5697 return nil, err
5698 }
5699 reqHeaders.Set("Content-Type", "application/json")
5700 c.urlParams_.Set("alt", alt)
5701 c.urlParams_.Set("prettyPrint", "false")
5702 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives")
5703 urls += "?" + c.urlParams_.Encode()
5704 req, err := http.NewRequest("POST", urls, body)
5705 if err != nil {
5706 return nil, err
5707 }
5708 req.Header = reqHeaders
5709 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5710 }
5711
5712
5713
5714
5715
5716
5717
5718
5719 func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
5720 gensupport.SetOptions(c.urlParams_, opts...)
5721 res, err := c.doRequest("json")
5722 if res != nil && res.StatusCode == http.StatusNotModified {
5723 if res.Body != nil {
5724 res.Body.Close()
5725 }
5726 return nil, &googleapi.Error{
5727 Code: res.StatusCode,
5728 Header: res.Header,
5729 }
5730 }
5731 if err != nil {
5732 return nil, err
5733 }
5734 defer googleapi.CloseBody(res)
5735 if err := googleapi.CheckResponse(res); err != nil {
5736 return nil, err
5737 }
5738 ret := &Creative{
5739 ServerResponse: googleapi.ServerResponse{
5740 Header: res.Header,
5741 HTTPStatusCode: res.StatusCode,
5742 },
5743 }
5744 target := &ret
5745 if err := gensupport.DecodeResponse(target, res); err != nil {
5746 return nil, err
5747 }
5748 return ret, nil
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765 }
5766
5767
5768
5769 type CreativesListCall struct {
5770 s *Service
5771 urlParams_ gensupport.URLParams
5772 ifNoneMatch_ string
5773 ctx_ context.Context
5774 header_ http.Header
5775 }
5776
5777
5778
5779 func (r *CreativesService) List() *CreativesListCall {
5780 c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5781 return c
5782 }
5783
5784
5785
5786 func (c *CreativesListCall) AccountId(accountId ...int64) *CreativesListCall {
5787 var accountId_ []string
5788 for _, v := range accountId {
5789 accountId_ = append(accountId_, fmt.Sprint(v))
5790 }
5791 c.urlParams_.SetMulti("accountId", accountId_)
5792 return c
5793 }
5794
5795
5796
5797
5798 func (c *CreativesListCall) BuyerCreativeId(buyerCreativeId ...string) *CreativesListCall {
5799 c.urlParams_.SetMulti("buyerCreativeId", append([]string{}, buyerCreativeId...))
5800 return c
5801 }
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822 func (c *CreativesListCall) DealsStatusFilter(dealsStatusFilter string) *CreativesListCall {
5823 c.urlParams_.Set("dealsStatusFilter", dealsStatusFilter)
5824 return c
5825 }
5826
5827
5828
5829
5830 func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
5831 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5832 return c
5833 }
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856 func (c *CreativesListCall) OpenAuctionStatusFilter(openAuctionStatusFilter string) *CreativesListCall {
5857 c.urlParams_.Set("openAuctionStatusFilter", openAuctionStatusFilter)
5858 return c
5859 }
5860
5861
5862
5863
5864
5865 func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
5866 c.urlParams_.Set("pageToken", pageToken)
5867 return c
5868 }
5869
5870
5871
5872
5873 func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
5874 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5875 return c
5876 }
5877
5878
5879
5880
5881
5882
5883 func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
5884 c.ifNoneMatch_ = entityTag
5885 return c
5886 }
5887
5888
5889
5890
5891 func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
5892 c.ctx_ = ctx
5893 return c
5894 }
5895
5896
5897
5898 func (c *CreativesListCall) Header() http.Header {
5899 if c.header_ == nil {
5900 c.header_ = make(http.Header)
5901 }
5902 return c.header_
5903 }
5904
5905 func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
5906 reqHeaders := make(http.Header)
5907 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
5908 for k, v := range c.header_ {
5909 reqHeaders[k] = v
5910 }
5911 reqHeaders.Set("User-Agent", c.s.userAgent())
5912 if c.ifNoneMatch_ != "" {
5913 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5914 }
5915 var body io.Reader = nil
5916 c.urlParams_.Set("alt", alt)
5917 c.urlParams_.Set("prettyPrint", "false")
5918 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives")
5919 urls += "?" + c.urlParams_.Encode()
5920 req, err := http.NewRequest("GET", urls, body)
5921 if err != nil {
5922 return nil, err
5923 }
5924 req.Header = reqHeaders
5925 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5926 }
5927
5928
5929
5930
5931
5932
5933
5934
5935 func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesList, error) {
5936 gensupport.SetOptions(c.urlParams_, opts...)
5937 res, err := c.doRequest("json")
5938 if res != nil && res.StatusCode == http.StatusNotModified {
5939 if res.Body != nil {
5940 res.Body.Close()
5941 }
5942 return nil, &googleapi.Error{
5943 Code: res.StatusCode,
5944 Header: res.Header,
5945 }
5946 }
5947 if err != nil {
5948 return nil, err
5949 }
5950 defer googleapi.CloseBody(res)
5951 if err := googleapi.CheckResponse(res); err != nil {
5952 return nil, err
5953 }
5954 ret := &CreativesList{
5955 ServerResponse: googleapi.ServerResponse{
5956 Header: res.Header,
5957 HTTPStatusCode: res.StatusCode,
5958 },
5959 }
5960 target := &ret
5961 if err := gensupport.DecodeResponse(target, res); err != nil {
5962 return nil, err
5963 }
5964 return ret, nil
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040 }
6041
6042
6043
6044
6045 func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesList) error) error {
6046 c.ctx_ = ctx
6047 defer c.PageToken(c.urlParams_.Get("pageToken"))
6048 for {
6049 x, err := c.Do()
6050 if err != nil {
6051 return err
6052 }
6053 if err := f(x); err != nil {
6054 return err
6055 }
6056 if x.NextPageToken == "" {
6057 return nil
6058 }
6059 c.PageToken(x.NextPageToken)
6060 }
6061 }
6062
6063
6064
6065 type CreativesListDealsCall struct {
6066 s *Service
6067 accountId int64
6068 buyerCreativeId string
6069 urlParams_ gensupport.URLParams
6070 ifNoneMatch_ string
6071 ctx_ context.Context
6072 header_ http.Header
6073 }
6074
6075
6076
6077
6078
6079 func (r *CreativesService) ListDeals(accountId int64, buyerCreativeId string) *CreativesListDealsCall {
6080 c := &CreativesListDealsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6081 c.accountId = accountId
6082 c.buyerCreativeId = buyerCreativeId
6083 return c
6084 }
6085
6086
6087
6088
6089 func (c *CreativesListDealsCall) Fields(s ...googleapi.Field) *CreativesListDealsCall {
6090 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6091 return c
6092 }
6093
6094
6095
6096
6097
6098
6099 func (c *CreativesListDealsCall) IfNoneMatch(entityTag string) *CreativesListDealsCall {
6100 c.ifNoneMatch_ = entityTag
6101 return c
6102 }
6103
6104
6105
6106
6107 func (c *CreativesListDealsCall) Context(ctx context.Context) *CreativesListDealsCall {
6108 c.ctx_ = ctx
6109 return c
6110 }
6111
6112
6113
6114 func (c *CreativesListDealsCall) Header() http.Header {
6115 if c.header_ == nil {
6116 c.header_ = make(http.Header)
6117 }
6118 return c.header_
6119 }
6120
6121 func (c *CreativesListDealsCall) doRequest(alt string) (*http.Response, error) {
6122 reqHeaders := make(http.Header)
6123 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
6124 for k, v := range c.header_ {
6125 reqHeaders[k] = v
6126 }
6127 reqHeaders.Set("User-Agent", c.s.userAgent())
6128 if c.ifNoneMatch_ != "" {
6129 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6130 }
6131 var body io.Reader = nil
6132 c.urlParams_.Set("alt", alt)
6133 c.urlParams_.Set("prettyPrint", "false")
6134 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}/listDeals")
6135 urls += "?" + c.urlParams_.Encode()
6136 req, err := http.NewRequest("GET", urls, body)
6137 if err != nil {
6138 return nil, err
6139 }
6140 req.Header = reqHeaders
6141 googleapi.Expand(req.URL, map[string]string{
6142 "accountId": strconv.FormatInt(c.accountId, 10),
6143 "buyerCreativeId": c.buyerCreativeId,
6144 })
6145 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6146 }
6147
6148
6149
6150
6151
6152
6153
6154
6155 func (c *CreativesListDealsCall) Do(opts ...googleapi.CallOption) (*CreativeDealIds, error) {
6156 gensupport.SetOptions(c.urlParams_, opts...)
6157 res, err := c.doRequest("json")
6158 if res != nil && res.StatusCode == http.StatusNotModified {
6159 if res.Body != nil {
6160 res.Body.Close()
6161 }
6162 return nil, &googleapi.Error{
6163 Code: res.StatusCode,
6164 Header: res.Header,
6165 }
6166 }
6167 if err != nil {
6168 return nil, err
6169 }
6170 defer googleapi.CloseBody(res)
6171 if err := googleapi.CheckResponse(res); err != nil {
6172 return nil, err
6173 }
6174 ret := &CreativeDealIds{
6175 ServerResponse: googleapi.ServerResponse{
6176 Header: res.Header,
6177 HTTPStatusCode: res.StatusCode,
6178 },
6179 }
6180 target := &ret
6181 if err := gensupport.DecodeResponse(target, res); err != nil {
6182 return nil, err
6183 }
6184 return ret, nil
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217 }
6218
6219
6220
6221 type CreativesRemoveDealCall struct {
6222 s *Service
6223 accountId int64
6224 buyerCreativeId string
6225 dealId int64
6226 urlParams_ gensupport.URLParams
6227 ctx_ context.Context
6228 header_ http.Header
6229 }
6230
6231
6232
6233
6234
6235
6236 func (r *CreativesService) RemoveDeal(accountId int64, buyerCreativeId string, dealId int64) *CreativesRemoveDealCall {
6237 c := &CreativesRemoveDealCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6238 c.accountId = accountId
6239 c.buyerCreativeId = buyerCreativeId
6240 c.dealId = dealId
6241 return c
6242 }
6243
6244
6245
6246
6247 func (c *CreativesRemoveDealCall) Fields(s ...googleapi.Field) *CreativesRemoveDealCall {
6248 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6249 return c
6250 }
6251
6252
6253
6254
6255 func (c *CreativesRemoveDealCall) Context(ctx context.Context) *CreativesRemoveDealCall {
6256 c.ctx_ = ctx
6257 return c
6258 }
6259
6260
6261
6262 func (c *CreativesRemoveDealCall) Header() http.Header {
6263 if c.header_ == nil {
6264 c.header_ = make(http.Header)
6265 }
6266 return c.header_
6267 }
6268
6269 func (c *CreativesRemoveDealCall) doRequest(alt string) (*http.Response, error) {
6270 reqHeaders := make(http.Header)
6271 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
6272 for k, v := range c.header_ {
6273 reqHeaders[k] = v
6274 }
6275 reqHeaders.Set("User-Agent", c.s.userAgent())
6276 var body io.Reader = nil
6277 c.urlParams_.Set("alt", alt)
6278 c.urlParams_.Set("prettyPrint", "false")
6279 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}/removeDeal/{dealId}")
6280 urls += "?" + c.urlParams_.Encode()
6281 req, err := http.NewRequest("POST", urls, body)
6282 if err != nil {
6283 return nil, err
6284 }
6285 req.Header = reqHeaders
6286 googleapi.Expand(req.URL, map[string]string{
6287 "accountId": strconv.FormatInt(c.accountId, 10),
6288 "buyerCreativeId": c.buyerCreativeId,
6289 "dealId": strconv.FormatInt(c.dealId, 10),
6290 })
6291 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6292 }
6293
6294
6295 func (c *CreativesRemoveDealCall) Do(opts ...googleapi.CallOption) error {
6296 gensupport.SetOptions(c.urlParams_, opts...)
6297 res, err := c.doRequest("json")
6298 if err != nil {
6299 return err
6300 }
6301 defer googleapi.CloseBody(res)
6302 if err := googleapi.CheckResponse(res); err != nil {
6303 return err
6304 }
6305 return nil
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343 }
6344
6345
6346
6347 type MarketplacedealsDeleteCall struct {
6348 s *Service
6349 proposalId string
6350 deleteorderdealsrequest *DeleteOrderDealsRequest
6351 urlParams_ gensupport.URLParams
6352 ctx_ context.Context
6353 header_ http.Header
6354 }
6355
6356
6357
6358
6359 func (r *MarketplacedealsService) Delete(proposalId string, deleteorderdealsrequest *DeleteOrderDealsRequest) *MarketplacedealsDeleteCall {
6360 c := &MarketplacedealsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6361 c.proposalId = proposalId
6362 c.deleteorderdealsrequest = deleteorderdealsrequest
6363 return c
6364 }
6365
6366
6367
6368
6369 func (c *MarketplacedealsDeleteCall) Fields(s ...googleapi.Field) *MarketplacedealsDeleteCall {
6370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6371 return c
6372 }
6373
6374
6375
6376
6377 func (c *MarketplacedealsDeleteCall) Context(ctx context.Context) *MarketplacedealsDeleteCall {
6378 c.ctx_ = ctx
6379 return c
6380 }
6381
6382
6383
6384 func (c *MarketplacedealsDeleteCall) Header() http.Header {
6385 if c.header_ == nil {
6386 c.header_ = make(http.Header)
6387 }
6388 return c.header_
6389 }
6390
6391 func (c *MarketplacedealsDeleteCall) doRequest(alt string) (*http.Response, error) {
6392 reqHeaders := make(http.Header)
6393 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
6394 for k, v := range c.header_ {
6395 reqHeaders[k] = v
6396 }
6397 reqHeaders.Set("User-Agent", c.s.userAgent())
6398 var body io.Reader = nil
6399 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deleteorderdealsrequest)
6400 if err != nil {
6401 return nil, err
6402 }
6403 reqHeaders.Set("Content-Type", "application/json")
6404 c.urlParams_.Set("alt", alt)
6405 c.urlParams_.Set("prettyPrint", "false")
6406 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/deals/delete")
6407 urls += "?" + c.urlParams_.Encode()
6408 req, err := http.NewRequest("POST", urls, body)
6409 if err != nil {
6410 return nil, err
6411 }
6412 req.Header = reqHeaders
6413 googleapi.Expand(req.URL, map[string]string{
6414 "proposalId": c.proposalId,
6415 })
6416 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6417 }
6418
6419
6420
6421
6422
6423
6424
6425
6426 func (c *MarketplacedealsDeleteCall) Do(opts ...googleapi.CallOption) (*DeleteOrderDealsResponse, error) {
6427 gensupport.SetOptions(c.urlParams_, opts...)
6428 res, err := c.doRequest("json")
6429 if res != nil && res.StatusCode == http.StatusNotModified {
6430 if res.Body != nil {
6431 res.Body.Close()
6432 }
6433 return nil, &googleapi.Error{
6434 Code: res.StatusCode,
6435 Header: res.Header,
6436 }
6437 }
6438 if err != nil {
6439 return nil, err
6440 }
6441 defer googleapi.CloseBody(res)
6442 if err := googleapi.CheckResponse(res); err != nil {
6443 return nil, err
6444 }
6445 ret := &DeleteOrderDealsResponse{
6446 ServerResponse: googleapi.ServerResponse{
6447 Header: res.Header,
6448 HTTPStatusCode: res.StatusCode,
6449 },
6450 }
6451 target := &ret
6452 if err := gensupport.DecodeResponse(target, res); err != nil {
6453 return nil, err
6454 }
6455 return ret, nil
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483 }
6484
6485
6486
6487 type MarketplacedealsInsertCall struct {
6488 s *Service
6489 proposalId string
6490 addorderdealsrequest *AddOrderDealsRequest
6491 urlParams_ gensupport.URLParams
6492 ctx_ context.Context
6493 header_ http.Header
6494 }
6495
6496
6497
6498
6499 func (r *MarketplacedealsService) Insert(proposalId string, addorderdealsrequest *AddOrderDealsRequest) *MarketplacedealsInsertCall {
6500 c := &MarketplacedealsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6501 c.proposalId = proposalId
6502 c.addorderdealsrequest = addorderdealsrequest
6503 return c
6504 }
6505
6506
6507
6508
6509 func (c *MarketplacedealsInsertCall) Fields(s ...googleapi.Field) *MarketplacedealsInsertCall {
6510 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6511 return c
6512 }
6513
6514
6515
6516
6517 func (c *MarketplacedealsInsertCall) Context(ctx context.Context) *MarketplacedealsInsertCall {
6518 c.ctx_ = ctx
6519 return c
6520 }
6521
6522
6523
6524 func (c *MarketplacedealsInsertCall) Header() http.Header {
6525 if c.header_ == nil {
6526 c.header_ = make(http.Header)
6527 }
6528 return c.header_
6529 }
6530
6531 func (c *MarketplacedealsInsertCall) doRequest(alt string) (*http.Response, error) {
6532 reqHeaders := make(http.Header)
6533 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
6534 for k, v := range c.header_ {
6535 reqHeaders[k] = v
6536 }
6537 reqHeaders.Set("User-Agent", c.s.userAgent())
6538 var body io.Reader = nil
6539 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addorderdealsrequest)
6540 if err != nil {
6541 return nil, err
6542 }
6543 reqHeaders.Set("Content-Type", "application/json")
6544 c.urlParams_.Set("alt", alt)
6545 c.urlParams_.Set("prettyPrint", "false")
6546 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/deals/insert")
6547 urls += "?" + c.urlParams_.Encode()
6548 req, err := http.NewRequest("POST", urls, body)
6549 if err != nil {
6550 return nil, err
6551 }
6552 req.Header = reqHeaders
6553 googleapi.Expand(req.URL, map[string]string{
6554 "proposalId": c.proposalId,
6555 })
6556 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6557 }
6558
6559
6560
6561
6562
6563
6564
6565
6566 func (c *MarketplacedealsInsertCall) Do(opts ...googleapi.CallOption) (*AddOrderDealsResponse, error) {
6567 gensupport.SetOptions(c.urlParams_, opts...)
6568 res, err := c.doRequest("json")
6569 if res != nil && res.StatusCode == http.StatusNotModified {
6570 if res.Body != nil {
6571 res.Body.Close()
6572 }
6573 return nil, &googleapi.Error{
6574 Code: res.StatusCode,
6575 Header: res.Header,
6576 }
6577 }
6578 if err != nil {
6579 return nil, err
6580 }
6581 defer googleapi.CloseBody(res)
6582 if err := googleapi.CheckResponse(res); err != nil {
6583 return nil, err
6584 }
6585 ret := &AddOrderDealsResponse{
6586 ServerResponse: googleapi.ServerResponse{
6587 Header: res.Header,
6588 HTTPStatusCode: res.StatusCode,
6589 },
6590 }
6591 target := &ret
6592 if err := gensupport.DecodeResponse(target, res); err != nil {
6593 return nil, err
6594 }
6595 return ret, nil
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623 }
6624
6625
6626
6627 type MarketplacedealsListCall struct {
6628 s *Service
6629 proposalId string
6630 urlParams_ gensupport.URLParams
6631 ifNoneMatch_ string
6632 ctx_ context.Context
6633 header_ http.Header
6634 }
6635
6636
6637
6638
6639
6640 func (r *MarketplacedealsService) List(proposalId string) *MarketplacedealsListCall {
6641 c := &MarketplacedealsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6642 c.proposalId = proposalId
6643 return c
6644 }
6645
6646
6647
6648 func (c *MarketplacedealsListCall) PqlQuery(pqlQuery string) *MarketplacedealsListCall {
6649 c.urlParams_.Set("pqlQuery", pqlQuery)
6650 return c
6651 }
6652
6653
6654
6655
6656 func (c *MarketplacedealsListCall) Fields(s ...googleapi.Field) *MarketplacedealsListCall {
6657 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6658 return c
6659 }
6660
6661
6662
6663
6664
6665
6666 func (c *MarketplacedealsListCall) IfNoneMatch(entityTag string) *MarketplacedealsListCall {
6667 c.ifNoneMatch_ = entityTag
6668 return c
6669 }
6670
6671
6672
6673
6674 func (c *MarketplacedealsListCall) Context(ctx context.Context) *MarketplacedealsListCall {
6675 c.ctx_ = ctx
6676 return c
6677 }
6678
6679
6680
6681 func (c *MarketplacedealsListCall) Header() http.Header {
6682 if c.header_ == nil {
6683 c.header_ = make(http.Header)
6684 }
6685 return c.header_
6686 }
6687
6688 func (c *MarketplacedealsListCall) doRequest(alt string) (*http.Response, error) {
6689 reqHeaders := make(http.Header)
6690 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
6691 for k, v := range c.header_ {
6692 reqHeaders[k] = v
6693 }
6694 reqHeaders.Set("User-Agent", c.s.userAgent())
6695 if c.ifNoneMatch_ != "" {
6696 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6697 }
6698 var body io.Reader = nil
6699 c.urlParams_.Set("alt", alt)
6700 c.urlParams_.Set("prettyPrint", "false")
6701 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/deals")
6702 urls += "?" + c.urlParams_.Encode()
6703 req, err := http.NewRequest("GET", urls, body)
6704 if err != nil {
6705 return nil, err
6706 }
6707 req.Header = reqHeaders
6708 googleapi.Expand(req.URL, map[string]string{
6709 "proposalId": c.proposalId,
6710 })
6711 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6712 }
6713
6714
6715
6716
6717
6718
6719
6720
6721 func (c *MarketplacedealsListCall) Do(opts ...googleapi.CallOption) (*GetOrderDealsResponse, error) {
6722 gensupport.SetOptions(c.urlParams_, opts...)
6723 res, err := c.doRequest("json")
6724 if res != nil && res.StatusCode == http.StatusNotModified {
6725 if res.Body != nil {
6726 res.Body.Close()
6727 }
6728 return nil, &googleapi.Error{
6729 Code: res.StatusCode,
6730 Header: res.Header,
6731 }
6732 }
6733 if err != nil {
6734 return nil, err
6735 }
6736 defer googleapi.CloseBody(res)
6737 if err := googleapi.CheckResponse(res); err != nil {
6738 return nil, err
6739 }
6740 ret := &GetOrderDealsResponse{
6741 ServerResponse: googleapi.ServerResponse{
6742 Header: res.Header,
6743 HTTPStatusCode: res.StatusCode,
6744 },
6745 }
6746 target := &ret
6747 if err := gensupport.DecodeResponse(target, res); err != nil {
6748 return nil, err
6749 }
6750 return ret, nil
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780 }
6781
6782
6783
6784 type MarketplacedealsUpdateCall struct {
6785 s *Service
6786 proposalId string
6787 editallorderdealsrequest *EditAllOrderDealsRequest
6788 urlParams_ gensupport.URLParams
6789 ctx_ context.Context
6790 header_ http.Header
6791 }
6792
6793
6794
6795
6796
6797 func (r *MarketplacedealsService) Update(proposalId string, editallorderdealsrequest *EditAllOrderDealsRequest) *MarketplacedealsUpdateCall {
6798 c := &MarketplacedealsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6799 c.proposalId = proposalId
6800 c.editallorderdealsrequest = editallorderdealsrequest
6801 return c
6802 }
6803
6804
6805
6806
6807 func (c *MarketplacedealsUpdateCall) Fields(s ...googleapi.Field) *MarketplacedealsUpdateCall {
6808 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6809 return c
6810 }
6811
6812
6813
6814
6815 func (c *MarketplacedealsUpdateCall) Context(ctx context.Context) *MarketplacedealsUpdateCall {
6816 c.ctx_ = ctx
6817 return c
6818 }
6819
6820
6821
6822 func (c *MarketplacedealsUpdateCall) Header() http.Header {
6823 if c.header_ == nil {
6824 c.header_ = make(http.Header)
6825 }
6826 return c.header_
6827 }
6828
6829 func (c *MarketplacedealsUpdateCall) doRequest(alt string) (*http.Response, error) {
6830 reqHeaders := make(http.Header)
6831 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
6832 for k, v := range c.header_ {
6833 reqHeaders[k] = v
6834 }
6835 reqHeaders.Set("User-Agent", c.s.userAgent())
6836 var body io.Reader = nil
6837 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editallorderdealsrequest)
6838 if err != nil {
6839 return nil, err
6840 }
6841 reqHeaders.Set("Content-Type", "application/json")
6842 c.urlParams_.Set("alt", alt)
6843 c.urlParams_.Set("prettyPrint", "false")
6844 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/deals/update")
6845 urls += "?" + c.urlParams_.Encode()
6846 req, err := http.NewRequest("POST", urls, body)
6847 if err != nil {
6848 return nil, err
6849 }
6850 req.Header = reqHeaders
6851 googleapi.Expand(req.URL, map[string]string{
6852 "proposalId": c.proposalId,
6853 })
6854 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6855 }
6856
6857
6858
6859
6860
6861
6862
6863
6864 func (c *MarketplacedealsUpdateCall) Do(opts ...googleapi.CallOption) (*EditAllOrderDealsResponse, error) {
6865 gensupport.SetOptions(c.urlParams_, opts...)
6866 res, err := c.doRequest("json")
6867 if res != nil && res.StatusCode == http.StatusNotModified {
6868 if res.Body != nil {
6869 res.Body.Close()
6870 }
6871 return nil, &googleapi.Error{
6872 Code: res.StatusCode,
6873 Header: res.Header,
6874 }
6875 }
6876 if err != nil {
6877 return nil, err
6878 }
6879 defer googleapi.CloseBody(res)
6880 if err := googleapi.CheckResponse(res); err != nil {
6881 return nil, err
6882 }
6883 ret := &EditAllOrderDealsResponse{
6884 ServerResponse: googleapi.ServerResponse{
6885 Header: res.Header,
6886 HTTPStatusCode: res.StatusCode,
6887 },
6888 }
6889 target := &ret
6890 if err := gensupport.DecodeResponse(target, res); err != nil {
6891 return nil, err
6892 }
6893 return ret, nil
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921 }
6922
6923
6924
6925 type MarketplacenotesInsertCall struct {
6926 s *Service
6927 proposalId string
6928 addordernotesrequest *AddOrderNotesRequest
6929 urlParams_ gensupport.URLParams
6930 ctx_ context.Context
6931 header_ http.Header
6932 }
6933
6934
6935
6936
6937 func (r *MarketplacenotesService) Insert(proposalId string, addordernotesrequest *AddOrderNotesRequest) *MarketplacenotesInsertCall {
6938 c := &MarketplacenotesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6939 c.proposalId = proposalId
6940 c.addordernotesrequest = addordernotesrequest
6941 return c
6942 }
6943
6944
6945
6946
6947 func (c *MarketplacenotesInsertCall) Fields(s ...googleapi.Field) *MarketplacenotesInsertCall {
6948 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6949 return c
6950 }
6951
6952
6953
6954
6955 func (c *MarketplacenotesInsertCall) Context(ctx context.Context) *MarketplacenotesInsertCall {
6956 c.ctx_ = ctx
6957 return c
6958 }
6959
6960
6961
6962 func (c *MarketplacenotesInsertCall) Header() http.Header {
6963 if c.header_ == nil {
6964 c.header_ = make(http.Header)
6965 }
6966 return c.header_
6967 }
6968
6969 func (c *MarketplacenotesInsertCall) doRequest(alt string) (*http.Response, error) {
6970 reqHeaders := make(http.Header)
6971 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
6972 for k, v := range c.header_ {
6973 reqHeaders[k] = v
6974 }
6975 reqHeaders.Set("User-Agent", c.s.userAgent())
6976 var body io.Reader = nil
6977 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addordernotesrequest)
6978 if err != nil {
6979 return nil, err
6980 }
6981 reqHeaders.Set("Content-Type", "application/json")
6982 c.urlParams_.Set("alt", alt)
6983 c.urlParams_.Set("prettyPrint", "false")
6984 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/notes/insert")
6985 urls += "?" + c.urlParams_.Encode()
6986 req, err := http.NewRequest("POST", urls, body)
6987 if err != nil {
6988 return nil, err
6989 }
6990 req.Header = reqHeaders
6991 googleapi.Expand(req.URL, map[string]string{
6992 "proposalId": c.proposalId,
6993 })
6994 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6995 }
6996
6997
6998
6999
7000
7001
7002
7003
7004 func (c *MarketplacenotesInsertCall) Do(opts ...googleapi.CallOption) (*AddOrderNotesResponse, error) {
7005 gensupport.SetOptions(c.urlParams_, opts...)
7006 res, err := c.doRequest("json")
7007 if res != nil && res.StatusCode == http.StatusNotModified {
7008 if res.Body != nil {
7009 res.Body.Close()
7010 }
7011 return nil, &googleapi.Error{
7012 Code: res.StatusCode,
7013 Header: res.Header,
7014 }
7015 }
7016 if err != nil {
7017 return nil, err
7018 }
7019 defer googleapi.CloseBody(res)
7020 if err := googleapi.CheckResponse(res); err != nil {
7021 return nil, err
7022 }
7023 ret := &AddOrderNotesResponse{
7024 ServerResponse: googleapi.ServerResponse{
7025 Header: res.Header,
7026 HTTPStatusCode: res.StatusCode,
7027 },
7028 }
7029 target := &ret
7030 if err := gensupport.DecodeResponse(target, res); err != nil {
7031 return nil, err
7032 }
7033 return ret, nil
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061 }
7062
7063
7064
7065 type MarketplacenotesListCall struct {
7066 s *Service
7067 proposalId string
7068 urlParams_ gensupport.URLParams
7069 ifNoneMatch_ string
7070 ctx_ context.Context
7071 header_ http.Header
7072 }
7073
7074
7075
7076
7077
7078 func (r *MarketplacenotesService) List(proposalId string) *MarketplacenotesListCall {
7079 c := &MarketplacenotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7080 c.proposalId = proposalId
7081 return c
7082 }
7083
7084
7085
7086
7087
7088 func (c *MarketplacenotesListCall) PqlQuery(pqlQuery string) *MarketplacenotesListCall {
7089 c.urlParams_.Set("pqlQuery", pqlQuery)
7090 return c
7091 }
7092
7093
7094
7095
7096 func (c *MarketplacenotesListCall) Fields(s ...googleapi.Field) *MarketplacenotesListCall {
7097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7098 return c
7099 }
7100
7101
7102
7103
7104
7105
7106 func (c *MarketplacenotesListCall) IfNoneMatch(entityTag string) *MarketplacenotesListCall {
7107 c.ifNoneMatch_ = entityTag
7108 return c
7109 }
7110
7111
7112
7113
7114 func (c *MarketplacenotesListCall) Context(ctx context.Context) *MarketplacenotesListCall {
7115 c.ctx_ = ctx
7116 return c
7117 }
7118
7119
7120
7121 func (c *MarketplacenotesListCall) Header() http.Header {
7122 if c.header_ == nil {
7123 c.header_ = make(http.Header)
7124 }
7125 return c.header_
7126 }
7127
7128 func (c *MarketplacenotesListCall) doRequest(alt string) (*http.Response, error) {
7129 reqHeaders := make(http.Header)
7130 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
7131 for k, v := range c.header_ {
7132 reqHeaders[k] = v
7133 }
7134 reqHeaders.Set("User-Agent", c.s.userAgent())
7135 if c.ifNoneMatch_ != "" {
7136 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7137 }
7138 var body io.Reader = nil
7139 c.urlParams_.Set("alt", alt)
7140 c.urlParams_.Set("prettyPrint", "false")
7141 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/notes")
7142 urls += "?" + c.urlParams_.Encode()
7143 req, err := http.NewRequest("GET", urls, body)
7144 if err != nil {
7145 return nil, err
7146 }
7147 req.Header = reqHeaders
7148 googleapi.Expand(req.URL, map[string]string{
7149 "proposalId": c.proposalId,
7150 })
7151 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7152 }
7153
7154
7155
7156
7157
7158
7159
7160
7161 func (c *MarketplacenotesListCall) Do(opts ...googleapi.CallOption) (*GetOrderNotesResponse, error) {
7162 gensupport.SetOptions(c.urlParams_, opts...)
7163 res, err := c.doRequest("json")
7164 if res != nil && res.StatusCode == http.StatusNotModified {
7165 if res.Body != nil {
7166 res.Body.Close()
7167 }
7168 return nil, &googleapi.Error{
7169 Code: res.StatusCode,
7170 Header: res.Header,
7171 }
7172 }
7173 if err != nil {
7174 return nil, err
7175 }
7176 defer googleapi.CloseBody(res)
7177 if err := googleapi.CheckResponse(res); err != nil {
7178 return nil, err
7179 }
7180 ret := &GetOrderNotesResponse{
7181 ServerResponse: googleapi.ServerResponse{
7182 Header: res.Header,
7183 HTTPStatusCode: res.StatusCode,
7184 },
7185 }
7186 target := &ret
7187 if err := gensupport.DecodeResponse(target, res); err != nil {
7188 return nil, err
7189 }
7190 return ret, nil
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220 }
7221
7222
7223
7224 type MarketplaceprivateauctionUpdateproposalCall struct {
7225 s *Service
7226 privateAuctionId string
7227 updateprivateauctionproposalrequest *UpdatePrivateAuctionProposalRequest
7228 urlParams_ gensupport.URLParams
7229 ctx_ context.Context
7230 header_ http.Header
7231 }
7232
7233
7234
7235
7236 func (r *MarketplaceprivateauctionService) Updateproposal(privateAuctionId string, updateprivateauctionproposalrequest *UpdatePrivateAuctionProposalRequest) *MarketplaceprivateauctionUpdateproposalCall {
7237 c := &MarketplaceprivateauctionUpdateproposalCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7238 c.privateAuctionId = privateAuctionId
7239 c.updateprivateauctionproposalrequest = updateprivateauctionproposalrequest
7240 return c
7241 }
7242
7243
7244
7245
7246 func (c *MarketplaceprivateauctionUpdateproposalCall) Fields(s ...googleapi.Field) *MarketplaceprivateauctionUpdateproposalCall {
7247 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7248 return c
7249 }
7250
7251
7252
7253
7254 func (c *MarketplaceprivateauctionUpdateproposalCall) Context(ctx context.Context) *MarketplaceprivateauctionUpdateproposalCall {
7255 c.ctx_ = ctx
7256 return c
7257 }
7258
7259
7260
7261 func (c *MarketplaceprivateauctionUpdateproposalCall) Header() http.Header {
7262 if c.header_ == nil {
7263 c.header_ = make(http.Header)
7264 }
7265 return c.header_
7266 }
7267
7268 func (c *MarketplaceprivateauctionUpdateproposalCall) doRequest(alt string) (*http.Response, error) {
7269 reqHeaders := make(http.Header)
7270 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
7271 for k, v := range c.header_ {
7272 reqHeaders[k] = v
7273 }
7274 reqHeaders.Set("User-Agent", c.s.userAgent())
7275 var body io.Reader = nil
7276 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateprivateauctionproposalrequest)
7277 if err != nil {
7278 return nil, err
7279 }
7280 reqHeaders.Set("Content-Type", "application/json")
7281 c.urlParams_.Set("alt", alt)
7282 c.urlParams_.Set("prettyPrint", "false")
7283 urls := googleapi.ResolveRelative(c.s.BasePath, "privateauction/{privateAuctionId}/updateproposal")
7284 urls += "?" + c.urlParams_.Encode()
7285 req, err := http.NewRequest("POST", urls, body)
7286 if err != nil {
7287 return nil, err
7288 }
7289 req.Header = reqHeaders
7290 googleapi.Expand(req.URL, map[string]string{
7291 "privateAuctionId": c.privateAuctionId,
7292 })
7293 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7294 }
7295
7296
7297 func (c *MarketplaceprivateauctionUpdateproposalCall) Do(opts ...googleapi.CallOption) error {
7298 gensupport.SetOptions(c.urlParams_, opts...)
7299 res, err := c.doRequest("json")
7300 if err != nil {
7301 return err
7302 }
7303 defer googleapi.CloseBody(res)
7304 if err := googleapi.CheckResponse(res); err != nil {
7305 return err
7306 }
7307 return nil
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332 }
7333
7334
7335
7336 type PerformanceReportListCall struct {
7337 s *Service
7338 urlParams_ gensupport.URLParams
7339 ifNoneMatch_ string
7340 ctx_ context.Context
7341 header_ http.Header
7342 }
7343
7344
7345
7346
7347
7348
7349
7350
7351 func (r *PerformanceReportService) List(accountId int64, endDateTime string, startDateTime string) *PerformanceReportListCall {
7352 c := &PerformanceReportListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7353 c.urlParams_.Set("accountId", fmt.Sprint(accountId))
7354 c.urlParams_.Set("endDateTime", endDateTime)
7355 c.urlParams_.Set("startDateTime", startDateTime)
7356 return c
7357 }
7358
7359
7360
7361
7362 func (c *PerformanceReportListCall) MaxResults(maxResults int64) *PerformanceReportListCall {
7363 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7364 return c
7365 }
7366
7367
7368
7369
7370
7371 func (c *PerformanceReportListCall) PageToken(pageToken string) *PerformanceReportListCall {
7372 c.urlParams_.Set("pageToken", pageToken)
7373 return c
7374 }
7375
7376
7377
7378
7379 func (c *PerformanceReportListCall) Fields(s ...googleapi.Field) *PerformanceReportListCall {
7380 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7381 return c
7382 }
7383
7384
7385
7386
7387
7388
7389 func (c *PerformanceReportListCall) IfNoneMatch(entityTag string) *PerformanceReportListCall {
7390 c.ifNoneMatch_ = entityTag
7391 return c
7392 }
7393
7394
7395
7396
7397 func (c *PerformanceReportListCall) Context(ctx context.Context) *PerformanceReportListCall {
7398 c.ctx_ = ctx
7399 return c
7400 }
7401
7402
7403
7404 func (c *PerformanceReportListCall) Header() http.Header {
7405 if c.header_ == nil {
7406 c.header_ = make(http.Header)
7407 }
7408 return c.header_
7409 }
7410
7411 func (c *PerformanceReportListCall) doRequest(alt string) (*http.Response, error) {
7412 reqHeaders := make(http.Header)
7413 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
7414 for k, v := range c.header_ {
7415 reqHeaders[k] = v
7416 }
7417 reqHeaders.Set("User-Agent", c.s.userAgent())
7418 if c.ifNoneMatch_ != "" {
7419 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7420 }
7421 var body io.Reader = nil
7422 c.urlParams_.Set("alt", alt)
7423 c.urlParams_.Set("prettyPrint", "false")
7424 urls := googleapi.ResolveRelative(c.s.BasePath, "performancereport")
7425 urls += "?" + c.urlParams_.Encode()
7426 req, err := http.NewRequest("GET", urls, body)
7427 if err != nil {
7428 return nil, err
7429 }
7430 req.Header = reqHeaders
7431 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7432 }
7433
7434
7435
7436
7437
7438
7439
7440
7441 func (c *PerformanceReportListCall) Do(opts ...googleapi.CallOption) (*PerformanceReportList, error) {
7442 gensupport.SetOptions(c.urlParams_, opts...)
7443 res, err := c.doRequest("json")
7444 if res != nil && res.StatusCode == http.StatusNotModified {
7445 if res.Body != nil {
7446 res.Body.Close()
7447 }
7448 return nil, &googleapi.Error{
7449 Code: res.StatusCode,
7450 Header: res.Header,
7451 }
7452 }
7453 if err != nil {
7454 return nil, err
7455 }
7456 defer googleapi.CloseBody(res)
7457 if err := googleapi.CheckResponse(res); err != nil {
7458 return nil, err
7459 }
7460 ret := &PerformanceReportList{
7461 ServerResponse: googleapi.ServerResponse{
7462 Header: res.Header,
7463 HTTPStatusCode: res.StatusCode,
7464 },
7465 }
7466 target := &ret
7467 if err := gensupport.DecodeResponse(target, res); err != nil {
7468 return nil, err
7469 }
7470 return ret, nil
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523 }
7524
7525
7526
7527 type PretargetingConfigDeleteCall struct {
7528 s *Service
7529 accountId int64
7530 configId int64
7531 urlParams_ gensupport.URLParams
7532 ctx_ context.Context
7533 header_ http.Header
7534 }
7535
7536
7537
7538
7539
7540 func (r *PretargetingConfigService) Delete(accountId int64, configId int64) *PretargetingConfigDeleteCall {
7541 c := &PretargetingConfigDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7542 c.accountId = accountId
7543 c.configId = configId
7544 return c
7545 }
7546
7547
7548
7549
7550 func (c *PretargetingConfigDeleteCall) Fields(s ...googleapi.Field) *PretargetingConfigDeleteCall {
7551 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7552 return c
7553 }
7554
7555
7556
7557
7558 func (c *PretargetingConfigDeleteCall) Context(ctx context.Context) *PretargetingConfigDeleteCall {
7559 c.ctx_ = ctx
7560 return c
7561 }
7562
7563
7564
7565 func (c *PretargetingConfigDeleteCall) Header() http.Header {
7566 if c.header_ == nil {
7567 c.header_ = make(http.Header)
7568 }
7569 return c.header_
7570 }
7571
7572 func (c *PretargetingConfigDeleteCall) doRequest(alt string) (*http.Response, error) {
7573 reqHeaders := make(http.Header)
7574 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
7575 for k, v := range c.header_ {
7576 reqHeaders[k] = v
7577 }
7578 reqHeaders.Set("User-Agent", c.s.userAgent())
7579 var body io.Reader = nil
7580 c.urlParams_.Set("alt", alt)
7581 c.urlParams_.Set("prettyPrint", "false")
7582 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}/{configId}")
7583 urls += "?" + c.urlParams_.Encode()
7584 req, err := http.NewRequest("DELETE", urls, body)
7585 if err != nil {
7586 return nil, err
7587 }
7588 req.Header = reqHeaders
7589 googleapi.Expand(req.URL, map[string]string{
7590 "accountId": strconv.FormatInt(c.accountId, 10),
7591 "configId": strconv.FormatInt(c.configId, 10),
7592 })
7593 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7594 }
7595
7596
7597 func (c *PretargetingConfigDeleteCall) Do(opts ...googleapi.CallOption) error {
7598 gensupport.SetOptions(c.urlParams_, opts...)
7599 res, err := c.doRequest("json")
7600 if err != nil {
7601 return err
7602 }
7603 defer googleapi.CloseBody(res)
7604 if err := googleapi.CheckResponse(res); err != nil {
7605 return err
7606 }
7607 return nil
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638 }
7639
7640
7641
7642 type PretargetingConfigGetCall struct {
7643 s *Service
7644 accountId int64
7645 configId int64
7646 urlParams_ gensupport.URLParams
7647 ifNoneMatch_ string
7648 ctx_ context.Context
7649 header_ http.Header
7650 }
7651
7652
7653
7654
7655
7656 func (r *PretargetingConfigService) Get(accountId int64, configId int64) *PretargetingConfigGetCall {
7657 c := &PretargetingConfigGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7658 c.accountId = accountId
7659 c.configId = configId
7660 return c
7661 }
7662
7663
7664
7665
7666 func (c *PretargetingConfigGetCall) Fields(s ...googleapi.Field) *PretargetingConfigGetCall {
7667 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7668 return c
7669 }
7670
7671
7672
7673
7674
7675
7676 func (c *PretargetingConfigGetCall) IfNoneMatch(entityTag string) *PretargetingConfigGetCall {
7677 c.ifNoneMatch_ = entityTag
7678 return c
7679 }
7680
7681
7682
7683
7684 func (c *PretargetingConfigGetCall) Context(ctx context.Context) *PretargetingConfigGetCall {
7685 c.ctx_ = ctx
7686 return c
7687 }
7688
7689
7690
7691 func (c *PretargetingConfigGetCall) Header() http.Header {
7692 if c.header_ == nil {
7693 c.header_ = make(http.Header)
7694 }
7695 return c.header_
7696 }
7697
7698 func (c *PretargetingConfigGetCall) doRequest(alt string) (*http.Response, error) {
7699 reqHeaders := make(http.Header)
7700 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
7701 for k, v := range c.header_ {
7702 reqHeaders[k] = v
7703 }
7704 reqHeaders.Set("User-Agent", c.s.userAgent())
7705 if c.ifNoneMatch_ != "" {
7706 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7707 }
7708 var body io.Reader = nil
7709 c.urlParams_.Set("alt", alt)
7710 c.urlParams_.Set("prettyPrint", "false")
7711 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}/{configId}")
7712 urls += "?" + c.urlParams_.Encode()
7713 req, err := http.NewRequest("GET", urls, body)
7714 if err != nil {
7715 return nil, err
7716 }
7717 req.Header = reqHeaders
7718 googleapi.Expand(req.URL, map[string]string{
7719 "accountId": strconv.FormatInt(c.accountId, 10),
7720 "configId": strconv.FormatInt(c.configId, 10),
7721 })
7722 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7723 }
7724
7725
7726
7727
7728
7729
7730
7731
7732 func (c *PretargetingConfigGetCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
7733 gensupport.SetOptions(c.urlParams_, opts...)
7734 res, err := c.doRequest("json")
7735 if res != nil && res.StatusCode == http.StatusNotModified {
7736 if res.Body != nil {
7737 res.Body.Close()
7738 }
7739 return nil, &googleapi.Error{
7740 Code: res.StatusCode,
7741 Header: res.Header,
7742 }
7743 }
7744 if err != nil {
7745 return nil, err
7746 }
7747 defer googleapi.CloseBody(res)
7748 if err := googleapi.CheckResponse(res); err != nil {
7749 return nil, err
7750 }
7751 ret := &PretargetingConfig{
7752 ServerResponse: googleapi.ServerResponse{
7753 Header: res.Header,
7754 HTTPStatusCode: res.StatusCode,
7755 },
7756 }
7757 target := &ret
7758 if err := gensupport.DecodeResponse(target, res); err != nil {
7759 return nil, err
7760 }
7761 return ret, nil
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795 }
7796
7797
7798
7799 type PretargetingConfigInsertCall struct {
7800 s *Service
7801 accountId int64
7802 pretargetingconfig *PretargetingConfig
7803 urlParams_ gensupport.URLParams
7804 ctx_ context.Context
7805 header_ http.Header
7806 }
7807
7808
7809
7810
7811 func (r *PretargetingConfigService) Insert(accountId int64, pretargetingconfig *PretargetingConfig) *PretargetingConfigInsertCall {
7812 c := &PretargetingConfigInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7813 c.accountId = accountId
7814 c.pretargetingconfig = pretargetingconfig
7815 return c
7816 }
7817
7818
7819
7820
7821 func (c *PretargetingConfigInsertCall) Fields(s ...googleapi.Field) *PretargetingConfigInsertCall {
7822 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7823 return c
7824 }
7825
7826
7827
7828
7829 func (c *PretargetingConfigInsertCall) Context(ctx context.Context) *PretargetingConfigInsertCall {
7830 c.ctx_ = ctx
7831 return c
7832 }
7833
7834
7835
7836 func (c *PretargetingConfigInsertCall) Header() http.Header {
7837 if c.header_ == nil {
7838 c.header_ = make(http.Header)
7839 }
7840 return c.header_
7841 }
7842
7843 func (c *PretargetingConfigInsertCall) doRequest(alt string) (*http.Response, error) {
7844 reqHeaders := make(http.Header)
7845 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
7846 for k, v := range c.header_ {
7847 reqHeaders[k] = v
7848 }
7849 reqHeaders.Set("User-Agent", c.s.userAgent())
7850 var body io.Reader = nil
7851 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
7852 if err != nil {
7853 return nil, err
7854 }
7855 reqHeaders.Set("Content-Type", "application/json")
7856 c.urlParams_.Set("alt", alt)
7857 c.urlParams_.Set("prettyPrint", "false")
7858 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}")
7859 urls += "?" + c.urlParams_.Encode()
7860 req, err := http.NewRequest("POST", urls, body)
7861 if err != nil {
7862 return nil, err
7863 }
7864 req.Header = reqHeaders
7865 googleapi.Expand(req.URL, map[string]string{
7866 "accountId": strconv.FormatInt(c.accountId, 10),
7867 })
7868 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7869 }
7870
7871
7872
7873
7874
7875
7876
7877
7878 func (c *PretargetingConfigInsertCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
7879 gensupport.SetOptions(c.urlParams_, opts...)
7880 res, err := c.doRequest("json")
7881 if res != nil && res.StatusCode == http.StatusNotModified {
7882 if res.Body != nil {
7883 res.Body.Close()
7884 }
7885 return nil, &googleapi.Error{
7886 Code: res.StatusCode,
7887 Header: res.Header,
7888 }
7889 }
7890 if err != nil {
7891 return nil, err
7892 }
7893 defer googleapi.CloseBody(res)
7894 if err := googleapi.CheckResponse(res); err != nil {
7895 return nil, err
7896 }
7897 ret := &PretargetingConfig{
7898 ServerResponse: googleapi.ServerResponse{
7899 Header: res.Header,
7900 HTTPStatusCode: res.StatusCode,
7901 },
7902 }
7903 target := &ret
7904 if err := gensupport.DecodeResponse(target, res); err != nil {
7905 return nil, err
7906 }
7907 return ret, nil
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936 }
7937
7938
7939
7940 type PretargetingConfigListCall struct {
7941 s *Service
7942 accountId int64
7943 urlParams_ gensupport.URLParams
7944 ifNoneMatch_ string
7945 ctx_ context.Context
7946 header_ http.Header
7947 }
7948
7949
7950
7951
7952
7953 func (r *PretargetingConfigService) List(accountId int64) *PretargetingConfigListCall {
7954 c := &PretargetingConfigListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7955 c.accountId = accountId
7956 return c
7957 }
7958
7959
7960
7961
7962 func (c *PretargetingConfigListCall) Fields(s ...googleapi.Field) *PretargetingConfigListCall {
7963 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7964 return c
7965 }
7966
7967
7968
7969
7970
7971
7972 func (c *PretargetingConfigListCall) IfNoneMatch(entityTag string) *PretargetingConfigListCall {
7973 c.ifNoneMatch_ = entityTag
7974 return c
7975 }
7976
7977
7978
7979
7980 func (c *PretargetingConfigListCall) Context(ctx context.Context) *PretargetingConfigListCall {
7981 c.ctx_ = ctx
7982 return c
7983 }
7984
7985
7986
7987 func (c *PretargetingConfigListCall) Header() http.Header {
7988 if c.header_ == nil {
7989 c.header_ = make(http.Header)
7990 }
7991 return c.header_
7992 }
7993
7994 func (c *PretargetingConfigListCall) doRequest(alt string) (*http.Response, error) {
7995 reqHeaders := make(http.Header)
7996 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
7997 for k, v := range c.header_ {
7998 reqHeaders[k] = v
7999 }
8000 reqHeaders.Set("User-Agent", c.s.userAgent())
8001 if c.ifNoneMatch_ != "" {
8002 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8003 }
8004 var body io.Reader = nil
8005 c.urlParams_.Set("alt", alt)
8006 c.urlParams_.Set("prettyPrint", "false")
8007 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}")
8008 urls += "?" + c.urlParams_.Encode()
8009 req, err := http.NewRequest("GET", urls, body)
8010 if err != nil {
8011 return nil, err
8012 }
8013 req.Header = reqHeaders
8014 googleapi.Expand(req.URL, map[string]string{
8015 "accountId": strconv.FormatInt(c.accountId, 10),
8016 })
8017 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8018 }
8019
8020
8021
8022
8023
8024
8025
8026
8027 func (c *PretargetingConfigListCall) Do(opts ...googleapi.CallOption) (*PretargetingConfigList, error) {
8028 gensupport.SetOptions(c.urlParams_, opts...)
8029 res, err := c.doRequest("json")
8030 if res != nil && res.StatusCode == http.StatusNotModified {
8031 if res.Body != nil {
8032 res.Body.Close()
8033 }
8034 return nil, &googleapi.Error{
8035 Code: res.StatusCode,
8036 Header: res.Header,
8037 }
8038 }
8039 if err != nil {
8040 return nil, err
8041 }
8042 defer googleapi.CloseBody(res)
8043 if err := googleapi.CheckResponse(res); err != nil {
8044 return nil, err
8045 }
8046 ret := &PretargetingConfigList{
8047 ServerResponse: googleapi.ServerResponse{
8048 Header: res.Header,
8049 HTTPStatusCode: res.StatusCode,
8050 },
8051 }
8052 target := &ret
8053 if err := gensupport.DecodeResponse(target, res); err != nil {
8054 return nil, err
8055 }
8056 return ret, nil
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082 }
8083
8084
8085
8086 type PretargetingConfigPatchCall struct {
8087 s *Service
8088 accountId int64
8089 configId int64
8090 pretargetingconfig *PretargetingConfig
8091 urlParams_ gensupport.URLParams
8092 ctx_ context.Context
8093 header_ http.Header
8094 }
8095
8096
8097
8098
8099
8100
8101 func (r *PretargetingConfigService) Patch(accountId int64, configId int64, pretargetingconfig *PretargetingConfig) *PretargetingConfigPatchCall {
8102 c := &PretargetingConfigPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8103 c.accountId = accountId
8104 c.configId = configId
8105 c.pretargetingconfig = pretargetingconfig
8106 return c
8107 }
8108
8109
8110
8111
8112 func (c *PretargetingConfigPatchCall) Fields(s ...googleapi.Field) *PretargetingConfigPatchCall {
8113 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8114 return c
8115 }
8116
8117
8118
8119
8120 func (c *PretargetingConfigPatchCall) Context(ctx context.Context) *PretargetingConfigPatchCall {
8121 c.ctx_ = ctx
8122 return c
8123 }
8124
8125
8126
8127 func (c *PretargetingConfigPatchCall) Header() http.Header {
8128 if c.header_ == nil {
8129 c.header_ = make(http.Header)
8130 }
8131 return c.header_
8132 }
8133
8134 func (c *PretargetingConfigPatchCall) doRequest(alt string) (*http.Response, error) {
8135 reqHeaders := make(http.Header)
8136 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
8137 for k, v := range c.header_ {
8138 reqHeaders[k] = v
8139 }
8140 reqHeaders.Set("User-Agent", c.s.userAgent())
8141 var body io.Reader = nil
8142 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
8143 if err != nil {
8144 return nil, err
8145 }
8146 reqHeaders.Set("Content-Type", "application/json")
8147 c.urlParams_.Set("alt", alt)
8148 c.urlParams_.Set("prettyPrint", "false")
8149 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}/{configId}")
8150 urls += "?" + c.urlParams_.Encode()
8151 req, err := http.NewRequest("PATCH", urls, body)
8152 if err != nil {
8153 return nil, err
8154 }
8155 req.Header = reqHeaders
8156 googleapi.Expand(req.URL, map[string]string{
8157 "accountId": strconv.FormatInt(c.accountId, 10),
8158 "configId": strconv.FormatInt(c.configId, 10),
8159 })
8160 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8161 }
8162
8163
8164
8165
8166
8167
8168
8169
8170 func (c *PretargetingConfigPatchCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
8171 gensupport.SetOptions(c.urlParams_, opts...)
8172 res, err := c.doRequest("json")
8173 if res != nil && res.StatusCode == http.StatusNotModified {
8174 if res.Body != nil {
8175 res.Body.Close()
8176 }
8177 return nil, &googleapi.Error{
8178 Code: res.StatusCode,
8179 Header: res.Header,
8180 }
8181 }
8182 if err != nil {
8183 return nil, err
8184 }
8185 defer googleapi.CloseBody(res)
8186 if err := googleapi.CheckResponse(res); err != nil {
8187 return nil, err
8188 }
8189 ret := &PretargetingConfig{
8190 ServerResponse: googleapi.ServerResponse{
8191 Header: res.Header,
8192 HTTPStatusCode: res.StatusCode,
8193 },
8194 }
8195 target := &ret
8196 if err := gensupport.DecodeResponse(target, res); err != nil {
8197 return nil, err
8198 }
8199 return ret, nil
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236 }
8237
8238
8239
8240 type PretargetingConfigUpdateCall struct {
8241 s *Service
8242 accountId int64
8243 configId int64
8244 pretargetingconfig *PretargetingConfig
8245 urlParams_ gensupport.URLParams
8246 ctx_ context.Context
8247 header_ http.Header
8248 }
8249
8250
8251
8252
8253
8254 func (r *PretargetingConfigService) Update(accountId int64, configId int64, pretargetingconfig *PretargetingConfig) *PretargetingConfigUpdateCall {
8255 c := &PretargetingConfigUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8256 c.accountId = accountId
8257 c.configId = configId
8258 c.pretargetingconfig = pretargetingconfig
8259 return c
8260 }
8261
8262
8263
8264
8265 func (c *PretargetingConfigUpdateCall) Fields(s ...googleapi.Field) *PretargetingConfigUpdateCall {
8266 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8267 return c
8268 }
8269
8270
8271
8272
8273 func (c *PretargetingConfigUpdateCall) Context(ctx context.Context) *PretargetingConfigUpdateCall {
8274 c.ctx_ = ctx
8275 return c
8276 }
8277
8278
8279
8280 func (c *PretargetingConfigUpdateCall) Header() http.Header {
8281 if c.header_ == nil {
8282 c.header_ = make(http.Header)
8283 }
8284 return c.header_
8285 }
8286
8287 func (c *PretargetingConfigUpdateCall) doRequest(alt string) (*http.Response, error) {
8288 reqHeaders := make(http.Header)
8289 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
8290 for k, v := range c.header_ {
8291 reqHeaders[k] = v
8292 }
8293 reqHeaders.Set("User-Agent", c.s.userAgent())
8294 var body io.Reader = nil
8295 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
8296 if err != nil {
8297 return nil, err
8298 }
8299 reqHeaders.Set("Content-Type", "application/json")
8300 c.urlParams_.Set("alt", alt)
8301 c.urlParams_.Set("prettyPrint", "false")
8302 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}/{configId}")
8303 urls += "?" + c.urlParams_.Encode()
8304 req, err := http.NewRequest("PUT", urls, body)
8305 if err != nil {
8306 return nil, err
8307 }
8308 req.Header = reqHeaders
8309 googleapi.Expand(req.URL, map[string]string{
8310 "accountId": strconv.FormatInt(c.accountId, 10),
8311 "configId": strconv.FormatInt(c.configId, 10),
8312 })
8313 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8314 }
8315
8316
8317
8318
8319
8320
8321
8322
8323 func (c *PretargetingConfigUpdateCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) {
8324 gensupport.SetOptions(c.urlParams_, opts...)
8325 res, err := c.doRequest("json")
8326 if res != nil && res.StatusCode == http.StatusNotModified {
8327 if res.Body != nil {
8328 res.Body.Close()
8329 }
8330 return nil, &googleapi.Error{
8331 Code: res.StatusCode,
8332 Header: res.Header,
8333 }
8334 }
8335 if err != nil {
8336 return nil, err
8337 }
8338 defer googleapi.CloseBody(res)
8339 if err := googleapi.CheckResponse(res); err != nil {
8340 return nil, err
8341 }
8342 ret := &PretargetingConfig{
8343 ServerResponse: googleapi.ServerResponse{
8344 Header: res.Header,
8345 HTTPStatusCode: res.StatusCode,
8346 },
8347 }
8348 target := &ret
8349 if err := gensupport.DecodeResponse(target, res); err != nil {
8350 return nil, err
8351 }
8352 return ret, nil
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389 }
8390
8391
8392
8393 type ProductsGetCall struct {
8394 s *Service
8395 productId string
8396 urlParams_ gensupport.URLParams
8397 ifNoneMatch_ string
8398 ctx_ context.Context
8399 header_ http.Header
8400 }
8401
8402
8403
8404
8405 func (r *ProductsService) Get(productId string) *ProductsGetCall {
8406 c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8407 c.productId = productId
8408 return c
8409 }
8410
8411
8412
8413
8414 func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall {
8415 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8416 return c
8417 }
8418
8419
8420
8421
8422
8423
8424 func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall {
8425 c.ifNoneMatch_ = entityTag
8426 return c
8427 }
8428
8429
8430
8431
8432 func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall {
8433 c.ctx_ = ctx
8434 return c
8435 }
8436
8437
8438
8439 func (c *ProductsGetCall) Header() http.Header {
8440 if c.header_ == nil {
8441 c.header_ = make(http.Header)
8442 }
8443 return c.header_
8444 }
8445
8446 func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) {
8447 reqHeaders := make(http.Header)
8448 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
8449 for k, v := range c.header_ {
8450 reqHeaders[k] = v
8451 }
8452 reqHeaders.Set("User-Agent", c.s.userAgent())
8453 if c.ifNoneMatch_ != "" {
8454 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8455 }
8456 var body io.Reader = nil
8457 c.urlParams_.Set("alt", alt)
8458 c.urlParams_.Set("prettyPrint", "false")
8459 urls := googleapi.ResolveRelative(c.s.BasePath, "products/{productId}")
8460 urls += "?" + c.urlParams_.Encode()
8461 req, err := http.NewRequest("GET", urls, body)
8462 if err != nil {
8463 return nil, err
8464 }
8465 req.Header = reqHeaders
8466 googleapi.Expand(req.URL, map[string]string{
8467 "productId": c.productId,
8468 })
8469 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8470 }
8471
8472
8473
8474
8475
8476
8477
8478
8479 func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) {
8480 gensupport.SetOptions(c.urlParams_, opts...)
8481 res, err := c.doRequest("json")
8482 if res != nil && res.StatusCode == http.StatusNotModified {
8483 if res.Body != nil {
8484 res.Body.Close()
8485 }
8486 return nil, &googleapi.Error{
8487 Code: res.StatusCode,
8488 Header: res.Header,
8489 }
8490 }
8491 if err != nil {
8492 return nil, err
8493 }
8494 defer googleapi.CloseBody(res)
8495 if err := googleapi.CheckResponse(res); err != nil {
8496 return nil, err
8497 }
8498 ret := &Product{
8499 ServerResponse: googleapi.ServerResponse{
8500 Header: res.Header,
8501 HTTPStatusCode: res.StatusCode,
8502 },
8503 }
8504 target := &ret
8505 if err := gensupport.DecodeResponse(target, res); err != nil {
8506 return nil, err
8507 }
8508 return ret, nil
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533 }
8534
8535
8536
8537 type ProductsSearchCall struct {
8538 s *Service
8539 urlParams_ gensupport.URLParams
8540 ifNoneMatch_ string
8541 ctx_ context.Context
8542 header_ http.Header
8543 }
8544
8545
8546 func (r *ProductsService) Search() *ProductsSearchCall {
8547 c := &ProductsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8548 return c
8549 }
8550
8551
8552
8553 func (c *ProductsSearchCall) PqlQuery(pqlQuery string) *ProductsSearchCall {
8554 c.urlParams_.Set("pqlQuery", pqlQuery)
8555 return c
8556 }
8557
8558
8559
8560
8561 func (c *ProductsSearchCall) Fields(s ...googleapi.Field) *ProductsSearchCall {
8562 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8563 return c
8564 }
8565
8566
8567
8568
8569
8570
8571 func (c *ProductsSearchCall) IfNoneMatch(entityTag string) *ProductsSearchCall {
8572 c.ifNoneMatch_ = entityTag
8573 return c
8574 }
8575
8576
8577
8578
8579 func (c *ProductsSearchCall) Context(ctx context.Context) *ProductsSearchCall {
8580 c.ctx_ = ctx
8581 return c
8582 }
8583
8584
8585
8586 func (c *ProductsSearchCall) Header() http.Header {
8587 if c.header_ == nil {
8588 c.header_ = make(http.Header)
8589 }
8590 return c.header_
8591 }
8592
8593 func (c *ProductsSearchCall) doRequest(alt string) (*http.Response, error) {
8594 reqHeaders := make(http.Header)
8595 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
8596 for k, v := range c.header_ {
8597 reqHeaders[k] = v
8598 }
8599 reqHeaders.Set("User-Agent", c.s.userAgent())
8600 if c.ifNoneMatch_ != "" {
8601 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8602 }
8603 var body io.Reader = nil
8604 c.urlParams_.Set("alt", alt)
8605 c.urlParams_.Set("prettyPrint", "false")
8606 urls := googleapi.ResolveRelative(c.s.BasePath, "products/search")
8607 urls += "?" + c.urlParams_.Encode()
8608 req, err := http.NewRequest("GET", urls, body)
8609 if err != nil {
8610 return nil, err
8611 }
8612 req.Header = reqHeaders
8613 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8614 }
8615
8616
8617
8618
8619
8620
8621
8622
8623 func (c *ProductsSearchCall) Do(opts ...googleapi.CallOption) (*GetOffersResponse, error) {
8624 gensupport.SetOptions(c.urlParams_, opts...)
8625 res, err := c.doRequest("json")
8626 if res != nil && res.StatusCode == http.StatusNotModified {
8627 if res.Body != nil {
8628 res.Body.Close()
8629 }
8630 return nil, &googleapi.Error{
8631 Code: res.StatusCode,
8632 Header: res.Header,
8633 }
8634 }
8635 if err != nil {
8636 return nil, err
8637 }
8638 defer googleapi.CloseBody(res)
8639 if err := googleapi.CheckResponse(res); err != nil {
8640 return nil, err
8641 }
8642 ret := &GetOffersResponse{
8643 ServerResponse: googleapi.ServerResponse{
8644 Header: res.Header,
8645 HTTPStatusCode: res.StatusCode,
8646 },
8647 }
8648 target := &ret
8649 if err := gensupport.DecodeResponse(target, res); err != nil {
8650 return nil, err
8651 }
8652 return ret, nil
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673 }
8674
8675
8676
8677 type ProposalsGetCall struct {
8678 s *Service
8679 proposalId string
8680 urlParams_ gensupport.URLParams
8681 ifNoneMatch_ string
8682 ctx_ context.Context
8683 header_ http.Header
8684 }
8685
8686
8687
8688
8689 func (r *ProposalsService) Get(proposalId string) *ProposalsGetCall {
8690 c := &ProposalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8691 c.proposalId = proposalId
8692 return c
8693 }
8694
8695
8696
8697
8698 func (c *ProposalsGetCall) Fields(s ...googleapi.Field) *ProposalsGetCall {
8699 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8700 return c
8701 }
8702
8703
8704
8705
8706
8707
8708 func (c *ProposalsGetCall) IfNoneMatch(entityTag string) *ProposalsGetCall {
8709 c.ifNoneMatch_ = entityTag
8710 return c
8711 }
8712
8713
8714
8715
8716 func (c *ProposalsGetCall) Context(ctx context.Context) *ProposalsGetCall {
8717 c.ctx_ = ctx
8718 return c
8719 }
8720
8721
8722
8723 func (c *ProposalsGetCall) Header() http.Header {
8724 if c.header_ == nil {
8725 c.header_ = make(http.Header)
8726 }
8727 return c.header_
8728 }
8729
8730 func (c *ProposalsGetCall) doRequest(alt string) (*http.Response, error) {
8731 reqHeaders := make(http.Header)
8732 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
8733 for k, v := range c.header_ {
8734 reqHeaders[k] = v
8735 }
8736 reqHeaders.Set("User-Agent", c.s.userAgent())
8737 if c.ifNoneMatch_ != "" {
8738 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8739 }
8740 var body io.Reader = nil
8741 c.urlParams_.Set("alt", alt)
8742 c.urlParams_.Set("prettyPrint", "false")
8743 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}")
8744 urls += "?" + c.urlParams_.Encode()
8745 req, err := http.NewRequest("GET", urls, body)
8746 if err != nil {
8747 return nil, err
8748 }
8749 req.Header = reqHeaders
8750 googleapi.Expand(req.URL, map[string]string{
8751 "proposalId": c.proposalId,
8752 })
8753 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8754 }
8755
8756
8757
8758
8759
8760
8761
8762
8763 func (c *ProposalsGetCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
8764 gensupport.SetOptions(c.urlParams_, opts...)
8765 res, err := c.doRequest("json")
8766 if res != nil && res.StatusCode == http.StatusNotModified {
8767 if res.Body != nil {
8768 res.Body.Close()
8769 }
8770 return nil, &googleapi.Error{
8771 Code: res.StatusCode,
8772 Header: res.Header,
8773 }
8774 }
8775 if err != nil {
8776 return nil, err
8777 }
8778 defer googleapi.CloseBody(res)
8779 if err := googleapi.CheckResponse(res); err != nil {
8780 return nil, err
8781 }
8782 ret := &Proposal{
8783 ServerResponse: googleapi.ServerResponse{
8784 Header: res.Header,
8785 HTTPStatusCode: res.StatusCode,
8786 },
8787 }
8788 target := &ret
8789 if err := gensupport.DecodeResponse(target, res); err != nil {
8790 return nil, err
8791 }
8792 return ret, nil
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817 }
8818
8819
8820
8821 type ProposalsInsertCall struct {
8822 s *Service
8823 createordersrequest *CreateOrdersRequest
8824 urlParams_ gensupport.URLParams
8825 ctx_ context.Context
8826 header_ http.Header
8827 }
8828
8829
8830 func (r *ProposalsService) Insert(createordersrequest *CreateOrdersRequest) *ProposalsInsertCall {
8831 c := &ProposalsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8832 c.createordersrequest = createordersrequest
8833 return c
8834 }
8835
8836
8837
8838
8839 func (c *ProposalsInsertCall) Fields(s ...googleapi.Field) *ProposalsInsertCall {
8840 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8841 return c
8842 }
8843
8844
8845
8846
8847 func (c *ProposalsInsertCall) Context(ctx context.Context) *ProposalsInsertCall {
8848 c.ctx_ = ctx
8849 return c
8850 }
8851
8852
8853
8854 func (c *ProposalsInsertCall) Header() http.Header {
8855 if c.header_ == nil {
8856 c.header_ = make(http.Header)
8857 }
8858 return c.header_
8859 }
8860
8861 func (c *ProposalsInsertCall) doRequest(alt string) (*http.Response, error) {
8862 reqHeaders := make(http.Header)
8863 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
8864 for k, v := range c.header_ {
8865 reqHeaders[k] = v
8866 }
8867 reqHeaders.Set("User-Agent", c.s.userAgent())
8868 var body io.Reader = nil
8869 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createordersrequest)
8870 if err != nil {
8871 return nil, err
8872 }
8873 reqHeaders.Set("Content-Type", "application/json")
8874 c.urlParams_.Set("alt", alt)
8875 c.urlParams_.Set("prettyPrint", "false")
8876 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/insert")
8877 urls += "?" + c.urlParams_.Encode()
8878 req, err := http.NewRequest("POST", urls, body)
8879 if err != nil {
8880 return nil, err
8881 }
8882 req.Header = reqHeaders
8883 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8884 }
8885
8886
8887
8888
8889
8890
8891
8892
8893 func (c *ProposalsInsertCall) Do(opts ...googleapi.CallOption) (*CreateOrdersResponse, error) {
8894 gensupport.SetOptions(c.urlParams_, opts...)
8895 res, err := c.doRequest("json")
8896 if res != nil && res.StatusCode == http.StatusNotModified {
8897 if res.Body != nil {
8898 res.Body.Close()
8899 }
8900 return nil, &googleapi.Error{
8901 Code: res.StatusCode,
8902 Header: res.Header,
8903 }
8904 }
8905 if err != nil {
8906 return nil, err
8907 }
8908 defer googleapi.CloseBody(res)
8909 if err := googleapi.CheckResponse(res); err != nil {
8910 return nil, err
8911 }
8912 ret := &CreateOrdersResponse{
8913 ServerResponse: googleapi.ServerResponse{
8914 Header: res.Header,
8915 HTTPStatusCode: res.StatusCode,
8916 },
8917 }
8918 target := &ret
8919 if err := gensupport.DecodeResponse(target, res); err != nil {
8920 return nil, err
8921 }
8922 return ret, nil
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939 }
8940
8941
8942
8943 type ProposalsPatchCall struct {
8944 s *Service
8945 proposalId string
8946 revisionNumber int64
8947 updateAction string
8948 proposal *Proposal
8949 urlParams_ gensupport.URLParams
8950 ctx_ context.Context
8951 header_ http.Header
8952 }
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964 func (r *ProposalsService) Patch(proposalId string, revisionNumber int64, updateAction string, proposal *Proposal) *ProposalsPatchCall {
8965 c := &ProposalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8966 c.proposalId = proposalId
8967 c.revisionNumber = revisionNumber
8968 c.updateAction = updateAction
8969 c.proposal = proposal
8970 return c
8971 }
8972
8973
8974
8975
8976 func (c *ProposalsPatchCall) Fields(s ...googleapi.Field) *ProposalsPatchCall {
8977 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8978 return c
8979 }
8980
8981
8982
8983
8984 func (c *ProposalsPatchCall) Context(ctx context.Context) *ProposalsPatchCall {
8985 c.ctx_ = ctx
8986 return c
8987 }
8988
8989
8990
8991 func (c *ProposalsPatchCall) Header() http.Header {
8992 if c.header_ == nil {
8993 c.header_ = make(http.Header)
8994 }
8995 return c.header_
8996 }
8997
8998 func (c *ProposalsPatchCall) doRequest(alt string) (*http.Response, error) {
8999 reqHeaders := make(http.Header)
9000 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
9001 for k, v := range c.header_ {
9002 reqHeaders[k] = v
9003 }
9004 reqHeaders.Set("User-Agent", c.s.userAgent())
9005 var body io.Reader = nil
9006 body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal)
9007 if err != nil {
9008 return nil, err
9009 }
9010 reqHeaders.Set("Content-Type", "application/json")
9011 c.urlParams_.Set("alt", alt)
9012 c.urlParams_.Set("prettyPrint", "false")
9013 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/{revisionNumber}/{updateAction}")
9014 urls += "?" + c.urlParams_.Encode()
9015 req, err := http.NewRequest("PATCH", urls, body)
9016 if err != nil {
9017 return nil, err
9018 }
9019 req.Header = reqHeaders
9020 googleapi.Expand(req.URL, map[string]string{
9021 "proposalId": c.proposalId,
9022 "revisionNumber": strconv.FormatInt(c.revisionNumber, 10),
9023 "updateAction": c.updateAction,
9024 })
9025 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9026 }
9027
9028
9029
9030
9031
9032
9033
9034
9035 func (c *ProposalsPatchCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
9036 gensupport.SetOptions(c.urlParams_, opts...)
9037 res, err := c.doRequest("json")
9038 if res != nil && res.StatusCode == http.StatusNotModified {
9039 if res.Body != nil {
9040 res.Body.Close()
9041 }
9042 return nil, &googleapi.Error{
9043 Code: res.StatusCode,
9044 Header: res.Header,
9045 }
9046 }
9047 if err != nil {
9048 return nil, err
9049 }
9050 defer googleapi.CloseBody(res)
9051 if err := googleapi.CheckResponse(res); err != nil {
9052 return nil, err
9053 }
9054 ret := &Proposal{
9055 ServerResponse: googleapi.ServerResponse{
9056 Header: res.Header,
9057 HTTPStatusCode: res.StatusCode,
9058 },
9059 }
9060 target := &ret
9061 if err := gensupport.DecodeResponse(target, res); err != nil {
9062 return nil, err
9063 }
9064 return ret, nil
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123 }
9124
9125
9126
9127 type ProposalsSearchCall struct {
9128 s *Service
9129 urlParams_ gensupport.URLParams
9130 ifNoneMatch_ string
9131 ctx_ context.Context
9132 header_ http.Header
9133 }
9134
9135
9136 func (r *ProposalsService) Search() *ProposalsSearchCall {
9137 c := &ProposalsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9138 return c
9139 }
9140
9141
9142
9143 func (c *ProposalsSearchCall) PqlQuery(pqlQuery string) *ProposalsSearchCall {
9144 c.urlParams_.Set("pqlQuery", pqlQuery)
9145 return c
9146 }
9147
9148
9149
9150
9151 func (c *ProposalsSearchCall) Fields(s ...googleapi.Field) *ProposalsSearchCall {
9152 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9153 return c
9154 }
9155
9156
9157
9158
9159
9160
9161 func (c *ProposalsSearchCall) IfNoneMatch(entityTag string) *ProposalsSearchCall {
9162 c.ifNoneMatch_ = entityTag
9163 return c
9164 }
9165
9166
9167
9168
9169 func (c *ProposalsSearchCall) Context(ctx context.Context) *ProposalsSearchCall {
9170 c.ctx_ = ctx
9171 return c
9172 }
9173
9174
9175
9176 func (c *ProposalsSearchCall) Header() http.Header {
9177 if c.header_ == nil {
9178 c.header_ = make(http.Header)
9179 }
9180 return c.header_
9181 }
9182
9183 func (c *ProposalsSearchCall) doRequest(alt string) (*http.Response, error) {
9184 reqHeaders := make(http.Header)
9185 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
9186 for k, v := range c.header_ {
9187 reqHeaders[k] = v
9188 }
9189 reqHeaders.Set("User-Agent", c.s.userAgent())
9190 if c.ifNoneMatch_ != "" {
9191 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9192 }
9193 var body io.Reader = nil
9194 c.urlParams_.Set("alt", alt)
9195 c.urlParams_.Set("prettyPrint", "false")
9196 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/search")
9197 urls += "?" + c.urlParams_.Encode()
9198 req, err := http.NewRequest("GET", urls, body)
9199 if err != nil {
9200 return nil, err
9201 }
9202 req.Header = reqHeaders
9203 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9204 }
9205
9206
9207
9208
9209
9210
9211
9212
9213 func (c *ProposalsSearchCall) Do(opts ...googleapi.CallOption) (*GetOrdersResponse, error) {
9214 gensupport.SetOptions(c.urlParams_, opts...)
9215 res, err := c.doRequest("json")
9216 if res != nil && res.StatusCode == http.StatusNotModified {
9217 if res.Body != nil {
9218 res.Body.Close()
9219 }
9220 return nil, &googleapi.Error{
9221 Code: res.StatusCode,
9222 Header: res.Header,
9223 }
9224 }
9225 if err != nil {
9226 return nil, err
9227 }
9228 defer googleapi.CloseBody(res)
9229 if err := googleapi.CheckResponse(res); err != nil {
9230 return nil, err
9231 }
9232 ret := &GetOrdersResponse{
9233 ServerResponse: googleapi.ServerResponse{
9234 Header: res.Header,
9235 HTTPStatusCode: res.StatusCode,
9236 },
9237 }
9238 target := &ret
9239 if err := gensupport.DecodeResponse(target, res); err != nil {
9240 return nil, err
9241 }
9242 return ret, nil
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263 }
9264
9265
9266
9267 type ProposalsSetupcompleteCall struct {
9268 s *Service
9269 proposalId string
9270 urlParams_ gensupport.URLParams
9271 ctx_ context.Context
9272 header_ http.Header
9273 }
9274
9275
9276
9277
9278
9279 func (r *ProposalsService) Setupcomplete(proposalId string) *ProposalsSetupcompleteCall {
9280 c := &ProposalsSetupcompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9281 c.proposalId = proposalId
9282 return c
9283 }
9284
9285
9286
9287
9288 func (c *ProposalsSetupcompleteCall) Fields(s ...googleapi.Field) *ProposalsSetupcompleteCall {
9289 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9290 return c
9291 }
9292
9293
9294
9295
9296 func (c *ProposalsSetupcompleteCall) Context(ctx context.Context) *ProposalsSetupcompleteCall {
9297 c.ctx_ = ctx
9298 return c
9299 }
9300
9301
9302
9303 func (c *ProposalsSetupcompleteCall) Header() http.Header {
9304 if c.header_ == nil {
9305 c.header_ = make(http.Header)
9306 }
9307 return c.header_
9308 }
9309
9310 func (c *ProposalsSetupcompleteCall) doRequest(alt string) (*http.Response, error) {
9311 reqHeaders := make(http.Header)
9312 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
9313 for k, v := range c.header_ {
9314 reqHeaders[k] = v
9315 }
9316 reqHeaders.Set("User-Agent", c.s.userAgent())
9317 var body io.Reader = nil
9318 c.urlParams_.Set("alt", alt)
9319 c.urlParams_.Set("prettyPrint", "false")
9320 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/setupcomplete")
9321 urls += "?" + c.urlParams_.Encode()
9322 req, err := http.NewRequest("POST", urls, body)
9323 if err != nil {
9324 return nil, err
9325 }
9326 req.Header = reqHeaders
9327 googleapi.Expand(req.URL, map[string]string{
9328 "proposalId": c.proposalId,
9329 })
9330 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9331 }
9332
9333
9334 func (c *ProposalsSetupcompleteCall) Do(opts ...googleapi.CallOption) error {
9335 gensupport.SetOptions(c.urlParams_, opts...)
9336 res, err := c.doRequest("json")
9337 if err != nil {
9338 return err
9339 }
9340 defer googleapi.CloseBody(res)
9341 if err := googleapi.CheckResponse(res); err != nil {
9342 return err
9343 }
9344 return nil
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366 }
9367
9368
9369
9370 type ProposalsUpdateCall struct {
9371 s *Service
9372 proposalId string
9373 revisionNumber int64
9374 updateAction string
9375 proposal *Proposal
9376 urlParams_ gensupport.URLParams
9377 ctx_ context.Context
9378 header_ http.Header
9379 }
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390 func (r *ProposalsService) Update(proposalId string, revisionNumber int64, updateAction string, proposal *Proposal) *ProposalsUpdateCall {
9391 c := &ProposalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9392 c.proposalId = proposalId
9393 c.revisionNumber = revisionNumber
9394 c.updateAction = updateAction
9395 c.proposal = proposal
9396 return c
9397 }
9398
9399
9400
9401
9402 func (c *ProposalsUpdateCall) Fields(s ...googleapi.Field) *ProposalsUpdateCall {
9403 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9404 return c
9405 }
9406
9407
9408
9409
9410 func (c *ProposalsUpdateCall) Context(ctx context.Context) *ProposalsUpdateCall {
9411 c.ctx_ = ctx
9412 return c
9413 }
9414
9415
9416
9417 func (c *ProposalsUpdateCall) Header() http.Header {
9418 if c.header_ == nil {
9419 c.header_ = make(http.Header)
9420 }
9421 return c.header_
9422 }
9423
9424 func (c *ProposalsUpdateCall) doRequest(alt string) (*http.Response, error) {
9425 reqHeaders := make(http.Header)
9426 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
9427 for k, v := range c.header_ {
9428 reqHeaders[k] = v
9429 }
9430 reqHeaders.Set("User-Agent", c.s.userAgent())
9431 var body io.Reader = nil
9432 body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal)
9433 if err != nil {
9434 return nil, err
9435 }
9436 reqHeaders.Set("Content-Type", "application/json")
9437 c.urlParams_.Set("alt", alt)
9438 c.urlParams_.Set("prettyPrint", "false")
9439 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/{revisionNumber}/{updateAction}")
9440 urls += "?" + c.urlParams_.Encode()
9441 req, err := http.NewRequest("PUT", urls, body)
9442 if err != nil {
9443 return nil, err
9444 }
9445 req.Header = reqHeaders
9446 googleapi.Expand(req.URL, map[string]string{
9447 "proposalId": c.proposalId,
9448 "revisionNumber": strconv.FormatInt(c.revisionNumber, 10),
9449 "updateAction": c.updateAction,
9450 })
9451 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9452 }
9453
9454
9455
9456
9457
9458
9459
9460
9461 func (c *ProposalsUpdateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
9462 gensupport.SetOptions(c.urlParams_, opts...)
9463 res, err := c.doRequest("json")
9464 if res != nil && res.StatusCode == http.StatusNotModified {
9465 if res.Body != nil {
9466 res.Body.Close()
9467 }
9468 return nil, &googleapi.Error{
9469 Code: res.StatusCode,
9470 Header: res.Header,
9471 }
9472 }
9473 if err != nil {
9474 return nil, err
9475 }
9476 defer googleapi.CloseBody(res)
9477 if err := googleapi.CheckResponse(res); err != nil {
9478 return nil, err
9479 }
9480 ret := &Proposal{
9481 ServerResponse: googleapi.ServerResponse{
9482 Header: res.Header,
9483 HTTPStatusCode: res.StatusCode,
9484 },
9485 }
9486 target := &ret
9487 if err := gensupport.DecodeResponse(target, res); err != nil {
9488 return nil, err
9489 }
9490 return ret, nil
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549 }
9550
9551
9552
9553 type PubprofilesListCall struct {
9554 s *Service
9555 accountId int64
9556 urlParams_ gensupport.URLParams
9557 ifNoneMatch_ string
9558 ctx_ context.Context
9559 header_ http.Header
9560 }
9561
9562
9563
9564
9565 func (r *PubprofilesService) List(accountId int64) *PubprofilesListCall {
9566 c := &PubprofilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9567 c.accountId = accountId
9568 return c
9569 }
9570
9571
9572
9573
9574 func (c *PubprofilesListCall) Fields(s ...googleapi.Field) *PubprofilesListCall {
9575 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9576 return c
9577 }
9578
9579
9580
9581
9582
9583
9584 func (c *PubprofilesListCall) IfNoneMatch(entityTag string) *PubprofilesListCall {
9585 c.ifNoneMatch_ = entityTag
9586 return c
9587 }
9588
9589
9590
9591
9592 func (c *PubprofilesListCall) Context(ctx context.Context) *PubprofilesListCall {
9593 c.ctx_ = ctx
9594 return c
9595 }
9596
9597
9598
9599 func (c *PubprofilesListCall) Header() http.Header {
9600 if c.header_ == nil {
9601 c.header_ = make(http.Header)
9602 }
9603 return c.header_
9604 }
9605
9606 func (c *PubprofilesListCall) doRequest(alt string) (*http.Response, error) {
9607 reqHeaders := make(http.Header)
9608 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210819")
9609 for k, v := range c.header_ {
9610 reqHeaders[k] = v
9611 }
9612 reqHeaders.Set("User-Agent", c.s.userAgent())
9613 if c.ifNoneMatch_ != "" {
9614 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9615 }
9616 var body io.Reader = nil
9617 c.urlParams_.Set("alt", alt)
9618 c.urlParams_.Set("prettyPrint", "false")
9619 urls := googleapi.ResolveRelative(c.s.BasePath, "publisher/{accountId}/profiles")
9620 urls += "?" + c.urlParams_.Encode()
9621 req, err := http.NewRequest("GET", urls, body)
9622 if err != nil {
9623 return nil, err
9624 }
9625 req.Header = reqHeaders
9626 googleapi.Expand(req.URL, map[string]string{
9627 "accountId": strconv.FormatInt(c.accountId, 10),
9628 })
9629 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9630 }
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640 func (c *PubprofilesListCall) Do(opts ...googleapi.CallOption) (*GetPublisherProfilesByAccountIdResponse, error) {
9641 gensupport.SetOptions(c.urlParams_, opts...)
9642 res, err := c.doRequest("json")
9643 if res != nil && res.StatusCode == http.StatusNotModified {
9644 if res.Body != nil {
9645 res.Body.Close()
9646 }
9647 return nil, &googleapi.Error{
9648 Code: res.StatusCode,
9649 Header: res.Header,
9650 }
9651 }
9652 if err != nil {
9653 return nil, err
9654 }
9655 defer googleapi.CloseBody(res)
9656 if err := googleapi.CheckResponse(res); err != nil {
9657 return nil, err
9658 }
9659 ret := &GetPublisherProfilesByAccountIdResponse{
9660 ServerResponse: googleapi.ServerResponse{
9661 Header: res.Header,
9662 HTTPStatusCode: res.StatusCode,
9663 },
9664 }
9665 target := &ret
9666 if err := gensupport.DecodeResponse(target, res); err != nil {
9667 return nil, err
9668 }
9669 return ret, nil
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695 }
9696
View as plain text