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 eventarc
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 = "eventarc:v1"
90 const apiName = "eventarc"
91 const apiVersion = "v1"
92 const basePath = "https://eventarc.googleapis.com/"
93 const basePathTemplate = "https://eventarc.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://eventarc.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type Service struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.ChannelConnections = NewProjectsLocationsChannelConnectionsService(s)
172 rs.Channels = NewProjectsLocationsChannelsService(s)
173 rs.Operations = NewProjectsLocationsOperationsService(s)
174 rs.Providers = NewProjectsLocationsProvidersService(s)
175 rs.Triggers = NewProjectsLocationsTriggersService(s)
176 return rs
177 }
178
179 type ProjectsLocationsService struct {
180 s *Service
181
182 ChannelConnections *ProjectsLocationsChannelConnectionsService
183
184 Channels *ProjectsLocationsChannelsService
185
186 Operations *ProjectsLocationsOperationsService
187
188 Providers *ProjectsLocationsProvidersService
189
190 Triggers *ProjectsLocationsTriggersService
191 }
192
193 func NewProjectsLocationsChannelConnectionsService(s *Service) *ProjectsLocationsChannelConnectionsService {
194 rs := &ProjectsLocationsChannelConnectionsService{s: s}
195 return rs
196 }
197
198 type ProjectsLocationsChannelConnectionsService struct {
199 s *Service
200 }
201
202 func NewProjectsLocationsChannelsService(s *Service) *ProjectsLocationsChannelsService {
203 rs := &ProjectsLocationsChannelsService{s: s}
204 return rs
205 }
206
207 type ProjectsLocationsChannelsService struct {
208 s *Service
209 }
210
211 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
212 rs := &ProjectsLocationsOperationsService{s: s}
213 return rs
214 }
215
216 type ProjectsLocationsOperationsService struct {
217 s *Service
218 }
219
220 func NewProjectsLocationsProvidersService(s *Service) *ProjectsLocationsProvidersService {
221 rs := &ProjectsLocationsProvidersService{s: s}
222 return rs
223 }
224
225 type ProjectsLocationsProvidersService struct {
226 s *Service
227 }
228
229 func NewProjectsLocationsTriggersService(s *Service) *ProjectsLocationsTriggersService {
230 rs := &ProjectsLocationsTriggersService{s: s}
231 return rs
232 }
233
234 type ProjectsLocationsTriggersService struct {
235 s *Service
236 }
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254 type AuditConfig struct {
255
256 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
257
258
259
260 Service string `json:"service,omitempty"`
261
262
263
264
265
266 ForceSendFields []string `json:"-"`
267
268
269
270
271 NullFields []string `json:"-"`
272 }
273
274 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
275 type NoMethod AuditConfig
276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
277 }
278
279
280
281
282
283
284 type AuditLogConfig struct {
285
286
287 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
288
289
290
291
292
293
294
295 LogType string `json:"logType,omitempty"`
296
297
298
299
300
301 ForceSendFields []string `json:"-"`
302
303
304
305
306 NullFields []string `json:"-"`
307 }
308
309 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
310 type NoMethod AuditLogConfig
311 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
312 }
313
314
315 type Binding struct {
316
317
318
319
320
321
322
323
324 Condition *Expr `json:"condition,omitempty"`
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387 Members []string `json:"members,omitempty"`
388
389
390
391
392
393
394 Role string `json:"role,omitempty"`
395
396
397
398
399
400 ForceSendFields []string `json:"-"`
401
402
403
404
405 NullFields []string `json:"-"`
406 }
407
408 func (s *Binding) MarshalJSON() ([]byte, error) {
409 type NoMethod Binding
410 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
411 }
412
413
414
415
416
417 type Channel struct {
418
419
420 ActivationToken string `json:"activationToken,omitempty"`
421
422 CreateTime string `json:"createTime,omitempty"`
423
424
425
426 CryptoKeyName string `json:"cryptoKeyName,omitempty"`
427
428
429
430 Name string `json:"name,omitempty"`
431
432
433
434
435 Provider string `json:"provider,omitempty"`
436
437
438
439 PubsubTopic string `json:"pubsubTopic,omitempty"`
440
441
442 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460 State string `json:"state,omitempty"`
461
462
463
464 Uid string `json:"uid,omitempty"`
465
466 UpdateTime string `json:"updateTime,omitempty"`
467
468
469 googleapi.ServerResponse `json:"-"`
470
471
472
473
474
475 ForceSendFields []string `json:"-"`
476
477
478
479
480 NullFields []string `json:"-"`
481 }
482
483 func (s *Channel) MarshalJSON() ([]byte, error) {
484 type NoMethod Channel
485 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
486 }
487
488
489
490
491
492 type ChannelConnection struct {
493
494
495
496
497 ActivationToken string `json:"activationToken,omitempty"`
498
499
500
501
502 Channel string `json:"channel,omitempty"`
503
504 CreateTime string `json:"createTime,omitempty"`
505
506 Name string `json:"name,omitempty"`
507
508
509 Uid string `json:"uid,omitempty"`
510
511 UpdateTime string `json:"updateTime,omitempty"`
512
513
514 googleapi.ServerResponse `json:"-"`
515
516
517
518
519
520 ForceSendFields []string `json:"-"`
521
522
523
524
525 NullFields []string `json:"-"`
526 }
527
528 func (s *ChannelConnection) MarshalJSON() ([]byte, error) {
529 type NoMethod ChannelConnection
530 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
531 }
532
533
534 type CloudRun struct {
535
536
537
538 Path string `json:"path,omitempty"`
539
540 Region string `json:"region,omitempty"`
541
542
543
544
545 Service string `json:"service,omitempty"`
546
547
548
549
550
551 ForceSendFields []string `json:"-"`
552
553
554
555
556 NullFields []string `json:"-"`
557 }
558
559 func (s *CloudRun) MarshalJSON() ([]byte, error) {
560 type NoMethod CloudRun
561 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
562 }
563
564
565 type Destination struct {
566
567
568
569
570
571
572 CloudFunction string `json:"cloudFunction,omitempty"`
573
574
575 CloudRun *CloudRun `json:"cloudRun,omitempty"`
576
577
578 Gke *GKE `json:"gke,omitempty"`
579
580 HttpEndpoint *HttpEndpoint `json:"httpEndpoint,omitempty"`
581
582
583
584 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
585
586
587
588
589 Workflow string `json:"workflow,omitempty"`
590
591
592
593
594
595 ForceSendFields []string `json:"-"`
596
597
598
599
600 NullFields []string `json:"-"`
601 }
602
603 func (s *Destination) MarshalJSON() ([]byte, error) {
604 type NoMethod Destination
605 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
606 }
607
608
609
610
611
612 type Empty struct {
613
614 googleapi.ServerResponse `json:"-"`
615 }
616
617
618
619 type EventFilter struct {
620
621
622
623
624
625 Attribute string `json:"attribute,omitempty"`
626
627
628
629
630
631 Operator string `json:"operator,omitempty"`
632
633 Value string `json:"value,omitempty"`
634
635
636
637
638
639 ForceSendFields []string `json:"-"`
640
641
642
643
644 NullFields []string `json:"-"`
645 }
646
647 func (s *EventFilter) MarshalJSON() ([]byte, error) {
648 type NoMethod EventFilter
649 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
650 }
651
652
653 type EventType struct {
654
655
656 Description string `json:"description,omitempty"`
657
658
659
660 EventSchemaUri string `json:"eventSchemaUri,omitempty"`
661
662 FilteringAttributes []*FilteringAttribute `json:"filteringAttributes,omitempty"`
663
664
665
666
667
668
669 Type string `json:"type,omitempty"`
670
671
672
673
674
675 ForceSendFields []string `json:"-"`
676
677
678
679
680 NullFields []string `json:"-"`
681 }
682
683 func (s *EventType) MarshalJSON() ([]byte, error) {
684 type NoMethod EventType
685 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
686 }
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704 type Expr struct {
705
706
707 Description string `json:"description,omitempty"`
708
709
710 Expression string `json:"expression,omitempty"`
711
712
713 Location string `json:"location,omitempty"`
714
715
716
717 Title string `json:"title,omitempty"`
718
719
720
721
722
723 ForceSendFields []string `json:"-"`
724
725
726
727
728 NullFields []string `json:"-"`
729 }
730
731 func (s *Expr) MarshalJSON() ([]byte, error) {
732 type NoMethod Expr
733 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
734 }
735
736
737
738 type FilteringAttribute struct {
739
740 Attribute string `json:"attribute,omitempty"`
741
742 Description string `json:"description,omitempty"`
743
744
745 PathPatternSupported bool `json:"pathPatternSupported,omitempty"`
746
747
748 Required bool `json:"required,omitempty"`
749
750
751
752
753
754 ForceSendFields []string `json:"-"`
755
756
757
758
759 NullFields []string `json:"-"`
760 }
761
762 func (s *FilteringAttribute) MarshalJSON() ([]byte, error) {
763 type NoMethod FilteringAttribute
764 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
765 }
766
767
768 type GKE struct {
769
770
771
772 Cluster string `json:"cluster,omitempty"`
773
774
775
776
777 Location string `json:"location,omitempty"`
778
779 Namespace string `json:"namespace,omitempty"`
780
781
782
783 Path string `json:"path,omitempty"`
784
785 Service string `json:"service,omitempty"`
786
787
788
789
790
791 ForceSendFields []string `json:"-"`
792
793
794
795
796 NullFields []string `json:"-"`
797 }
798
799 func (s *GKE) MarshalJSON() ([]byte, error) {
800 type NoMethod GKE
801 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
802 }
803
804
805
806
807
808
809 type GoogleChannelConfig struct {
810
811
812
813 CryptoKeyName string `json:"cryptoKeyName,omitempty"`
814
815
816 Name string `json:"name,omitempty"`
817
818 UpdateTime string `json:"updateTime,omitempty"`
819
820
821 googleapi.ServerResponse `json:"-"`
822
823
824
825
826
827 ForceSendFields []string `json:"-"`
828
829
830
831
832 NullFields []string `json:"-"`
833 }
834
835 func (s *GoogleChannelConfig) MarshalJSON() ([]byte, error) {
836 type NoMethod GoogleChannelConfig
837 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
838 }
839
840
841
842 type GoogleLongrunningCancelOperationRequest struct {
843 }
844
845
846
847 type GoogleLongrunningListOperationsResponse struct {
848
849 NextPageToken string `json:"nextPageToken,omitempty"`
850
851
852 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
853
854
855 googleapi.ServerResponse `json:"-"`
856
857
858
859
860
861 ForceSendFields []string `json:"-"`
862
863
864
865
866 NullFields []string `json:"-"`
867 }
868
869 func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
870 type NoMethod GoogleLongrunningListOperationsResponse
871 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
872 }
873
874
875
876 type GoogleLongrunningOperation struct {
877
878
879
880 Done bool `json:"done,omitempty"`
881
882 Error *GoogleRpcStatus `json:"error,omitempty"`
883
884
885
886
887 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
888
889
890
891 Name string `json:"name,omitempty"`
892
893
894
895
896
897
898
899 Response googleapi.RawMessage `json:"response,omitempty"`
900
901
902 googleapi.ServerResponse `json:"-"`
903
904
905
906
907
908 ForceSendFields []string `json:"-"`
909
910
911
912
913 NullFields []string `json:"-"`
914 }
915
916 func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
917 type NoMethod GoogleLongrunningOperation
918 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
919 }
920
921
922
923
924
925
926
927 type GoogleRpcStatus struct {
928
929 Code int64 `json:"code,omitempty"`
930
931
932 Details []googleapi.RawMessage `json:"details,omitempty"`
933
934
935
936 Message string `json:"message,omitempty"`
937
938
939
940
941
942 ForceSendFields []string `json:"-"`
943
944
945
946
947 NullFields []string `json:"-"`
948 }
949
950 func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
951 type NoMethod GoogleRpcStatus
952 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
953 }
954
955
956 type HttpEndpoint struct {
957
958
959
960
961
962
963 Uri string `json:"uri,omitempty"`
964
965
966
967
968
969 ForceSendFields []string `json:"-"`
970
971
972
973
974 NullFields []string `json:"-"`
975 }
976
977 func (s *HttpEndpoint) MarshalJSON() ([]byte, error) {
978 type NoMethod HttpEndpoint
979 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
980 }
981
982
983
984 type ListChannelConnectionsResponse struct {
985
986
987 ChannelConnections []*ChannelConnection `json:"channelConnections,omitempty"`
988
989
990 NextPageToken string `json:"nextPageToken,omitempty"`
991
992 Unreachable []string `json:"unreachable,omitempty"`
993
994
995 googleapi.ServerResponse `json:"-"`
996
997
998
999
1000
1001 ForceSendFields []string `json:"-"`
1002
1003
1004
1005
1006 NullFields []string `json:"-"`
1007 }
1008
1009 func (s *ListChannelConnectionsResponse) MarshalJSON() ([]byte, error) {
1010 type NoMethod ListChannelConnectionsResponse
1011 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1012 }
1013
1014
1015 type ListChannelsResponse struct {
1016
1017 Channels []*Channel `json:"channels,omitempty"`
1018
1019
1020 NextPageToken string `json:"nextPageToken,omitempty"`
1021
1022 Unreachable []string `json:"unreachable,omitempty"`
1023
1024
1025 googleapi.ServerResponse `json:"-"`
1026
1027
1028
1029
1030
1031 ForceSendFields []string `json:"-"`
1032
1033
1034
1035
1036 NullFields []string `json:"-"`
1037 }
1038
1039 func (s *ListChannelsResponse) MarshalJSON() ([]byte, error) {
1040 type NoMethod ListChannelsResponse
1041 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1042 }
1043
1044
1045 type ListLocationsResponse struct {
1046
1047
1048 Locations []*Location `json:"locations,omitempty"`
1049
1050 NextPageToken string `json:"nextPageToken,omitempty"`
1051
1052
1053 googleapi.ServerResponse `json:"-"`
1054
1055
1056
1057
1058
1059 ForceSendFields []string `json:"-"`
1060
1061
1062
1063
1064 NullFields []string `json:"-"`
1065 }
1066
1067 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
1068 type NoMethod ListLocationsResponse
1069 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1070 }
1071
1072
1073 type ListProvidersResponse struct {
1074
1075
1076 NextPageToken string `json:"nextPageToken,omitempty"`
1077
1078
1079 Providers []*Provider `json:"providers,omitempty"`
1080
1081 Unreachable []string `json:"unreachable,omitempty"`
1082
1083
1084 googleapi.ServerResponse `json:"-"`
1085
1086
1087
1088
1089
1090 ForceSendFields []string `json:"-"`
1091
1092
1093
1094
1095 NullFields []string `json:"-"`
1096 }
1097
1098 func (s *ListProvidersResponse) MarshalJSON() ([]byte, error) {
1099 type NoMethod ListProvidersResponse
1100 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1101 }
1102
1103
1104 type ListTriggersResponse struct {
1105
1106
1107 NextPageToken string `json:"nextPageToken,omitempty"`
1108
1109 Triggers []*Trigger `json:"triggers,omitempty"`
1110
1111 Unreachable []string `json:"unreachable,omitempty"`
1112
1113
1114 googleapi.ServerResponse `json:"-"`
1115
1116
1117
1118
1119
1120 ForceSendFields []string `json:"-"`
1121
1122
1123
1124
1125 NullFields []string `json:"-"`
1126 }
1127
1128 func (s *ListTriggersResponse) MarshalJSON() ([]byte, error) {
1129 type NoMethod ListTriggersResponse
1130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1131 }
1132
1133
1134 type Location struct {
1135
1136
1137 DisplayName string `json:"displayName,omitempty"`
1138
1139
1140 Labels map[string]string `json:"labels,omitempty"`
1141
1142 LocationId string `json:"locationId,omitempty"`
1143
1144
1145 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1146
1147
1148
1149 Name string `json:"name,omitempty"`
1150
1151
1152 googleapi.ServerResponse `json:"-"`
1153
1154
1155
1156
1157
1158 ForceSendFields []string `json:"-"`
1159
1160
1161
1162
1163 NullFields []string `json:"-"`
1164 }
1165
1166 func (s *Location) MarshalJSON() ([]byte, error) {
1167 type NoMethod Location
1168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1169 }
1170
1171
1172
1173 type NetworkConfig struct {
1174
1175
1176
1177
1178 NetworkAttachment string `json:"networkAttachment,omitempty"`
1179
1180
1181
1182
1183
1184 ForceSendFields []string `json:"-"`
1185
1186
1187
1188
1189 NullFields []string `json:"-"`
1190 }
1191
1192 func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
1193 type NoMethod NetworkConfig
1194 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1195 }
1196
1197
1198 type OperationMetadata struct {
1199
1200 ApiVersion string `json:"apiVersion,omitempty"`
1201
1202 CreateTime string `json:"createTime,omitempty"`
1203
1204 EndTime string `json:"endTime,omitempty"`
1205
1206
1207
1208
1209 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1210
1211 StatusMessage string `json:"statusMessage,omitempty"`
1212
1213
1214 Target string `json:"target,omitempty"`
1215
1216 Verb string `json:"verb,omitempty"`
1217
1218
1219
1220
1221
1222 ForceSendFields []string `json:"-"`
1223
1224
1225
1226
1227 NullFields []string `json:"-"`
1228 }
1229
1230 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1231 type NoMethod OperationMetadata
1232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1233 }
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265 type Policy struct {
1266
1267 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277 Bindings []*Binding `json:"bindings,omitempty"`
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289 Etag string `json:"etag,omitempty"`
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305 Version int64 `json:"version,omitempty"`
1306
1307
1308 googleapi.ServerResponse `json:"-"`
1309
1310
1311
1312
1313
1314 ForceSendFields []string `json:"-"`
1315
1316
1317
1318
1319 NullFields []string `json:"-"`
1320 }
1321
1322 func (s *Policy) MarshalJSON() ([]byte, error) {
1323 type NoMethod Policy
1324 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1325 }
1326
1327
1328 type Provider struct {
1329
1330
1331 DisplayName string `json:"displayName,omitempty"`
1332
1333 EventTypes []*EventType `json:"eventTypes,omitempty"`
1334
1335
1336 Name string `json:"name,omitempty"`
1337
1338
1339 googleapi.ServerResponse `json:"-"`
1340
1341
1342
1343
1344
1345 ForceSendFields []string `json:"-"`
1346
1347
1348
1349
1350 NullFields []string `json:"-"`
1351 }
1352
1353 func (s *Provider) MarshalJSON() ([]byte, error) {
1354 type NoMethod Provider
1355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1356 }
1357
1358
1359 type Pubsub struct {
1360
1361
1362
1363 Subscription string `json:"subscription,omitempty"`
1364
1365
1366
1367
1368
1369 Topic string `json:"topic,omitempty"`
1370
1371
1372
1373
1374
1375 ForceSendFields []string `json:"-"`
1376
1377
1378
1379
1380 NullFields []string `json:"-"`
1381 }
1382
1383 func (s *Pubsub) MarshalJSON() ([]byte, error) {
1384 type NoMethod Pubsub
1385 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1386 }
1387
1388
1389 type SetIamPolicyRequest struct {
1390
1391
1392
1393
1394 Policy *Policy `json:"policy,omitempty"`
1395
1396
1397
1398 UpdateMask string `json:"updateMask,omitempty"`
1399
1400
1401
1402
1403
1404 ForceSendFields []string `json:"-"`
1405
1406
1407
1408
1409 NullFields []string `json:"-"`
1410 }
1411
1412 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1413 type NoMethod SetIamPolicyRequest
1414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1415 }
1416
1417
1418 type StateCondition struct {
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500 Code string `json:"code,omitempty"`
1501
1502 Message string `json:"message,omitempty"`
1503
1504
1505
1506
1507
1508 ForceSendFields []string `json:"-"`
1509
1510
1511
1512
1513 NullFields []string `json:"-"`
1514 }
1515
1516 func (s *StateCondition) MarshalJSON() ([]byte, error) {
1517 type NoMethod StateCondition
1518 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1519 }
1520
1521
1522 type TestIamPermissionsRequest struct {
1523
1524
1525
1526
1527 Permissions []string `json:"permissions,omitempty"`
1528
1529
1530
1531
1532
1533 ForceSendFields []string `json:"-"`
1534
1535
1536
1537
1538 NullFields []string `json:"-"`
1539 }
1540
1541 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
1542 type NoMethod TestIamPermissionsRequest
1543 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1544 }
1545
1546
1547
1548 type TestIamPermissionsResponse struct {
1549
1550
1551 Permissions []string `json:"permissions,omitempty"`
1552
1553
1554 googleapi.ServerResponse `json:"-"`
1555
1556
1557
1558
1559
1560 ForceSendFields []string `json:"-"`
1561
1562
1563
1564
1565 NullFields []string `json:"-"`
1566 }
1567
1568 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
1569 type NoMethod TestIamPermissionsResponse
1570 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1571 }
1572
1573
1574
1575 type Transport struct {
1576
1577
1578 Pubsub *Pubsub `json:"pubsub,omitempty"`
1579
1580
1581
1582
1583
1584 ForceSendFields []string `json:"-"`
1585
1586
1587
1588
1589 NullFields []string `json:"-"`
1590 }
1591
1592 func (s *Transport) MarshalJSON() ([]byte, error) {
1593 type NoMethod Transport
1594 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1595 }
1596
1597
1598 type Trigger struct {
1599
1600
1601
1602 Channel string `json:"channel,omitempty"`
1603
1604 Conditions map[string]StateCondition `json:"conditions,omitempty"`
1605
1606 CreateTime string `json:"createTime,omitempty"`
1607
1608
1609 Destination *Destination `json:"destination,omitempty"`
1610
1611
1612
1613 Etag string `json:"etag,omitempty"`
1614
1615
1616
1617 EventDataContentType string `json:"eventDataContentType,omitempty"`
1618
1619
1620
1621 EventFilters []*EventFilter `json:"eventFilters,omitempty"`
1622
1623
1624 Labels map[string]string `json:"labels,omitempty"`
1625
1626
1627
1628 Name string `json:"name,omitempty"`
1629
1630
1631 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
1632
1633
1634
1635
1636
1637
1638
1639 ServiceAccount string `json:"serviceAccount,omitempty"`
1640
1641
1642
1643
1644 Transport *Transport `json:"transport,omitempty"`
1645
1646
1647
1648 Uid string `json:"uid,omitempty"`
1649
1650 UpdateTime string `json:"updateTime,omitempty"`
1651
1652
1653 googleapi.ServerResponse `json:"-"`
1654
1655
1656
1657
1658
1659 ForceSendFields []string `json:"-"`
1660
1661
1662
1663
1664 NullFields []string `json:"-"`
1665 }
1666
1667 func (s *Trigger) MarshalJSON() ([]byte, error) {
1668 type NoMethod Trigger
1669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1670 }
1671
1672 type ProjectsLocationsGetCall struct {
1673 s *Service
1674 name string
1675 urlParams_ gensupport.URLParams
1676 ifNoneMatch_ string
1677 ctx_ context.Context
1678 header_ http.Header
1679 }
1680
1681
1682
1683
1684 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
1685 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1686 c.name = name
1687 return c
1688 }
1689
1690
1691
1692
1693 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
1694 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1695 return c
1696 }
1697
1698
1699
1700
1701 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
1702 c.ifNoneMatch_ = entityTag
1703 return c
1704 }
1705
1706
1707 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
1708 c.ctx_ = ctx
1709 return c
1710 }
1711
1712
1713
1714 func (c *ProjectsLocationsGetCall) Header() http.Header {
1715 if c.header_ == nil {
1716 c.header_ = make(http.Header)
1717 }
1718 return c.header_
1719 }
1720
1721 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
1722 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1723 if c.ifNoneMatch_ != "" {
1724 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1725 }
1726 var body io.Reader = nil
1727 c.urlParams_.Set("alt", alt)
1728 c.urlParams_.Set("prettyPrint", "false")
1729 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1730 urls += "?" + c.urlParams_.Encode()
1731 req, err := http.NewRequest("GET", urls, body)
1732 if err != nil {
1733 return nil, err
1734 }
1735 req.Header = reqHeaders
1736 googleapi.Expand(req.URL, map[string]string{
1737 "name": c.name,
1738 })
1739 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1740 }
1741
1742
1743
1744
1745
1746
1747 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
1748 gensupport.SetOptions(c.urlParams_, opts...)
1749 res, err := c.doRequest("json")
1750 if res != nil && res.StatusCode == http.StatusNotModified {
1751 if res.Body != nil {
1752 res.Body.Close()
1753 }
1754 return nil, gensupport.WrapError(&googleapi.Error{
1755 Code: res.StatusCode,
1756 Header: res.Header,
1757 })
1758 }
1759 if err != nil {
1760 return nil, err
1761 }
1762 defer googleapi.CloseBody(res)
1763 if err := googleapi.CheckResponse(res); err != nil {
1764 return nil, gensupport.WrapError(err)
1765 }
1766 ret := &Location{
1767 ServerResponse: googleapi.ServerResponse{
1768 Header: res.Header,
1769 HTTPStatusCode: res.StatusCode,
1770 },
1771 }
1772 target := &ret
1773 if err := gensupport.DecodeResponse(target, res); err != nil {
1774 return nil, err
1775 }
1776 return ret, nil
1777 }
1778
1779 type ProjectsLocationsGetGoogleChannelConfigCall struct {
1780 s *Service
1781 name string
1782 urlParams_ gensupport.URLParams
1783 ifNoneMatch_ string
1784 ctx_ context.Context
1785 header_ http.Header
1786 }
1787
1788
1789
1790
1791 func (r *ProjectsLocationsService) GetGoogleChannelConfig(name string) *ProjectsLocationsGetGoogleChannelConfigCall {
1792 c := &ProjectsLocationsGetGoogleChannelConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1793 c.name = name
1794 return c
1795 }
1796
1797
1798
1799
1800 func (c *ProjectsLocationsGetGoogleChannelConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetGoogleChannelConfigCall {
1801 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1802 return c
1803 }
1804
1805
1806
1807
1808 func (c *ProjectsLocationsGetGoogleChannelConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetGoogleChannelConfigCall {
1809 c.ifNoneMatch_ = entityTag
1810 return c
1811 }
1812
1813
1814 func (c *ProjectsLocationsGetGoogleChannelConfigCall) Context(ctx context.Context) *ProjectsLocationsGetGoogleChannelConfigCall {
1815 c.ctx_ = ctx
1816 return c
1817 }
1818
1819
1820
1821 func (c *ProjectsLocationsGetGoogleChannelConfigCall) Header() http.Header {
1822 if c.header_ == nil {
1823 c.header_ = make(http.Header)
1824 }
1825 return c.header_
1826 }
1827
1828 func (c *ProjectsLocationsGetGoogleChannelConfigCall) doRequest(alt string) (*http.Response, error) {
1829 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1830 if c.ifNoneMatch_ != "" {
1831 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1832 }
1833 var body io.Reader = nil
1834 c.urlParams_.Set("alt", alt)
1835 c.urlParams_.Set("prettyPrint", "false")
1836 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1837 urls += "?" + c.urlParams_.Encode()
1838 req, err := http.NewRequest("GET", urls, body)
1839 if err != nil {
1840 return nil, err
1841 }
1842 req.Header = reqHeaders
1843 googleapi.Expand(req.URL, map[string]string{
1844 "name": c.name,
1845 })
1846 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1847 }
1848
1849
1850
1851
1852
1853
1854
1855 func (c *ProjectsLocationsGetGoogleChannelConfigCall) Do(opts ...googleapi.CallOption) (*GoogleChannelConfig, error) {
1856 gensupport.SetOptions(c.urlParams_, opts...)
1857 res, err := c.doRequest("json")
1858 if res != nil && res.StatusCode == http.StatusNotModified {
1859 if res.Body != nil {
1860 res.Body.Close()
1861 }
1862 return nil, gensupport.WrapError(&googleapi.Error{
1863 Code: res.StatusCode,
1864 Header: res.Header,
1865 })
1866 }
1867 if err != nil {
1868 return nil, err
1869 }
1870 defer googleapi.CloseBody(res)
1871 if err := googleapi.CheckResponse(res); err != nil {
1872 return nil, gensupport.WrapError(err)
1873 }
1874 ret := &GoogleChannelConfig{
1875 ServerResponse: googleapi.ServerResponse{
1876 Header: res.Header,
1877 HTTPStatusCode: res.StatusCode,
1878 },
1879 }
1880 target := &ret
1881 if err := gensupport.DecodeResponse(target, res); err != nil {
1882 return nil, err
1883 }
1884 return ret, nil
1885 }
1886
1887 type ProjectsLocationsListCall struct {
1888 s *Service
1889 name string
1890 urlParams_ gensupport.URLParams
1891 ifNoneMatch_ string
1892 ctx_ context.Context
1893 header_ http.Header
1894 }
1895
1896
1897
1898
1899 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
1900 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1901 c.name = name
1902 return c
1903 }
1904
1905
1906
1907
1908
1909 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
1910 c.urlParams_.Set("filter", filter)
1911 return c
1912 }
1913
1914
1915
1916 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
1917 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1918 return c
1919 }
1920
1921
1922
1923
1924 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
1925 c.urlParams_.Set("pageToken", pageToken)
1926 return c
1927 }
1928
1929
1930
1931
1932 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
1933 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1934 return c
1935 }
1936
1937
1938
1939
1940 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
1941 c.ifNoneMatch_ = entityTag
1942 return c
1943 }
1944
1945
1946 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
1947 c.ctx_ = ctx
1948 return c
1949 }
1950
1951
1952
1953 func (c *ProjectsLocationsListCall) Header() http.Header {
1954 if c.header_ == nil {
1955 c.header_ = make(http.Header)
1956 }
1957 return c.header_
1958 }
1959
1960 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
1961 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
1962 if c.ifNoneMatch_ != "" {
1963 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1964 }
1965 var body io.Reader = nil
1966 c.urlParams_.Set("alt", alt)
1967 c.urlParams_.Set("prettyPrint", "false")
1968 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
1969 urls += "?" + c.urlParams_.Encode()
1970 req, err := http.NewRequest("GET", urls, body)
1971 if err != nil {
1972 return nil, err
1973 }
1974 req.Header = reqHeaders
1975 googleapi.Expand(req.URL, map[string]string{
1976 "name": c.name,
1977 })
1978 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1979 }
1980
1981
1982
1983
1984
1985
1986
1987 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
1988 gensupport.SetOptions(c.urlParams_, opts...)
1989 res, err := c.doRequest("json")
1990 if res != nil && res.StatusCode == http.StatusNotModified {
1991 if res.Body != nil {
1992 res.Body.Close()
1993 }
1994 return nil, gensupport.WrapError(&googleapi.Error{
1995 Code: res.StatusCode,
1996 Header: res.Header,
1997 })
1998 }
1999 if err != nil {
2000 return nil, err
2001 }
2002 defer googleapi.CloseBody(res)
2003 if err := googleapi.CheckResponse(res); err != nil {
2004 return nil, gensupport.WrapError(err)
2005 }
2006 ret := &ListLocationsResponse{
2007 ServerResponse: googleapi.ServerResponse{
2008 Header: res.Header,
2009 HTTPStatusCode: res.StatusCode,
2010 },
2011 }
2012 target := &ret
2013 if err := gensupport.DecodeResponse(target, res); err != nil {
2014 return nil, err
2015 }
2016 return ret, nil
2017 }
2018
2019
2020
2021
2022 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2023 c.ctx_ = ctx
2024 defer c.PageToken(c.urlParams_.Get("pageToken"))
2025 for {
2026 x, err := c.Do()
2027 if err != nil {
2028 return err
2029 }
2030 if err := f(x); err != nil {
2031 return err
2032 }
2033 if x.NextPageToken == "" {
2034 return nil
2035 }
2036 c.PageToken(x.NextPageToken)
2037 }
2038 }
2039
2040 type ProjectsLocationsUpdateGoogleChannelConfigCall struct {
2041 s *Service
2042 name string
2043 googlechannelconfig *GoogleChannelConfig
2044 urlParams_ gensupport.URLParams
2045 ctx_ context.Context
2046 header_ http.Header
2047 }
2048
2049
2050
2051
2052
2053 func (r *ProjectsLocationsService) UpdateGoogleChannelConfig(name string, googlechannelconfig *GoogleChannelConfig) *ProjectsLocationsUpdateGoogleChannelConfigCall {
2054 c := &ProjectsLocationsUpdateGoogleChannelConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2055 c.name = name
2056 c.googlechannelconfig = googlechannelconfig
2057 return c
2058 }
2059
2060
2061
2062
2063
2064 func (c *ProjectsLocationsUpdateGoogleChannelConfigCall) UpdateMask(updateMask string) *ProjectsLocationsUpdateGoogleChannelConfigCall {
2065 c.urlParams_.Set("updateMask", updateMask)
2066 return c
2067 }
2068
2069
2070
2071
2072 func (c *ProjectsLocationsUpdateGoogleChannelConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateGoogleChannelConfigCall {
2073 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2074 return c
2075 }
2076
2077
2078 func (c *ProjectsLocationsUpdateGoogleChannelConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateGoogleChannelConfigCall {
2079 c.ctx_ = ctx
2080 return c
2081 }
2082
2083
2084
2085 func (c *ProjectsLocationsUpdateGoogleChannelConfigCall) Header() http.Header {
2086 if c.header_ == nil {
2087 c.header_ = make(http.Header)
2088 }
2089 return c.header_
2090 }
2091
2092 func (c *ProjectsLocationsUpdateGoogleChannelConfigCall) doRequest(alt string) (*http.Response, error) {
2093 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2094 var body io.Reader = nil
2095 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlechannelconfig)
2096 if err != nil {
2097 return nil, err
2098 }
2099 c.urlParams_.Set("alt", alt)
2100 c.urlParams_.Set("prettyPrint", "false")
2101 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2102 urls += "?" + c.urlParams_.Encode()
2103 req, err := http.NewRequest("PATCH", urls, body)
2104 if err != nil {
2105 return nil, err
2106 }
2107 req.Header = reqHeaders
2108 googleapi.Expand(req.URL, map[string]string{
2109 "name": c.name,
2110 })
2111 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2112 }
2113
2114
2115
2116
2117
2118
2119
2120 func (c *ProjectsLocationsUpdateGoogleChannelConfigCall) Do(opts ...googleapi.CallOption) (*GoogleChannelConfig, error) {
2121 gensupport.SetOptions(c.urlParams_, opts...)
2122 res, err := c.doRequest("json")
2123 if res != nil && res.StatusCode == http.StatusNotModified {
2124 if res.Body != nil {
2125 res.Body.Close()
2126 }
2127 return nil, gensupport.WrapError(&googleapi.Error{
2128 Code: res.StatusCode,
2129 Header: res.Header,
2130 })
2131 }
2132 if err != nil {
2133 return nil, err
2134 }
2135 defer googleapi.CloseBody(res)
2136 if err := googleapi.CheckResponse(res); err != nil {
2137 return nil, gensupport.WrapError(err)
2138 }
2139 ret := &GoogleChannelConfig{
2140 ServerResponse: googleapi.ServerResponse{
2141 Header: res.Header,
2142 HTTPStatusCode: res.StatusCode,
2143 },
2144 }
2145 target := &ret
2146 if err := gensupport.DecodeResponse(target, res); err != nil {
2147 return nil, err
2148 }
2149 return ret, nil
2150 }
2151
2152 type ProjectsLocationsChannelConnectionsCreateCall struct {
2153 s *Service
2154 parent string
2155 channelconnection *ChannelConnection
2156 urlParams_ gensupport.URLParams
2157 ctx_ context.Context
2158 header_ http.Header
2159 }
2160
2161
2162
2163
2164 func (r *ProjectsLocationsChannelConnectionsService) Create(parent string, channelconnection *ChannelConnection) *ProjectsLocationsChannelConnectionsCreateCall {
2165 c := &ProjectsLocationsChannelConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2166 c.parent = parent
2167 c.channelconnection = channelconnection
2168 return c
2169 }
2170
2171
2172
2173 func (c *ProjectsLocationsChannelConnectionsCreateCall) ChannelConnectionId(channelConnectionId string) *ProjectsLocationsChannelConnectionsCreateCall {
2174 c.urlParams_.Set("channelConnectionId", channelConnectionId)
2175 return c
2176 }
2177
2178
2179
2180
2181 func (c *ProjectsLocationsChannelConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelConnectionsCreateCall {
2182 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2183 return c
2184 }
2185
2186
2187 func (c *ProjectsLocationsChannelConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsChannelConnectionsCreateCall {
2188 c.ctx_ = ctx
2189 return c
2190 }
2191
2192
2193
2194 func (c *ProjectsLocationsChannelConnectionsCreateCall) Header() http.Header {
2195 if c.header_ == nil {
2196 c.header_ = make(http.Header)
2197 }
2198 return c.header_
2199 }
2200
2201 func (c *ProjectsLocationsChannelConnectionsCreateCall) doRequest(alt string) (*http.Response, error) {
2202 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2203 var body io.Reader = nil
2204 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelconnection)
2205 if err != nil {
2206 return nil, err
2207 }
2208 c.urlParams_.Set("alt", alt)
2209 c.urlParams_.Set("prettyPrint", "false")
2210 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/channelConnections")
2211 urls += "?" + c.urlParams_.Encode()
2212 req, err := http.NewRequest("POST", urls, body)
2213 if err != nil {
2214 return nil, err
2215 }
2216 req.Header = reqHeaders
2217 googleapi.Expand(req.URL, map[string]string{
2218 "parent": c.parent,
2219 })
2220 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2221 }
2222
2223
2224
2225
2226
2227
2228
2229 func (c *ProjectsLocationsChannelConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2230 gensupport.SetOptions(c.urlParams_, opts...)
2231 res, err := c.doRequest("json")
2232 if res != nil && res.StatusCode == http.StatusNotModified {
2233 if res.Body != nil {
2234 res.Body.Close()
2235 }
2236 return nil, gensupport.WrapError(&googleapi.Error{
2237 Code: res.StatusCode,
2238 Header: res.Header,
2239 })
2240 }
2241 if err != nil {
2242 return nil, err
2243 }
2244 defer googleapi.CloseBody(res)
2245 if err := googleapi.CheckResponse(res); err != nil {
2246 return nil, gensupport.WrapError(err)
2247 }
2248 ret := &GoogleLongrunningOperation{
2249 ServerResponse: googleapi.ServerResponse{
2250 Header: res.Header,
2251 HTTPStatusCode: res.StatusCode,
2252 },
2253 }
2254 target := &ret
2255 if err := gensupport.DecodeResponse(target, res); err != nil {
2256 return nil, err
2257 }
2258 return ret, nil
2259 }
2260
2261 type ProjectsLocationsChannelConnectionsDeleteCall struct {
2262 s *Service
2263 name string
2264 urlParams_ gensupport.URLParams
2265 ctx_ context.Context
2266 header_ http.Header
2267 }
2268
2269
2270
2271
2272 func (r *ProjectsLocationsChannelConnectionsService) Delete(name string) *ProjectsLocationsChannelConnectionsDeleteCall {
2273 c := &ProjectsLocationsChannelConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2274 c.name = name
2275 return c
2276 }
2277
2278
2279
2280
2281 func (c *ProjectsLocationsChannelConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelConnectionsDeleteCall {
2282 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2283 return c
2284 }
2285
2286
2287 func (c *ProjectsLocationsChannelConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsChannelConnectionsDeleteCall {
2288 c.ctx_ = ctx
2289 return c
2290 }
2291
2292
2293
2294 func (c *ProjectsLocationsChannelConnectionsDeleteCall) Header() http.Header {
2295 if c.header_ == nil {
2296 c.header_ = make(http.Header)
2297 }
2298 return c.header_
2299 }
2300
2301 func (c *ProjectsLocationsChannelConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
2302 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2303 var body io.Reader = nil
2304 c.urlParams_.Set("alt", alt)
2305 c.urlParams_.Set("prettyPrint", "false")
2306 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2307 urls += "?" + c.urlParams_.Encode()
2308 req, err := http.NewRequest("DELETE", urls, body)
2309 if err != nil {
2310 return nil, err
2311 }
2312 req.Header = reqHeaders
2313 googleapi.Expand(req.URL, map[string]string{
2314 "name": c.name,
2315 })
2316 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2317 }
2318
2319
2320
2321
2322
2323
2324
2325 func (c *ProjectsLocationsChannelConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2326 gensupport.SetOptions(c.urlParams_, opts...)
2327 res, err := c.doRequest("json")
2328 if res != nil && res.StatusCode == http.StatusNotModified {
2329 if res.Body != nil {
2330 res.Body.Close()
2331 }
2332 return nil, gensupport.WrapError(&googleapi.Error{
2333 Code: res.StatusCode,
2334 Header: res.Header,
2335 })
2336 }
2337 if err != nil {
2338 return nil, err
2339 }
2340 defer googleapi.CloseBody(res)
2341 if err := googleapi.CheckResponse(res); err != nil {
2342 return nil, gensupport.WrapError(err)
2343 }
2344 ret := &GoogleLongrunningOperation{
2345 ServerResponse: googleapi.ServerResponse{
2346 Header: res.Header,
2347 HTTPStatusCode: res.StatusCode,
2348 },
2349 }
2350 target := &ret
2351 if err := gensupport.DecodeResponse(target, res); err != nil {
2352 return nil, err
2353 }
2354 return ret, nil
2355 }
2356
2357 type ProjectsLocationsChannelConnectionsGetCall struct {
2358 s *Service
2359 name string
2360 urlParams_ gensupport.URLParams
2361 ifNoneMatch_ string
2362 ctx_ context.Context
2363 header_ http.Header
2364 }
2365
2366
2367
2368
2369 func (r *ProjectsLocationsChannelConnectionsService) Get(name string) *ProjectsLocationsChannelConnectionsGetCall {
2370 c := &ProjectsLocationsChannelConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2371 c.name = name
2372 return c
2373 }
2374
2375
2376
2377
2378 func (c *ProjectsLocationsChannelConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelConnectionsGetCall {
2379 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2380 return c
2381 }
2382
2383
2384
2385
2386 func (c *ProjectsLocationsChannelConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsChannelConnectionsGetCall {
2387 c.ifNoneMatch_ = entityTag
2388 return c
2389 }
2390
2391
2392 func (c *ProjectsLocationsChannelConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsChannelConnectionsGetCall {
2393 c.ctx_ = ctx
2394 return c
2395 }
2396
2397
2398
2399 func (c *ProjectsLocationsChannelConnectionsGetCall) Header() http.Header {
2400 if c.header_ == nil {
2401 c.header_ = make(http.Header)
2402 }
2403 return c.header_
2404 }
2405
2406 func (c *ProjectsLocationsChannelConnectionsGetCall) doRequest(alt string) (*http.Response, error) {
2407 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2408 if c.ifNoneMatch_ != "" {
2409 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2410 }
2411 var body io.Reader = nil
2412 c.urlParams_.Set("alt", alt)
2413 c.urlParams_.Set("prettyPrint", "false")
2414 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2415 urls += "?" + c.urlParams_.Encode()
2416 req, err := http.NewRequest("GET", urls, body)
2417 if err != nil {
2418 return nil, err
2419 }
2420 req.Header = reqHeaders
2421 googleapi.Expand(req.URL, map[string]string{
2422 "name": c.name,
2423 })
2424 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2425 }
2426
2427
2428
2429
2430
2431
2432
2433 func (c *ProjectsLocationsChannelConnectionsGetCall) Do(opts ...googleapi.CallOption) (*ChannelConnection, error) {
2434 gensupport.SetOptions(c.urlParams_, opts...)
2435 res, err := c.doRequest("json")
2436 if res != nil && res.StatusCode == http.StatusNotModified {
2437 if res.Body != nil {
2438 res.Body.Close()
2439 }
2440 return nil, gensupport.WrapError(&googleapi.Error{
2441 Code: res.StatusCode,
2442 Header: res.Header,
2443 })
2444 }
2445 if err != nil {
2446 return nil, err
2447 }
2448 defer googleapi.CloseBody(res)
2449 if err := googleapi.CheckResponse(res); err != nil {
2450 return nil, gensupport.WrapError(err)
2451 }
2452 ret := &ChannelConnection{
2453 ServerResponse: googleapi.ServerResponse{
2454 Header: res.Header,
2455 HTTPStatusCode: res.StatusCode,
2456 },
2457 }
2458 target := &ret
2459 if err := gensupport.DecodeResponse(target, res); err != nil {
2460 return nil, err
2461 }
2462 return ret, nil
2463 }
2464
2465 type ProjectsLocationsChannelConnectionsGetIamPolicyCall struct {
2466 s *Service
2467 resource string
2468 urlParams_ gensupport.URLParams
2469 ifNoneMatch_ string
2470 ctx_ context.Context
2471 header_ http.Header
2472 }
2473
2474
2475
2476
2477
2478
2479
2480 func (r *ProjectsLocationsChannelConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsChannelConnectionsGetIamPolicyCall {
2481 c := &ProjectsLocationsChannelConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2482 c.resource = resource
2483 return c
2484 }
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498 func (c *ProjectsLocationsChannelConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsChannelConnectionsGetIamPolicyCall {
2499 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
2500 return c
2501 }
2502
2503
2504
2505
2506 func (c *ProjectsLocationsChannelConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelConnectionsGetIamPolicyCall {
2507 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2508 return c
2509 }
2510
2511
2512
2513
2514 func (c *ProjectsLocationsChannelConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsChannelConnectionsGetIamPolicyCall {
2515 c.ifNoneMatch_ = entityTag
2516 return c
2517 }
2518
2519
2520 func (c *ProjectsLocationsChannelConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsChannelConnectionsGetIamPolicyCall {
2521 c.ctx_ = ctx
2522 return c
2523 }
2524
2525
2526
2527 func (c *ProjectsLocationsChannelConnectionsGetIamPolicyCall) Header() http.Header {
2528 if c.header_ == nil {
2529 c.header_ = make(http.Header)
2530 }
2531 return c.header_
2532 }
2533
2534 func (c *ProjectsLocationsChannelConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
2535 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2536 if c.ifNoneMatch_ != "" {
2537 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2538 }
2539 var body io.Reader = nil
2540 c.urlParams_.Set("alt", alt)
2541 c.urlParams_.Set("prettyPrint", "false")
2542 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
2543 urls += "?" + c.urlParams_.Encode()
2544 req, err := http.NewRequest("GET", urls, body)
2545 if err != nil {
2546 return nil, err
2547 }
2548 req.Header = reqHeaders
2549 googleapi.Expand(req.URL, map[string]string{
2550 "resource": c.resource,
2551 })
2552 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2553 }
2554
2555
2556
2557
2558
2559
2560 func (c *ProjectsLocationsChannelConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
2561 gensupport.SetOptions(c.urlParams_, opts...)
2562 res, err := c.doRequest("json")
2563 if res != nil && res.StatusCode == http.StatusNotModified {
2564 if res.Body != nil {
2565 res.Body.Close()
2566 }
2567 return nil, gensupport.WrapError(&googleapi.Error{
2568 Code: res.StatusCode,
2569 Header: res.Header,
2570 })
2571 }
2572 if err != nil {
2573 return nil, err
2574 }
2575 defer googleapi.CloseBody(res)
2576 if err := googleapi.CheckResponse(res); err != nil {
2577 return nil, gensupport.WrapError(err)
2578 }
2579 ret := &Policy{
2580 ServerResponse: googleapi.ServerResponse{
2581 Header: res.Header,
2582 HTTPStatusCode: res.StatusCode,
2583 },
2584 }
2585 target := &ret
2586 if err := gensupport.DecodeResponse(target, res); err != nil {
2587 return nil, err
2588 }
2589 return ret, nil
2590 }
2591
2592 type ProjectsLocationsChannelConnectionsListCall struct {
2593 s *Service
2594 parent string
2595 urlParams_ gensupport.URLParams
2596 ifNoneMatch_ string
2597 ctx_ context.Context
2598 header_ http.Header
2599 }
2600
2601
2602
2603
2604 func (r *ProjectsLocationsChannelConnectionsService) List(parent string) *ProjectsLocationsChannelConnectionsListCall {
2605 c := &ProjectsLocationsChannelConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2606 c.parent = parent
2607 return c
2608 }
2609
2610
2611
2612
2613 func (c *ProjectsLocationsChannelConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsChannelConnectionsListCall {
2614 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2615 return c
2616 }
2617
2618
2619
2620
2621
2622
2623 func (c *ProjectsLocationsChannelConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsChannelConnectionsListCall {
2624 c.urlParams_.Set("pageToken", pageToken)
2625 return c
2626 }
2627
2628
2629
2630
2631 func (c *ProjectsLocationsChannelConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelConnectionsListCall {
2632 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2633 return c
2634 }
2635
2636
2637
2638
2639 func (c *ProjectsLocationsChannelConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsChannelConnectionsListCall {
2640 c.ifNoneMatch_ = entityTag
2641 return c
2642 }
2643
2644
2645 func (c *ProjectsLocationsChannelConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsChannelConnectionsListCall {
2646 c.ctx_ = ctx
2647 return c
2648 }
2649
2650
2651
2652 func (c *ProjectsLocationsChannelConnectionsListCall) Header() http.Header {
2653 if c.header_ == nil {
2654 c.header_ = make(http.Header)
2655 }
2656 return c.header_
2657 }
2658
2659 func (c *ProjectsLocationsChannelConnectionsListCall) doRequest(alt string) (*http.Response, error) {
2660 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2661 if c.ifNoneMatch_ != "" {
2662 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2663 }
2664 var body io.Reader = nil
2665 c.urlParams_.Set("alt", alt)
2666 c.urlParams_.Set("prettyPrint", "false")
2667 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/channelConnections")
2668 urls += "?" + c.urlParams_.Encode()
2669 req, err := http.NewRequest("GET", urls, body)
2670 if err != nil {
2671 return nil, err
2672 }
2673 req.Header = reqHeaders
2674 googleapi.Expand(req.URL, map[string]string{
2675 "parent": c.parent,
2676 })
2677 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2678 }
2679
2680
2681
2682
2683
2684
2685
2686 func (c *ProjectsLocationsChannelConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListChannelConnectionsResponse, error) {
2687 gensupport.SetOptions(c.urlParams_, opts...)
2688 res, err := c.doRequest("json")
2689 if res != nil && res.StatusCode == http.StatusNotModified {
2690 if res.Body != nil {
2691 res.Body.Close()
2692 }
2693 return nil, gensupport.WrapError(&googleapi.Error{
2694 Code: res.StatusCode,
2695 Header: res.Header,
2696 })
2697 }
2698 if err != nil {
2699 return nil, err
2700 }
2701 defer googleapi.CloseBody(res)
2702 if err := googleapi.CheckResponse(res); err != nil {
2703 return nil, gensupport.WrapError(err)
2704 }
2705 ret := &ListChannelConnectionsResponse{
2706 ServerResponse: googleapi.ServerResponse{
2707 Header: res.Header,
2708 HTTPStatusCode: res.StatusCode,
2709 },
2710 }
2711 target := &ret
2712 if err := gensupport.DecodeResponse(target, res); err != nil {
2713 return nil, err
2714 }
2715 return ret, nil
2716 }
2717
2718
2719
2720
2721 func (c *ProjectsLocationsChannelConnectionsListCall) Pages(ctx context.Context, f func(*ListChannelConnectionsResponse) error) error {
2722 c.ctx_ = ctx
2723 defer c.PageToken(c.urlParams_.Get("pageToken"))
2724 for {
2725 x, err := c.Do()
2726 if err != nil {
2727 return err
2728 }
2729 if err := f(x); err != nil {
2730 return err
2731 }
2732 if x.NextPageToken == "" {
2733 return nil
2734 }
2735 c.PageToken(x.NextPageToken)
2736 }
2737 }
2738
2739 type ProjectsLocationsChannelConnectionsSetIamPolicyCall struct {
2740 s *Service
2741 resource string
2742 setiampolicyrequest *SetIamPolicyRequest
2743 urlParams_ gensupport.URLParams
2744 ctx_ context.Context
2745 header_ http.Header
2746 }
2747
2748
2749
2750
2751
2752
2753
2754
2755 func (r *ProjectsLocationsChannelConnectionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsChannelConnectionsSetIamPolicyCall {
2756 c := &ProjectsLocationsChannelConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2757 c.resource = resource
2758 c.setiampolicyrequest = setiampolicyrequest
2759 return c
2760 }
2761
2762
2763
2764
2765 func (c *ProjectsLocationsChannelConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelConnectionsSetIamPolicyCall {
2766 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2767 return c
2768 }
2769
2770
2771 func (c *ProjectsLocationsChannelConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsChannelConnectionsSetIamPolicyCall {
2772 c.ctx_ = ctx
2773 return c
2774 }
2775
2776
2777
2778 func (c *ProjectsLocationsChannelConnectionsSetIamPolicyCall) Header() http.Header {
2779 if c.header_ == nil {
2780 c.header_ = make(http.Header)
2781 }
2782 return c.header_
2783 }
2784
2785 func (c *ProjectsLocationsChannelConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
2786 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2787 var body io.Reader = nil
2788 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
2789 if err != nil {
2790 return nil, err
2791 }
2792 c.urlParams_.Set("alt", alt)
2793 c.urlParams_.Set("prettyPrint", "false")
2794 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
2795 urls += "?" + c.urlParams_.Encode()
2796 req, err := http.NewRequest("POST", urls, body)
2797 if err != nil {
2798 return nil, err
2799 }
2800 req.Header = reqHeaders
2801 googleapi.Expand(req.URL, map[string]string{
2802 "resource": c.resource,
2803 })
2804 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2805 }
2806
2807
2808
2809
2810
2811
2812 func (c *ProjectsLocationsChannelConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
2813 gensupport.SetOptions(c.urlParams_, opts...)
2814 res, err := c.doRequest("json")
2815 if res != nil && res.StatusCode == http.StatusNotModified {
2816 if res.Body != nil {
2817 res.Body.Close()
2818 }
2819 return nil, gensupport.WrapError(&googleapi.Error{
2820 Code: res.StatusCode,
2821 Header: res.Header,
2822 })
2823 }
2824 if err != nil {
2825 return nil, err
2826 }
2827 defer googleapi.CloseBody(res)
2828 if err := googleapi.CheckResponse(res); err != nil {
2829 return nil, gensupport.WrapError(err)
2830 }
2831 ret := &Policy{
2832 ServerResponse: googleapi.ServerResponse{
2833 Header: res.Header,
2834 HTTPStatusCode: res.StatusCode,
2835 },
2836 }
2837 target := &ret
2838 if err := gensupport.DecodeResponse(target, res); err != nil {
2839 return nil, err
2840 }
2841 return ret, nil
2842 }
2843
2844 type ProjectsLocationsChannelConnectionsTestIamPermissionsCall struct {
2845 s *Service
2846 resource string
2847 testiampermissionsrequest *TestIamPermissionsRequest
2848 urlParams_ gensupport.URLParams
2849 ctx_ context.Context
2850 header_ http.Header
2851 }
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863 func (r *ProjectsLocationsChannelConnectionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsChannelConnectionsTestIamPermissionsCall {
2864 c := &ProjectsLocationsChannelConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2865 c.resource = resource
2866 c.testiampermissionsrequest = testiampermissionsrequest
2867 return c
2868 }
2869
2870
2871
2872
2873 func (c *ProjectsLocationsChannelConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelConnectionsTestIamPermissionsCall {
2874 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2875 return c
2876 }
2877
2878
2879 func (c *ProjectsLocationsChannelConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsChannelConnectionsTestIamPermissionsCall {
2880 c.ctx_ = ctx
2881 return c
2882 }
2883
2884
2885
2886 func (c *ProjectsLocationsChannelConnectionsTestIamPermissionsCall) Header() http.Header {
2887 if c.header_ == nil {
2888 c.header_ = make(http.Header)
2889 }
2890 return c.header_
2891 }
2892
2893 func (c *ProjectsLocationsChannelConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
2894 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2895 var body io.Reader = nil
2896 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
2897 if err != nil {
2898 return nil, err
2899 }
2900 c.urlParams_.Set("alt", alt)
2901 c.urlParams_.Set("prettyPrint", "false")
2902 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
2903 urls += "?" + c.urlParams_.Encode()
2904 req, err := http.NewRequest("POST", urls, body)
2905 if err != nil {
2906 return nil, err
2907 }
2908 req.Header = reqHeaders
2909 googleapi.Expand(req.URL, map[string]string{
2910 "resource": c.resource,
2911 })
2912 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2913 }
2914
2915
2916
2917
2918
2919
2920
2921 func (c *ProjectsLocationsChannelConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
2922 gensupport.SetOptions(c.urlParams_, opts...)
2923 res, err := c.doRequest("json")
2924 if res != nil && res.StatusCode == http.StatusNotModified {
2925 if res.Body != nil {
2926 res.Body.Close()
2927 }
2928 return nil, gensupport.WrapError(&googleapi.Error{
2929 Code: res.StatusCode,
2930 Header: res.Header,
2931 })
2932 }
2933 if err != nil {
2934 return nil, err
2935 }
2936 defer googleapi.CloseBody(res)
2937 if err := googleapi.CheckResponse(res); err != nil {
2938 return nil, gensupport.WrapError(err)
2939 }
2940 ret := &TestIamPermissionsResponse{
2941 ServerResponse: googleapi.ServerResponse{
2942 Header: res.Header,
2943 HTTPStatusCode: res.StatusCode,
2944 },
2945 }
2946 target := &ret
2947 if err := gensupport.DecodeResponse(target, res); err != nil {
2948 return nil, err
2949 }
2950 return ret, nil
2951 }
2952
2953 type ProjectsLocationsChannelsCreateCall struct {
2954 s *Service
2955 parent string
2956 channel *Channel
2957 urlParams_ gensupport.URLParams
2958 ctx_ context.Context
2959 header_ http.Header
2960 }
2961
2962
2963
2964
2965 func (r *ProjectsLocationsChannelsService) Create(parent string, channel *Channel) *ProjectsLocationsChannelsCreateCall {
2966 c := &ProjectsLocationsChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2967 c.parent = parent
2968 c.channel = channel
2969 return c
2970 }
2971
2972
2973
2974 func (c *ProjectsLocationsChannelsCreateCall) ChannelId(channelId string) *ProjectsLocationsChannelsCreateCall {
2975 c.urlParams_.Set("channelId", channelId)
2976 return c
2977 }
2978
2979
2980
2981 func (c *ProjectsLocationsChannelsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsChannelsCreateCall {
2982 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
2983 return c
2984 }
2985
2986
2987
2988
2989 func (c *ProjectsLocationsChannelsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelsCreateCall {
2990 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2991 return c
2992 }
2993
2994
2995 func (c *ProjectsLocationsChannelsCreateCall) Context(ctx context.Context) *ProjectsLocationsChannelsCreateCall {
2996 c.ctx_ = ctx
2997 return c
2998 }
2999
3000
3001
3002 func (c *ProjectsLocationsChannelsCreateCall) Header() http.Header {
3003 if c.header_ == nil {
3004 c.header_ = make(http.Header)
3005 }
3006 return c.header_
3007 }
3008
3009 func (c *ProjectsLocationsChannelsCreateCall) doRequest(alt string) (*http.Response, error) {
3010 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3011 var body io.Reader = nil
3012 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
3013 if err != nil {
3014 return nil, err
3015 }
3016 c.urlParams_.Set("alt", alt)
3017 c.urlParams_.Set("prettyPrint", "false")
3018 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/channels")
3019 urls += "?" + c.urlParams_.Encode()
3020 req, err := http.NewRequest("POST", urls, body)
3021 if err != nil {
3022 return nil, err
3023 }
3024 req.Header = reqHeaders
3025 googleapi.Expand(req.URL, map[string]string{
3026 "parent": c.parent,
3027 })
3028 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3029 }
3030
3031
3032
3033
3034
3035
3036
3037 func (c *ProjectsLocationsChannelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3038 gensupport.SetOptions(c.urlParams_, opts...)
3039 res, err := c.doRequest("json")
3040 if res != nil && res.StatusCode == http.StatusNotModified {
3041 if res.Body != nil {
3042 res.Body.Close()
3043 }
3044 return nil, gensupport.WrapError(&googleapi.Error{
3045 Code: res.StatusCode,
3046 Header: res.Header,
3047 })
3048 }
3049 if err != nil {
3050 return nil, err
3051 }
3052 defer googleapi.CloseBody(res)
3053 if err := googleapi.CheckResponse(res); err != nil {
3054 return nil, gensupport.WrapError(err)
3055 }
3056 ret := &GoogleLongrunningOperation{
3057 ServerResponse: googleapi.ServerResponse{
3058 Header: res.Header,
3059 HTTPStatusCode: res.StatusCode,
3060 },
3061 }
3062 target := &ret
3063 if err := gensupport.DecodeResponse(target, res); err != nil {
3064 return nil, err
3065 }
3066 return ret, nil
3067 }
3068
3069 type ProjectsLocationsChannelsDeleteCall struct {
3070 s *Service
3071 name string
3072 urlParams_ gensupport.URLParams
3073 ctx_ context.Context
3074 header_ http.Header
3075 }
3076
3077
3078
3079
3080 func (r *ProjectsLocationsChannelsService) Delete(name string) *ProjectsLocationsChannelsDeleteCall {
3081 c := &ProjectsLocationsChannelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3082 c.name = name
3083 return c
3084 }
3085
3086
3087
3088 func (c *ProjectsLocationsChannelsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsChannelsDeleteCall {
3089 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
3090 return c
3091 }
3092
3093
3094
3095
3096 func (c *ProjectsLocationsChannelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelsDeleteCall {
3097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3098 return c
3099 }
3100
3101
3102 func (c *ProjectsLocationsChannelsDeleteCall) Context(ctx context.Context) *ProjectsLocationsChannelsDeleteCall {
3103 c.ctx_ = ctx
3104 return c
3105 }
3106
3107
3108
3109 func (c *ProjectsLocationsChannelsDeleteCall) Header() http.Header {
3110 if c.header_ == nil {
3111 c.header_ = make(http.Header)
3112 }
3113 return c.header_
3114 }
3115
3116 func (c *ProjectsLocationsChannelsDeleteCall) doRequest(alt string) (*http.Response, error) {
3117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3118 var body io.Reader = nil
3119 c.urlParams_.Set("alt", alt)
3120 c.urlParams_.Set("prettyPrint", "false")
3121 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3122 urls += "?" + c.urlParams_.Encode()
3123 req, err := http.NewRequest("DELETE", urls, body)
3124 if err != nil {
3125 return nil, err
3126 }
3127 req.Header = reqHeaders
3128 googleapi.Expand(req.URL, map[string]string{
3129 "name": c.name,
3130 })
3131 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3132 }
3133
3134
3135
3136
3137
3138
3139
3140 func (c *ProjectsLocationsChannelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3141 gensupport.SetOptions(c.urlParams_, opts...)
3142 res, err := c.doRequest("json")
3143 if res != nil && res.StatusCode == http.StatusNotModified {
3144 if res.Body != nil {
3145 res.Body.Close()
3146 }
3147 return nil, gensupport.WrapError(&googleapi.Error{
3148 Code: res.StatusCode,
3149 Header: res.Header,
3150 })
3151 }
3152 if err != nil {
3153 return nil, err
3154 }
3155 defer googleapi.CloseBody(res)
3156 if err := googleapi.CheckResponse(res); err != nil {
3157 return nil, gensupport.WrapError(err)
3158 }
3159 ret := &GoogleLongrunningOperation{
3160 ServerResponse: googleapi.ServerResponse{
3161 Header: res.Header,
3162 HTTPStatusCode: res.StatusCode,
3163 },
3164 }
3165 target := &ret
3166 if err := gensupport.DecodeResponse(target, res); err != nil {
3167 return nil, err
3168 }
3169 return ret, nil
3170 }
3171
3172 type ProjectsLocationsChannelsGetCall struct {
3173 s *Service
3174 name string
3175 urlParams_ gensupport.URLParams
3176 ifNoneMatch_ string
3177 ctx_ context.Context
3178 header_ http.Header
3179 }
3180
3181
3182
3183
3184 func (r *ProjectsLocationsChannelsService) Get(name string) *ProjectsLocationsChannelsGetCall {
3185 c := &ProjectsLocationsChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3186 c.name = name
3187 return c
3188 }
3189
3190
3191
3192
3193 func (c *ProjectsLocationsChannelsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelsGetCall {
3194 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3195 return c
3196 }
3197
3198
3199
3200
3201 func (c *ProjectsLocationsChannelsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsChannelsGetCall {
3202 c.ifNoneMatch_ = entityTag
3203 return c
3204 }
3205
3206
3207 func (c *ProjectsLocationsChannelsGetCall) Context(ctx context.Context) *ProjectsLocationsChannelsGetCall {
3208 c.ctx_ = ctx
3209 return c
3210 }
3211
3212
3213
3214 func (c *ProjectsLocationsChannelsGetCall) Header() http.Header {
3215 if c.header_ == nil {
3216 c.header_ = make(http.Header)
3217 }
3218 return c.header_
3219 }
3220
3221 func (c *ProjectsLocationsChannelsGetCall) doRequest(alt string) (*http.Response, error) {
3222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3223 if c.ifNoneMatch_ != "" {
3224 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3225 }
3226 var body io.Reader = nil
3227 c.urlParams_.Set("alt", alt)
3228 c.urlParams_.Set("prettyPrint", "false")
3229 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3230 urls += "?" + c.urlParams_.Encode()
3231 req, err := http.NewRequest("GET", urls, body)
3232 if err != nil {
3233 return nil, err
3234 }
3235 req.Header = reqHeaders
3236 googleapi.Expand(req.URL, map[string]string{
3237 "name": c.name,
3238 })
3239 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3240 }
3241
3242
3243
3244
3245
3246
3247 func (c *ProjectsLocationsChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) {
3248 gensupport.SetOptions(c.urlParams_, opts...)
3249 res, err := c.doRequest("json")
3250 if res != nil && res.StatusCode == http.StatusNotModified {
3251 if res.Body != nil {
3252 res.Body.Close()
3253 }
3254 return nil, gensupport.WrapError(&googleapi.Error{
3255 Code: res.StatusCode,
3256 Header: res.Header,
3257 })
3258 }
3259 if err != nil {
3260 return nil, err
3261 }
3262 defer googleapi.CloseBody(res)
3263 if err := googleapi.CheckResponse(res); err != nil {
3264 return nil, gensupport.WrapError(err)
3265 }
3266 ret := &Channel{
3267 ServerResponse: googleapi.ServerResponse{
3268 Header: res.Header,
3269 HTTPStatusCode: res.StatusCode,
3270 },
3271 }
3272 target := &ret
3273 if err := gensupport.DecodeResponse(target, res); err != nil {
3274 return nil, err
3275 }
3276 return ret, nil
3277 }
3278
3279 type ProjectsLocationsChannelsGetIamPolicyCall struct {
3280 s *Service
3281 resource string
3282 urlParams_ gensupport.URLParams
3283 ifNoneMatch_ string
3284 ctx_ context.Context
3285 header_ http.Header
3286 }
3287
3288
3289
3290
3291
3292
3293
3294 func (r *ProjectsLocationsChannelsService) GetIamPolicy(resource string) *ProjectsLocationsChannelsGetIamPolicyCall {
3295 c := &ProjectsLocationsChannelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3296 c.resource = resource
3297 return c
3298 }
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312 func (c *ProjectsLocationsChannelsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsChannelsGetIamPolicyCall {
3313 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
3314 return c
3315 }
3316
3317
3318
3319
3320 func (c *ProjectsLocationsChannelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelsGetIamPolicyCall {
3321 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3322 return c
3323 }
3324
3325
3326
3327
3328 func (c *ProjectsLocationsChannelsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsChannelsGetIamPolicyCall {
3329 c.ifNoneMatch_ = entityTag
3330 return c
3331 }
3332
3333
3334 func (c *ProjectsLocationsChannelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsChannelsGetIamPolicyCall {
3335 c.ctx_ = ctx
3336 return c
3337 }
3338
3339
3340
3341 func (c *ProjectsLocationsChannelsGetIamPolicyCall) Header() http.Header {
3342 if c.header_ == nil {
3343 c.header_ = make(http.Header)
3344 }
3345 return c.header_
3346 }
3347
3348 func (c *ProjectsLocationsChannelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3349 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3350 if c.ifNoneMatch_ != "" {
3351 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3352 }
3353 var body io.Reader = nil
3354 c.urlParams_.Set("alt", alt)
3355 c.urlParams_.Set("prettyPrint", "false")
3356 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
3357 urls += "?" + c.urlParams_.Encode()
3358 req, err := http.NewRequest("GET", urls, body)
3359 if err != nil {
3360 return nil, err
3361 }
3362 req.Header = reqHeaders
3363 googleapi.Expand(req.URL, map[string]string{
3364 "resource": c.resource,
3365 })
3366 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3367 }
3368
3369
3370
3371
3372
3373
3374 func (c *ProjectsLocationsChannelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3375 gensupport.SetOptions(c.urlParams_, opts...)
3376 res, err := c.doRequest("json")
3377 if res != nil && res.StatusCode == http.StatusNotModified {
3378 if res.Body != nil {
3379 res.Body.Close()
3380 }
3381 return nil, gensupport.WrapError(&googleapi.Error{
3382 Code: res.StatusCode,
3383 Header: res.Header,
3384 })
3385 }
3386 if err != nil {
3387 return nil, err
3388 }
3389 defer googleapi.CloseBody(res)
3390 if err := googleapi.CheckResponse(res); err != nil {
3391 return nil, gensupport.WrapError(err)
3392 }
3393 ret := &Policy{
3394 ServerResponse: googleapi.ServerResponse{
3395 Header: res.Header,
3396 HTTPStatusCode: res.StatusCode,
3397 },
3398 }
3399 target := &ret
3400 if err := gensupport.DecodeResponse(target, res); err != nil {
3401 return nil, err
3402 }
3403 return ret, nil
3404 }
3405
3406 type ProjectsLocationsChannelsListCall struct {
3407 s *Service
3408 parent string
3409 urlParams_ gensupport.URLParams
3410 ifNoneMatch_ string
3411 ctx_ context.Context
3412 header_ http.Header
3413 }
3414
3415
3416
3417
3418 func (r *ProjectsLocationsChannelsService) List(parent string) *ProjectsLocationsChannelsListCall {
3419 c := &ProjectsLocationsChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3420 c.parent = parent
3421 return c
3422 }
3423
3424
3425
3426
3427
3428 func (c *ProjectsLocationsChannelsListCall) OrderBy(orderBy string) *ProjectsLocationsChannelsListCall {
3429 c.urlParams_.Set("orderBy", orderBy)
3430 return c
3431 }
3432
3433
3434
3435 func (c *ProjectsLocationsChannelsListCall) PageSize(pageSize int64) *ProjectsLocationsChannelsListCall {
3436 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3437 return c
3438 }
3439
3440
3441
3442
3443
3444 func (c *ProjectsLocationsChannelsListCall) PageToken(pageToken string) *ProjectsLocationsChannelsListCall {
3445 c.urlParams_.Set("pageToken", pageToken)
3446 return c
3447 }
3448
3449
3450
3451
3452 func (c *ProjectsLocationsChannelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelsListCall {
3453 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3454 return c
3455 }
3456
3457
3458
3459
3460 func (c *ProjectsLocationsChannelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsChannelsListCall {
3461 c.ifNoneMatch_ = entityTag
3462 return c
3463 }
3464
3465
3466 func (c *ProjectsLocationsChannelsListCall) Context(ctx context.Context) *ProjectsLocationsChannelsListCall {
3467 c.ctx_ = ctx
3468 return c
3469 }
3470
3471
3472
3473 func (c *ProjectsLocationsChannelsListCall) Header() http.Header {
3474 if c.header_ == nil {
3475 c.header_ = make(http.Header)
3476 }
3477 return c.header_
3478 }
3479
3480 func (c *ProjectsLocationsChannelsListCall) doRequest(alt string) (*http.Response, error) {
3481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3482 if c.ifNoneMatch_ != "" {
3483 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3484 }
3485 var body io.Reader = nil
3486 c.urlParams_.Set("alt", alt)
3487 c.urlParams_.Set("prettyPrint", "false")
3488 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/channels")
3489 urls += "?" + c.urlParams_.Encode()
3490 req, err := http.NewRequest("GET", urls, body)
3491 if err != nil {
3492 return nil, err
3493 }
3494 req.Header = reqHeaders
3495 googleapi.Expand(req.URL, map[string]string{
3496 "parent": c.parent,
3497 })
3498 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3499 }
3500
3501
3502
3503
3504
3505
3506
3507 func (c *ProjectsLocationsChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) {
3508 gensupport.SetOptions(c.urlParams_, opts...)
3509 res, err := c.doRequest("json")
3510 if res != nil && res.StatusCode == http.StatusNotModified {
3511 if res.Body != nil {
3512 res.Body.Close()
3513 }
3514 return nil, gensupport.WrapError(&googleapi.Error{
3515 Code: res.StatusCode,
3516 Header: res.Header,
3517 })
3518 }
3519 if err != nil {
3520 return nil, err
3521 }
3522 defer googleapi.CloseBody(res)
3523 if err := googleapi.CheckResponse(res); err != nil {
3524 return nil, gensupport.WrapError(err)
3525 }
3526 ret := &ListChannelsResponse{
3527 ServerResponse: googleapi.ServerResponse{
3528 Header: res.Header,
3529 HTTPStatusCode: res.StatusCode,
3530 },
3531 }
3532 target := &ret
3533 if err := gensupport.DecodeResponse(target, res); err != nil {
3534 return nil, err
3535 }
3536 return ret, nil
3537 }
3538
3539
3540
3541
3542 func (c *ProjectsLocationsChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error {
3543 c.ctx_ = ctx
3544 defer c.PageToken(c.urlParams_.Get("pageToken"))
3545 for {
3546 x, err := c.Do()
3547 if err != nil {
3548 return err
3549 }
3550 if err := f(x); err != nil {
3551 return err
3552 }
3553 if x.NextPageToken == "" {
3554 return nil
3555 }
3556 c.PageToken(x.NextPageToken)
3557 }
3558 }
3559
3560 type ProjectsLocationsChannelsPatchCall struct {
3561 s *Service
3562 name string
3563 channel *Channel
3564 urlParams_ gensupport.URLParams
3565 ctx_ context.Context
3566 header_ http.Header
3567 }
3568
3569
3570
3571
3572
3573
3574 func (r *ProjectsLocationsChannelsService) Patch(name string, channel *Channel) *ProjectsLocationsChannelsPatchCall {
3575 c := &ProjectsLocationsChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3576 c.name = name
3577 c.channel = channel
3578 return c
3579 }
3580
3581
3582
3583
3584
3585 func (c *ProjectsLocationsChannelsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsChannelsPatchCall {
3586 c.urlParams_.Set("updateMask", updateMask)
3587 return c
3588 }
3589
3590
3591
3592 func (c *ProjectsLocationsChannelsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsChannelsPatchCall {
3593 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
3594 return c
3595 }
3596
3597
3598
3599
3600 func (c *ProjectsLocationsChannelsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelsPatchCall {
3601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3602 return c
3603 }
3604
3605
3606 func (c *ProjectsLocationsChannelsPatchCall) Context(ctx context.Context) *ProjectsLocationsChannelsPatchCall {
3607 c.ctx_ = ctx
3608 return c
3609 }
3610
3611
3612
3613 func (c *ProjectsLocationsChannelsPatchCall) Header() http.Header {
3614 if c.header_ == nil {
3615 c.header_ = make(http.Header)
3616 }
3617 return c.header_
3618 }
3619
3620 func (c *ProjectsLocationsChannelsPatchCall) doRequest(alt string) (*http.Response, error) {
3621 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3622 var body io.Reader = nil
3623 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
3624 if err != nil {
3625 return nil, err
3626 }
3627 c.urlParams_.Set("alt", alt)
3628 c.urlParams_.Set("prettyPrint", "false")
3629 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3630 urls += "?" + c.urlParams_.Encode()
3631 req, err := http.NewRequest("PATCH", urls, body)
3632 if err != nil {
3633 return nil, err
3634 }
3635 req.Header = reqHeaders
3636 googleapi.Expand(req.URL, map[string]string{
3637 "name": c.name,
3638 })
3639 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3640 }
3641
3642
3643
3644
3645
3646
3647
3648 func (c *ProjectsLocationsChannelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3649 gensupport.SetOptions(c.urlParams_, opts...)
3650 res, err := c.doRequest("json")
3651 if res != nil && res.StatusCode == http.StatusNotModified {
3652 if res.Body != nil {
3653 res.Body.Close()
3654 }
3655 return nil, gensupport.WrapError(&googleapi.Error{
3656 Code: res.StatusCode,
3657 Header: res.Header,
3658 })
3659 }
3660 if err != nil {
3661 return nil, err
3662 }
3663 defer googleapi.CloseBody(res)
3664 if err := googleapi.CheckResponse(res); err != nil {
3665 return nil, gensupport.WrapError(err)
3666 }
3667 ret := &GoogleLongrunningOperation{
3668 ServerResponse: googleapi.ServerResponse{
3669 Header: res.Header,
3670 HTTPStatusCode: res.StatusCode,
3671 },
3672 }
3673 target := &ret
3674 if err := gensupport.DecodeResponse(target, res); err != nil {
3675 return nil, err
3676 }
3677 return ret, nil
3678 }
3679
3680 type ProjectsLocationsChannelsSetIamPolicyCall struct {
3681 s *Service
3682 resource string
3683 setiampolicyrequest *SetIamPolicyRequest
3684 urlParams_ gensupport.URLParams
3685 ctx_ context.Context
3686 header_ http.Header
3687 }
3688
3689
3690
3691
3692
3693
3694
3695
3696 func (r *ProjectsLocationsChannelsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsChannelsSetIamPolicyCall {
3697 c := &ProjectsLocationsChannelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3698 c.resource = resource
3699 c.setiampolicyrequest = setiampolicyrequest
3700 return c
3701 }
3702
3703
3704
3705
3706 func (c *ProjectsLocationsChannelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelsSetIamPolicyCall {
3707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3708 return c
3709 }
3710
3711
3712 func (c *ProjectsLocationsChannelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsChannelsSetIamPolicyCall {
3713 c.ctx_ = ctx
3714 return c
3715 }
3716
3717
3718
3719 func (c *ProjectsLocationsChannelsSetIamPolicyCall) Header() http.Header {
3720 if c.header_ == nil {
3721 c.header_ = make(http.Header)
3722 }
3723 return c.header_
3724 }
3725
3726 func (c *ProjectsLocationsChannelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3727 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3728 var body io.Reader = nil
3729 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
3730 if err != nil {
3731 return nil, err
3732 }
3733 c.urlParams_.Set("alt", alt)
3734 c.urlParams_.Set("prettyPrint", "false")
3735 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
3736 urls += "?" + c.urlParams_.Encode()
3737 req, err := http.NewRequest("POST", urls, body)
3738 if err != nil {
3739 return nil, err
3740 }
3741 req.Header = reqHeaders
3742 googleapi.Expand(req.URL, map[string]string{
3743 "resource": c.resource,
3744 })
3745 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3746 }
3747
3748
3749
3750
3751
3752
3753 func (c *ProjectsLocationsChannelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3754 gensupport.SetOptions(c.urlParams_, opts...)
3755 res, err := c.doRequest("json")
3756 if res != nil && res.StatusCode == http.StatusNotModified {
3757 if res.Body != nil {
3758 res.Body.Close()
3759 }
3760 return nil, gensupport.WrapError(&googleapi.Error{
3761 Code: res.StatusCode,
3762 Header: res.Header,
3763 })
3764 }
3765 if err != nil {
3766 return nil, err
3767 }
3768 defer googleapi.CloseBody(res)
3769 if err := googleapi.CheckResponse(res); err != nil {
3770 return nil, gensupport.WrapError(err)
3771 }
3772 ret := &Policy{
3773 ServerResponse: googleapi.ServerResponse{
3774 Header: res.Header,
3775 HTTPStatusCode: res.StatusCode,
3776 },
3777 }
3778 target := &ret
3779 if err := gensupport.DecodeResponse(target, res); err != nil {
3780 return nil, err
3781 }
3782 return ret, nil
3783 }
3784
3785 type ProjectsLocationsChannelsTestIamPermissionsCall struct {
3786 s *Service
3787 resource string
3788 testiampermissionsrequest *TestIamPermissionsRequest
3789 urlParams_ gensupport.URLParams
3790 ctx_ context.Context
3791 header_ http.Header
3792 }
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804 func (r *ProjectsLocationsChannelsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsChannelsTestIamPermissionsCall {
3805 c := &ProjectsLocationsChannelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3806 c.resource = resource
3807 c.testiampermissionsrequest = testiampermissionsrequest
3808 return c
3809 }
3810
3811
3812
3813
3814 func (c *ProjectsLocationsChannelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsChannelsTestIamPermissionsCall {
3815 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3816 return c
3817 }
3818
3819
3820 func (c *ProjectsLocationsChannelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsChannelsTestIamPermissionsCall {
3821 c.ctx_ = ctx
3822 return c
3823 }
3824
3825
3826
3827 func (c *ProjectsLocationsChannelsTestIamPermissionsCall) Header() http.Header {
3828 if c.header_ == nil {
3829 c.header_ = make(http.Header)
3830 }
3831 return c.header_
3832 }
3833
3834 func (c *ProjectsLocationsChannelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
3835 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3836 var body io.Reader = nil
3837 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
3838 if err != nil {
3839 return nil, err
3840 }
3841 c.urlParams_.Set("alt", alt)
3842 c.urlParams_.Set("prettyPrint", "false")
3843 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
3844 urls += "?" + c.urlParams_.Encode()
3845 req, err := http.NewRequest("POST", urls, body)
3846 if err != nil {
3847 return nil, err
3848 }
3849 req.Header = reqHeaders
3850 googleapi.Expand(req.URL, map[string]string{
3851 "resource": c.resource,
3852 })
3853 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3854 }
3855
3856
3857
3858
3859
3860
3861
3862 func (c *ProjectsLocationsChannelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
3863 gensupport.SetOptions(c.urlParams_, opts...)
3864 res, err := c.doRequest("json")
3865 if res != nil && res.StatusCode == http.StatusNotModified {
3866 if res.Body != nil {
3867 res.Body.Close()
3868 }
3869 return nil, gensupport.WrapError(&googleapi.Error{
3870 Code: res.StatusCode,
3871 Header: res.Header,
3872 })
3873 }
3874 if err != nil {
3875 return nil, err
3876 }
3877 defer googleapi.CloseBody(res)
3878 if err := googleapi.CheckResponse(res); err != nil {
3879 return nil, gensupport.WrapError(err)
3880 }
3881 ret := &TestIamPermissionsResponse{
3882 ServerResponse: googleapi.ServerResponse{
3883 Header: res.Header,
3884 HTTPStatusCode: res.StatusCode,
3885 },
3886 }
3887 target := &ret
3888 if err := gensupport.DecodeResponse(target, res); err != nil {
3889 return nil, err
3890 }
3891 return ret, nil
3892 }
3893
3894 type ProjectsLocationsOperationsCancelCall struct {
3895 s *Service
3896 name string
3897 googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest
3898 urlParams_ gensupport.URLParams
3899 ctx_ context.Context
3900 header_ http.Header
3901 }
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914 func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
3915 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3916 c.name = name
3917 c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest
3918 return c
3919 }
3920
3921
3922
3923
3924 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
3925 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3926 return c
3927 }
3928
3929
3930 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
3931 c.ctx_ = ctx
3932 return c
3933 }
3934
3935
3936
3937 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
3938 if c.header_ == nil {
3939 c.header_ = make(http.Header)
3940 }
3941 return c.header_
3942 }
3943
3944 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
3945 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3946 var body io.Reader = nil
3947 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest)
3948 if err != nil {
3949 return nil, err
3950 }
3951 c.urlParams_.Set("alt", alt)
3952 c.urlParams_.Set("prettyPrint", "false")
3953 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
3954 urls += "?" + c.urlParams_.Encode()
3955 req, err := http.NewRequest("POST", urls, body)
3956 if err != nil {
3957 return nil, err
3958 }
3959 req.Header = reqHeaders
3960 googleapi.Expand(req.URL, map[string]string{
3961 "name": c.name,
3962 })
3963 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3964 }
3965
3966
3967
3968
3969
3970
3971 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3972 gensupport.SetOptions(c.urlParams_, opts...)
3973 res, err := c.doRequest("json")
3974 if res != nil && res.StatusCode == http.StatusNotModified {
3975 if res.Body != nil {
3976 res.Body.Close()
3977 }
3978 return nil, gensupport.WrapError(&googleapi.Error{
3979 Code: res.StatusCode,
3980 Header: res.Header,
3981 })
3982 }
3983 if err != nil {
3984 return nil, err
3985 }
3986 defer googleapi.CloseBody(res)
3987 if err := googleapi.CheckResponse(res); err != nil {
3988 return nil, gensupport.WrapError(err)
3989 }
3990 ret := &Empty{
3991 ServerResponse: googleapi.ServerResponse{
3992 Header: res.Header,
3993 HTTPStatusCode: res.StatusCode,
3994 },
3995 }
3996 target := &ret
3997 if err := gensupport.DecodeResponse(target, res); err != nil {
3998 return nil, err
3999 }
4000 return ret, nil
4001 }
4002
4003 type ProjectsLocationsOperationsDeleteCall struct {
4004 s *Service
4005 name string
4006 urlParams_ gensupport.URLParams
4007 ctx_ context.Context
4008 header_ http.Header
4009 }
4010
4011
4012
4013
4014
4015
4016
4017 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
4018 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4019 c.name = name
4020 return c
4021 }
4022
4023
4024
4025
4026 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
4027 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4028 return c
4029 }
4030
4031
4032 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
4033 c.ctx_ = ctx
4034 return c
4035 }
4036
4037
4038
4039 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
4040 if c.header_ == nil {
4041 c.header_ = make(http.Header)
4042 }
4043 return c.header_
4044 }
4045
4046 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
4047 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4048 var body io.Reader = nil
4049 c.urlParams_.Set("alt", alt)
4050 c.urlParams_.Set("prettyPrint", "false")
4051 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4052 urls += "?" + c.urlParams_.Encode()
4053 req, err := http.NewRequest("DELETE", urls, body)
4054 if err != nil {
4055 return nil, err
4056 }
4057 req.Header = reqHeaders
4058 googleapi.Expand(req.URL, map[string]string{
4059 "name": c.name,
4060 })
4061 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4062 }
4063
4064
4065
4066
4067
4068
4069 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4070 gensupport.SetOptions(c.urlParams_, opts...)
4071 res, err := c.doRequest("json")
4072 if res != nil && res.StatusCode == http.StatusNotModified {
4073 if res.Body != nil {
4074 res.Body.Close()
4075 }
4076 return nil, gensupport.WrapError(&googleapi.Error{
4077 Code: res.StatusCode,
4078 Header: res.Header,
4079 })
4080 }
4081 if err != nil {
4082 return nil, err
4083 }
4084 defer googleapi.CloseBody(res)
4085 if err := googleapi.CheckResponse(res); err != nil {
4086 return nil, gensupport.WrapError(err)
4087 }
4088 ret := &Empty{
4089 ServerResponse: googleapi.ServerResponse{
4090 Header: res.Header,
4091 HTTPStatusCode: res.StatusCode,
4092 },
4093 }
4094 target := &ret
4095 if err := gensupport.DecodeResponse(target, res); err != nil {
4096 return nil, err
4097 }
4098 return ret, nil
4099 }
4100
4101 type ProjectsLocationsOperationsGetCall struct {
4102 s *Service
4103 name string
4104 urlParams_ gensupport.URLParams
4105 ifNoneMatch_ string
4106 ctx_ context.Context
4107 header_ http.Header
4108 }
4109
4110
4111
4112
4113
4114
4115 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
4116 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4117 c.name = name
4118 return c
4119 }
4120
4121
4122
4123
4124 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
4125 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4126 return c
4127 }
4128
4129
4130
4131
4132 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
4133 c.ifNoneMatch_ = entityTag
4134 return c
4135 }
4136
4137
4138 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
4139 c.ctx_ = ctx
4140 return c
4141 }
4142
4143
4144
4145 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4146 if c.header_ == nil {
4147 c.header_ = make(http.Header)
4148 }
4149 return c.header_
4150 }
4151
4152 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4153 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4154 if c.ifNoneMatch_ != "" {
4155 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4156 }
4157 var body io.Reader = nil
4158 c.urlParams_.Set("alt", alt)
4159 c.urlParams_.Set("prettyPrint", "false")
4160 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4161 urls += "?" + c.urlParams_.Encode()
4162 req, err := http.NewRequest("GET", urls, body)
4163 if err != nil {
4164 return nil, err
4165 }
4166 req.Header = reqHeaders
4167 googleapi.Expand(req.URL, map[string]string{
4168 "name": c.name,
4169 })
4170 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4171 }
4172
4173
4174
4175
4176
4177
4178
4179 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4180 gensupport.SetOptions(c.urlParams_, opts...)
4181 res, err := c.doRequest("json")
4182 if res != nil && res.StatusCode == http.StatusNotModified {
4183 if res.Body != nil {
4184 res.Body.Close()
4185 }
4186 return nil, gensupport.WrapError(&googleapi.Error{
4187 Code: res.StatusCode,
4188 Header: res.Header,
4189 })
4190 }
4191 if err != nil {
4192 return nil, err
4193 }
4194 defer googleapi.CloseBody(res)
4195 if err := googleapi.CheckResponse(res); err != nil {
4196 return nil, gensupport.WrapError(err)
4197 }
4198 ret := &GoogleLongrunningOperation{
4199 ServerResponse: googleapi.ServerResponse{
4200 Header: res.Header,
4201 HTTPStatusCode: res.StatusCode,
4202 },
4203 }
4204 target := &ret
4205 if err := gensupport.DecodeResponse(target, res); err != nil {
4206 return nil, err
4207 }
4208 return ret, nil
4209 }
4210
4211 type ProjectsLocationsOperationsListCall struct {
4212 s *Service
4213 name string
4214 urlParams_ gensupport.URLParams
4215 ifNoneMatch_ string
4216 ctx_ context.Context
4217 header_ http.Header
4218 }
4219
4220
4221
4222
4223
4224 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4225 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4226 c.name = name
4227 return c
4228 }
4229
4230
4231 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4232 c.urlParams_.Set("filter", filter)
4233 return c
4234 }
4235
4236
4237
4238 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4239 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4240 return c
4241 }
4242
4243
4244
4245 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4246 c.urlParams_.Set("pageToken", pageToken)
4247 return c
4248 }
4249
4250
4251
4252
4253 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
4254 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4255 return c
4256 }
4257
4258
4259
4260
4261 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
4262 c.ifNoneMatch_ = entityTag
4263 return c
4264 }
4265
4266
4267 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
4268 c.ctx_ = ctx
4269 return c
4270 }
4271
4272
4273
4274 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
4275 if c.header_ == nil {
4276 c.header_ = make(http.Header)
4277 }
4278 return c.header_
4279 }
4280
4281 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4282 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4283 if c.ifNoneMatch_ != "" {
4284 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4285 }
4286 var body io.Reader = nil
4287 c.urlParams_.Set("alt", alt)
4288 c.urlParams_.Set("prettyPrint", "false")
4289 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
4290 urls += "?" + c.urlParams_.Encode()
4291 req, err := http.NewRequest("GET", urls, body)
4292 if err != nil {
4293 return nil, err
4294 }
4295 req.Header = reqHeaders
4296 googleapi.Expand(req.URL, map[string]string{
4297 "name": c.name,
4298 })
4299 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4300 }
4301
4302
4303
4304
4305
4306
4307
4308 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
4309 gensupport.SetOptions(c.urlParams_, opts...)
4310 res, err := c.doRequest("json")
4311 if res != nil && res.StatusCode == http.StatusNotModified {
4312 if res.Body != nil {
4313 res.Body.Close()
4314 }
4315 return nil, gensupport.WrapError(&googleapi.Error{
4316 Code: res.StatusCode,
4317 Header: res.Header,
4318 })
4319 }
4320 if err != nil {
4321 return nil, err
4322 }
4323 defer googleapi.CloseBody(res)
4324 if err := googleapi.CheckResponse(res); err != nil {
4325 return nil, gensupport.WrapError(err)
4326 }
4327 ret := &GoogleLongrunningListOperationsResponse{
4328 ServerResponse: googleapi.ServerResponse{
4329 Header: res.Header,
4330 HTTPStatusCode: res.StatusCode,
4331 },
4332 }
4333 target := &ret
4334 if err := gensupport.DecodeResponse(target, res); err != nil {
4335 return nil, err
4336 }
4337 return ret, nil
4338 }
4339
4340
4341
4342
4343 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
4344 c.ctx_ = ctx
4345 defer c.PageToken(c.urlParams_.Get("pageToken"))
4346 for {
4347 x, err := c.Do()
4348 if err != nil {
4349 return err
4350 }
4351 if err := f(x); err != nil {
4352 return err
4353 }
4354 if x.NextPageToken == "" {
4355 return nil
4356 }
4357 c.PageToken(x.NextPageToken)
4358 }
4359 }
4360
4361 type ProjectsLocationsProvidersGetCall struct {
4362 s *Service
4363 name string
4364 urlParams_ gensupport.URLParams
4365 ifNoneMatch_ string
4366 ctx_ context.Context
4367 header_ http.Header
4368 }
4369
4370
4371
4372
4373 func (r *ProjectsLocationsProvidersService) Get(name string) *ProjectsLocationsProvidersGetCall {
4374 c := &ProjectsLocationsProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4375 c.name = name
4376 return c
4377 }
4378
4379
4380
4381
4382 func (c *ProjectsLocationsProvidersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvidersGetCall {
4383 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4384 return c
4385 }
4386
4387
4388
4389
4390 func (c *ProjectsLocationsProvidersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvidersGetCall {
4391 c.ifNoneMatch_ = entityTag
4392 return c
4393 }
4394
4395
4396 func (c *ProjectsLocationsProvidersGetCall) Context(ctx context.Context) *ProjectsLocationsProvidersGetCall {
4397 c.ctx_ = ctx
4398 return c
4399 }
4400
4401
4402
4403 func (c *ProjectsLocationsProvidersGetCall) Header() http.Header {
4404 if c.header_ == nil {
4405 c.header_ = make(http.Header)
4406 }
4407 return c.header_
4408 }
4409
4410 func (c *ProjectsLocationsProvidersGetCall) doRequest(alt string) (*http.Response, error) {
4411 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4412 if c.ifNoneMatch_ != "" {
4413 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4414 }
4415 var body io.Reader = nil
4416 c.urlParams_.Set("alt", alt)
4417 c.urlParams_.Set("prettyPrint", "false")
4418 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4419 urls += "?" + c.urlParams_.Encode()
4420 req, err := http.NewRequest("GET", urls, body)
4421 if err != nil {
4422 return nil, err
4423 }
4424 req.Header = reqHeaders
4425 googleapi.Expand(req.URL, map[string]string{
4426 "name": c.name,
4427 })
4428 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4429 }
4430
4431
4432
4433
4434
4435
4436 func (c *ProjectsLocationsProvidersGetCall) Do(opts ...googleapi.CallOption) (*Provider, error) {
4437 gensupport.SetOptions(c.urlParams_, opts...)
4438 res, err := c.doRequest("json")
4439 if res != nil && res.StatusCode == http.StatusNotModified {
4440 if res.Body != nil {
4441 res.Body.Close()
4442 }
4443 return nil, gensupport.WrapError(&googleapi.Error{
4444 Code: res.StatusCode,
4445 Header: res.Header,
4446 })
4447 }
4448 if err != nil {
4449 return nil, err
4450 }
4451 defer googleapi.CloseBody(res)
4452 if err := googleapi.CheckResponse(res); err != nil {
4453 return nil, gensupport.WrapError(err)
4454 }
4455 ret := &Provider{
4456 ServerResponse: googleapi.ServerResponse{
4457 Header: res.Header,
4458 HTTPStatusCode: res.StatusCode,
4459 },
4460 }
4461 target := &ret
4462 if err := gensupport.DecodeResponse(target, res); err != nil {
4463 return nil, err
4464 }
4465 return ret, nil
4466 }
4467
4468 type ProjectsLocationsProvidersListCall struct {
4469 s *Service
4470 parent string
4471 urlParams_ gensupport.URLParams
4472 ifNoneMatch_ string
4473 ctx_ context.Context
4474 header_ http.Header
4475 }
4476
4477
4478
4479
4480 func (r *ProjectsLocationsProvidersService) List(parent string) *ProjectsLocationsProvidersListCall {
4481 c := &ProjectsLocationsProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4482 c.parent = parent
4483 return c
4484 }
4485
4486
4487
4488 func (c *ProjectsLocationsProvidersListCall) Filter(filter string) *ProjectsLocationsProvidersListCall {
4489 c.urlParams_.Set("filter", filter)
4490 return c
4491 }
4492
4493
4494
4495
4496
4497 func (c *ProjectsLocationsProvidersListCall) OrderBy(orderBy string) *ProjectsLocationsProvidersListCall {
4498 c.urlParams_.Set("orderBy", orderBy)
4499 return c
4500 }
4501
4502
4503
4504 func (c *ProjectsLocationsProvidersListCall) PageSize(pageSize int64) *ProjectsLocationsProvidersListCall {
4505 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4506 return c
4507 }
4508
4509
4510
4511
4512
4513
4514 func (c *ProjectsLocationsProvidersListCall) PageToken(pageToken string) *ProjectsLocationsProvidersListCall {
4515 c.urlParams_.Set("pageToken", pageToken)
4516 return c
4517 }
4518
4519
4520
4521
4522 func (c *ProjectsLocationsProvidersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvidersListCall {
4523 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4524 return c
4525 }
4526
4527
4528
4529
4530 func (c *ProjectsLocationsProvidersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvidersListCall {
4531 c.ifNoneMatch_ = entityTag
4532 return c
4533 }
4534
4535
4536 func (c *ProjectsLocationsProvidersListCall) Context(ctx context.Context) *ProjectsLocationsProvidersListCall {
4537 c.ctx_ = ctx
4538 return c
4539 }
4540
4541
4542
4543 func (c *ProjectsLocationsProvidersListCall) Header() http.Header {
4544 if c.header_ == nil {
4545 c.header_ = make(http.Header)
4546 }
4547 return c.header_
4548 }
4549
4550 func (c *ProjectsLocationsProvidersListCall) doRequest(alt string) (*http.Response, error) {
4551 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4552 if c.ifNoneMatch_ != "" {
4553 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4554 }
4555 var body io.Reader = nil
4556 c.urlParams_.Set("alt", alt)
4557 c.urlParams_.Set("prettyPrint", "false")
4558 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/providers")
4559 urls += "?" + c.urlParams_.Encode()
4560 req, err := http.NewRequest("GET", urls, body)
4561 if err != nil {
4562 return nil, err
4563 }
4564 req.Header = reqHeaders
4565 googleapi.Expand(req.URL, map[string]string{
4566 "parent": c.parent,
4567 })
4568 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4569 }
4570
4571
4572
4573
4574
4575
4576
4577 func (c *ProjectsLocationsProvidersListCall) Do(opts ...googleapi.CallOption) (*ListProvidersResponse, error) {
4578 gensupport.SetOptions(c.urlParams_, opts...)
4579 res, err := c.doRequest("json")
4580 if res != nil && res.StatusCode == http.StatusNotModified {
4581 if res.Body != nil {
4582 res.Body.Close()
4583 }
4584 return nil, gensupport.WrapError(&googleapi.Error{
4585 Code: res.StatusCode,
4586 Header: res.Header,
4587 })
4588 }
4589 if err != nil {
4590 return nil, err
4591 }
4592 defer googleapi.CloseBody(res)
4593 if err := googleapi.CheckResponse(res); err != nil {
4594 return nil, gensupport.WrapError(err)
4595 }
4596 ret := &ListProvidersResponse{
4597 ServerResponse: googleapi.ServerResponse{
4598 Header: res.Header,
4599 HTTPStatusCode: res.StatusCode,
4600 },
4601 }
4602 target := &ret
4603 if err := gensupport.DecodeResponse(target, res); err != nil {
4604 return nil, err
4605 }
4606 return ret, nil
4607 }
4608
4609
4610
4611
4612 func (c *ProjectsLocationsProvidersListCall) Pages(ctx context.Context, f func(*ListProvidersResponse) error) error {
4613 c.ctx_ = ctx
4614 defer c.PageToken(c.urlParams_.Get("pageToken"))
4615 for {
4616 x, err := c.Do()
4617 if err != nil {
4618 return err
4619 }
4620 if err := f(x); err != nil {
4621 return err
4622 }
4623 if x.NextPageToken == "" {
4624 return nil
4625 }
4626 c.PageToken(x.NextPageToken)
4627 }
4628 }
4629
4630 type ProjectsLocationsTriggersCreateCall struct {
4631 s *Service
4632 parent string
4633 trigger *Trigger
4634 urlParams_ gensupport.URLParams
4635 ctx_ context.Context
4636 header_ http.Header
4637 }
4638
4639
4640
4641
4642 func (r *ProjectsLocationsTriggersService) Create(parent string, trigger *Trigger) *ProjectsLocationsTriggersCreateCall {
4643 c := &ProjectsLocationsTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4644 c.parent = parent
4645 c.trigger = trigger
4646 return c
4647 }
4648
4649
4650
4651 func (c *ProjectsLocationsTriggersCreateCall) TriggerId(triggerId string) *ProjectsLocationsTriggersCreateCall {
4652 c.urlParams_.Set("triggerId", triggerId)
4653 return c
4654 }
4655
4656
4657
4658 func (c *ProjectsLocationsTriggersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTriggersCreateCall {
4659 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
4660 return c
4661 }
4662
4663
4664
4665
4666 func (c *ProjectsLocationsTriggersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersCreateCall {
4667 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4668 return c
4669 }
4670
4671
4672 func (c *ProjectsLocationsTriggersCreateCall) Context(ctx context.Context) *ProjectsLocationsTriggersCreateCall {
4673 c.ctx_ = ctx
4674 return c
4675 }
4676
4677
4678
4679 func (c *ProjectsLocationsTriggersCreateCall) Header() http.Header {
4680 if c.header_ == nil {
4681 c.header_ = make(http.Header)
4682 }
4683 return c.header_
4684 }
4685
4686 func (c *ProjectsLocationsTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
4687 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4688 var body io.Reader = nil
4689 body, err := googleapi.WithoutDataWrapper.JSONReader(c.trigger)
4690 if err != nil {
4691 return nil, err
4692 }
4693 c.urlParams_.Set("alt", alt)
4694 c.urlParams_.Set("prettyPrint", "false")
4695 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/triggers")
4696 urls += "?" + c.urlParams_.Encode()
4697 req, err := http.NewRequest("POST", urls, body)
4698 if err != nil {
4699 return nil, err
4700 }
4701 req.Header = reqHeaders
4702 googleapi.Expand(req.URL, map[string]string{
4703 "parent": c.parent,
4704 })
4705 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4706 }
4707
4708
4709
4710
4711
4712
4713
4714 func (c *ProjectsLocationsTriggersCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4715 gensupport.SetOptions(c.urlParams_, opts...)
4716 res, err := c.doRequest("json")
4717 if res != nil && res.StatusCode == http.StatusNotModified {
4718 if res.Body != nil {
4719 res.Body.Close()
4720 }
4721 return nil, gensupport.WrapError(&googleapi.Error{
4722 Code: res.StatusCode,
4723 Header: res.Header,
4724 })
4725 }
4726 if err != nil {
4727 return nil, err
4728 }
4729 defer googleapi.CloseBody(res)
4730 if err := googleapi.CheckResponse(res); err != nil {
4731 return nil, gensupport.WrapError(err)
4732 }
4733 ret := &GoogleLongrunningOperation{
4734 ServerResponse: googleapi.ServerResponse{
4735 Header: res.Header,
4736 HTTPStatusCode: res.StatusCode,
4737 },
4738 }
4739 target := &ret
4740 if err := gensupport.DecodeResponse(target, res); err != nil {
4741 return nil, err
4742 }
4743 return ret, nil
4744 }
4745
4746 type ProjectsLocationsTriggersDeleteCall struct {
4747 s *Service
4748 name string
4749 urlParams_ gensupport.URLParams
4750 ctx_ context.Context
4751 header_ http.Header
4752 }
4753
4754
4755
4756
4757 func (r *ProjectsLocationsTriggersService) Delete(name string) *ProjectsLocationsTriggersDeleteCall {
4758 c := &ProjectsLocationsTriggersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4759 c.name = name
4760 return c
4761 }
4762
4763
4764
4765
4766 func (c *ProjectsLocationsTriggersDeleteCall) AllowMissing(allowMissing bool) *ProjectsLocationsTriggersDeleteCall {
4767 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
4768 return c
4769 }
4770
4771
4772
4773 func (c *ProjectsLocationsTriggersDeleteCall) Etag(etag string) *ProjectsLocationsTriggersDeleteCall {
4774 c.urlParams_.Set("etag", etag)
4775 return c
4776 }
4777
4778
4779
4780 func (c *ProjectsLocationsTriggersDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTriggersDeleteCall {
4781 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
4782 return c
4783 }
4784
4785
4786
4787
4788 func (c *ProjectsLocationsTriggersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersDeleteCall {
4789 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4790 return c
4791 }
4792
4793
4794 func (c *ProjectsLocationsTriggersDeleteCall) Context(ctx context.Context) *ProjectsLocationsTriggersDeleteCall {
4795 c.ctx_ = ctx
4796 return c
4797 }
4798
4799
4800
4801 func (c *ProjectsLocationsTriggersDeleteCall) Header() http.Header {
4802 if c.header_ == nil {
4803 c.header_ = make(http.Header)
4804 }
4805 return c.header_
4806 }
4807
4808 func (c *ProjectsLocationsTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
4809 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4810 var body io.Reader = nil
4811 c.urlParams_.Set("alt", alt)
4812 c.urlParams_.Set("prettyPrint", "false")
4813 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4814 urls += "?" + c.urlParams_.Encode()
4815 req, err := http.NewRequest("DELETE", urls, body)
4816 if err != nil {
4817 return nil, err
4818 }
4819 req.Header = reqHeaders
4820 googleapi.Expand(req.URL, map[string]string{
4821 "name": c.name,
4822 })
4823 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4824 }
4825
4826
4827
4828
4829
4830
4831
4832 func (c *ProjectsLocationsTriggersDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
4833 gensupport.SetOptions(c.urlParams_, opts...)
4834 res, err := c.doRequest("json")
4835 if res != nil && res.StatusCode == http.StatusNotModified {
4836 if res.Body != nil {
4837 res.Body.Close()
4838 }
4839 return nil, gensupport.WrapError(&googleapi.Error{
4840 Code: res.StatusCode,
4841 Header: res.Header,
4842 })
4843 }
4844 if err != nil {
4845 return nil, err
4846 }
4847 defer googleapi.CloseBody(res)
4848 if err := googleapi.CheckResponse(res); err != nil {
4849 return nil, gensupport.WrapError(err)
4850 }
4851 ret := &GoogleLongrunningOperation{
4852 ServerResponse: googleapi.ServerResponse{
4853 Header: res.Header,
4854 HTTPStatusCode: res.StatusCode,
4855 },
4856 }
4857 target := &ret
4858 if err := gensupport.DecodeResponse(target, res); err != nil {
4859 return nil, err
4860 }
4861 return ret, nil
4862 }
4863
4864 type ProjectsLocationsTriggersGetCall struct {
4865 s *Service
4866 name string
4867 urlParams_ gensupport.URLParams
4868 ifNoneMatch_ string
4869 ctx_ context.Context
4870 header_ http.Header
4871 }
4872
4873
4874
4875
4876 func (r *ProjectsLocationsTriggersService) Get(name string) *ProjectsLocationsTriggersGetCall {
4877 c := &ProjectsLocationsTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4878 c.name = name
4879 return c
4880 }
4881
4882
4883
4884
4885 func (c *ProjectsLocationsTriggersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersGetCall {
4886 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4887 return c
4888 }
4889
4890
4891
4892
4893 func (c *ProjectsLocationsTriggersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersGetCall {
4894 c.ifNoneMatch_ = entityTag
4895 return c
4896 }
4897
4898
4899 func (c *ProjectsLocationsTriggersGetCall) Context(ctx context.Context) *ProjectsLocationsTriggersGetCall {
4900 c.ctx_ = ctx
4901 return c
4902 }
4903
4904
4905
4906 func (c *ProjectsLocationsTriggersGetCall) Header() http.Header {
4907 if c.header_ == nil {
4908 c.header_ = make(http.Header)
4909 }
4910 return c.header_
4911 }
4912
4913 func (c *ProjectsLocationsTriggersGetCall) doRequest(alt string) (*http.Response, error) {
4914 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4915 if c.ifNoneMatch_ != "" {
4916 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4917 }
4918 var body io.Reader = nil
4919 c.urlParams_.Set("alt", alt)
4920 c.urlParams_.Set("prettyPrint", "false")
4921 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4922 urls += "?" + c.urlParams_.Encode()
4923 req, err := http.NewRequest("GET", urls, body)
4924 if err != nil {
4925 return nil, err
4926 }
4927 req.Header = reqHeaders
4928 googleapi.Expand(req.URL, map[string]string{
4929 "name": c.name,
4930 })
4931 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4932 }
4933
4934
4935
4936
4937
4938
4939 func (c *ProjectsLocationsTriggersGetCall) Do(opts ...googleapi.CallOption) (*Trigger, error) {
4940 gensupport.SetOptions(c.urlParams_, opts...)
4941 res, err := c.doRequest("json")
4942 if res != nil && res.StatusCode == http.StatusNotModified {
4943 if res.Body != nil {
4944 res.Body.Close()
4945 }
4946 return nil, gensupport.WrapError(&googleapi.Error{
4947 Code: res.StatusCode,
4948 Header: res.Header,
4949 })
4950 }
4951 if err != nil {
4952 return nil, err
4953 }
4954 defer googleapi.CloseBody(res)
4955 if err := googleapi.CheckResponse(res); err != nil {
4956 return nil, gensupport.WrapError(err)
4957 }
4958 ret := &Trigger{
4959 ServerResponse: googleapi.ServerResponse{
4960 Header: res.Header,
4961 HTTPStatusCode: res.StatusCode,
4962 },
4963 }
4964 target := &ret
4965 if err := gensupport.DecodeResponse(target, res); err != nil {
4966 return nil, err
4967 }
4968 return ret, nil
4969 }
4970
4971 type ProjectsLocationsTriggersGetIamPolicyCall struct {
4972 s *Service
4973 resource string
4974 urlParams_ gensupport.URLParams
4975 ifNoneMatch_ string
4976 ctx_ context.Context
4977 header_ http.Header
4978 }
4979
4980
4981
4982
4983
4984
4985
4986 func (r *ProjectsLocationsTriggersService) GetIamPolicy(resource string) *ProjectsLocationsTriggersGetIamPolicyCall {
4987 c := &ProjectsLocationsTriggersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4988 c.resource = resource
4989 return c
4990 }
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004 func (c *ProjectsLocationsTriggersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsTriggersGetIamPolicyCall {
5005 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
5006 return c
5007 }
5008
5009
5010
5011
5012 func (c *ProjectsLocationsTriggersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersGetIamPolicyCall {
5013 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5014 return c
5015 }
5016
5017
5018
5019
5020 func (c *ProjectsLocationsTriggersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersGetIamPolicyCall {
5021 c.ifNoneMatch_ = entityTag
5022 return c
5023 }
5024
5025
5026 func (c *ProjectsLocationsTriggersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTriggersGetIamPolicyCall {
5027 c.ctx_ = ctx
5028 return c
5029 }
5030
5031
5032
5033 func (c *ProjectsLocationsTriggersGetIamPolicyCall) Header() http.Header {
5034 if c.header_ == nil {
5035 c.header_ = make(http.Header)
5036 }
5037 return c.header_
5038 }
5039
5040 func (c *ProjectsLocationsTriggersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5041 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5042 if c.ifNoneMatch_ != "" {
5043 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5044 }
5045 var body io.Reader = nil
5046 c.urlParams_.Set("alt", alt)
5047 c.urlParams_.Set("prettyPrint", "false")
5048 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
5049 urls += "?" + c.urlParams_.Encode()
5050 req, err := http.NewRequest("GET", urls, body)
5051 if err != nil {
5052 return nil, err
5053 }
5054 req.Header = reqHeaders
5055 googleapi.Expand(req.URL, map[string]string{
5056 "resource": c.resource,
5057 })
5058 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5059 }
5060
5061
5062
5063
5064
5065
5066 func (c *ProjectsLocationsTriggersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5067 gensupport.SetOptions(c.urlParams_, opts...)
5068 res, err := c.doRequest("json")
5069 if res != nil && res.StatusCode == http.StatusNotModified {
5070 if res.Body != nil {
5071 res.Body.Close()
5072 }
5073 return nil, gensupport.WrapError(&googleapi.Error{
5074 Code: res.StatusCode,
5075 Header: res.Header,
5076 })
5077 }
5078 if err != nil {
5079 return nil, err
5080 }
5081 defer googleapi.CloseBody(res)
5082 if err := googleapi.CheckResponse(res); err != nil {
5083 return nil, gensupport.WrapError(err)
5084 }
5085 ret := &Policy{
5086 ServerResponse: googleapi.ServerResponse{
5087 Header: res.Header,
5088 HTTPStatusCode: res.StatusCode,
5089 },
5090 }
5091 target := &ret
5092 if err := gensupport.DecodeResponse(target, res); err != nil {
5093 return nil, err
5094 }
5095 return ret, nil
5096 }
5097
5098 type ProjectsLocationsTriggersListCall struct {
5099 s *Service
5100 parent string
5101 urlParams_ gensupport.URLParams
5102 ifNoneMatch_ string
5103 ctx_ context.Context
5104 header_ http.Header
5105 }
5106
5107
5108
5109
5110 func (r *ProjectsLocationsTriggersService) List(parent string) *ProjectsLocationsTriggersListCall {
5111 c := &ProjectsLocationsTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5112 c.parent = parent
5113 return c
5114 }
5115
5116
5117
5118
5119
5120 func (c *ProjectsLocationsTriggersListCall) Filter(filter string) *ProjectsLocationsTriggersListCall {
5121 c.urlParams_.Set("filter", filter)
5122 return c
5123 }
5124
5125
5126
5127
5128
5129 func (c *ProjectsLocationsTriggersListCall) OrderBy(orderBy string) *ProjectsLocationsTriggersListCall {
5130 c.urlParams_.Set("orderBy", orderBy)
5131 return c
5132 }
5133
5134
5135
5136 func (c *ProjectsLocationsTriggersListCall) PageSize(pageSize int64) *ProjectsLocationsTriggersListCall {
5137 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5138 return c
5139 }
5140
5141
5142
5143
5144
5145 func (c *ProjectsLocationsTriggersListCall) PageToken(pageToken string) *ProjectsLocationsTriggersListCall {
5146 c.urlParams_.Set("pageToken", pageToken)
5147 return c
5148 }
5149
5150
5151
5152
5153 func (c *ProjectsLocationsTriggersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersListCall {
5154 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5155 return c
5156 }
5157
5158
5159
5160
5161 func (c *ProjectsLocationsTriggersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTriggersListCall {
5162 c.ifNoneMatch_ = entityTag
5163 return c
5164 }
5165
5166
5167 func (c *ProjectsLocationsTriggersListCall) Context(ctx context.Context) *ProjectsLocationsTriggersListCall {
5168 c.ctx_ = ctx
5169 return c
5170 }
5171
5172
5173
5174 func (c *ProjectsLocationsTriggersListCall) Header() http.Header {
5175 if c.header_ == nil {
5176 c.header_ = make(http.Header)
5177 }
5178 return c.header_
5179 }
5180
5181 func (c *ProjectsLocationsTriggersListCall) doRequest(alt string) (*http.Response, error) {
5182 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5183 if c.ifNoneMatch_ != "" {
5184 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5185 }
5186 var body io.Reader = nil
5187 c.urlParams_.Set("alt", alt)
5188 c.urlParams_.Set("prettyPrint", "false")
5189 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/triggers")
5190 urls += "?" + c.urlParams_.Encode()
5191 req, err := http.NewRequest("GET", urls, body)
5192 if err != nil {
5193 return nil, err
5194 }
5195 req.Header = reqHeaders
5196 googleapi.Expand(req.URL, map[string]string{
5197 "parent": c.parent,
5198 })
5199 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5200 }
5201
5202
5203
5204
5205
5206
5207
5208 func (c *ProjectsLocationsTriggersListCall) Do(opts ...googleapi.CallOption) (*ListTriggersResponse, error) {
5209 gensupport.SetOptions(c.urlParams_, opts...)
5210 res, err := c.doRequest("json")
5211 if res != nil && res.StatusCode == http.StatusNotModified {
5212 if res.Body != nil {
5213 res.Body.Close()
5214 }
5215 return nil, gensupport.WrapError(&googleapi.Error{
5216 Code: res.StatusCode,
5217 Header: res.Header,
5218 })
5219 }
5220 if err != nil {
5221 return nil, err
5222 }
5223 defer googleapi.CloseBody(res)
5224 if err := googleapi.CheckResponse(res); err != nil {
5225 return nil, gensupport.WrapError(err)
5226 }
5227 ret := &ListTriggersResponse{
5228 ServerResponse: googleapi.ServerResponse{
5229 Header: res.Header,
5230 HTTPStatusCode: res.StatusCode,
5231 },
5232 }
5233 target := &ret
5234 if err := gensupport.DecodeResponse(target, res); err != nil {
5235 return nil, err
5236 }
5237 return ret, nil
5238 }
5239
5240
5241
5242
5243 func (c *ProjectsLocationsTriggersListCall) Pages(ctx context.Context, f func(*ListTriggersResponse) error) error {
5244 c.ctx_ = ctx
5245 defer c.PageToken(c.urlParams_.Get("pageToken"))
5246 for {
5247 x, err := c.Do()
5248 if err != nil {
5249 return err
5250 }
5251 if err := f(x); err != nil {
5252 return err
5253 }
5254 if x.NextPageToken == "" {
5255 return nil
5256 }
5257 c.PageToken(x.NextPageToken)
5258 }
5259 }
5260
5261 type ProjectsLocationsTriggersPatchCall struct {
5262 s *Service
5263 name string
5264 trigger *Trigger
5265 urlParams_ gensupport.URLParams
5266 ctx_ context.Context
5267 header_ http.Header
5268 }
5269
5270
5271
5272
5273
5274
5275 func (r *ProjectsLocationsTriggersService) Patch(name string, trigger *Trigger) *ProjectsLocationsTriggersPatchCall {
5276 c := &ProjectsLocationsTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5277 c.name = name
5278 c.trigger = trigger
5279 return c
5280 }
5281
5282
5283
5284
5285 func (c *ProjectsLocationsTriggersPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsTriggersPatchCall {
5286 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
5287 return c
5288 }
5289
5290
5291
5292
5293
5294 func (c *ProjectsLocationsTriggersPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTriggersPatchCall {
5295 c.urlParams_.Set("updateMask", updateMask)
5296 return c
5297 }
5298
5299
5300
5301 func (c *ProjectsLocationsTriggersPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsTriggersPatchCall {
5302 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
5303 return c
5304 }
5305
5306
5307
5308
5309 func (c *ProjectsLocationsTriggersPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersPatchCall {
5310 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5311 return c
5312 }
5313
5314
5315 func (c *ProjectsLocationsTriggersPatchCall) Context(ctx context.Context) *ProjectsLocationsTriggersPatchCall {
5316 c.ctx_ = ctx
5317 return c
5318 }
5319
5320
5321
5322 func (c *ProjectsLocationsTriggersPatchCall) Header() http.Header {
5323 if c.header_ == nil {
5324 c.header_ = make(http.Header)
5325 }
5326 return c.header_
5327 }
5328
5329 func (c *ProjectsLocationsTriggersPatchCall) doRequest(alt string) (*http.Response, error) {
5330 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5331 var body io.Reader = nil
5332 body, err := googleapi.WithoutDataWrapper.JSONReader(c.trigger)
5333 if err != nil {
5334 return nil, err
5335 }
5336 c.urlParams_.Set("alt", alt)
5337 c.urlParams_.Set("prettyPrint", "false")
5338 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5339 urls += "?" + c.urlParams_.Encode()
5340 req, err := http.NewRequest("PATCH", urls, body)
5341 if err != nil {
5342 return nil, err
5343 }
5344 req.Header = reqHeaders
5345 googleapi.Expand(req.URL, map[string]string{
5346 "name": c.name,
5347 })
5348 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5349 }
5350
5351
5352
5353
5354
5355
5356
5357 func (c *ProjectsLocationsTriggersPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
5358 gensupport.SetOptions(c.urlParams_, opts...)
5359 res, err := c.doRequest("json")
5360 if res != nil && res.StatusCode == http.StatusNotModified {
5361 if res.Body != nil {
5362 res.Body.Close()
5363 }
5364 return nil, gensupport.WrapError(&googleapi.Error{
5365 Code: res.StatusCode,
5366 Header: res.Header,
5367 })
5368 }
5369 if err != nil {
5370 return nil, err
5371 }
5372 defer googleapi.CloseBody(res)
5373 if err := googleapi.CheckResponse(res); err != nil {
5374 return nil, gensupport.WrapError(err)
5375 }
5376 ret := &GoogleLongrunningOperation{
5377 ServerResponse: googleapi.ServerResponse{
5378 Header: res.Header,
5379 HTTPStatusCode: res.StatusCode,
5380 },
5381 }
5382 target := &ret
5383 if err := gensupport.DecodeResponse(target, res); err != nil {
5384 return nil, err
5385 }
5386 return ret, nil
5387 }
5388
5389 type ProjectsLocationsTriggersSetIamPolicyCall struct {
5390 s *Service
5391 resource string
5392 setiampolicyrequest *SetIamPolicyRequest
5393 urlParams_ gensupport.URLParams
5394 ctx_ context.Context
5395 header_ http.Header
5396 }
5397
5398
5399
5400
5401
5402
5403
5404
5405 func (r *ProjectsLocationsTriggersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTriggersSetIamPolicyCall {
5406 c := &ProjectsLocationsTriggersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5407 c.resource = resource
5408 c.setiampolicyrequest = setiampolicyrequest
5409 return c
5410 }
5411
5412
5413
5414
5415 func (c *ProjectsLocationsTriggersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersSetIamPolicyCall {
5416 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5417 return c
5418 }
5419
5420
5421 func (c *ProjectsLocationsTriggersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTriggersSetIamPolicyCall {
5422 c.ctx_ = ctx
5423 return c
5424 }
5425
5426
5427
5428 func (c *ProjectsLocationsTriggersSetIamPolicyCall) Header() http.Header {
5429 if c.header_ == nil {
5430 c.header_ = make(http.Header)
5431 }
5432 return c.header_
5433 }
5434
5435 func (c *ProjectsLocationsTriggersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5436 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5437 var body io.Reader = nil
5438 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
5439 if err != nil {
5440 return nil, err
5441 }
5442 c.urlParams_.Set("alt", alt)
5443 c.urlParams_.Set("prettyPrint", "false")
5444 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
5445 urls += "?" + c.urlParams_.Encode()
5446 req, err := http.NewRequest("POST", urls, body)
5447 if err != nil {
5448 return nil, err
5449 }
5450 req.Header = reqHeaders
5451 googleapi.Expand(req.URL, map[string]string{
5452 "resource": c.resource,
5453 })
5454 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5455 }
5456
5457
5458
5459
5460
5461
5462 func (c *ProjectsLocationsTriggersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5463 gensupport.SetOptions(c.urlParams_, opts...)
5464 res, err := c.doRequest("json")
5465 if res != nil && res.StatusCode == http.StatusNotModified {
5466 if res.Body != nil {
5467 res.Body.Close()
5468 }
5469 return nil, gensupport.WrapError(&googleapi.Error{
5470 Code: res.StatusCode,
5471 Header: res.Header,
5472 })
5473 }
5474 if err != nil {
5475 return nil, err
5476 }
5477 defer googleapi.CloseBody(res)
5478 if err := googleapi.CheckResponse(res); err != nil {
5479 return nil, gensupport.WrapError(err)
5480 }
5481 ret := &Policy{
5482 ServerResponse: googleapi.ServerResponse{
5483 Header: res.Header,
5484 HTTPStatusCode: res.StatusCode,
5485 },
5486 }
5487 target := &ret
5488 if err := gensupport.DecodeResponse(target, res); err != nil {
5489 return nil, err
5490 }
5491 return ret, nil
5492 }
5493
5494 type ProjectsLocationsTriggersTestIamPermissionsCall struct {
5495 s *Service
5496 resource string
5497 testiampermissionsrequest *TestIamPermissionsRequest
5498 urlParams_ gensupport.URLParams
5499 ctx_ context.Context
5500 header_ http.Header
5501 }
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513 func (r *ProjectsLocationsTriggersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTriggersTestIamPermissionsCall {
5514 c := &ProjectsLocationsTriggersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5515 c.resource = resource
5516 c.testiampermissionsrequest = testiampermissionsrequest
5517 return c
5518 }
5519
5520
5521
5522
5523 func (c *ProjectsLocationsTriggersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTriggersTestIamPermissionsCall {
5524 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5525 return c
5526 }
5527
5528
5529 func (c *ProjectsLocationsTriggersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTriggersTestIamPermissionsCall {
5530 c.ctx_ = ctx
5531 return c
5532 }
5533
5534
5535
5536 func (c *ProjectsLocationsTriggersTestIamPermissionsCall) Header() http.Header {
5537 if c.header_ == nil {
5538 c.header_ = make(http.Header)
5539 }
5540 return c.header_
5541 }
5542
5543 func (c *ProjectsLocationsTriggersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5544 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5545 var body io.Reader = nil
5546 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
5547 if err != nil {
5548 return nil, err
5549 }
5550 c.urlParams_.Set("alt", alt)
5551 c.urlParams_.Set("prettyPrint", "false")
5552 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
5553 urls += "?" + c.urlParams_.Encode()
5554 req, err := http.NewRequest("POST", urls, body)
5555 if err != nil {
5556 return nil, err
5557 }
5558 req.Header = reqHeaders
5559 googleapi.Expand(req.URL, map[string]string{
5560 "resource": c.resource,
5561 })
5562 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5563 }
5564
5565
5566
5567
5568
5569
5570
5571 func (c *ProjectsLocationsTriggersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
5572 gensupport.SetOptions(c.urlParams_, opts...)
5573 res, err := c.doRequest("json")
5574 if res != nil && res.StatusCode == http.StatusNotModified {
5575 if res.Body != nil {
5576 res.Body.Close()
5577 }
5578 return nil, gensupport.WrapError(&googleapi.Error{
5579 Code: res.StatusCode,
5580 Header: res.Header,
5581 })
5582 }
5583 if err != nil {
5584 return nil, err
5585 }
5586 defer googleapi.CloseBody(res)
5587 if err := googleapi.CheckResponse(res); err != nil {
5588 return nil, gensupport.WrapError(err)
5589 }
5590 ret := &TestIamPermissionsResponse{
5591 ServerResponse: googleapi.ServerResponse{
5592 Header: res.Header,
5593 HTTPStatusCode: res.StatusCode,
5594 },
5595 }
5596 target := &ret
5597 if err := gensupport.DecodeResponse(target, res); err != nil {
5598 return nil, err
5599 }
5600 return ret, nil
5601 }
5602
View as plain text