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