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 privateca
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 = "privateca:v1"
90 const apiName = "privateca"
91 const apiVersion = "v1"
92 const basePath = "https://privateca.googleapis.com/"
93 const basePathTemplate = "https://privateca.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://privateca.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.CaPools = NewProjectsLocationsCaPoolsService(s)
172 rs.CertificateTemplates = NewProjectsLocationsCertificateTemplatesService(s)
173 rs.Operations = NewProjectsLocationsOperationsService(s)
174 return rs
175 }
176
177 type ProjectsLocationsService struct {
178 s *Service
179
180 CaPools *ProjectsLocationsCaPoolsService
181
182 CertificateTemplates *ProjectsLocationsCertificateTemplatesService
183
184 Operations *ProjectsLocationsOperationsService
185 }
186
187 func NewProjectsLocationsCaPoolsService(s *Service) *ProjectsLocationsCaPoolsService {
188 rs := &ProjectsLocationsCaPoolsService{s: s}
189 rs.CertificateAuthorities = NewProjectsLocationsCaPoolsCertificateAuthoritiesService(s)
190 rs.Certificates = NewProjectsLocationsCaPoolsCertificatesService(s)
191 return rs
192 }
193
194 type ProjectsLocationsCaPoolsService struct {
195 s *Service
196
197 CertificateAuthorities *ProjectsLocationsCaPoolsCertificateAuthoritiesService
198
199 Certificates *ProjectsLocationsCaPoolsCertificatesService
200 }
201
202 func NewProjectsLocationsCaPoolsCertificateAuthoritiesService(s *Service) *ProjectsLocationsCaPoolsCertificateAuthoritiesService {
203 rs := &ProjectsLocationsCaPoolsCertificateAuthoritiesService{s: s}
204 rs.CertificateRevocationLists = NewProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService(s)
205 return rs
206 }
207
208 type ProjectsLocationsCaPoolsCertificateAuthoritiesService struct {
209 s *Service
210
211 CertificateRevocationLists *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService
212 }
213
214 func NewProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService(s *Service) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService {
215 rs := &ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService{s: s}
216 return rs
217 }
218
219 type ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService struct {
220 s *Service
221 }
222
223 func NewProjectsLocationsCaPoolsCertificatesService(s *Service) *ProjectsLocationsCaPoolsCertificatesService {
224 rs := &ProjectsLocationsCaPoolsCertificatesService{s: s}
225 return rs
226 }
227
228 type ProjectsLocationsCaPoolsCertificatesService struct {
229 s *Service
230 }
231
232 func NewProjectsLocationsCertificateTemplatesService(s *Service) *ProjectsLocationsCertificateTemplatesService {
233 rs := &ProjectsLocationsCertificateTemplatesService{s: s}
234 return rs
235 }
236
237 type ProjectsLocationsCertificateTemplatesService struct {
238 s *Service
239 }
240
241 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
242 rs := &ProjectsLocationsOperationsService{s: s}
243 return rs
244 }
245
246 type ProjectsLocationsOperationsService struct {
247 s *Service
248 }
249
250
251 type AccessUrls struct {
252
253
254
255 CaCertificateAccessUrl string `json:"caCertificateAccessUrl,omitempty"`
256
257
258 CrlAccessUrls []string `json:"crlAccessUrls,omitempty"`
259
260
261
262
263
264 ForceSendFields []string `json:"-"`
265
266
267
268
269 NullFields []string `json:"-"`
270 }
271
272 func (s *AccessUrls) MarshalJSON() ([]byte, error) {
273 type NoMethod AccessUrls
274 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
275 }
276
277
278
279 type ActivateCertificateAuthorityRequest struct {
280
281
282 PemCaCertificate string `json:"pemCaCertificate,omitempty"`
283
284
285
286
287
288
289
290
291
292
293
294 RequestId string `json:"requestId,omitempty"`
295
296
297 SubordinateConfig *SubordinateConfig `json:"subordinateConfig,omitempty"`
298
299
300
301
302
303 ForceSendFields []string `json:"-"`
304
305
306
307
308 NullFields []string `json:"-"`
309 }
310
311 func (s *ActivateCertificateAuthorityRequest) MarshalJSON() ([]byte, error) {
312 type NoMethod ActivateCertificateAuthorityRequest
313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
314 }
315
316
317
318
319
320 type AllowedKeyType struct {
321
322 EllipticCurve *EcKeyType `json:"ellipticCurve,omitempty"`
323
324 Rsa *RsaKeyType `json:"rsa,omitempty"`
325
326
327
328
329
330 ForceSendFields []string `json:"-"`
331
332
333
334
335 NullFields []string `json:"-"`
336 }
337
338 func (s *AllowedKeyType) MarshalJSON() ([]byte, error) {
339 type NoMethod AllowedKeyType
340 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
341 }
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359 type AuditConfig struct {
360
361 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
362
363
364
365 Service string `json:"service,omitempty"`
366
367
368
369
370
371 ForceSendFields []string `json:"-"`
372
373
374
375
376 NullFields []string `json:"-"`
377 }
378
379 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
380 type NoMethod AuditConfig
381 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
382 }
383
384
385
386
387
388
389 type AuditLogConfig struct {
390
391
392 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
393
394
395
396
397
398
399
400 LogType string `json:"logType,omitempty"`
401
402
403
404
405
406 ForceSendFields []string `json:"-"`
407
408
409
410
411 NullFields []string `json:"-"`
412 }
413
414 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
415 type NoMethod AuditLogConfig
416 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
417 }
418
419
420 type Binding struct {
421
422
423
424
425
426
427
428
429 Condition *Expr `json:"condition,omitempty"`
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492 Members []string `json:"members,omitempty"`
493
494
495
496
497
498
499 Role string `json:"role,omitempty"`
500
501
502
503
504
505 ForceSendFields []string `json:"-"`
506
507
508
509
510 NullFields []string `json:"-"`
511 }
512
513 func (s *Binding) MarshalJSON() ([]byte, error) {
514 type NoMethod Binding
515 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
516 }
517
518
519 type CaOptions struct {
520
521
522
523 IsCa bool `json:"isCa,omitempty"`
524
525
526
527
528
529 MaxIssuerPathLength int64 `json:"maxIssuerPathLength,omitempty"`
530
531
532
533
534
535 ForceSendFields []string `json:"-"`
536
537
538
539
540 NullFields []string `json:"-"`
541 }
542
543 func (s *CaOptions) MarshalJSON() ([]byte, error) {
544 type NoMethod CaOptions
545 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
546 }
547
548
549
550
551
552 type CaPool struct {
553
554
555 IssuancePolicy *IssuancePolicy `json:"issuancePolicy,omitempty"`
556
557 Labels map[string]string `json:"labels,omitempty"`
558
559
560 Name string `json:"name,omitempty"`
561
562
563 PublishingOptions *PublishingOptions `json:"publishingOptions,omitempty"`
564
565
566
567
568
569
570 Tier string `json:"tier,omitempty"`
571
572
573 googleapi.ServerResponse `json:"-"`
574
575
576
577
578
579 ForceSendFields []string `json:"-"`
580
581
582
583
584 NullFields []string `json:"-"`
585 }
586
587 func (s *CaPool) MarshalJSON() ([]byte, error) {
588 type NoMethod CaPool
589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
590 }
591
592
593 type CancelOperationRequest struct {
594 }
595
596 type CertChain struct {
597
598
599 Certificates []string `json:"certificates,omitempty"`
600
601
602
603
604
605 ForceSendFields []string `json:"-"`
606
607
608
609
610 NullFields []string `json:"-"`
611 }
612
613 func (s *CertChain) MarshalJSON() ([]byte, error) {
614 type NoMethod CertChain
615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
616 }
617
618
619
620 type Certificate struct {
621
622
623 CertificateDescription *CertificateDescription `json:"certificateDescription,omitempty"`
624
625
626
627
628
629
630 CertificateTemplate string `json:"certificateTemplate,omitempty"`
631
632
633 Config *CertificateConfig `json:"config,omitempty"`
634
635 CreateTime string `json:"createTime,omitempty"`
636
637
638
639 IssuerCertificateAuthority string `json:"issuerCertificateAuthority,omitempty"`
640
641 Labels map[string]string `json:"labels,omitempty"`
642
643
644
645
646 Lifetime string `json:"lifetime,omitempty"`
647
648
649 Name string `json:"name,omitempty"`
650
651 PemCertificate string `json:"pemCertificate,omitempty"`
652
653
654
655 PemCertificateChain []string `json:"pemCertificateChain,omitempty"`
656
657 PemCsr string `json:"pemCsr,omitempty"`
658
659
660
661 RevocationDetails *RevocationDetails `json:"revocationDetails,omitempty"`
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677 SubjectMode string `json:"subjectMode,omitempty"`
678
679 UpdateTime string `json:"updateTime,omitempty"`
680
681
682 googleapi.ServerResponse `json:"-"`
683
684
685
686
687
688 ForceSendFields []string `json:"-"`
689
690
691
692
693 NullFields []string `json:"-"`
694 }
695
696 func (s *Certificate) MarshalJSON() ([]byte, error) {
697 type NoMethod Certificate
698 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
699 }
700
701
702
703
704 type CertificateAuthority struct {
705
706
707 AccessUrls *AccessUrls `json:"accessUrls,omitempty"`
708
709
710
711 CaCertificateDescriptions []*CertificateDescription `json:"caCertificateDescriptions,omitempty"`
712
713
714 Config *CertificateConfig `json:"config,omitempty"`
715
716
717 CreateTime string `json:"createTime,omitempty"`
718
719
720 DeleteTime string `json:"deleteTime,omitempty"`
721
722
723 ExpireTime string `json:"expireTime,omitempty"`
724
725
726
727
728
729
730 GcsBucket string `json:"gcsBucket,omitempty"`
731
732
733
734
735 KeySpec *KeyVersionSpec `json:"keySpec,omitempty"`
736
737 Labels map[string]string `json:"labels,omitempty"`
738
739
740
741 Lifetime string `json:"lifetime,omitempty"`
742
743
744 Name string `json:"name,omitempty"`
745
746
747
748
749
750 PemCaCertificates []string `json:"pemCaCertificates,omitempty"`
751
752 SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
753
754 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776 State string `json:"state,omitempty"`
777
778
779
780
781 SubordinateConfig *SubordinateConfig `json:"subordinateConfig,omitempty"`
782
783
784
785
786
787
788
789 Tier string `json:"tier,omitempty"`
790
791
792
793
794
795
796
797 Type string `json:"type,omitempty"`
798
799
800 UpdateTime string `json:"updateTime,omitempty"`
801
802
803 googleapi.ServerResponse `json:"-"`
804
805
806
807
808
809 ForceSendFields []string `json:"-"`
810
811
812
813
814 NullFields []string `json:"-"`
815 }
816
817 func (s *CertificateAuthority) MarshalJSON() ([]byte, error) {
818 type NoMethod CertificateAuthority
819 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
820 }
821
822
823
824 type CertificateConfig struct {
825
826
827
828 PublicKey *PublicKey `json:"publicKey,omitempty"`
829
830
831 SubjectConfig *SubjectConfig `json:"subjectConfig,omitempty"`
832
833
834
835
836 SubjectKeyId *CertificateConfigKeyId `json:"subjectKeyId,omitempty"`
837
838
839 X509Config *X509Parameters `json:"x509Config,omitempty"`
840
841
842
843
844
845 ForceSendFields []string `json:"-"`
846
847
848
849
850 NullFields []string `json:"-"`
851 }
852
853 func (s *CertificateConfig) MarshalJSON() ([]byte, error) {
854 type NoMethod CertificateConfig
855 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
856 }
857
858
859
860 type CertificateConfigKeyId struct {
861
862
863 KeyId string `json:"keyId,omitempty"`
864
865
866
867
868
869 ForceSendFields []string `json:"-"`
870
871
872
873
874 NullFields []string `json:"-"`
875 }
876
877 func (s *CertificateConfigKeyId) MarshalJSON() ([]byte, error) {
878 type NoMethod CertificateConfigKeyId
879 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
880 }
881
882
883
884
885 type CertificateDescription struct {
886
887
888
889 AiaIssuingCertificateUrls []string `json:"aiaIssuingCertificateUrls,omitempty"`
890
891
892 AuthorityKeyId *KeyId `json:"authorityKeyId,omitempty"`
893
894 CertFingerprint *CertificateFingerprint `json:"certFingerprint,omitempty"`
895
896
897
898 CrlDistributionPoints []string `json:"crlDistributionPoints,omitempty"`
899
900 PublicKey *PublicKey `json:"publicKey,omitempty"`
901
902
903 SubjectDescription *SubjectDescription `json:"subjectDescription,omitempty"`
904
905
906
907 SubjectKeyId *KeyId `json:"subjectKeyId,omitempty"`
908
909
910 X509Description *X509Parameters `json:"x509Description,omitempty"`
911
912
913
914
915
916 ForceSendFields []string `json:"-"`
917
918
919
920
921 NullFields []string `json:"-"`
922 }
923
924 func (s *CertificateDescription) MarshalJSON() ([]byte, error) {
925 type NoMethod CertificateDescription
926 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
927 }
928
929
930
931 type CertificateExtensionConstraints struct {
932
933
934
935 AdditionalExtensions []*ObjectId `json:"additionalExtensions,omitempty"`
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964 KnownExtensions []string `json:"knownExtensions,omitempty"`
965
966
967
968
969
970 ForceSendFields []string `json:"-"`
971
972
973
974
975 NullFields []string `json:"-"`
976 }
977
978 func (s *CertificateExtensionConstraints) MarshalJSON() ([]byte, error) {
979 type NoMethod CertificateExtensionConstraints
980 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
981 }
982
983
984 type CertificateFingerprint struct {
985
986
987 Sha256Hash string `json:"sha256Hash,omitempty"`
988
989
990
991
992
993 ForceSendFields []string `json:"-"`
994
995
996
997
998 NullFields []string `json:"-"`
999 }
1000
1001 func (s *CertificateFingerprint) MarshalJSON() ([]byte, error) {
1002 type NoMethod CertificateFingerprint
1003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1004 }
1005
1006
1007
1008 type CertificateIdentityConstraints struct {
1009
1010
1011
1012
1013 AllowSubjectAltNamesPassthrough bool `json:"allowSubjectAltNamesPassthrough,omitempty"`
1014
1015
1016
1017 AllowSubjectPassthrough bool `json:"allowSubjectPassthrough,omitempty"`
1018
1019
1020
1021
1022 CelExpression *Expr `json:"celExpression,omitempty"`
1023
1024
1025
1026
1027
1028
1029 ForceSendFields []string `json:"-"`
1030
1031
1032
1033
1034 NullFields []string `json:"-"`
1035 }
1036
1037 func (s *CertificateIdentityConstraints) MarshalJSON() ([]byte, error) {
1038 type NoMethod CertificateIdentityConstraints
1039 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1040 }
1041
1042
1043
1044
1045 type CertificateRevocationList struct {
1046
1047 AccessUrl string `json:"accessUrl,omitempty"`
1048
1049
1050 CreateTime string `json:"createTime,omitempty"`
1051
1052 Labels map[string]string `json:"labels,omitempty"`
1053
1054
1055
1056 Name string `json:"name,omitempty"`
1057
1058 PemCrl string `json:"pemCrl,omitempty"`
1059
1060
1061
1062 RevisionId string `json:"revisionId,omitempty"`
1063
1064
1065 RevokedCertificates []*RevokedCertificate `json:"revokedCertificates,omitempty"`
1066
1067
1068 SequenceNumber int64 `json:"sequenceNumber,omitempty,string"`
1069
1070
1071
1072
1073
1074
1075 State string `json:"state,omitempty"`
1076
1077
1078 UpdateTime string `json:"updateTime,omitempty"`
1079
1080
1081 googleapi.ServerResponse `json:"-"`
1082
1083
1084
1085
1086
1087 ForceSendFields []string `json:"-"`
1088
1089
1090
1091
1092 NullFields []string `json:"-"`
1093 }
1094
1095 func (s *CertificateRevocationList) MarshalJSON() ([]byte, error) {
1096 type NoMethod CertificateRevocationList
1097 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1098 }
1099
1100
1101
1102 type CertificateTemplate struct {
1103
1104
1105 CreateTime string `json:"createTime,omitempty"`
1106
1107
1108 Description string `json:"description,omitempty"`
1109
1110
1111
1112 IdentityConstraints *CertificateIdentityConstraints `json:"identityConstraints,omitempty"`
1113
1114 Labels map[string]string `json:"labels,omitempty"`
1115
1116
1117
1118
1119
1120
1121
1122 MaximumLifetime string `json:"maximumLifetime,omitempty"`
1123
1124
1125 Name string `json:"name,omitempty"`
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135 PassthroughExtensions *CertificateExtensionConstraints `json:"passthroughExtensions,omitempty"`
1136
1137
1138
1139
1140
1141
1142 PredefinedValues *X509Parameters `json:"predefinedValues,omitempty"`
1143
1144
1145 UpdateTime string `json:"updateTime,omitempty"`
1146
1147
1148 googleapi.ServerResponse `json:"-"`
1149
1150
1151
1152
1153
1154 ForceSendFields []string `json:"-"`
1155
1156
1157
1158
1159 NullFields []string `json:"-"`
1160 }
1161
1162 func (s *CertificateTemplate) MarshalJSON() ([]byte, error) {
1163 type NoMethod CertificateTemplate
1164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1165 }
1166
1167
1168
1169 type DisableCertificateAuthorityRequest struct {
1170
1171
1172
1173
1174 IgnoreDependentResources bool `json:"ignoreDependentResources,omitempty"`
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186 RequestId string `json:"requestId,omitempty"`
1187
1188
1189
1190
1191
1192 ForceSendFields []string `json:"-"`
1193
1194
1195
1196
1197 NullFields []string `json:"-"`
1198 }
1199
1200 func (s *DisableCertificateAuthorityRequest) MarshalJSON() ([]byte, error) {
1201 type NoMethod DisableCertificateAuthorityRequest
1202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1203 }
1204
1205
1206
1207 type EcKeyType struct {
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220 SignatureAlgorithm string `json:"signatureAlgorithm,omitempty"`
1221
1222
1223
1224
1225
1226 ForceSendFields []string `json:"-"`
1227
1228
1229
1230
1231 NullFields []string `json:"-"`
1232 }
1233
1234 func (s *EcKeyType) MarshalJSON() ([]byte, error) {
1235 type NoMethod EcKeyType
1236 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1237 }
1238
1239
1240
1241
1242
1243 type Empty struct {
1244
1245 googleapi.ServerResponse `json:"-"`
1246 }
1247
1248
1249
1250 type EnableCertificateAuthorityRequest struct {
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262 RequestId string `json:"requestId,omitempty"`
1263
1264
1265
1266
1267
1268 ForceSendFields []string `json:"-"`
1269
1270
1271
1272
1273 NullFields []string `json:"-"`
1274 }
1275
1276 func (s *EnableCertificateAuthorityRequest) MarshalJSON() ([]byte, error) {
1277 type NoMethod EnableCertificateAuthorityRequest
1278 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1279 }
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297 type Expr struct {
1298
1299
1300 Description string `json:"description,omitempty"`
1301
1302
1303 Expression string `json:"expression,omitempty"`
1304
1305
1306 Location string `json:"location,omitempty"`
1307
1308
1309
1310 Title string `json:"title,omitempty"`
1311
1312
1313
1314
1315
1316 ForceSendFields []string `json:"-"`
1317
1318
1319
1320
1321 NullFields []string `json:"-"`
1322 }
1323
1324 func (s *Expr) MarshalJSON() ([]byte, error) {
1325 type NoMethod Expr
1326 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1327 }
1328
1329
1330
1331
1332 type ExtendedKeyUsageOptions struct {
1333
1334
1335 ClientAuth bool `json:"clientAuth,omitempty"`
1336
1337
1338 CodeSigning bool `json:"codeSigning,omitempty"`
1339
1340
1341 EmailProtection bool `json:"emailProtection,omitempty"`
1342
1343
1344 OcspSigning bool `json:"ocspSigning,omitempty"`
1345
1346
1347 ServerAuth bool `json:"serverAuth,omitempty"`
1348
1349
1350 TimeStamping bool `json:"timeStamping,omitempty"`
1351
1352
1353
1354
1355
1356 ForceSendFields []string `json:"-"`
1357
1358
1359
1360
1361 NullFields []string `json:"-"`
1362 }
1363
1364 func (s *ExtendedKeyUsageOptions) MarshalJSON() ([]byte, error) {
1365 type NoMethod ExtendedKeyUsageOptions
1366 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1367 }
1368
1369
1370
1371 type FetchCaCertsRequest struct {
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383 RequestId string `json:"requestId,omitempty"`
1384
1385
1386
1387
1388
1389 ForceSendFields []string `json:"-"`
1390
1391
1392
1393
1394 NullFields []string `json:"-"`
1395 }
1396
1397 func (s *FetchCaCertsRequest) MarshalJSON() ([]byte, error) {
1398 type NoMethod FetchCaCertsRequest
1399 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1400 }
1401
1402
1403
1404 type FetchCaCertsResponse struct {
1405
1406
1407 CaCerts []*CertChain `json:"caCerts,omitempty"`
1408
1409
1410 googleapi.ServerResponse `json:"-"`
1411
1412
1413
1414
1415
1416 ForceSendFields []string `json:"-"`
1417
1418
1419
1420
1421 NullFields []string `json:"-"`
1422 }
1423
1424 func (s *FetchCaCertsResponse) MarshalJSON() ([]byte, error) {
1425 type NoMethod FetchCaCertsResponse
1426 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1427 }
1428
1429
1430
1431 type FetchCertificateAuthorityCsrResponse struct {
1432
1433
1434 PemCsr string `json:"pemCsr,omitempty"`
1435
1436
1437 googleapi.ServerResponse `json:"-"`
1438
1439
1440
1441
1442
1443 ForceSendFields []string `json:"-"`
1444
1445
1446
1447
1448 NullFields []string `json:"-"`
1449 }
1450
1451 func (s *FetchCertificateAuthorityCsrResponse) MarshalJSON() ([]byte, error) {
1452 type NoMethod FetchCertificateAuthorityCsrResponse
1453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1454 }
1455
1456
1457
1458 type IssuanceModes struct {
1459
1460
1461 AllowConfigBasedIssuance bool `json:"allowConfigBasedIssuance,omitempty"`
1462
1463
1464 AllowCsrBasedIssuance bool `json:"allowCsrBasedIssuance,omitempty"`
1465
1466
1467
1468
1469
1470 ForceSendFields []string `json:"-"`
1471
1472
1473
1474
1475 NullFields []string `json:"-"`
1476 }
1477
1478 func (s *IssuanceModes) MarshalJSON() ([]byte, error) {
1479 type NoMethod IssuanceModes
1480 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1481 }
1482
1483
1484
1485 type IssuancePolicy struct {
1486
1487
1488 AllowedIssuanceModes *IssuanceModes `json:"allowedIssuanceModes,omitempty"`
1489
1490
1491
1492 AllowedKeyTypes []*AllowedKeyType `json:"allowedKeyTypes,omitempty"`
1493
1494
1495
1496
1497
1498
1499 BaselineValues *X509Parameters `json:"baselineValues,omitempty"`
1500
1501
1502
1503 IdentityConstraints *CertificateIdentityConstraints `json:"identityConstraints,omitempty"`
1504
1505
1506
1507
1508 MaximumLifetime string `json:"maximumLifetime,omitempty"`
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518 PassthroughExtensions *CertificateExtensionConstraints `json:"passthroughExtensions,omitempty"`
1519
1520
1521
1522
1523
1524 ForceSendFields []string `json:"-"`
1525
1526
1527
1528
1529 NullFields []string `json:"-"`
1530 }
1531
1532 func (s *IssuancePolicy) MarshalJSON() ([]byte, error) {
1533 type NoMethod IssuancePolicy
1534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1535 }
1536
1537
1538
1539 type KeyId struct {
1540
1541
1542 KeyId string `json:"keyId,omitempty"`
1543
1544
1545
1546
1547
1548 ForceSendFields []string `json:"-"`
1549
1550
1551
1552
1553 NullFields []string `json:"-"`
1554 }
1555
1556 func (s *KeyId) MarshalJSON() ([]byte, error) {
1557 type NoMethod KeyId
1558 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1559 }
1560
1561
1562
1563 type KeyUsage struct {
1564
1565 BaseKeyUsage *KeyUsageOptions `json:"baseKeyUsage,omitempty"`
1566
1567 ExtendedKeyUsage *ExtendedKeyUsageOptions `json:"extendedKeyUsage,omitempty"`
1568
1569
1570 UnknownExtendedKeyUsages []*ObjectId `json:"unknownExtendedKeyUsages,omitempty"`
1571
1572
1573
1574
1575
1576 ForceSendFields []string `json:"-"`
1577
1578
1579
1580
1581 NullFields []string `json:"-"`
1582 }
1583
1584 func (s *KeyUsage) MarshalJSON() ([]byte, error) {
1585 type NoMethod KeyUsage
1586 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1587 }
1588
1589
1590
1591 type KeyUsageOptions struct {
1592
1593 CertSign bool `json:"certSign,omitempty"`
1594
1595
1596 ContentCommitment bool `json:"contentCommitment,omitempty"`
1597
1598 CrlSign bool `json:"crlSign,omitempty"`
1599
1600 DataEncipherment bool `json:"dataEncipherment,omitempty"`
1601
1602 DecipherOnly bool `json:"decipherOnly,omitempty"`
1603
1604 DigitalSignature bool `json:"digitalSignature,omitempty"`
1605
1606 EncipherOnly bool `json:"encipherOnly,omitempty"`
1607
1608 KeyAgreement bool `json:"keyAgreement,omitempty"`
1609
1610 KeyEncipherment bool `json:"keyEncipherment,omitempty"`
1611
1612
1613
1614
1615
1616 ForceSendFields []string `json:"-"`
1617
1618
1619
1620
1621 NullFields []string `json:"-"`
1622 }
1623
1624 func (s *KeyUsageOptions) MarshalJSON() ([]byte, error) {
1625 type NoMethod KeyUsageOptions
1626 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1627 }
1628
1629
1630
1631 type KeyVersionSpec struct {
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652 Algorithm string `json:"algorithm,omitempty"`
1653
1654
1655
1656
1657 CloudKmsKeyVersion string `json:"cloudKmsKeyVersion,omitempty"`
1658
1659
1660
1661
1662
1663 ForceSendFields []string `json:"-"`
1664
1665
1666
1667
1668 NullFields []string `json:"-"`
1669 }
1670
1671 func (s *KeyVersionSpec) MarshalJSON() ([]byte, error) {
1672 type NoMethod KeyVersionSpec
1673 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1674 }
1675
1676
1677
1678 type ListCaPoolsResponse struct {
1679
1680 CaPools []*CaPool `json:"caPools,omitempty"`
1681
1682
1683
1684 NextPageToken string `json:"nextPageToken,omitempty"`
1685
1686
1687 Unreachable []string `json:"unreachable,omitempty"`
1688
1689
1690 googleapi.ServerResponse `json:"-"`
1691
1692
1693
1694
1695
1696 ForceSendFields []string `json:"-"`
1697
1698
1699
1700
1701 NullFields []string `json:"-"`
1702 }
1703
1704 func (s *ListCaPoolsResponse) MarshalJSON() ([]byte, error) {
1705 type NoMethod ListCaPoolsResponse
1706 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1707 }
1708
1709
1710
1711 type ListCertificateAuthoritiesResponse struct {
1712
1713 CertificateAuthorities []*CertificateAuthority `json:"certificateAuthorities,omitempty"`
1714
1715
1716
1717 NextPageToken string `json:"nextPageToken,omitempty"`
1718
1719
1720 Unreachable []string `json:"unreachable,omitempty"`
1721
1722
1723 googleapi.ServerResponse `json:"-"`
1724
1725
1726
1727
1728
1729 ForceSendFields []string `json:"-"`
1730
1731
1732
1733
1734 NullFields []string `json:"-"`
1735 }
1736
1737 func (s *ListCertificateAuthoritiesResponse) MarshalJSON() ([]byte, error) {
1738 type NoMethod ListCertificateAuthoritiesResponse
1739 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1740 }
1741
1742
1743
1744 type ListCertificateRevocationListsResponse struct {
1745
1746 CertificateRevocationLists []*CertificateRevocationList `json:"certificateRevocationLists,omitempty"`
1747
1748
1749
1750 NextPageToken string `json:"nextPageToken,omitempty"`
1751
1752
1753 Unreachable []string `json:"unreachable,omitempty"`
1754
1755
1756 googleapi.ServerResponse `json:"-"`
1757
1758
1759
1760
1761
1762 ForceSendFields []string `json:"-"`
1763
1764
1765
1766
1767 NullFields []string `json:"-"`
1768 }
1769
1770 func (s *ListCertificateRevocationListsResponse) MarshalJSON() ([]byte, error) {
1771 type NoMethod ListCertificateRevocationListsResponse
1772 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1773 }
1774
1775
1776
1777 type ListCertificateTemplatesResponse struct {
1778
1779 CertificateTemplates []*CertificateTemplate `json:"certificateTemplates,omitempty"`
1780
1781
1782
1783 NextPageToken string `json:"nextPageToken,omitempty"`
1784
1785
1786 Unreachable []string `json:"unreachable,omitempty"`
1787
1788
1789 googleapi.ServerResponse `json:"-"`
1790
1791
1792
1793
1794
1795 ForceSendFields []string `json:"-"`
1796
1797
1798
1799
1800 NullFields []string `json:"-"`
1801 }
1802
1803 func (s *ListCertificateTemplatesResponse) MarshalJSON() ([]byte, error) {
1804 type NoMethod ListCertificateTemplatesResponse
1805 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1806 }
1807
1808
1809
1810 type ListCertificatesResponse struct {
1811
1812 Certificates []*Certificate `json:"certificates,omitempty"`
1813
1814
1815
1816 NextPageToken string `json:"nextPageToken,omitempty"`
1817
1818
1819 Unreachable []string `json:"unreachable,omitempty"`
1820
1821
1822 googleapi.ServerResponse `json:"-"`
1823
1824
1825
1826
1827
1828 ForceSendFields []string `json:"-"`
1829
1830
1831
1832
1833 NullFields []string `json:"-"`
1834 }
1835
1836 func (s *ListCertificatesResponse) MarshalJSON() ([]byte, error) {
1837 type NoMethod ListCertificatesResponse
1838 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1839 }
1840
1841
1842 type ListLocationsResponse struct {
1843
1844
1845 Locations []*Location `json:"locations,omitempty"`
1846
1847 NextPageToken string `json:"nextPageToken,omitempty"`
1848
1849
1850 googleapi.ServerResponse `json:"-"`
1851
1852
1853
1854
1855
1856 ForceSendFields []string `json:"-"`
1857
1858
1859
1860
1861 NullFields []string `json:"-"`
1862 }
1863
1864 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
1865 type NoMethod ListLocationsResponse
1866 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1867 }
1868
1869
1870 type ListOperationsResponse struct {
1871
1872 NextPageToken string `json:"nextPageToken,omitempty"`
1873
1874
1875 Operations []*Operation `json:"operations,omitempty"`
1876
1877
1878 googleapi.ServerResponse `json:"-"`
1879
1880
1881
1882
1883
1884 ForceSendFields []string `json:"-"`
1885
1886
1887
1888
1889 NullFields []string `json:"-"`
1890 }
1891
1892 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1893 type NoMethod ListOperationsResponse
1894 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1895 }
1896
1897
1898 type Location struct {
1899
1900
1901 DisplayName string `json:"displayName,omitempty"`
1902
1903
1904 Labels map[string]string `json:"labels,omitempty"`
1905
1906 LocationId string `json:"locationId,omitempty"`
1907
1908
1909 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1910
1911
1912
1913 Name string `json:"name,omitempty"`
1914
1915
1916 googleapi.ServerResponse `json:"-"`
1917
1918
1919
1920
1921
1922 ForceSendFields []string `json:"-"`
1923
1924
1925
1926
1927 NullFields []string `json:"-"`
1928 }
1929
1930 func (s *Location) MarshalJSON() ([]byte, error) {
1931 type NoMethod Location
1932 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1933 }
1934
1935
1936
1937 type NameConstraints struct {
1938
1939 Critical bool `json:"critical,omitempty"`
1940
1941
1942
1943
1944
1945 ExcludedDnsNames []string `json:"excludedDnsNames,omitempty"`
1946
1947
1948
1949
1950 ExcludedEmailAddresses []string `json:"excludedEmailAddresses,omitempty"`
1951
1952
1953
1954 ExcludedIpRanges []string `json:"excludedIpRanges,omitempty"`
1955
1956
1957
1958 ExcludedUris []string `json:"excludedUris,omitempty"`
1959
1960
1961
1962
1963
1964 PermittedDnsNames []string `json:"permittedDnsNames,omitempty"`
1965
1966
1967
1968
1969 PermittedEmailAddresses []string `json:"permittedEmailAddresses,omitempty"`
1970
1971
1972
1973 PermittedIpRanges []string `json:"permittedIpRanges,omitempty"`
1974
1975
1976
1977 PermittedUris []string `json:"permittedUris,omitempty"`
1978
1979
1980
1981
1982
1983 ForceSendFields []string `json:"-"`
1984
1985
1986
1987
1988 NullFields []string `json:"-"`
1989 }
1990
1991 func (s *NameConstraints) MarshalJSON() ([]byte, error) {
1992 type NoMethod NameConstraints
1993 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1994 }
1995
1996
1997
1998 type ObjectId struct {
1999
2000
2001 ObjectIdPath []int64 `json:"objectIdPath,omitempty"`
2002
2003
2004
2005
2006
2007 ForceSendFields []string `json:"-"`
2008
2009
2010
2011
2012 NullFields []string `json:"-"`
2013 }
2014
2015 func (s *ObjectId) MarshalJSON() ([]byte, error) {
2016 type NoMethod ObjectId
2017 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2018 }
2019
2020
2021
2022 type Operation struct {
2023
2024
2025
2026 Done bool `json:"done,omitempty"`
2027
2028 Error *Status `json:"error,omitempty"`
2029
2030
2031
2032
2033 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2034
2035
2036
2037 Name string `json:"name,omitempty"`
2038
2039
2040
2041
2042
2043
2044
2045 Response googleapi.RawMessage `json:"response,omitempty"`
2046
2047
2048 googleapi.ServerResponse `json:"-"`
2049
2050
2051
2052
2053
2054 ForceSendFields []string `json:"-"`
2055
2056
2057
2058
2059 NullFields []string `json:"-"`
2060 }
2061
2062 func (s *Operation) MarshalJSON() ([]byte, error) {
2063 type NoMethod Operation
2064 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2065 }
2066
2067
2068 type OperationMetadata struct {
2069
2070 ApiVersion string `json:"apiVersion,omitempty"`
2071
2072 CreateTime string `json:"createTime,omitempty"`
2073
2074 EndTime string `json:"endTime,omitempty"`
2075
2076
2077
2078
2079 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
2080
2081 StatusMessage string `json:"statusMessage,omitempty"`
2082
2083
2084 Target string `json:"target,omitempty"`
2085
2086 Verb string `json:"verb,omitempty"`
2087
2088
2089
2090
2091
2092 ForceSendFields []string `json:"-"`
2093
2094
2095
2096
2097 NullFields []string `json:"-"`
2098 }
2099
2100 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
2101 type NoMethod OperationMetadata
2102 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2103 }
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135 type Policy struct {
2136
2137 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147 Bindings []*Binding `json:"bindings,omitempty"`
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159 Etag string `json:"etag,omitempty"`
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175 Version int64 `json:"version,omitempty"`
2176
2177
2178 googleapi.ServerResponse `json:"-"`
2179
2180
2181
2182
2183
2184 ForceSendFields []string `json:"-"`
2185
2186
2187
2188
2189 NullFields []string `json:"-"`
2190 }
2191
2192 func (s *Policy) MarshalJSON() ([]byte, error) {
2193 type NoMethod Policy
2194 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2195 }
2196
2197
2198 type PublicKey struct {
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215 Format string `json:"format,omitempty"`
2216
2217
2218 Key string `json:"key,omitempty"`
2219
2220
2221
2222
2223
2224 ForceSendFields []string `json:"-"`
2225
2226
2227
2228
2229 NullFields []string `json:"-"`
2230 }
2231
2232 func (s *PublicKey) MarshalJSON() ([]byte, error) {
2233 type NoMethod PublicKey
2234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2235 }
2236
2237
2238
2239
2240
2241 type PublishingOptions struct {
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253 EncodingFormat string `json:"encodingFormat,omitempty"`
2254
2255
2256
2257
2258
2259 PublishCaCert bool `json:"publishCaCert,omitempty"`
2260
2261
2262
2263
2264
2265
2266 PublishCrl bool `json:"publishCrl,omitempty"`
2267
2268
2269
2270
2271
2272 ForceSendFields []string `json:"-"`
2273
2274
2275
2276
2277 NullFields []string `json:"-"`
2278 }
2279
2280 func (s *PublishingOptions) MarshalJSON() ([]byte, error) {
2281 type NoMethod PublishingOptions
2282 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2283 }
2284
2285
2286
2287 type ReconciliationOperationMetadata struct {
2288
2289 DeleteResource bool `json:"deleteResource,omitempty"`
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301 ExclusiveAction string `json:"exclusiveAction,omitempty"`
2302
2303
2304
2305
2306
2307 ForceSendFields []string `json:"-"`
2308
2309
2310
2311
2312 NullFields []string `json:"-"`
2313 }
2314
2315 func (s *ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) {
2316 type NoMethod ReconciliationOperationMetadata
2317 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2318 }
2319
2320
2321
2322 type RevocationDetails struct {
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343 RevocationState string `json:"revocationState,omitempty"`
2344
2345 RevocationTime string `json:"revocationTime,omitempty"`
2346
2347
2348
2349
2350
2351 ForceSendFields []string `json:"-"`
2352
2353
2354
2355
2356 NullFields []string `json:"-"`
2357 }
2358
2359 func (s *RevocationDetails) MarshalJSON() ([]byte, error) {
2360 type NoMethod RevocationDetails
2361 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2362 }
2363
2364
2365
2366 type RevokeCertificateRequest struct {
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387 Reason string `json:"reason,omitempty"`
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399 RequestId string `json:"requestId,omitempty"`
2400
2401
2402
2403
2404
2405 ForceSendFields []string `json:"-"`
2406
2407
2408
2409
2410 NullFields []string `json:"-"`
2411 }
2412
2413 func (s *RevokeCertificateRequest) MarshalJSON() ([]byte, error) {
2414 type NoMethod RevokeCertificateRequest
2415 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2416 }
2417
2418
2419 type RevokedCertificate struct {
2420
2421
2422 Certificate string `json:"certificate,omitempty"`
2423
2424 HexSerialNumber string `json:"hexSerialNumber,omitempty"`
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445 RevocationReason string `json:"revocationReason,omitempty"`
2446
2447
2448
2449
2450
2451 ForceSendFields []string `json:"-"`
2452
2453
2454
2455
2456 NullFields []string `json:"-"`
2457 }
2458
2459 func (s *RevokedCertificate) MarshalJSON() ([]byte, error) {
2460 type NoMethod RevokedCertificate
2461 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2462 }
2463
2464
2465
2466 type RsaKeyType struct {
2467
2468
2469
2470 MaxModulusSize int64 `json:"maxModulusSize,omitempty,string"`
2471
2472
2473
2474 MinModulusSize int64 `json:"minModulusSize,omitempty,string"`
2475
2476
2477
2478
2479
2480 ForceSendFields []string `json:"-"`
2481
2482
2483
2484
2485 NullFields []string `json:"-"`
2486 }
2487
2488 func (s *RsaKeyType) MarshalJSON() ([]byte, error) {
2489 type NoMethod RsaKeyType
2490 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2491 }
2492
2493
2494 type SetIamPolicyRequest struct {
2495
2496
2497
2498
2499 Policy *Policy `json:"policy,omitempty"`
2500
2501
2502
2503 UpdateMask string `json:"updateMask,omitempty"`
2504
2505
2506
2507
2508
2509 ForceSendFields []string `json:"-"`
2510
2511
2512
2513
2514 NullFields []string `json:"-"`
2515 }
2516
2517 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
2518 type NoMethod SetIamPolicyRequest
2519 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2520 }
2521
2522
2523
2524
2525
2526
2527
2528 type Status struct {
2529
2530 Code int64 `json:"code,omitempty"`
2531
2532
2533 Details []googleapi.RawMessage `json:"details,omitempty"`
2534
2535
2536
2537 Message string `json:"message,omitempty"`
2538
2539
2540
2541
2542
2543 ForceSendFields []string `json:"-"`
2544
2545
2546
2547
2548 NullFields []string `json:"-"`
2549 }
2550
2551 func (s *Status) MarshalJSON() ([]byte, error) {
2552 type NoMethod Status
2553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2554 }
2555
2556
2557
2558 type Subject struct {
2559
2560 CommonName string `json:"commonName,omitempty"`
2561
2562 CountryCode string `json:"countryCode,omitempty"`
2563
2564 Locality string `json:"locality,omitempty"`
2565
2566 Organization string `json:"organization,omitempty"`
2567
2568 OrganizationalUnit string `json:"organizationalUnit,omitempty"`
2569
2570 PostalCode string `json:"postalCode,omitempty"`
2571
2572 Province string `json:"province,omitempty"`
2573
2574 StreetAddress string `json:"streetAddress,omitempty"`
2575
2576
2577
2578
2579
2580 ForceSendFields []string `json:"-"`
2581
2582
2583
2584
2585 NullFields []string `json:"-"`
2586 }
2587
2588 func (s *Subject) MarshalJSON() ([]byte, error) {
2589 type NoMethod Subject
2590 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2591 }
2592
2593
2594
2595
2596 type SubjectAltNames struct {
2597
2598
2599 CustomSans []*X509Extension `json:"customSans,omitempty"`
2600
2601 DnsNames []string `json:"dnsNames,omitempty"`
2602
2603 EmailAddresses []string `json:"emailAddresses,omitempty"`
2604
2605
2606 IpAddresses []string `json:"ipAddresses,omitempty"`
2607
2608 Uris []string `json:"uris,omitempty"`
2609
2610
2611
2612
2613
2614 ForceSendFields []string `json:"-"`
2615
2616
2617
2618
2619 NullFields []string `json:"-"`
2620 }
2621
2622 func (s *SubjectAltNames) MarshalJSON() ([]byte, error) {
2623 type NoMethod SubjectAltNames
2624 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2625 }
2626
2627
2628
2629 type SubjectConfig struct {
2630
2631
2632 Subject *Subject `json:"subject,omitempty"`
2633
2634 SubjectAltName *SubjectAltNames `json:"subjectAltName,omitempty"`
2635
2636
2637
2638
2639
2640 ForceSendFields []string `json:"-"`
2641
2642
2643
2644
2645 NullFields []string `json:"-"`
2646 }
2647
2648 func (s *SubjectConfig) MarshalJSON() ([]byte, error) {
2649 type NoMethod SubjectConfig
2650 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2651 }
2652
2653
2654
2655
2656 type SubjectDescription struct {
2657
2658 HexSerialNumber string `json:"hexSerialNumber,omitempty"`
2659
2660 Lifetime string `json:"lifetime,omitempty"`
2661
2662
2663
2664
2665 NotAfterTime string `json:"notAfterTime,omitempty"`
2666
2667 NotBeforeTime string `json:"notBeforeTime,omitempty"`
2668
2669
2670 Subject *Subject `json:"subject,omitempty"`
2671
2672 SubjectAltName *SubjectAltNames `json:"subjectAltName,omitempty"`
2673
2674
2675
2676
2677
2678 ForceSendFields []string `json:"-"`
2679
2680
2681
2682
2683 NullFields []string `json:"-"`
2684 }
2685
2686 func (s *SubjectDescription) MarshalJSON() ([]byte, error) {
2687 type NoMethod SubjectDescription
2688 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2689 }
2690
2691
2692
2693
2694 type SubordinateConfig struct {
2695
2696
2697
2698
2699 CertificateAuthority string `json:"certificateAuthority,omitempty"`
2700
2701
2702 PemIssuerChain *SubordinateConfigChain `json:"pemIssuerChain,omitempty"`
2703
2704
2705
2706
2707
2708 ForceSendFields []string `json:"-"`
2709
2710
2711
2712
2713 NullFields []string `json:"-"`
2714 }
2715
2716 func (s *SubordinateConfig) MarshalJSON() ([]byte, error) {
2717 type NoMethod SubordinateConfig
2718 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2719 }
2720
2721
2722
2723 type SubordinateConfigChain struct {
2724
2725
2726 PemCertificates []string `json:"pemCertificates,omitempty"`
2727
2728
2729
2730
2731
2732 ForceSendFields []string `json:"-"`
2733
2734
2735
2736
2737 NullFields []string `json:"-"`
2738 }
2739
2740 func (s *SubordinateConfigChain) MarshalJSON() ([]byte, error) {
2741 type NoMethod SubordinateConfigChain
2742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2743 }
2744
2745
2746 type TestIamPermissionsRequest struct {
2747
2748
2749
2750
2751 Permissions []string `json:"permissions,omitempty"`
2752
2753
2754
2755
2756
2757 ForceSendFields []string `json:"-"`
2758
2759
2760
2761
2762 NullFields []string `json:"-"`
2763 }
2764
2765 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2766 type NoMethod TestIamPermissionsRequest
2767 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2768 }
2769
2770
2771
2772 type TestIamPermissionsResponse struct {
2773
2774
2775 Permissions []string `json:"permissions,omitempty"`
2776
2777
2778 googleapi.ServerResponse `json:"-"`
2779
2780
2781
2782
2783
2784 ForceSendFields []string `json:"-"`
2785
2786
2787
2788
2789 NullFields []string `json:"-"`
2790 }
2791
2792 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2793 type NoMethod TestIamPermissionsResponse
2794 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2795 }
2796
2797
2798
2799 type UndeleteCertificateAuthorityRequest struct {
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811 RequestId string `json:"requestId,omitempty"`
2812
2813
2814
2815
2816
2817 ForceSendFields []string `json:"-"`
2818
2819
2820
2821
2822 NullFields []string `json:"-"`
2823 }
2824
2825 func (s *UndeleteCertificateAuthorityRequest) MarshalJSON() ([]byte, error) {
2826 type NoMethod UndeleteCertificateAuthorityRequest
2827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2828 }
2829
2830
2831
2832 type X509Extension struct {
2833
2834
2835
2836 Critical bool `json:"critical,omitempty"`
2837
2838 ObjectId *ObjectId `json:"objectId,omitempty"`
2839
2840 Value string `json:"value,omitempty"`
2841
2842
2843
2844
2845
2846 ForceSendFields []string `json:"-"`
2847
2848
2849
2850
2851 NullFields []string `json:"-"`
2852 }
2853
2854 func (s *X509Extension) MarshalJSON() ([]byte, error) {
2855 type NoMethod X509Extension
2856 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2857 }
2858
2859
2860
2861
2862 type X509Parameters struct {
2863
2864 AdditionalExtensions []*X509Extension `json:"additionalExtensions,omitempty"`
2865
2866
2867
2868 AiaOcspServers []string `json:"aiaOcspServers,omitempty"`
2869
2870
2871 CaOptions *CaOptions `json:"caOptions,omitempty"`
2872
2873
2874 KeyUsage *KeyUsage `json:"keyUsage,omitempty"`
2875
2876 NameConstraints *NameConstraints `json:"nameConstraints,omitempty"`
2877
2878
2879 PolicyIds []*ObjectId `json:"policyIds,omitempty"`
2880
2881
2882
2883
2884
2885 ForceSendFields []string `json:"-"`
2886
2887
2888
2889
2890 NullFields []string `json:"-"`
2891 }
2892
2893 func (s *X509Parameters) MarshalJSON() ([]byte, error) {
2894 type NoMethod X509Parameters
2895 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2896 }
2897
2898 type ProjectsLocationsGetCall struct {
2899 s *Service
2900 name string
2901 urlParams_ gensupport.URLParams
2902 ifNoneMatch_ string
2903 ctx_ context.Context
2904 header_ http.Header
2905 }
2906
2907
2908
2909
2910 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2911 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2912 c.name = name
2913 return c
2914 }
2915
2916
2917
2918
2919 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2920 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2921 return c
2922 }
2923
2924
2925
2926
2927 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2928 c.ifNoneMatch_ = entityTag
2929 return c
2930 }
2931
2932
2933 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2934 c.ctx_ = ctx
2935 return c
2936 }
2937
2938
2939
2940 func (c *ProjectsLocationsGetCall) Header() http.Header {
2941 if c.header_ == nil {
2942 c.header_ = make(http.Header)
2943 }
2944 return c.header_
2945 }
2946
2947 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2948 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2949 if c.ifNoneMatch_ != "" {
2950 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2951 }
2952 var body io.Reader = nil
2953 c.urlParams_.Set("alt", alt)
2954 c.urlParams_.Set("prettyPrint", "false")
2955 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2956 urls += "?" + c.urlParams_.Encode()
2957 req, err := http.NewRequest("GET", urls, body)
2958 if err != nil {
2959 return nil, err
2960 }
2961 req.Header = reqHeaders
2962 googleapi.Expand(req.URL, map[string]string{
2963 "name": c.name,
2964 })
2965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2966 }
2967
2968
2969
2970
2971
2972
2973 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2974 gensupport.SetOptions(c.urlParams_, opts...)
2975 res, err := c.doRequest("json")
2976 if res != nil && res.StatusCode == http.StatusNotModified {
2977 if res.Body != nil {
2978 res.Body.Close()
2979 }
2980 return nil, gensupport.WrapError(&googleapi.Error{
2981 Code: res.StatusCode,
2982 Header: res.Header,
2983 })
2984 }
2985 if err != nil {
2986 return nil, err
2987 }
2988 defer googleapi.CloseBody(res)
2989 if err := googleapi.CheckResponse(res); err != nil {
2990 return nil, gensupport.WrapError(err)
2991 }
2992 ret := &Location{
2993 ServerResponse: googleapi.ServerResponse{
2994 Header: res.Header,
2995 HTTPStatusCode: res.StatusCode,
2996 },
2997 }
2998 target := &ret
2999 if err := gensupport.DecodeResponse(target, res); err != nil {
3000 return nil, err
3001 }
3002 return ret, nil
3003 }
3004
3005 type ProjectsLocationsListCall struct {
3006 s *Service
3007 name string
3008 urlParams_ gensupport.URLParams
3009 ifNoneMatch_ string
3010 ctx_ context.Context
3011 header_ http.Header
3012 }
3013
3014
3015
3016
3017 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
3018 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3019 c.name = name
3020 return c
3021 }
3022
3023
3024
3025
3026
3027 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
3028 c.urlParams_.Set("filter", filter)
3029 return c
3030 }
3031
3032
3033
3034 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
3035 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3036 return c
3037 }
3038
3039
3040
3041
3042 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
3043 c.urlParams_.Set("pageToken", pageToken)
3044 return c
3045 }
3046
3047
3048
3049
3050 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
3051 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3052 return c
3053 }
3054
3055
3056
3057
3058 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
3059 c.ifNoneMatch_ = entityTag
3060 return c
3061 }
3062
3063
3064 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
3065 c.ctx_ = ctx
3066 return c
3067 }
3068
3069
3070
3071 func (c *ProjectsLocationsListCall) Header() http.Header {
3072 if c.header_ == nil {
3073 c.header_ = make(http.Header)
3074 }
3075 return c.header_
3076 }
3077
3078 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
3079 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3080 if c.ifNoneMatch_ != "" {
3081 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3082 }
3083 var body io.Reader = nil
3084 c.urlParams_.Set("alt", alt)
3085 c.urlParams_.Set("prettyPrint", "false")
3086 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
3087 urls += "?" + c.urlParams_.Encode()
3088 req, err := http.NewRequest("GET", urls, body)
3089 if err != nil {
3090 return nil, err
3091 }
3092 req.Header = reqHeaders
3093 googleapi.Expand(req.URL, map[string]string{
3094 "name": c.name,
3095 })
3096 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3097 }
3098
3099
3100
3101
3102
3103
3104
3105 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
3106 gensupport.SetOptions(c.urlParams_, opts...)
3107 res, err := c.doRequest("json")
3108 if res != nil && res.StatusCode == http.StatusNotModified {
3109 if res.Body != nil {
3110 res.Body.Close()
3111 }
3112 return nil, gensupport.WrapError(&googleapi.Error{
3113 Code: res.StatusCode,
3114 Header: res.Header,
3115 })
3116 }
3117 if err != nil {
3118 return nil, err
3119 }
3120 defer googleapi.CloseBody(res)
3121 if err := googleapi.CheckResponse(res); err != nil {
3122 return nil, gensupport.WrapError(err)
3123 }
3124 ret := &ListLocationsResponse{
3125 ServerResponse: googleapi.ServerResponse{
3126 Header: res.Header,
3127 HTTPStatusCode: res.StatusCode,
3128 },
3129 }
3130 target := &ret
3131 if err := gensupport.DecodeResponse(target, res); err != nil {
3132 return nil, err
3133 }
3134 return ret, nil
3135 }
3136
3137
3138
3139
3140 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
3141 c.ctx_ = ctx
3142 defer c.PageToken(c.urlParams_.Get("pageToken"))
3143 for {
3144 x, err := c.Do()
3145 if err != nil {
3146 return err
3147 }
3148 if err := f(x); err != nil {
3149 return err
3150 }
3151 if x.NextPageToken == "" {
3152 return nil
3153 }
3154 c.PageToken(x.NextPageToken)
3155 }
3156 }
3157
3158 type ProjectsLocationsCaPoolsCreateCall struct {
3159 s *Service
3160 parent string
3161 capool *CaPool
3162 urlParams_ gensupport.URLParams
3163 ctx_ context.Context
3164 header_ http.Header
3165 }
3166
3167
3168
3169
3170
3171 func (r *ProjectsLocationsCaPoolsService) Create(parent string, capool *CaPool) *ProjectsLocationsCaPoolsCreateCall {
3172 c := &ProjectsLocationsCaPoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3173 c.parent = parent
3174 c.capool = capool
3175 return c
3176 }
3177
3178
3179
3180 func (c *ProjectsLocationsCaPoolsCreateCall) CaPoolId(caPoolId string) *ProjectsLocationsCaPoolsCreateCall {
3181 c.urlParams_.Set("caPoolId", caPoolId)
3182 return c
3183 }
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196 func (c *ProjectsLocationsCaPoolsCreateCall) RequestId(requestId string) *ProjectsLocationsCaPoolsCreateCall {
3197 c.urlParams_.Set("requestId", requestId)
3198 return c
3199 }
3200
3201
3202
3203
3204 func (c *ProjectsLocationsCaPoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCreateCall {
3205 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3206 return c
3207 }
3208
3209
3210 func (c *ProjectsLocationsCaPoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCreateCall {
3211 c.ctx_ = ctx
3212 return c
3213 }
3214
3215
3216
3217 func (c *ProjectsLocationsCaPoolsCreateCall) Header() http.Header {
3218 if c.header_ == nil {
3219 c.header_ = make(http.Header)
3220 }
3221 return c.header_
3222 }
3223
3224 func (c *ProjectsLocationsCaPoolsCreateCall) doRequest(alt string) (*http.Response, error) {
3225 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3226 var body io.Reader = nil
3227 body, err := googleapi.WithoutDataWrapper.JSONReader(c.capool)
3228 if err != nil {
3229 return nil, err
3230 }
3231 c.urlParams_.Set("alt", alt)
3232 c.urlParams_.Set("prettyPrint", "false")
3233 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/caPools")
3234 urls += "?" + c.urlParams_.Encode()
3235 req, err := http.NewRequest("POST", urls, body)
3236 if err != nil {
3237 return nil, err
3238 }
3239 req.Header = reqHeaders
3240 googleapi.Expand(req.URL, map[string]string{
3241 "parent": c.parent,
3242 })
3243 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3244 }
3245
3246
3247
3248
3249
3250
3251 func (c *ProjectsLocationsCaPoolsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3252 gensupport.SetOptions(c.urlParams_, opts...)
3253 res, err := c.doRequest("json")
3254 if res != nil && res.StatusCode == http.StatusNotModified {
3255 if res.Body != nil {
3256 res.Body.Close()
3257 }
3258 return nil, gensupport.WrapError(&googleapi.Error{
3259 Code: res.StatusCode,
3260 Header: res.Header,
3261 })
3262 }
3263 if err != nil {
3264 return nil, err
3265 }
3266 defer googleapi.CloseBody(res)
3267 if err := googleapi.CheckResponse(res); err != nil {
3268 return nil, gensupport.WrapError(err)
3269 }
3270 ret := &Operation{
3271 ServerResponse: googleapi.ServerResponse{
3272 Header: res.Header,
3273 HTTPStatusCode: res.StatusCode,
3274 },
3275 }
3276 target := &ret
3277 if err := gensupport.DecodeResponse(target, res); err != nil {
3278 return nil, err
3279 }
3280 return ret, nil
3281 }
3282
3283 type ProjectsLocationsCaPoolsDeleteCall struct {
3284 s *Service
3285 name string
3286 urlParams_ gensupport.URLParams
3287 ctx_ context.Context
3288 header_ http.Header
3289 }
3290
3291
3292
3293
3294
3295 func (r *ProjectsLocationsCaPoolsService) Delete(name string) *ProjectsLocationsCaPoolsDeleteCall {
3296 c := &ProjectsLocationsCaPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3297 c.name = name
3298 return c
3299 }
3300
3301
3302
3303
3304
3305
3306 func (c *ProjectsLocationsCaPoolsDeleteCall) IgnoreDependentResources(ignoreDependentResources bool) *ProjectsLocationsCaPoolsDeleteCall {
3307 c.urlParams_.Set("ignoreDependentResources", fmt.Sprint(ignoreDependentResources))
3308 return c
3309 }
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322 func (c *ProjectsLocationsCaPoolsDeleteCall) RequestId(requestId string) *ProjectsLocationsCaPoolsDeleteCall {
3323 c.urlParams_.Set("requestId", requestId)
3324 return c
3325 }
3326
3327
3328
3329
3330 func (c *ProjectsLocationsCaPoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsDeleteCall {
3331 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3332 return c
3333 }
3334
3335
3336 func (c *ProjectsLocationsCaPoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsDeleteCall {
3337 c.ctx_ = ctx
3338 return c
3339 }
3340
3341
3342
3343 func (c *ProjectsLocationsCaPoolsDeleteCall) Header() http.Header {
3344 if c.header_ == nil {
3345 c.header_ = make(http.Header)
3346 }
3347 return c.header_
3348 }
3349
3350 func (c *ProjectsLocationsCaPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
3351 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3352 var body io.Reader = nil
3353 c.urlParams_.Set("alt", alt)
3354 c.urlParams_.Set("prettyPrint", "false")
3355 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3356 urls += "?" + c.urlParams_.Encode()
3357 req, err := http.NewRequest("DELETE", urls, body)
3358 if err != nil {
3359 return nil, err
3360 }
3361 req.Header = reqHeaders
3362 googleapi.Expand(req.URL, map[string]string{
3363 "name": c.name,
3364 })
3365 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3366 }
3367
3368
3369
3370
3371
3372
3373 func (c *ProjectsLocationsCaPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3374 gensupport.SetOptions(c.urlParams_, opts...)
3375 res, err := c.doRequest("json")
3376 if res != nil && res.StatusCode == http.StatusNotModified {
3377 if res.Body != nil {
3378 res.Body.Close()
3379 }
3380 return nil, gensupport.WrapError(&googleapi.Error{
3381 Code: res.StatusCode,
3382 Header: res.Header,
3383 })
3384 }
3385 if err != nil {
3386 return nil, err
3387 }
3388 defer googleapi.CloseBody(res)
3389 if err := googleapi.CheckResponse(res); err != nil {
3390 return nil, gensupport.WrapError(err)
3391 }
3392 ret := &Operation{
3393 ServerResponse: googleapi.ServerResponse{
3394 Header: res.Header,
3395 HTTPStatusCode: res.StatusCode,
3396 },
3397 }
3398 target := &ret
3399 if err := gensupport.DecodeResponse(target, res); err != nil {
3400 return nil, err
3401 }
3402 return ret, nil
3403 }
3404
3405 type ProjectsLocationsCaPoolsFetchCaCertsCall struct {
3406 s *Service
3407 caPool string
3408 fetchcacertsrequest *FetchCaCertsRequest
3409 urlParams_ gensupport.URLParams
3410 ctx_ context.Context
3411 header_ http.Header
3412 }
3413
3414
3415
3416
3417
3418
3419
3420 func (r *ProjectsLocationsCaPoolsService) FetchCaCerts(caPool string, fetchcacertsrequest *FetchCaCertsRequest) *ProjectsLocationsCaPoolsFetchCaCertsCall {
3421 c := &ProjectsLocationsCaPoolsFetchCaCertsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3422 c.caPool = caPool
3423 c.fetchcacertsrequest = fetchcacertsrequest
3424 return c
3425 }
3426
3427
3428
3429
3430 func (c *ProjectsLocationsCaPoolsFetchCaCertsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsFetchCaCertsCall {
3431 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3432 return c
3433 }
3434
3435
3436 func (c *ProjectsLocationsCaPoolsFetchCaCertsCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsFetchCaCertsCall {
3437 c.ctx_ = ctx
3438 return c
3439 }
3440
3441
3442
3443 func (c *ProjectsLocationsCaPoolsFetchCaCertsCall) Header() http.Header {
3444 if c.header_ == nil {
3445 c.header_ = make(http.Header)
3446 }
3447 return c.header_
3448 }
3449
3450 func (c *ProjectsLocationsCaPoolsFetchCaCertsCall) doRequest(alt string) (*http.Response, error) {
3451 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3452 var body io.Reader = nil
3453 body, err := googleapi.WithoutDataWrapper.JSONReader(c.fetchcacertsrequest)
3454 if err != nil {
3455 return nil, err
3456 }
3457 c.urlParams_.Set("alt", alt)
3458 c.urlParams_.Set("prettyPrint", "false")
3459 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+caPool}:fetchCaCerts")
3460 urls += "?" + c.urlParams_.Encode()
3461 req, err := http.NewRequest("POST", urls, body)
3462 if err != nil {
3463 return nil, err
3464 }
3465 req.Header = reqHeaders
3466 googleapi.Expand(req.URL, map[string]string{
3467 "caPool": c.caPool,
3468 })
3469 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3470 }
3471
3472
3473
3474
3475
3476
3477
3478 func (c *ProjectsLocationsCaPoolsFetchCaCertsCall) Do(opts ...googleapi.CallOption) (*FetchCaCertsResponse, error) {
3479 gensupport.SetOptions(c.urlParams_, opts...)
3480 res, err := c.doRequest("json")
3481 if res != nil && res.StatusCode == http.StatusNotModified {
3482 if res.Body != nil {
3483 res.Body.Close()
3484 }
3485 return nil, gensupport.WrapError(&googleapi.Error{
3486 Code: res.StatusCode,
3487 Header: res.Header,
3488 })
3489 }
3490 if err != nil {
3491 return nil, err
3492 }
3493 defer googleapi.CloseBody(res)
3494 if err := googleapi.CheckResponse(res); err != nil {
3495 return nil, gensupport.WrapError(err)
3496 }
3497 ret := &FetchCaCertsResponse{
3498 ServerResponse: googleapi.ServerResponse{
3499 Header: res.Header,
3500 HTTPStatusCode: res.StatusCode,
3501 },
3502 }
3503 target := &ret
3504 if err := gensupport.DecodeResponse(target, res); err != nil {
3505 return nil, err
3506 }
3507 return ret, nil
3508 }
3509
3510 type ProjectsLocationsCaPoolsGetCall struct {
3511 s *Service
3512 name string
3513 urlParams_ gensupport.URLParams
3514 ifNoneMatch_ string
3515 ctx_ context.Context
3516 header_ http.Header
3517 }
3518
3519
3520
3521
3522 func (r *ProjectsLocationsCaPoolsService) Get(name string) *ProjectsLocationsCaPoolsGetCall {
3523 c := &ProjectsLocationsCaPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3524 c.name = name
3525 return c
3526 }
3527
3528
3529
3530
3531 func (c *ProjectsLocationsCaPoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsGetCall {
3532 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3533 return c
3534 }
3535
3536
3537
3538
3539 func (c *ProjectsLocationsCaPoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsGetCall {
3540 c.ifNoneMatch_ = entityTag
3541 return c
3542 }
3543
3544
3545 func (c *ProjectsLocationsCaPoolsGetCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsGetCall {
3546 c.ctx_ = ctx
3547 return c
3548 }
3549
3550
3551
3552 func (c *ProjectsLocationsCaPoolsGetCall) Header() http.Header {
3553 if c.header_ == nil {
3554 c.header_ = make(http.Header)
3555 }
3556 return c.header_
3557 }
3558
3559 func (c *ProjectsLocationsCaPoolsGetCall) doRequest(alt string) (*http.Response, error) {
3560 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3561 if c.ifNoneMatch_ != "" {
3562 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3563 }
3564 var body io.Reader = nil
3565 c.urlParams_.Set("alt", alt)
3566 c.urlParams_.Set("prettyPrint", "false")
3567 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3568 urls += "?" + c.urlParams_.Encode()
3569 req, err := http.NewRequest("GET", urls, body)
3570 if err != nil {
3571 return nil, err
3572 }
3573 req.Header = reqHeaders
3574 googleapi.Expand(req.URL, map[string]string{
3575 "name": c.name,
3576 })
3577 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3578 }
3579
3580
3581
3582
3583
3584
3585 func (c *ProjectsLocationsCaPoolsGetCall) Do(opts ...googleapi.CallOption) (*CaPool, error) {
3586 gensupport.SetOptions(c.urlParams_, opts...)
3587 res, err := c.doRequest("json")
3588 if res != nil && res.StatusCode == http.StatusNotModified {
3589 if res.Body != nil {
3590 res.Body.Close()
3591 }
3592 return nil, gensupport.WrapError(&googleapi.Error{
3593 Code: res.StatusCode,
3594 Header: res.Header,
3595 })
3596 }
3597 if err != nil {
3598 return nil, err
3599 }
3600 defer googleapi.CloseBody(res)
3601 if err := googleapi.CheckResponse(res); err != nil {
3602 return nil, gensupport.WrapError(err)
3603 }
3604 ret := &CaPool{
3605 ServerResponse: googleapi.ServerResponse{
3606 Header: res.Header,
3607 HTTPStatusCode: res.StatusCode,
3608 },
3609 }
3610 target := &ret
3611 if err := gensupport.DecodeResponse(target, res); err != nil {
3612 return nil, err
3613 }
3614 return ret, nil
3615 }
3616
3617 type ProjectsLocationsCaPoolsGetIamPolicyCall struct {
3618 s *Service
3619 resource string
3620 urlParams_ gensupport.URLParams
3621 ifNoneMatch_ string
3622 ctx_ context.Context
3623 header_ http.Header
3624 }
3625
3626
3627
3628
3629
3630
3631
3632 func (r *ProjectsLocationsCaPoolsService) GetIamPolicy(resource string) *ProjectsLocationsCaPoolsGetIamPolicyCall {
3633 c := &ProjectsLocationsCaPoolsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3634 c.resource = resource
3635 return c
3636 }
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650 func (c *ProjectsLocationsCaPoolsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsCaPoolsGetIamPolicyCall {
3651 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
3652 return c
3653 }
3654
3655
3656
3657
3658 func (c *ProjectsLocationsCaPoolsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsGetIamPolicyCall {
3659 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3660 return c
3661 }
3662
3663
3664
3665
3666 func (c *ProjectsLocationsCaPoolsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsGetIamPolicyCall {
3667 c.ifNoneMatch_ = entityTag
3668 return c
3669 }
3670
3671
3672 func (c *ProjectsLocationsCaPoolsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsGetIamPolicyCall {
3673 c.ctx_ = ctx
3674 return c
3675 }
3676
3677
3678
3679 func (c *ProjectsLocationsCaPoolsGetIamPolicyCall) Header() http.Header {
3680 if c.header_ == nil {
3681 c.header_ = make(http.Header)
3682 }
3683 return c.header_
3684 }
3685
3686 func (c *ProjectsLocationsCaPoolsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3687 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3688 if c.ifNoneMatch_ != "" {
3689 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3690 }
3691 var body io.Reader = nil
3692 c.urlParams_.Set("alt", alt)
3693 c.urlParams_.Set("prettyPrint", "false")
3694 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
3695 urls += "?" + c.urlParams_.Encode()
3696 req, err := http.NewRequest("GET", urls, body)
3697 if err != nil {
3698 return nil, err
3699 }
3700 req.Header = reqHeaders
3701 googleapi.Expand(req.URL, map[string]string{
3702 "resource": c.resource,
3703 })
3704 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3705 }
3706
3707
3708
3709
3710
3711
3712 func (c *ProjectsLocationsCaPoolsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3713 gensupport.SetOptions(c.urlParams_, opts...)
3714 res, err := c.doRequest("json")
3715 if res != nil && res.StatusCode == http.StatusNotModified {
3716 if res.Body != nil {
3717 res.Body.Close()
3718 }
3719 return nil, gensupport.WrapError(&googleapi.Error{
3720 Code: res.StatusCode,
3721 Header: res.Header,
3722 })
3723 }
3724 if err != nil {
3725 return nil, err
3726 }
3727 defer googleapi.CloseBody(res)
3728 if err := googleapi.CheckResponse(res); err != nil {
3729 return nil, gensupport.WrapError(err)
3730 }
3731 ret := &Policy{
3732 ServerResponse: googleapi.ServerResponse{
3733 Header: res.Header,
3734 HTTPStatusCode: res.StatusCode,
3735 },
3736 }
3737 target := &ret
3738 if err := gensupport.DecodeResponse(target, res); err != nil {
3739 return nil, err
3740 }
3741 return ret, nil
3742 }
3743
3744 type ProjectsLocationsCaPoolsListCall struct {
3745 s *Service
3746 parent string
3747 urlParams_ gensupport.URLParams
3748 ifNoneMatch_ string
3749 ctx_ context.Context
3750 header_ http.Header
3751 }
3752
3753
3754
3755
3756
3757 func (r *ProjectsLocationsCaPoolsService) List(parent string) *ProjectsLocationsCaPoolsListCall {
3758 c := &ProjectsLocationsCaPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3759 c.parent = parent
3760 return c
3761 }
3762
3763
3764
3765 func (c *ProjectsLocationsCaPoolsListCall) Filter(filter string) *ProjectsLocationsCaPoolsListCall {
3766 c.urlParams_.Set("filter", filter)
3767 return c
3768 }
3769
3770
3771
3772 func (c *ProjectsLocationsCaPoolsListCall) OrderBy(orderBy string) *ProjectsLocationsCaPoolsListCall {
3773 c.urlParams_.Set("orderBy", orderBy)
3774 return c
3775 }
3776
3777
3778
3779
3780
3781
3782 func (c *ProjectsLocationsCaPoolsListCall) PageSize(pageSize int64) *ProjectsLocationsCaPoolsListCall {
3783 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3784 return c
3785 }
3786
3787
3788
3789 func (c *ProjectsLocationsCaPoolsListCall) PageToken(pageToken string) *ProjectsLocationsCaPoolsListCall {
3790 c.urlParams_.Set("pageToken", pageToken)
3791 return c
3792 }
3793
3794
3795
3796
3797 func (c *ProjectsLocationsCaPoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsListCall {
3798 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3799 return c
3800 }
3801
3802
3803
3804
3805 func (c *ProjectsLocationsCaPoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsListCall {
3806 c.ifNoneMatch_ = entityTag
3807 return c
3808 }
3809
3810
3811 func (c *ProjectsLocationsCaPoolsListCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsListCall {
3812 c.ctx_ = ctx
3813 return c
3814 }
3815
3816
3817
3818 func (c *ProjectsLocationsCaPoolsListCall) Header() http.Header {
3819 if c.header_ == nil {
3820 c.header_ = make(http.Header)
3821 }
3822 return c.header_
3823 }
3824
3825 func (c *ProjectsLocationsCaPoolsListCall) doRequest(alt string) (*http.Response, error) {
3826 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3827 if c.ifNoneMatch_ != "" {
3828 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3829 }
3830 var body io.Reader = nil
3831 c.urlParams_.Set("alt", alt)
3832 c.urlParams_.Set("prettyPrint", "false")
3833 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/caPools")
3834 urls += "?" + c.urlParams_.Encode()
3835 req, err := http.NewRequest("GET", urls, body)
3836 if err != nil {
3837 return nil, err
3838 }
3839 req.Header = reqHeaders
3840 googleapi.Expand(req.URL, map[string]string{
3841 "parent": c.parent,
3842 })
3843 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3844 }
3845
3846
3847
3848
3849
3850
3851
3852 func (c *ProjectsLocationsCaPoolsListCall) Do(opts ...googleapi.CallOption) (*ListCaPoolsResponse, error) {
3853 gensupport.SetOptions(c.urlParams_, opts...)
3854 res, err := c.doRequest("json")
3855 if res != nil && res.StatusCode == http.StatusNotModified {
3856 if res.Body != nil {
3857 res.Body.Close()
3858 }
3859 return nil, gensupport.WrapError(&googleapi.Error{
3860 Code: res.StatusCode,
3861 Header: res.Header,
3862 })
3863 }
3864 if err != nil {
3865 return nil, err
3866 }
3867 defer googleapi.CloseBody(res)
3868 if err := googleapi.CheckResponse(res); err != nil {
3869 return nil, gensupport.WrapError(err)
3870 }
3871 ret := &ListCaPoolsResponse{
3872 ServerResponse: googleapi.ServerResponse{
3873 Header: res.Header,
3874 HTTPStatusCode: res.StatusCode,
3875 },
3876 }
3877 target := &ret
3878 if err := gensupport.DecodeResponse(target, res); err != nil {
3879 return nil, err
3880 }
3881 return ret, nil
3882 }
3883
3884
3885
3886
3887 func (c *ProjectsLocationsCaPoolsListCall) Pages(ctx context.Context, f func(*ListCaPoolsResponse) error) error {
3888 c.ctx_ = ctx
3889 defer c.PageToken(c.urlParams_.Get("pageToken"))
3890 for {
3891 x, err := c.Do()
3892 if err != nil {
3893 return err
3894 }
3895 if err := f(x); err != nil {
3896 return err
3897 }
3898 if x.NextPageToken == "" {
3899 return nil
3900 }
3901 c.PageToken(x.NextPageToken)
3902 }
3903 }
3904
3905 type ProjectsLocationsCaPoolsPatchCall struct {
3906 s *Service
3907 name string
3908 capool *CaPool
3909 urlParams_ gensupport.URLParams
3910 ctx_ context.Context
3911 header_ http.Header
3912 }
3913
3914
3915
3916
3917
3918 func (r *ProjectsLocationsCaPoolsService) Patch(name string, capool *CaPool) *ProjectsLocationsCaPoolsPatchCall {
3919 c := &ProjectsLocationsCaPoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3920 c.name = name
3921 c.capool = capool
3922 return c
3923 }
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936 func (c *ProjectsLocationsCaPoolsPatchCall) RequestId(requestId string) *ProjectsLocationsCaPoolsPatchCall {
3937 c.urlParams_.Set("requestId", requestId)
3938 return c
3939 }
3940
3941
3942
3943 func (c *ProjectsLocationsCaPoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCaPoolsPatchCall {
3944 c.urlParams_.Set("updateMask", updateMask)
3945 return c
3946 }
3947
3948
3949
3950
3951 func (c *ProjectsLocationsCaPoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsPatchCall {
3952 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3953 return c
3954 }
3955
3956
3957 func (c *ProjectsLocationsCaPoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsPatchCall {
3958 c.ctx_ = ctx
3959 return c
3960 }
3961
3962
3963
3964 func (c *ProjectsLocationsCaPoolsPatchCall) Header() http.Header {
3965 if c.header_ == nil {
3966 c.header_ = make(http.Header)
3967 }
3968 return c.header_
3969 }
3970
3971 func (c *ProjectsLocationsCaPoolsPatchCall) doRequest(alt string) (*http.Response, error) {
3972 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3973 var body io.Reader = nil
3974 body, err := googleapi.WithoutDataWrapper.JSONReader(c.capool)
3975 if err != nil {
3976 return nil, err
3977 }
3978 c.urlParams_.Set("alt", alt)
3979 c.urlParams_.Set("prettyPrint", "false")
3980 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3981 urls += "?" + c.urlParams_.Encode()
3982 req, err := http.NewRequest("PATCH", urls, body)
3983 if err != nil {
3984 return nil, err
3985 }
3986 req.Header = reqHeaders
3987 googleapi.Expand(req.URL, map[string]string{
3988 "name": c.name,
3989 })
3990 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3991 }
3992
3993
3994
3995
3996
3997
3998 func (c *ProjectsLocationsCaPoolsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3999 gensupport.SetOptions(c.urlParams_, opts...)
4000 res, err := c.doRequest("json")
4001 if res != nil && res.StatusCode == http.StatusNotModified {
4002 if res.Body != nil {
4003 res.Body.Close()
4004 }
4005 return nil, gensupport.WrapError(&googleapi.Error{
4006 Code: res.StatusCode,
4007 Header: res.Header,
4008 })
4009 }
4010 if err != nil {
4011 return nil, err
4012 }
4013 defer googleapi.CloseBody(res)
4014 if err := googleapi.CheckResponse(res); err != nil {
4015 return nil, gensupport.WrapError(err)
4016 }
4017 ret := &Operation{
4018 ServerResponse: googleapi.ServerResponse{
4019 Header: res.Header,
4020 HTTPStatusCode: res.StatusCode,
4021 },
4022 }
4023 target := &ret
4024 if err := gensupport.DecodeResponse(target, res); err != nil {
4025 return nil, err
4026 }
4027 return ret, nil
4028 }
4029
4030 type ProjectsLocationsCaPoolsSetIamPolicyCall struct {
4031 s *Service
4032 resource string
4033 setiampolicyrequest *SetIamPolicyRequest
4034 urlParams_ gensupport.URLParams
4035 ctx_ context.Context
4036 header_ http.Header
4037 }
4038
4039
4040
4041
4042
4043
4044
4045
4046 func (r *ProjectsLocationsCaPoolsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsCaPoolsSetIamPolicyCall {
4047 c := &ProjectsLocationsCaPoolsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4048 c.resource = resource
4049 c.setiampolicyrequest = setiampolicyrequest
4050 return c
4051 }
4052
4053
4054
4055
4056 func (c *ProjectsLocationsCaPoolsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsSetIamPolicyCall {
4057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4058 return c
4059 }
4060
4061
4062 func (c *ProjectsLocationsCaPoolsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsSetIamPolicyCall {
4063 c.ctx_ = ctx
4064 return c
4065 }
4066
4067
4068
4069 func (c *ProjectsLocationsCaPoolsSetIamPolicyCall) Header() http.Header {
4070 if c.header_ == nil {
4071 c.header_ = make(http.Header)
4072 }
4073 return c.header_
4074 }
4075
4076 func (c *ProjectsLocationsCaPoolsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4078 var body io.Reader = nil
4079 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
4080 if err != nil {
4081 return nil, err
4082 }
4083 c.urlParams_.Set("alt", alt)
4084 c.urlParams_.Set("prettyPrint", "false")
4085 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
4086 urls += "?" + c.urlParams_.Encode()
4087 req, err := http.NewRequest("POST", urls, body)
4088 if err != nil {
4089 return nil, err
4090 }
4091 req.Header = reqHeaders
4092 googleapi.Expand(req.URL, map[string]string{
4093 "resource": c.resource,
4094 })
4095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4096 }
4097
4098
4099
4100
4101
4102
4103 func (c *ProjectsLocationsCaPoolsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4104 gensupport.SetOptions(c.urlParams_, opts...)
4105 res, err := c.doRequest("json")
4106 if res != nil && res.StatusCode == http.StatusNotModified {
4107 if res.Body != nil {
4108 res.Body.Close()
4109 }
4110 return nil, gensupport.WrapError(&googleapi.Error{
4111 Code: res.StatusCode,
4112 Header: res.Header,
4113 })
4114 }
4115 if err != nil {
4116 return nil, err
4117 }
4118 defer googleapi.CloseBody(res)
4119 if err := googleapi.CheckResponse(res); err != nil {
4120 return nil, gensupport.WrapError(err)
4121 }
4122 ret := &Policy{
4123 ServerResponse: googleapi.ServerResponse{
4124 Header: res.Header,
4125 HTTPStatusCode: res.StatusCode,
4126 },
4127 }
4128 target := &ret
4129 if err := gensupport.DecodeResponse(target, res); err != nil {
4130 return nil, err
4131 }
4132 return ret, nil
4133 }
4134
4135 type ProjectsLocationsCaPoolsTestIamPermissionsCall struct {
4136 s *Service
4137 resource string
4138 testiampermissionsrequest *TestIamPermissionsRequest
4139 urlParams_ gensupport.URLParams
4140 ctx_ context.Context
4141 header_ http.Header
4142 }
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154 func (r *ProjectsLocationsCaPoolsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsCaPoolsTestIamPermissionsCall {
4155 c := &ProjectsLocationsCaPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4156 c.resource = resource
4157 c.testiampermissionsrequest = testiampermissionsrequest
4158 return c
4159 }
4160
4161
4162
4163
4164 func (c *ProjectsLocationsCaPoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsTestIamPermissionsCall {
4165 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4166 return c
4167 }
4168
4169
4170 func (c *ProjectsLocationsCaPoolsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsTestIamPermissionsCall {
4171 c.ctx_ = ctx
4172 return c
4173 }
4174
4175
4176
4177 func (c *ProjectsLocationsCaPoolsTestIamPermissionsCall) Header() http.Header {
4178 if c.header_ == nil {
4179 c.header_ = make(http.Header)
4180 }
4181 return c.header_
4182 }
4183
4184 func (c *ProjectsLocationsCaPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4185 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4186 var body io.Reader = nil
4187 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
4188 if err != nil {
4189 return nil, err
4190 }
4191 c.urlParams_.Set("alt", alt)
4192 c.urlParams_.Set("prettyPrint", "false")
4193 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
4194 urls += "?" + c.urlParams_.Encode()
4195 req, err := http.NewRequest("POST", urls, body)
4196 if err != nil {
4197 return nil, err
4198 }
4199 req.Header = reqHeaders
4200 googleapi.Expand(req.URL, map[string]string{
4201 "resource": c.resource,
4202 })
4203 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4204 }
4205
4206
4207
4208
4209
4210
4211
4212 func (c *ProjectsLocationsCaPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
4213 gensupport.SetOptions(c.urlParams_, opts...)
4214 res, err := c.doRequest("json")
4215 if res != nil && res.StatusCode == http.StatusNotModified {
4216 if res.Body != nil {
4217 res.Body.Close()
4218 }
4219 return nil, gensupport.WrapError(&googleapi.Error{
4220 Code: res.StatusCode,
4221 Header: res.Header,
4222 })
4223 }
4224 if err != nil {
4225 return nil, err
4226 }
4227 defer googleapi.CloseBody(res)
4228 if err := googleapi.CheckResponse(res); err != nil {
4229 return nil, gensupport.WrapError(err)
4230 }
4231 ret := &TestIamPermissionsResponse{
4232 ServerResponse: googleapi.ServerResponse{
4233 Header: res.Header,
4234 HTTPStatusCode: res.StatusCode,
4235 },
4236 }
4237 target := &ret
4238 if err := gensupport.DecodeResponse(target, res); err != nil {
4239 return nil, err
4240 }
4241 return ret, nil
4242 }
4243
4244 type ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall struct {
4245 s *Service
4246 name string
4247 activatecertificateauthorityrequest *ActivateCertificateAuthorityRequest
4248 urlParams_ gensupport.URLParams
4249 ctx_ context.Context
4250 header_ http.Header
4251 }
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Activate(name string, activatecertificateauthorityrequest *ActivateCertificateAuthorityRequest) *ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall {
4262 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4263 c.name = name
4264 c.activatecertificateauthorityrequest = activatecertificateauthorityrequest
4265 return c
4266 }
4267
4268
4269
4270
4271 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall {
4272 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4273 return c
4274 }
4275
4276
4277 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall {
4278 c.ctx_ = ctx
4279 return c
4280 }
4281
4282
4283
4284 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall) Header() http.Header {
4285 if c.header_ == nil {
4286 c.header_ = make(http.Header)
4287 }
4288 return c.header_
4289 }
4290
4291 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall) doRequest(alt string) (*http.Response, error) {
4292 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4293 var body io.Reader = nil
4294 body, err := googleapi.WithoutDataWrapper.JSONReader(c.activatecertificateauthorityrequest)
4295 if err != nil {
4296 return nil, err
4297 }
4298 c.urlParams_.Set("alt", alt)
4299 c.urlParams_.Set("prettyPrint", "false")
4300 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate")
4301 urls += "?" + c.urlParams_.Encode()
4302 req, err := http.NewRequest("POST", urls, body)
4303 if err != nil {
4304 return nil, err
4305 }
4306 req.Header = reqHeaders
4307 googleapi.Expand(req.URL, map[string]string{
4308 "name": c.name,
4309 })
4310 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4311 }
4312
4313
4314
4315
4316
4317
4318 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesActivateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4319 gensupport.SetOptions(c.urlParams_, opts...)
4320 res, err := c.doRequest("json")
4321 if res != nil && res.StatusCode == http.StatusNotModified {
4322 if res.Body != nil {
4323 res.Body.Close()
4324 }
4325 return nil, gensupport.WrapError(&googleapi.Error{
4326 Code: res.StatusCode,
4327 Header: res.Header,
4328 })
4329 }
4330 if err != nil {
4331 return nil, err
4332 }
4333 defer googleapi.CloseBody(res)
4334 if err := googleapi.CheckResponse(res); err != nil {
4335 return nil, gensupport.WrapError(err)
4336 }
4337 ret := &Operation{
4338 ServerResponse: googleapi.ServerResponse{
4339 Header: res.Header,
4340 HTTPStatusCode: res.StatusCode,
4341 },
4342 }
4343 target := &ret
4344 if err := gensupport.DecodeResponse(target, res); err != nil {
4345 return nil, err
4346 }
4347 return ret, nil
4348 }
4349
4350 type ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall struct {
4351 s *Service
4352 parent string
4353 certificateauthority *CertificateAuthority
4354 urlParams_ gensupport.URLParams
4355 ctx_ context.Context
4356 header_ http.Header
4357 }
4358
4359
4360
4361
4362
4363 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Create(parent string, certificateauthority *CertificateAuthority) *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall {
4364 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4365 c.parent = parent
4366 c.certificateauthority = certificateauthority
4367 return c
4368 }
4369
4370
4371
4372
4373 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall) CertificateAuthorityId(certificateAuthorityId string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall {
4374 c.urlParams_.Set("certificateAuthorityId", certificateAuthorityId)
4375 return c
4376 }
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall) RequestId(requestId string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall {
4390 c.urlParams_.Set("requestId", requestId)
4391 return c
4392 }
4393
4394
4395
4396
4397 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall {
4398 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4399 return c
4400 }
4401
4402
4403 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall {
4404 c.ctx_ = ctx
4405 return c
4406 }
4407
4408
4409
4410 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall) Header() http.Header {
4411 if c.header_ == nil {
4412 c.header_ = make(http.Header)
4413 }
4414 return c.header_
4415 }
4416
4417 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall) doRequest(alt string) (*http.Response, error) {
4418 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4419 var body io.Reader = nil
4420 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificateauthority)
4421 if err != nil {
4422 return nil, err
4423 }
4424 c.urlParams_.Set("alt", alt)
4425 c.urlParams_.Set("prettyPrint", "false")
4426 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateAuthorities")
4427 urls += "?" + c.urlParams_.Encode()
4428 req, err := http.NewRequest("POST", urls, body)
4429 if err != nil {
4430 return nil, err
4431 }
4432 req.Header = reqHeaders
4433 googleapi.Expand(req.URL, map[string]string{
4434 "parent": c.parent,
4435 })
4436 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4437 }
4438
4439
4440
4441
4442
4443
4444 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4445 gensupport.SetOptions(c.urlParams_, opts...)
4446 res, err := c.doRequest("json")
4447 if res != nil && res.StatusCode == http.StatusNotModified {
4448 if res.Body != nil {
4449 res.Body.Close()
4450 }
4451 return nil, gensupport.WrapError(&googleapi.Error{
4452 Code: res.StatusCode,
4453 Header: res.Header,
4454 })
4455 }
4456 if err != nil {
4457 return nil, err
4458 }
4459 defer googleapi.CloseBody(res)
4460 if err := googleapi.CheckResponse(res); err != nil {
4461 return nil, gensupport.WrapError(err)
4462 }
4463 ret := &Operation{
4464 ServerResponse: googleapi.ServerResponse{
4465 Header: res.Header,
4466 HTTPStatusCode: res.StatusCode,
4467 },
4468 }
4469 target := &ret
4470 if err := gensupport.DecodeResponse(target, res); err != nil {
4471 return nil, err
4472 }
4473 return ret, nil
4474 }
4475
4476 type ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall struct {
4477 s *Service
4478 name string
4479 urlParams_ gensupport.URLParams
4480 ctx_ context.Context
4481 header_ http.Header
4482 }
4483
4484
4485
4486
4487
4488 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Delete(name string) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall {
4489 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4490 c.name = name
4491 return c
4492 }
4493
4494
4495
4496
4497
4498 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) IgnoreActiveCertificates(ignoreActiveCertificates bool) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall {
4499 c.urlParams_.Set("ignoreActiveCertificates", fmt.Sprint(ignoreActiveCertificates))
4500 return c
4501 }
4502
4503
4504
4505
4506
4507
4508 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) IgnoreDependentResources(ignoreDependentResources bool) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall {
4509 c.urlParams_.Set("ignoreDependentResources", fmt.Sprint(ignoreDependentResources))
4510 return c
4511 }
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) RequestId(requestId string) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall {
4525 c.urlParams_.Set("requestId", requestId)
4526 return c
4527 }
4528
4529
4530
4531
4532
4533 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) SkipGracePeriod(skipGracePeriod bool) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall {
4534 c.urlParams_.Set("skipGracePeriod", fmt.Sprint(skipGracePeriod))
4535 return c
4536 }
4537
4538
4539
4540
4541 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall {
4542 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4543 return c
4544 }
4545
4546
4547 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall {
4548 c.ctx_ = ctx
4549 return c
4550 }
4551
4552
4553
4554 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) Header() http.Header {
4555 if c.header_ == nil {
4556 c.header_ = make(http.Header)
4557 }
4558 return c.header_
4559 }
4560
4561 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) doRequest(alt string) (*http.Response, error) {
4562 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4563 var body io.Reader = nil
4564 c.urlParams_.Set("alt", alt)
4565 c.urlParams_.Set("prettyPrint", "false")
4566 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4567 urls += "?" + c.urlParams_.Encode()
4568 req, err := http.NewRequest("DELETE", urls, body)
4569 if err != nil {
4570 return nil, err
4571 }
4572 req.Header = reqHeaders
4573 googleapi.Expand(req.URL, map[string]string{
4574 "name": c.name,
4575 })
4576 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4577 }
4578
4579
4580
4581
4582
4583
4584 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4585 gensupport.SetOptions(c.urlParams_, opts...)
4586 res, err := c.doRequest("json")
4587 if res != nil && res.StatusCode == http.StatusNotModified {
4588 if res.Body != nil {
4589 res.Body.Close()
4590 }
4591 return nil, gensupport.WrapError(&googleapi.Error{
4592 Code: res.StatusCode,
4593 Header: res.Header,
4594 })
4595 }
4596 if err != nil {
4597 return nil, err
4598 }
4599 defer googleapi.CloseBody(res)
4600 if err := googleapi.CheckResponse(res); err != nil {
4601 return nil, gensupport.WrapError(err)
4602 }
4603 ret := &Operation{
4604 ServerResponse: googleapi.ServerResponse{
4605 Header: res.Header,
4606 HTTPStatusCode: res.StatusCode,
4607 },
4608 }
4609 target := &ret
4610 if err := gensupport.DecodeResponse(target, res); err != nil {
4611 return nil, err
4612 }
4613 return ret, nil
4614 }
4615
4616 type ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall struct {
4617 s *Service
4618 name string
4619 disablecertificateauthorityrequest *DisableCertificateAuthorityRequest
4620 urlParams_ gensupport.URLParams
4621 ctx_ context.Context
4622 header_ http.Header
4623 }
4624
4625
4626
4627
4628
4629 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Disable(name string, disablecertificateauthorityrequest *DisableCertificateAuthorityRequest) *ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall {
4630 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4631 c.name = name
4632 c.disablecertificateauthorityrequest = disablecertificateauthorityrequest
4633 return c
4634 }
4635
4636
4637
4638
4639 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall {
4640 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4641 return c
4642 }
4643
4644
4645 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall {
4646 c.ctx_ = ctx
4647 return c
4648 }
4649
4650
4651
4652 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall) Header() http.Header {
4653 if c.header_ == nil {
4654 c.header_ = make(http.Header)
4655 }
4656 return c.header_
4657 }
4658
4659 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall) doRequest(alt string) (*http.Response, error) {
4660 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4661 var body io.Reader = nil
4662 body, err := googleapi.WithoutDataWrapper.JSONReader(c.disablecertificateauthorityrequest)
4663 if err != nil {
4664 return nil, err
4665 }
4666 c.urlParams_.Set("alt", alt)
4667 c.urlParams_.Set("prettyPrint", "false")
4668 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disable")
4669 urls += "?" + c.urlParams_.Encode()
4670 req, err := http.NewRequest("POST", urls, body)
4671 if err != nil {
4672 return nil, err
4673 }
4674 req.Header = reqHeaders
4675 googleapi.Expand(req.URL, map[string]string{
4676 "name": c.name,
4677 })
4678 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4679 }
4680
4681
4682
4683
4684
4685
4686 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesDisableCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4687 gensupport.SetOptions(c.urlParams_, opts...)
4688 res, err := c.doRequest("json")
4689 if res != nil && res.StatusCode == http.StatusNotModified {
4690 if res.Body != nil {
4691 res.Body.Close()
4692 }
4693 return nil, gensupport.WrapError(&googleapi.Error{
4694 Code: res.StatusCode,
4695 Header: res.Header,
4696 })
4697 }
4698 if err != nil {
4699 return nil, err
4700 }
4701 defer googleapi.CloseBody(res)
4702 if err := googleapi.CheckResponse(res); err != nil {
4703 return nil, gensupport.WrapError(err)
4704 }
4705 ret := &Operation{
4706 ServerResponse: googleapi.ServerResponse{
4707 Header: res.Header,
4708 HTTPStatusCode: res.StatusCode,
4709 },
4710 }
4711 target := &ret
4712 if err := gensupport.DecodeResponse(target, res); err != nil {
4713 return nil, err
4714 }
4715 return ret, nil
4716 }
4717
4718 type ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall struct {
4719 s *Service
4720 name string
4721 enablecertificateauthorityrequest *EnableCertificateAuthorityRequest
4722 urlParams_ gensupport.URLParams
4723 ctx_ context.Context
4724 header_ http.Header
4725 }
4726
4727
4728
4729
4730
4731 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Enable(name string, enablecertificateauthorityrequest *EnableCertificateAuthorityRequest) *ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall {
4732 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4733 c.name = name
4734 c.enablecertificateauthorityrequest = enablecertificateauthorityrequest
4735 return c
4736 }
4737
4738
4739
4740
4741 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall {
4742 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4743 return c
4744 }
4745
4746
4747 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall {
4748 c.ctx_ = ctx
4749 return c
4750 }
4751
4752
4753
4754 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall) Header() http.Header {
4755 if c.header_ == nil {
4756 c.header_ = make(http.Header)
4757 }
4758 return c.header_
4759 }
4760
4761 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall) doRequest(alt string) (*http.Response, error) {
4762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4763 var body io.Reader = nil
4764 body, err := googleapi.WithoutDataWrapper.JSONReader(c.enablecertificateauthorityrequest)
4765 if err != nil {
4766 return nil, err
4767 }
4768 c.urlParams_.Set("alt", alt)
4769 c.urlParams_.Set("prettyPrint", "false")
4770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enable")
4771 urls += "?" + c.urlParams_.Encode()
4772 req, err := http.NewRequest("POST", urls, body)
4773 if err != nil {
4774 return nil, err
4775 }
4776 req.Header = reqHeaders
4777 googleapi.Expand(req.URL, map[string]string{
4778 "name": c.name,
4779 })
4780 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4781 }
4782
4783
4784
4785
4786
4787
4788 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesEnableCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4789 gensupport.SetOptions(c.urlParams_, opts...)
4790 res, err := c.doRequest("json")
4791 if res != nil && res.StatusCode == http.StatusNotModified {
4792 if res.Body != nil {
4793 res.Body.Close()
4794 }
4795 return nil, gensupport.WrapError(&googleapi.Error{
4796 Code: res.StatusCode,
4797 Header: res.Header,
4798 })
4799 }
4800 if err != nil {
4801 return nil, err
4802 }
4803 defer googleapi.CloseBody(res)
4804 if err := googleapi.CheckResponse(res); err != nil {
4805 return nil, gensupport.WrapError(err)
4806 }
4807 ret := &Operation{
4808 ServerResponse: googleapi.ServerResponse{
4809 Header: res.Header,
4810 HTTPStatusCode: res.StatusCode,
4811 },
4812 }
4813 target := &ret
4814 if err := gensupport.DecodeResponse(target, res); err != nil {
4815 return nil, err
4816 }
4817 return ret, nil
4818 }
4819
4820 type ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall struct {
4821 s *Service
4822 name string
4823 urlParams_ gensupport.URLParams
4824 ifNoneMatch_ string
4825 ctx_ context.Context
4826 header_ http.Header
4827 }
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Fetch(name string) *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall {
4838 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4839 c.name = name
4840 return c
4841 }
4842
4843
4844
4845
4846 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall {
4847 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4848 return c
4849 }
4850
4851
4852
4853
4854 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall {
4855 c.ifNoneMatch_ = entityTag
4856 return c
4857 }
4858
4859
4860 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall {
4861 c.ctx_ = ctx
4862 return c
4863 }
4864
4865
4866
4867 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall) Header() http.Header {
4868 if c.header_ == nil {
4869 c.header_ = make(http.Header)
4870 }
4871 return c.header_
4872 }
4873
4874 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall) doRequest(alt string) (*http.Response, error) {
4875 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4876 if c.ifNoneMatch_ != "" {
4877 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4878 }
4879 var body io.Reader = nil
4880 c.urlParams_.Set("alt", alt)
4881 c.urlParams_.Set("prettyPrint", "false")
4882 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:fetch")
4883 urls += "?" + c.urlParams_.Encode()
4884 req, err := http.NewRequest("GET", urls, body)
4885 if err != nil {
4886 return nil, err
4887 }
4888 req.Header = reqHeaders
4889 googleapi.Expand(req.URL, map[string]string{
4890 "name": c.name,
4891 })
4892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4893 }
4894
4895
4896
4897
4898
4899
4900
4901 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesFetchCall) Do(opts ...googleapi.CallOption) (*FetchCertificateAuthorityCsrResponse, error) {
4902 gensupport.SetOptions(c.urlParams_, opts...)
4903 res, err := c.doRequest("json")
4904 if res != nil && res.StatusCode == http.StatusNotModified {
4905 if res.Body != nil {
4906 res.Body.Close()
4907 }
4908 return nil, gensupport.WrapError(&googleapi.Error{
4909 Code: res.StatusCode,
4910 Header: res.Header,
4911 })
4912 }
4913 if err != nil {
4914 return nil, err
4915 }
4916 defer googleapi.CloseBody(res)
4917 if err := googleapi.CheckResponse(res); err != nil {
4918 return nil, gensupport.WrapError(err)
4919 }
4920 ret := &FetchCertificateAuthorityCsrResponse{
4921 ServerResponse: googleapi.ServerResponse{
4922 Header: res.Header,
4923 HTTPStatusCode: res.StatusCode,
4924 },
4925 }
4926 target := &ret
4927 if err := gensupport.DecodeResponse(target, res); err != nil {
4928 return nil, err
4929 }
4930 return ret, nil
4931 }
4932
4933 type ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall struct {
4934 s *Service
4935 name string
4936 urlParams_ gensupport.URLParams
4937 ifNoneMatch_ string
4938 ctx_ context.Context
4939 header_ http.Header
4940 }
4941
4942
4943
4944
4945 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Get(name string) *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall {
4946 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4947 c.name = name
4948 return c
4949 }
4950
4951
4952
4953
4954 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall {
4955 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4956 return c
4957 }
4958
4959
4960
4961
4962 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall {
4963 c.ifNoneMatch_ = entityTag
4964 return c
4965 }
4966
4967
4968 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall {
4969 c.ctx_ = ctx
4970 return c
4971 }
4972
4973
4974
4975 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall) Header() http.Header {
4976 if c.header_ == nil {
4977 c.header_ = make(http.Header)
4978 }
4979 return c.header_
4980 }
4981
4982 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall) doRequest(alt string) (*http.Response, error) {
4983 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4984 if c.ifNoneMatch_ != "" {
4985 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4986 }
4987 var body io.Reader = nil
4988 c.urlParams_.Set("alt", alt)
4989 c.urlParams_.Set("prettyPrint", "false")
4990 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4991 urls += "?" + c.urlParams_.Encode()
4992 req, err := http.NewRequest("GET", urls, body)
4993 if err != nil {
4994 return nil, err
4995 }
4996 req.Header = reqHeaders
4997 googleapi.Expand(req.URL, map[string]string{
4998 "name": c.name,
4999 })
5000 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5001 }
5002
5003
5004
5005
5006
5007
5008
5009 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesGetCall) Do(opts ...googleapi.CallOption) (*CertificateAuthority, error) {
5010 gensupport.SetOptions(c.urlParams_, opts...)
5011 res, err := c.doRequest("json")
5012 if res != nil && res.StatusCode == http.StatusNotModified {
5013 if res.Body != nil {
5014 res.Body.Close()
5015 }
5016 return nil, gensupport.WrapError(&googleapi.Error{
5017 Code: res.StatusCode,
5018 Header: res.Header,
5019 })
5020 }
5021 if err != nil {
5022 return nil, err
5023 }
5024 defer googleapi.CloseBody(res)
5025 if err := googleapi.CheckResponse(res); err != nil {
5026 return nil, gensupport.WrapError(err)
5027 }
5028 ret := &CertificateAuthority{
5029 ServerResponse: googleapi.ServerResponse{
5030 Header: res.Header,
5031 HTTPStatusCode: res.StatusCode,
5032 },
5033 }
5034 target := &ret
5035 if err := gensupport.DecodeResponse(target, res); err != nil {
5036 return nil, err
5037 }
5038 return ret, nil
5039 }
5040
5041 type ProjectsLocationsCaPoolsCertificateAuthoritiesListCall struct {
5042 s *Service
5043 parent string
5044 urlParams_ gensupport.URLParams
5045 ifNoneMatch_ string
5046 ctx_ context.Context
5047 header_ http.Header
5048 }
5049
5050
5051
5052
5053
5054 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) List(parent string) *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall {
5055 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5056 c.parent = parent
5057 return c
5058 }
5059
5060
5061
5062 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) Filter(filter string) *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall {
5063 c.urlParams_.Set("filter", filter)
5064 return c
5065 }
5066
5067
5068
5069 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) OrderBy(orderBy string) *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall {
5070 c.urlParams_.Set("orderBy", orderBy)
5071 return c
5072 }
5073
5074
5075
5076
5077
5078
5079 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) PageSize(pageSize int64) *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall {
5080 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5081 return c
5082 }
5083
5084
5085
5086 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) PageToken(pageToken string) *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall {
5087 c.urlParams_.Set("pageToken", pageToken)
5088 return c
5089 }
5090
5091
5092
5093
5094 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall {
5095 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5096 return c
5097 }
5098
5099
5100
5101
5102 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall {
5103 c.ifNoneMatch_ = entityTag
5104 return c
5105 }
5106
5107
5108 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall {
5109 c.ctx_ = ctx
5110 return c
5111 }
5112
5113
5114
5115 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) Header() http.Header {
5116 if c.header_ == nil {
5117 c.header_ = make(http.Header)
5118 }
5119 return c.header_
5120 }
5121
5122 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) doRequest(alt string) (*http.Response, error) {
5123 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5124 if c.ifNoneMatch_ != "" {
5125 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5126 }
5127 var body io.Reader = nil
5128 c.urlParams_.Set("alt", alt)
5129 c.urlParams_.Set("prettyPrint", "false")
5130 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateAuthorities")
5131 urls += "?" + c.urlParams_.Encode()
5132 req, err := http.NewRequest("GET", urls, body)
5133 if err != nil {
5134 return nil, err
5135 }
5136 req.Header = reqHeaders
5137 googleapi.Expand(req.URL, map[string]string{
5138 "parent": c.parent,
5139 })
5140 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5141 }
5142
5143
5144
5145
5146
5147
5148
5149 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) Do(opts ...googleapi.CallOption) (*ListCertificateAuthoritiesResponse, error) {
5150 gensupport.SetOptions(c.urlParams_, opts...)
5151 res, err := c.doRequest("json")
5152 if res != nil && res.StatusCode == http.StatusNotModified {
5153 if res.Body != nil {
5154 res.Body.Close()
5155 }
5156 return nil, gensupport.WrapError(&googleapi.Error{
5157 Code: res.StatusCode,
5158 Header: res.Header,
5159 })
5160 }
5161 if err != nil {
5162 return nil, err
5163 }
5164 defer googleapi.CloseBody(res)
5165 if err := googleapi.CheckResponse(res); err != nil {
5166 return nil, gensupport.WrapError(err)
5167 }
5168 ret := &ListCertificateAuthoritiesResponse{
5169 ServerResponse: googleapi.ServerResponse{
5170 Header: res.Header,
5171 HTTPStatusCode: res.StatusCode,
5172 },
5173 }
5174 target := &ret
5175 if err := gensupport.DecodeResponse(target, res); err != nil {
5176 return nil, err
5177 }
5178 return ret, nil
5179 }
5180
5181
5182
5183
5184 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesListCall) Pages(ctx context.Context, f func(*ListCertificateAuthoritiesResponse) error) error {
5185 c.ctx_ = ctx
5186 defer c.PageToken(c.urlParams_.Get("pageToken"))
5187 for {
5188 x, err := c.Do()
5189 if err != nil {
5190 return err
5191 }
5192 if err := f(x); err != nil {
5193 return err
5194 }
5195 if x.NextPageToken == "" {
5196 return nil
5197 }
5198 c.PageToken(x.NextPageToken)
5199 }
5200 }
5201
5202 type ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall struct {
5203 s *Service
5204 name string
5205 certificateauthority *CertificateAuthority
5206 urlParams_ gensupport.URLParams
5207 ctx_ context.Context
5208 header_ http.Header
5209 }
5210
5211
5212
5213
5214
5215 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Patch(name string, certificateauthority *CertificateAuthority) *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall {
5216 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5217 c.name = name
5218 c.certificateauthority = certificateauthority
5219 return c
5220 }
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall) RequestId(requestId string) *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall {
5234 c.urlParams_.Set("requestId", requestId)
5235 return c
5236 }
5237
5238
5239
5240 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall {
5241 c.urlParams_.Set("updateMask", updateMask)
5242 return c
5243 }
5244
5245
5246
5247
5248 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall {
5249 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5250 return c
5251 }
5252
5253
5254 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall {
5255 c.ctx_ = ctx
5256 return c
5257 }
5258
5259
5260
5261 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall) Header() http.Header {
5262 if c.header_ == nil {
5263 c.header_ = make(http.Header)
5264 }
5265 return c.header_
5266 }
5267
5268 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall) doRequest(alt string) (*http.Response, error) {
5269 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5270 var body io.Reader = nil
5271 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificateauthority)
5272 if err != nil {
5273 return nil, err
5274 }
5275 c.urlParams_.Set("alt", alt)
5276 c.urlParams_.Set("prettyPrint", "false")
5277 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5278 urls += "?" + c.urlParams_.Encode()
5279 req, err := http.NewRequest("PATCH", urls, body)
5280 if err != nil {
5281 return nil, err
5282 }
5283 req.Header = reqHeaders
5284 googleapi.Expand(req.URL, map[string]string{
5285 "name": c.name,
5286 })
5287 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5288 }
5289
5290
5291
5292
5293
5294
5295 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5296 gensupport.SetOptions(c.urlParams_, opts...)
5297 res, err := c.doRequest("json")
5298 if res != nil && res.StatusCode == http.StatusNotModified {
5299 if res.Body != nil {
5300 res.Body.Close()
5301 }
5302 return nil, gensupport.WrapError(&googleapi.Error{
5303 Code: res.StatusCode,
5304 Header: res.Header,
5305 })
5306 }
5307 if err != nil {
5308 return nil, err
5309 }
5310 defer googleapi.CloseBody(res)
5311 if err := googleapi.CheckResponse(res); err != nil {
5312 return nil, gensupport.WrapError(err)
5313 }
5314 ret := &Operation{
5315 ServerResponse: googleapi.ServerResponse{
5316 Header: res.Header,
5317 HTTPStatusCode: res.StatusCode,
5318 },
5319 }
5320 target := &ret
5321 if err := gensupport.DecodeResponse(target, res); err != nil {
5322 return nil, err
5323 }
5324 return ret, nil
5325 }
5326
5327 type ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall struct {
5328 s *Service
5329 name string
5330 undeletecertificateauthorityrequest *UndeleteCertificateAuthorityRequest
5331 urlParams_ gensupport.URLParams
5332 ctx_ context.Context
5333 header_ http.Header
5334 }
5335
5336
5337
5338
5339
5340 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesService) Undelete(name string, undeletecertificateauthorityrequest *UndeleteCertificateAuthorityRequest) *ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall {
5341 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5342 c.name = name
5343 c.undeletecertificateauthorityrequest = undeletecertificateauthorityrequest
5344 return c
5345 }
5346
5347
5348
5349
5350 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall {
5351 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5352 return c
5353 }
5354
5355
5356 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall {
5357 c.ctx_ = ctx
5358 return c
5359 }
5360
5361
5362
5363 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall) Header() http.Header {
5364 if c.header_ == nil {
5365 c.header_ = make(http.Header)
5366 }
5367 return c.header_
5368 }
5369
5370 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall) doRequest(alt string) (*http.Response, error) {
5371 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5372 var body io.Reader = nil
5373 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletecertificateauthorityrequest)
5374 if err != nil {
5375 return nil, err
5376 }
5377 c.urlParams_.Set("alt", alt)
5378 c.urlParams_.Set("prettyPrint", "false")
5379 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undelete")
5380 urls += "?" + c.urlParams_.Encode()
5381 req, err := http.NewRequest("POST", urls, body)
5382 if err != nil {
5383 return nil, err
5384 }
5385 req.Header = reqHeaders
5386 googleapi.Expand(req.URL, map[string]string{
5387 "name": c.name,
5388 })
5389 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5390 }
5391
5392
5393
5394
5395
5396
5397 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5398 gensupport.SetOptions(c.urlParams_, opts...)
5399 res, err := c.doRequest("json")
5400 if res != nil && res.StatusCode == http.StatusNotModified {
5401 if res.Body != nil {
5402 res.Body.Close()
5403 }
5404 return nil, gensupport.WrapError(&googleapi.Error{
5405 Code: res.StatusCode,
5406 Header: res.Header,
5407 })
5408 }
5409 if err != nil {
5410 return nil, err
5411 }
5412 defer googleapi.CloseBody(res)
5413 if err := googleapi.CheckResponse(res); err != nil {
5414 return nil, gensupport.WrapError(err)
5415 }
5416 ret := &Operation{
5417 ServerResponse: googleapi.ServerResponse{
5418 Header: res.Header,
5419 HTTPStatusCode: res.StatusCode,
5420 },
5421 }
5422 target := &ret
5423 if err := gensupport.DecodeResponse(target, res); err != nil {
5424 return nil, err
5425 }
5426 return ret, nil
5427 }
5428
5429 type ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall struct {
5430 s *Service
5431 name string
5432 urlParams_ gensupport.URLParams
5433 ifNoneMatch_ string
5434 ctx_ context.Context
5435 header_ http.Header
5436 }
5437
5438
5439
5440
5441 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService) Get(name string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall {
5442 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5443 c.name = name
5444 return c
5445 }
5446
5447
5448
5449
5450 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall {
5451 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5452 return c
5453 }
5454
5455
5456
5457
5458 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall {
5459 c.ifNoneMatch_ = entityTag
5460 return c
5461 }
5462
5463
5464 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall {
5465 c.ctx_ = ctx
5466 return c
5467 }
5468
5469
5470
5471 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall) Header() http.Header {
5472 if c.header_ == nil {
5473 c.header_ = make(http.Header)
5474 }
5475 return c.header_
5476 }
5477
5478 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall) doRequest(alt string) (*http.Response, error) {
5479 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5480 if c.ifNoneMatch_ != "" {
5481 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5482 }
5483 var body io.Reader = nil
5484 c.urlParams_.Set("alt", alt)
5485 c.urlParams_.Set("prettyPrint", "false")
5486 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5487 urls += "?" + c.urlParams_.Encode()
5488 req, err := http.NewRequest("GET", urls, body)
5489 if err != nil {
5490 return nil, err
5491 }
5492 req.Header = reqHeaders
5493 googleapi.Expand(req.URL, map[string]string{
5494 "name": c.name,
5495 })
5496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5497 }
5498
5499
5500
5501
5502
5503
5504
5505 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetCall) Do(opts ...googleapi.CallOption) (*CertificateRevocationList, error) {
5506 gensupport.SetOptions(c.urlParams_, opts...)
5507 res, err := c.doRequest("json")
5508 if res != nil && res.StatusCode == http.StatusNotModified {
5509 if res.Body != nil {
5510 res.Body.Close()
5511 }
5512 return nil, gensupport.WrapError(&googleapi.Error{
5513 Code: res.StatusCode,
5514 Header: res.Header,
5515 })
5516 }
5517 if err != nil {
5518 return nil, err
5519 }
5520 defer googleapi.CloseBody(res)
5521 if err := googleapi.CheckResponse(res); err != nil {
5522 return nil, gensupport.WrapError(err)
5523 }
5524 ret := &CertificateRevocationList{
5525 ServerResponse: googleapi.ServerResponse{
5526 Header: res.Header,
5527 HTTPStatusCode: res.StatusCode,
5528 },
5529 }
5530 target := &ret
5531 if err := gensupport.DecodeResponse(target, res); err != nil {
5532 return nil, err
5533 }
5534 return ret, nil
5535 }
5536
5537 type ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall struct {
5538 s *Service
5539 resource string
5540 urlParams_ gensupport.URLParams
5541 ifNoneMatch_ string
5542 ctx_ context.Context
5543 header_ http.Header
5544 }
5545
5546
5547
5548
5549
5550
5551
5552 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService) GetIamPolicy(resource string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall {
5553 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5554 c.resource = resource
5555 return c
5556 }
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall {
5571 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
5572 return c
5573 }
5574
5575
5576
5577
5578 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall {
5579 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5580 return c
5581 }
5582
5583
5584
5585
5586 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall {
5587 c.ifNoneMatch_ = entityTag
5588 return c
5589 }
5590
5591
5592 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall {
5593 c.ctx_ = ctx
5594 return c
5595 }
5596
5597
5598
5599 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) Header() http.Header {
5600 if c.header_ == nil {
5601 c.header_ = make(http.Header)
5602 }
5603 return c.header_
5604 }
5605
5606 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5607 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5608 if c.ifNoneMatch_ != "" {
5609 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5610 }
5611 var body io.Reader = nil
5612 c.urlParams_.Set("alt", alt)
5613 c.urlParams_.Set("prettyPrint", "false")
5614 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
5615 urls += "?" + c.urlParams_.Encode()
5616 req, err := http.NewRequest("GET", urls, body)
5617 if err != nil {
5618 return nil, err
5619 }
5620 req.Header = reqHeaders
5621 googleapi.Expand(req.URL, map[string]string{
5622 "resource": c.resource,
5623 })
5624 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5625 }
5626
5627
5628
5629
5630
5631
5632 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5633 gensupport.SetOptions(c.urlParams_, opts...)
5634 res, err := c.doRequest("json")
5635 if res != nil && res.StatusCode == http.StatusNotModified {
5636 if res.Body != nil {
5637 res.Body.Close()
5638 }
5639 return nil, gensupport.WrapError(&googleapi.Error{
5640 Code: res.StatusCode,
5641 Header: res.Header,
5642 })
5643 }
5644 if err != nil {
5645 return nil, err
5646 }
5647 defer googleapi.CloseBody(res)
5648 if err := googleapi.CheckResponse(res); err != nil {
5649 return nil, gensupport.WrapError(err)
5650 }
5651 ret := &Policy{
5652 ServerResponse: googleapi.ServerResponse{
5653 Header: res.Header,
5654 HTTPStatusCode: res.StatusCode,
5655 },
5656 }
5657 target := &ret
5658 if err := gensupport.DecodeResponse(target, res); err != nil {
5659 return nil, err
5660 }
5661 return ret, nil
5662 }
5663
5664 type ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall struct {
5665 s *Service
5666 parent string
5667 urlParams_ gensupport.URLParams
5668 ifNoneMatch_ string
5669 ctx_ context.Context
5670 header_ http.Header
5671 }
5672
5673
5674
5675
5676
5677
5678 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService) List(parent string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall {
5679 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5680 c.parent = parent
5681 return c
5682 }
5683
5684
5685
5686 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) Filter(filter string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall {
5687 c.urlParams_.Set("filter", filter)
5688 return c
5689 }
5690
5691
5692
5693 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) OrderBy(orderBy string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall {
5694 c.urlParams_.Set("orderBy", orderBy)
5695 return c
5696 }
5697
5698
5699
5700
5701
5702
5703 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) PageSize(pageSize int64) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall {
5704 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5705 return c
5706 }
5707
5708
5709
5710 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) PageToken(pageToken string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall {
5711 c.urlParams_.Set("pageToken", pageToken)
5712 return c
5713 }
5714
5715
5716
5717
5718 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall {
5719 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5720 return c
5721 }
5722
5723
5724
5725
5726 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall {
5727 c.ifNoneMatch_ = entityTag
5728 return c
5729 }
5730
5731
5732 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall {
5733 c.ctx_ = ctx
5734 return c
5735 }
5736
5737
5738
5739 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) Header() http.Header {
5740 if c.header_ == nil {
5741 c.header_ = make(http.Header)
5742 }
5743 return c.header_
5744 }
5745
5746 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) doRequest(alt string) (*http.Response, error) {
5747 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5748 if c.ifNoneMatch_ != "" {
5749 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5750 }
5751 var body io.Reader = nil
5752 c.urlParams_.Set("alt", alt)
5753 c.urlParams_.Set("prettyPrint", "false")
5754 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateRevocationLists")
5755 urls += "?" + c.urlParams_.Encode()
5756 req, err := http.NewRequest("GET", urls, body)
5757 if err != nil {
5758 return nil, err
5759 }
5760 req.Header = reqHeaders
5761 googleapi.Expand(req.URL, map[string]string{
5762 "parent": c.parent,
5763 })
5764 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5765 }
5766
5767
5768
5769
5770
5771
5772
5773 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) Do(opts ...googleapi.CallOption) (*ListCertificateRevocationListsResponse, error) {
5774 gensupport.SetOptions(c.urlParams_, opts...)
5775 res, err := c.doRequest("json")
5776 if res != nil && res.StatusCode == http.StatusNotModified {
5777 if res.Body != nil {
5778 res.Body.Close()
5779 }
5780 return nil, gensupport.WrapError(&googleapi.Error{
5781 Code: res.StatusCode,
5782 Header: res.Header,
5783 })
5784 }
5785 if err != nil {
5786 return nil, err
5787 }
5788 defer googleapi.CloseBody(res)
5789 if err := googleapi.CheckResponse(res); err != nil {
5790 return nil, gensupport.WrapError(err)
5791 }
5792 ret := &ListCertificateRevocationListsResponse{
5793 ServerResponse: googleapi.ServerResponse{
5794 Header: res.Header,
5795 HTTPStatusCode: res.StatusCode,
5796 },
5797 }
5798 target := &ret
5799 if err := gensupport.DecodeResponse(target, res); err != nil {
5800 return nil, err
5801 }
5802 return ret, nil
5803 }
5804
5805
5806
5807
5808 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsListCall) Pages(ctx context.Context, f func(*ListCertificateRevocationListsResponse) error) error {
5809 c.ctx_ = ctx
5810 defer c.PageToken(c.urlParams_.Get("pageToken"))
5811 for {
5812 x, err := c.Do()
5813 if err != nil {
5814 return err
5815 }
5816 if err := f(x); err != nil {
5817 return err
5818 }
5819 if x.NextPageToken == "" {
5820 return nil
5821 }
5822 c.PageToken(x.NextPageToken)
5823 }
5824 }
5825
5826 type ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall struct {
5827 s *Service
5828 name string
5829 certificaterevocationlist *CertificateRevocationList
5830 urlParams_ gensupport.URLParams
5831 ctx_ context.Context
5832 header_ http.Header
5833 }
5834
5835
5836
5837
5838
5839
5840 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService) Patch(name string, certificaterevocationlist *CertificateRevocationList) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall {
5841 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5842 c.name = name
5843 c.certificaterevocationlist = certificaterevocationlist
5844 return c
5845 }
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall) RequestId(requestId string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall {
5859 c.urlParams_.Set("requestId", requestId)
5860 return c
5861 }
5862
5863
5864
5865 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall {
5866 c.urlParams_.Set("updateMask", updateMask)
5867 return c
5868 }
5869
5870
5871
5872
5873 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall {
5874 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5875 return c
5876 }
5877
5878
5879 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall {
5880 c.ctx_ = ctx
5881 return c
5882 }
5883
5884
5885
5886 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall) Header() http.Header {
5887 if c.header_ == nil {
5888 c.header_ = make(http.Header)
5889 }
5890 return c.header_
5891 }
5892
5893 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall) doRequest(alt string) (*http.Response, error) {
5894 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5895 var body io.Reader = nil
5896 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificaterevocationlist)
5897 if err != nil {
5898 return nil, err
5899 }
5900 c.urlParams_.Set("alt", alt)
5901 c.urlParams_.Set("prettyPrint", "false")
5902 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5903 urls += "?" + c.urlParams_.Encode()
5904 req, err := http.NewRequest("PATCH", urls, body)
5905 if err != nil {
5906 return nil, err
5907 }
5908 req.Header = reqHeaders
5909 googleapi.Expand(req.URL, map[string]string{
5910 "name": c.name,
5911 })
5912 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5913 }
5914
5915
5916
5917
5918
5919
5920 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5921 gensupport.SetOptions(c.urlParams_, opts...)
5922 res, err := c.doRequest("json")
5923 if res != nil && res.StatusCode == http.StatusNotModified {
5924 if res.Body != nil {
5925 res.Body.Close()
5926 }
5927 return nil, gensupport.WrapError(&googleapi.Error{
5928 Code: res.StatusCode,
5929 Header: res.Header,
5930 })
5931 }
5932 if err != nil {
5933 return nil, err
5934 }
5935 defer googleapi.CloseBody(res)
5936 if err := googleapi.CheckResponse(res); err != nil {
5937 return nil, gensupport.WrapError(err)
5938 }
5939 ret := &Operation{
5940 ServerResponse: googleapi.ServerResponse{
5941 Header: res.Header,
5942 HTTPStatusCode: res.StatusCode,
5943 },
5944 }
5945 target := &ret
5946 if err := gensupport.DecodeResponse(target, res); err != nil {
5947 return nil, err
5948 }
5949 return ret, nil
5950 }
5951
5952 type ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall struct {
5953 s *Service
5954 resource string
5955 setiampolicyrequest *SetIamPolicyRequest
5956 urlParams_ gensupport.URLParams
5957 ctx_ context.Context
5958 header_ http.Header
5959 }
5960
5961
5962
5963
5964
5965
5966
5967
5968 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall {
5969 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5970 c.resource = resource
5971 c.setiampolicyrequest = setiampolicyrequest
5972 return c
5973 }
5974
5975
5976
5977
5978 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall {
5979 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5980 return c
5981 }
5982
5983
5984 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall {
5985 c.ctx_ = ctx
5986 return c
5987 }
5988
5989
5990
5991 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) Header() http.Header {
5992 if c.header_ == nil {
5993 c.header_ = make(http.Header)
5994 }
5995 return c.header_
5996 }
5997
5998 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5999 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6000 var body io.Reader = nil
6001 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
6002 if err != nil {
6003 return nil, err
6004 }
6005 c.urlParams_.Set("alt", alt)
6006 c.urlParams_.Set("prettyPrint", "false")
6007 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
6008 urls += "?" + c.urlParams_.Encode()
6009 req, err := http.NewRequest("POST", urls, body)
6010 if err != nil {
6011 return nil, err
6012 }
6013 req.Header = reqHeaders
6014 googleapi.Expand(req.URL, map[string]string{
6015 "resource": c.resource,
6016 })
6017 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6018 }
6019
6020
6021
6022
6023
6024
6025 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6026 gensupport.SetOptions(c.urlParams_, opts...)
6027 res, err := c.doRequest("json")
6028 if res != nil && res.StatusCode == http.StatusNotModified {
6029 if res.Body != nil {
6030 res.Body.Close()
6031 }
6032 return nil, gensupport.WrapError(&googleapi.Error{
6033 Code: res.StatusCode,
6034 Header: res.Header,
6035 })
6036 }
6037 if err != nil {
6038 return nil, err
6039 }
6040 defer googleapi.CloseBody(res)
6041 if err := googleapi.CheckResponse(res); err != nil {
6042 return nil, gensupport.WrapError(err)
6043 }
6044 ret := &Policy{
6045 ServerResponse: googleapi.ServerResponse{
6046 Header: res.Header,
6047 HTTPStatusCode: res.StatusCode,
6048 },
6049 }
6050 target := &ret
6051 if err := gensupport.DecodeResponse(target, res); err != nil {
6052 return nil, err
6053 }
6054 return ret, nil
6055 }
6056
6057 type ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall struct {
6058 s *Service
6059 resource string
6060 testiampermissionsrequest *TestIamPermissionsRequest
6061 urlParams_ gensupport.URLParams
6062 ctx_ context.Context
6063 header_ http.Header
6064 }
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076 func (r *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall {
6077 c := &ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6078 c.resource = resource
6079 c.testiampermissionsrequest = testiampermissionsrequest
6080 return c
6081 }
6082
6083
6084
6085
6086 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall {
6087 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6088 return c
6089 }
6090
6091
6092 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall {
6093 c.ctx_ = ctx
6094 return c
6095 }
6096
6097
6098
6099 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) Header() http.Header {
6100 if c.header_ == nil {
6101 c.header_ = make(http.Header)
6102 }
6103 return c.header_
6104 }
6105
6106 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
6107 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6108 var body io.Reader = nil
6109 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
6110 if err != nil {
6111 return nil, err
6112 }
6113 c.urlParams_.Set("alt", alt)
6114 c.urlParams_.Set("prettyPrint", "false")
6115 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
6116 urls += "?" + c.urlParams_.Encode()
6117 req, err := http.NewRequest("POST", urls, body)
6118 if err != nil {
6119 return nil, err
6120 }
6121 req.Header = reqHeaders
6122 googleapi.Expand(req.URL, map[string]string{
6123 "resource": c.resource,
6124 })
6125 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6126 }
6127
6128
6129
6130
6131
6132
6133
6134 func (c *ProjectsLocationsCaPoolsCertificateAuthoritiesCertificateRevocationListsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
6135 gensupport.SetOptions(c.urlParams_, opts...)
6136 res, err := c.doRequest("json")
6137 if res != nil && res.StatusCode == http.StatusNotModified {
6138 if res.Body != nil {
6139 res.Body.Close()
6140 }
6141 return nil, gensupport.WrapError(&googleapi.Error{
6142 Code: res.StatusCode,
6143 Header: res.Header,
6144 })
6145 }
6146 if err != nil {
6147 return nil, err
6148 }
6149 defer googleapi.CloseBody(res)
6150 if err := googleapi.CheckResponse(res); err != nil {
6151 return nil, gensupport.WrapError(err)
6152 }
6153 ret := &TestIamPermissionsResponse{
6154 ServerResponse: googleapi.ServerResponse{
6155 Header: res.Header,
6156 HTTPStatusCode: res.StatusCode,
6157 },
6158 }
6159 target := &ret
6160 if err := gensupport.DecodeResponse(target, res); err != nil {
6161 return nil, err
6162 }
6163 return ret, nil
6164 }
6165
6166 type ProjectsLocationsCaPoolsCertificatesCreateCall struct {
6167 s *Service
6168 parent string
6169 certificate *Certificate
6170 urlParams_ gensupport.URLParams
6171 ctx_ context.Context
6172 header_ http.Header
6173 }
6174
6175
6176
6177
6178
6179
6180 func (r *ProjectsLocationsCaPoolsCertificatesService) Create(parent string, certificate *Certificate) *ProjectsLocationsCaPoolsCertificatesCreateCall {
6181 c := &ProjectsLocationsCaPoolsCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6182 c.parent = parent
6183 c.certificate = certificate
6184 return c
6185 }
6186
6187
6188
6189
6190
6191
6192 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) CertificateId(certificateId string) *ProjectsLocationsCaPoolsCertificatesCreateCall {
6193 c.urlParams_.Set("certificateId", certificateId)
6194 return c
6195 }
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) IssuingCertificateAuthorityId(issuingCertificateAuthorityId string) *ProjectsLocationsCaPoolsCertificatesCreateCall {
6210 c.urlParams_.Set("issuingCertificateAuthorityId", issuingCertificateAuthorityId)
6211 return c
6212 }
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) RequestId(requestId string) *ProjectsLocationsCaPoolsCertificatesCreateCall {
6226 c.urlParams_.Set("requestId", requestId)
6227 return c
6228 }
6229
6230
6231
6232
6233 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsCaPoolsCertificatesCreateCall {
6234 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly))
6235 return c
6236 }
6237
6238
6239
6240
6241 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificatesCreateCall {
6242 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6243 return c
6244 }
6245
6246
6247 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificatesCreateCall {
6248 c.ctx_ = ctx
6249 return c
6250 }
6251
6252
6253
6254 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) Header() http.Header {
6255 if c.header_ == nil {
6256 c.header_ = make(http.Header)
6257 }
6258 return c.header_
6259 }
6260
6261 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) doRequest(alt string) (*http.Response, error) {
6262 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6263 var body io.Reader = nil
6264 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificate)
6265 if err != nil {
6266 return nil, err
6267 }
6268 c.urlParams_.Set("alt", alt)
6269 c.urlParams_.Set("prettyPrint", "false")
6270 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificates")
6271 urls += "?" + c.urlParams_.Encode()
6272 req, err := http.NewRequest("POST", urls, body)
6273 if err != nil {
6274 return nil, err
6275 }
6276 req.Header = reqHeaders
6277 googleapi.Expand(req.URL, map[string]string{
6278 "parent": c.parent,
6279 })
6280 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6281 }
6282
6283
6284
6285
6286
6287
6288 func (c *ProjectsLocationsCaPoolsCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*Certificate, error) {
6289 gensupport.SetOptions(c.urlParams_, opts...)
6290 res, err := c.doRequest("json")
6291 if res != nil && res.StatusCode == http.StatusNotModified {
6292 if res.Body != nil {
6293 res.Body.Close()
6294 }
6295 return nil, gensupport.WrapError(&googleapi.Error{
6296 Code: res.StatusCode,
6297 Header: res.Header,
6298 })
6299 }
6300 if err != nil {
6301 return nil, err
6302 }
6303 defer googleapi.CloseBody(res)
6304 if err := googleapi.CheckResponse(res); err != nil {
6305 return nil, gensupport.WrapError(err)
6306 }
6307 ret := &Certificate{
6308 ServerResponse: googleapi.ServerResponse{
6309 Header: res.Header,
6310 HTTPStatusCode: res.StatusCode,
6311 },
6312 }
6313 target := &ret
6314 if err := gensupport.DecodeResponse(target, res); err != nil {
6315 return nil, err
6316 }
6317 return ret, nil
6318 }
6319
6320 type ProjectsLocationsCaPoolsCertificatesGetCall struct {
6321 s *Service
6322 name string
6323 urlParams_ gensupport.URLParams
6324 ifNoneMatch_ string
6325 ctx_ context.Context
6326 header_ http.Header
6327 }
6328
6329
6330
6331
6332 func (r *ProjectsLocationsCaPoolsCertificatesService) Get(name string) *ProjectsLocationsCaPoolsCertificatesGetCall {
6333 c := &ProjectsLocationsCaPoolsCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6334 c.name = name
6335 return c
6336 }
6337
6338
6339
6340
6341 func (c *ProjectsLocationsCaPoolsCertificatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificatesGetCall {
6342 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6343 return c
6344 }
6345
6346
6347
6348
6349 func (c *ProjectsLocationsCaPoolsCertificatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsCertificatesGetCall {
6350 c.ifNoneMatch_ = entityTag
6351 return c
6352 }
6353
6354
6355 func (c *ProjectsLocationsCaPoolsCertificatesGetCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificatesGetCall {
6356 c.ctx_ = ctx
6357 return c
6358 }
6359
6360
6361
6362 func (c *ProjectsLocationsCaPoolsCertificatesGetCall) Header() http.Header {
6363 if c.header_ == nil {
6364 c.header_ = make(http.Header)
6365 }
6366 return c.header_
6367 }
6368
6369 func (c *ProjectsLocationsCaPoolsCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
6370 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6371 if c.ifNoneMatch_ != "" {
6372 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6373 }
6374 var body io.Reader = nil
6375 c.urlParams_.Set("alt", alt)
6376 c.urlParams_.Set("prettyPrint", "false")
6377 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6378 urls += "?" + c.urlParams_.Encode()
6379 req, err := http.NewRequest("GET", urls, body)
6380 if err != nil {
6381 return nil, err
6382 }
6383 req.Header = reqHeaders
6384 googleapi.Expand(req.URL, map[string]string{
6385 "name": c.name,
6386 })
6387 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6388 }
6389
6390
6391
6392
6393
6394
6395 func (c *ProjectsLocationsCaPoolsCertificatesGetCall) Do(opts ...googleapi.CallOption) (*Certificate, error) {
6396 gensupport.SetOptions(c.urlParams_, opts...)
6397 res, err := c.doRequest("json")
6398 if res != nil && res.StatusCode == http.StatusNotModified {
6399 if res.Body != nil {
6400 res.Body.Close()
6401 }
6402 return nil, gensupport.WrapError(&googleapi.Error{
6403 Code: res.StatusCode,
6404 Header: res.Header,
6405 })
6406 }
6407 if err != nil {
6408 return nil, err
6409 }
6410 defer googleapi.CloseBody(res)
6411 if err := googleapi.CheckResponse(res); err != nil {
6412 return nil, gensupport.WrapError(err)
6413 }
6414 ret := &Certificate{
6415 ServerResponse: googleapi.ServerResponse{
6416 Header: res.Header,
6417 HTTPStatusCode: res.StatusCode,
6418 },
6419 }
6420 target := &ret
6421 if err := gensupport.DecodeResponse(target, res); err != nil {
6422 return nil, err
6423 }
6424 return ret, nil
6425 }
6426
6427 type ProjectsLocationsCaPoolsCertificatesListCall struct {
6428 s *Service
6429 parent string
6430 urlParams_ gensupport.URLParams
6431 ifNoneMatch_ string
6432 ctx_ context.Context
6433 header_ http.Header
6434 }
6435
6436
6437
6438
6439
6440 func (r *ProjectsLocationsCaPoolsCertificatesService) List(parent string) *ProjectsLocationsCaPoolsCertificatesListCall {
6441 c := &ProjectsLocationsCaPoolsCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6442 c.parent = parent
6443 return c
6444 }
6445
6446
6447
6448
6449
6450 func (c *ProjectsLocationsCaPoolsCertificatesListCall) Filter(filter string) *ProjectsLocationsCaPoolsCertificatesListCall {
6451 c.urlParams_.Set("filter", filter)
6452 return c
6453 }
6454
6455
6456
6457
6458
6459 func (c *ProjectsLocationsCaPoolsCertificatesListCall) OrderBy(orderBy string) *ProjectsLocationsCaPoolsCertificatesListCall {
6460 c.urlParams_.Set("orderBy", orderBy)
6461 return c
6462 }
6463
6464
6465
6466
6467
6468
6469 func (c *ProjectsLocationsCaPoolsCertificatesListCall) PageSize(pageSize int64) *ProjectsLocationsCaPoolsCertificatesListCall {
6470 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6471 return c
6472 }
6473
6474
6475
6476 func (c *ProjectsLocationsCaPoolsCertificatesListCall) PageToken(pageToken string) *ProjectsLocationsCaPoolsCertificatesListCall {
6477 c.urlParams_.Set("pageToken", pageToken)
6478 return c
6479 }
6480
6481
6482
6483
6484 func (c *ProjectsLocationsCaPoolsCertificatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificatesListCall {
6485 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6486 return c
6487 }
6488
6489
6490
6491
6492 func (c *ProjectsLocationsCaPoolsCertificatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCaPoolsCertificatesListCall {
6493 c.ifNoneMatch_ = entityTag
6494 return c
6495 }
6496
6497
6498 func (c *ProjectsLocationsCaPoolsCertificatesListCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificatesListCall {
6499 c.ctx_ = ctx
6500 return c
6501 }
6502
6503
6504
6505 func (c *ProjectsLocationsCaPoolsCertificatesListCall) Header() http.Header {
6506 if c.header_ == nil {
6507 c.header_ = make(http.Header)
6508 }
6509 return c.header_
6510 }
6511
6512 func (c *ProjectsLocationsCaPoolsCertificatesListCall) doRequest(alt string) (*http.Response, error) {
6513 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6514 if c.ifNoneMatch_ != "" {
6515 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6516 }
6517 var body io.Reader = nil
6518 c.urlParams_.Set("alt", alt)
6519 c.urlParams_.Set("prettyPrint", "false")
6520 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificates")
6521 urls += "?" + c.urlParams_.Encode()
6522 req, err := http.NewRequest("GET", urls, body)
6523 if err != nil {
6524 return nil, err
6525 }
6526 req.Header = reqHeaders
6527 googleapi.Expand(req.URL, map[string]string{
6528 "parent": c.parent,
6529 })
6530 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6531 }
6532
6533
6534
6535
6536
6537
6538
6539 func (c *ProjectsLocationsCaPoolsCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListCertificatesResponse, error) {
6540 gensupport.SetOptions(c.urlParams_, opts...)
6541 res, err := c.doRequest("json")
6542 if res != nil && res.StatusCode == http.StatusNotModified {
6543 if res.Body != nil {
6544 res.Body.Close()
6545 }
6546 return nil, gensupport.WrapError(&googleapi.Error{
6547 Code: res.StatusCode,
6548 Header: res.Header,
6549 })
6550 }
6551 if err != nil {
6552 return nil, err
6553 }
6554 defer googleapi.CloseBody(res)
6555 if err := googleapi.CheckResponse(res); err != nil {
6556 return nil, gensupport.WrapError(err)
6557 }
6558 ret := &ListCertificatesResponse{
6559 ServerResponse: googleapi.ServerResponse{
6560 Header: res.Header,
6561 HTTPStatusCode: res.StatusCode,
6562 },
6563 }
6564 target := &ret
6565 if err := gensupport.DecodeResponse(target, res); err != nil {
6566 return nil, err
6567 }
6568 return ret, nil
6569 }
6570
6571
6572
6573
6574 func (c *ProjectsLocationsCaPoolsCertificatesListCall) Pages(ctx context.Context, f func(*ListCertificatesResponse) error) error {
6575 c.ctx_ = ctx
6576 defer c.PageToken(c.urlParams_.Get("pageToken"))
6577 for {
6578 x, err := c.Do()
6579 if err != nil {
6580 return err
6581 }
6582 if err := f(x); err != nil {
6583 return err
6584 }
6585 if x.NextPageToken == "" {
6586 return nil
6587 }
6588 c.PageToken(x.NextPageToken)
6589 }
6590 }
6591
6592 type ProjectsLocationsCaPoolsCertificatesPatchCall struct {
6593 s *Service
6594 name string
6595 certificate *Certificate
6596 urlParams_ gensupport.URLParams
6597 ctx_ context.Context
6598 header_ http.Header
6599 }
6600
6601
6602
6603
6604
6605
6606 func (r *ProjectsLocationsCaPoolsCertificatesService) Patch(name string, certificate *Certificate) *ProjectsLocationsCaPoolsCertificatesPatchCall {
6607 c := &ProjectsLocationsCaPoolsCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6608 c.name = name
6609 c.certificate = certificate
6610 return c
6611 }
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624 func (c *ProjectsLocationsCaPoolsCertificatesPatchCall) RequestId(requestId string) *ProjectsLocationsCaPoolsCertificatesPatchCall {
6625 c.urlParams_.Set("requestId", requestId)
6626 return c
6627 }
6628
6629
6630
6631 func (c *ProjectsLocationsCaPoolsCertificatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCaPoolsCertificatesPatchCall {
6632 c.urlParams_.Set("updateMask", updateMask)
6633 return c
6634 }
6635
6636
6637
6638
6639 func (c *ProjectsLocationsCaPoolsCertificatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificatesPatchCall {
6640 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6641 return c
6642 }
6643
6644
6645 func (c *ProjectsLocationsCaPoolsCertificatesPatchCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificatesPatchCall {
6646 c.ctx_ = ctx
6647 return c
6648 }
6649
6650
6651
6652 func (c *ProjectsLocationsCaPoolsCertificatesPatchCall) Header() http.Header {
6653 if c.header_ == nil {
6654 c.header_ = make(http.Header)
6655 }
6656 return c.header_
6657 }
6658
6659 func (c *ProjectsLocationsCaPoolsCertificatesPatchCall) doRequest(alt string) (*http.Response, error) {
6660 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6661 var body io.Reader = nil
6662 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificate)
6663 if err != nil {
6664 return nil, err
6665 }
6666 c.urlParams_.Set("alt", alt)
6667 c.urlParams_.Set("prettyPrint", "false")
6668 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6669 urls += "?" + c.urlParams_.Encode()
6670 req, err := http.NewRequest("PATCH", urls, body)
6671 if err != nil {
6672 return nil, err
6673 }
6674 req.Header = reqHeaders
6675 googleapi.Expand(req.URL, map[string]string{
6676 "name": c.name,
6677 })
6678 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6679 }
6680
6681
6682
6683
6684
6685
6686 func (c *ProjectsLocationsCaPoolsCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*Certificate, error) {
6687 gensupport.SetOptions(c.urlParams_, opts...)
6688 res, err := c.doRequest("json")
6689 if res != nil && res.StatusCode == http.StatusNotModified {
6690 if res.Body != nil {
6691 res.Body.Close()
6692 }
6693 return nil, gensupport.WrapError(&googleapi.Error{
6694 Code: res.StatusCode,
6695 Header: res.Header,
6696 })
6697 }
6698 if err != nil {
6699 return nil, err
6700 }
6701 defer googleapi.CloseBody(res)
6702 if err := googleapi.CheckResponse(res); err != nil {
6703 return nil, gensupport.WrapError(err)
6704 }
6705 ret := &Certificate{
6706 ServerResponse: googleapi.ServerResponse{
6707 Header: res.Header,
6708 HTTPStatusCode: res.StatusCode,
6709 },
6710 }
6711 target := &ret
6712 if err := gensupport.DecodeResponse(target, res); err != nil {
6713 return nil, err
6714 }
6715 return ret, nil
6716 }
6717
6718 type ProjectsLocationsCaPoolsCertificatesRevokeCall struct {
6719 s *Service
6720 name string
6721 revokecertificaterequest *RevokeCertificateRequest
6722 urlParams_ gensupport.URLParams
6723 ctx_ context.Context
6724 header_ http.Header
6725 }
6726
6727
6728
6729
6730
6731 func (r *ProjectsLocationsCaPoolsCertificatesService) Revoke(name string, revokecertificaterequest *RevokeCertificateRequest) *ProjectsLocationsCaPoolsCertificatesRevokeCall {
6732 c := &ProjectsLocationsCaPoolsCertificatesRevokeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6733 c.name = name
6734 c.revokecertificaterequest = revokecertificaterequest
6735 return c
6736 }
6737
6738
6739
6740
6741 func (c *ProjectsLocationsCaPoolsCertificatesRevokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCaPoolsCertificatesRevokeCall {
6742 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6743 return c
6744 }
6745
6746
6747 func (c *ProjectsLocationsCaPoolsCertificatesRevokeCall) Context(ctx context.Context) *ProjectsLocationsCaPoolsCertificatesRevokeCall {
6748 c.ctx_ = ctx
6749 return c
6750 }
6751
6752
6753
6754 func (c *ProjectsLocationsCaPoolsCertificatesRevokeCall) Header() http.Header {
6755 if c.header_ == nil {
6756 c.header_ = make(http.Header)
6757 }
6758 return c.header_
6759 }
6760
6761 func (c *ProjectsLocationsCaPoolsCertificatesRevokeCall) doRequest(alt string) (*http.Response, error) {
6762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6763 var body io.Reader = nil
6764 body, err := googleapi.WithoutDataWrapper.JSONReader(c.revokecertificaterequest)
6765 if err != nil {
6766 return nil, err
6767 }
6768 c.urlParams_.Set("alt", alt)
6769 c.urlParams_.Set("prettyPrint", "false")
6770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:revoke")
6771 urls += "?" + c.urlParams_.Encode()
6772 req, err := http.NewRequest("POST", urls, body)
6773 if err != nil {
6774 return nil, err
6775 }
6776 req.Header = reqHeaders
6777 googleapi.Expand(req.URL, map[string]string{
6778 "name": c.name,
6779 })
6780 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6781 }
6782
6783
6784
6785
6786
6787
6788 func (c *ProjectsLocationsCaPoolsCertificatesRevokeCall) Do(opts ...googleapi.CallOption) (*Certificate, error) {
6789 gensupport.SetOptions(c.urlParams_, opts...)
6790 res, err := c.doRequest("json")
6791 if res != nil && res.StatusCode == http.StatusNotModified {
6792 if res.Body != nil {
6793 res.Body.Close()
6794 }
6795 return nil, gensupport.WrapError(&googleapi.Error{
6796 Code: res.StatusCode,
6797 Header: res.Header,
6798 })
6799 }
6800 if err != nil {
6801 return nil, err
6802 }
6803 defer googleapi.CloseBody(res)
6804 if err := googleapi.CheckResponse(res); err != nil {
6805 return nil, gensupport.WrapError(err)
6806 }
6807 ret := &Certificate{
6808 ServerResponse: googleapi.ServerResponse{
6809 Header: res.Header,
6810 HTTPStatusCode: res.StatusCode,
6811 },
6812 }
6813 target := &ret
6814 if err := gensupport.DecodeResponse(target, res); err != nil {
6815 return nil, err
6816 }
6817 return ret, nil
6818 }
6819
6820 type ProjectsLocationsCertificateTemplatesCreateCall struct {
6821 s *Service
6822 parent string
6823 certificatetemplate *CertificateTemplate
6824 urlParams_ gensupport.URLParams
6825 ctx_ context.Context
6826 header_ http.Header
6827 }
6828
6829
6830
6831
6832
6833 func (r *ProjectsLocationsCertificateTemplatesService) Create(parent string, certificatetemplate *CertificateTemplate) *ProjectsLocationsCertificateTemplatesCreateCall {
6834 c := &ProjectsLocationsCertificateTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6835 c.parent = parent
6836 c.certificatetemplate = certificatetemplate
6837 return c
6838 }
6839
6840
6841
6842
6843 func (c *ProjectsLocationsCertificateTemplatesCreateCall) CertificateTemplateId(certificateTemplateId string) *ProjectsLocationsCertificateTemplatesCreateCall {
6844 c.urlParams_.Set("certificateTemplateId", certificateTemplateId)
6845 return c
6846 }
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859 func (c *ProjectsLocationsCertificateTemplatesCreateCall) RequestId(requestId string) *ProjectsLocationsCertificateTemplatesCreateCall {
6860 c.urlParams_.Set("requestId", requestId)
6861 return c
6862 }
6863
6864
6865
6866
6867 func (c *ProjectsLocationsCertificateTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateTemplatesCreateCall {
6868 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6869 return c
6870 }
6871
6872
6873 func (c *ProjectsLocationsCertificateTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsCertificateTemplatesCreateCall {
6874 c.ctx_ = ctx
6875 return c
6876 }
6877
6878
6879
6880 func (c *ProjectsLocationsCertificateTemplatesCreateCall) Header() http.Header {
6881 if c.header_ == nil {
6882 c.header_ = make(http.Header)
6883 }
6884 return c.header_
6885 }
6886
6887 func (c *ProjectsLocationsCertificateTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
6888 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6889 var body io.Reader = nil
6890 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificatetemplate)
6891 if err != nil {
6892 return nil, err
6893 }
6894 c.urlParams_.Set("alt", alt)
6895 c.urlParams_.Set("prettyPrint", "false")
6896 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateTemplates")
6897 urls += "?" + c.urlParams_.Encode()
6898 req, err := http.NewRequest("POST", urls, body)
6899 if err != nil {
6900 return nil, err
6901 }
6902 req.Header = reqHeaders
6903 googleapi.Expand(req.URL, map[string]string{
6904 "parent": c.parent,
6905 })
6906 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6907 }
6908
6909
6910
6911
6912
6913
6914 func (c *ProjectsLocationsCertificateTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6915 gensupport.SetOptions(c.urlParams_, opts...)
6916 res, err := c.doRequest("json")
6917 if res != nil && res.StatusCode == http.StatusNotModified {
6918 if res.Body != nil {
6919 res.Body.Close()
6920 }
6921 return nil, gensupport.WrapError(&googleapi.Error{
6922 Code: res.StatusCode,
6923 Header: res.Header,
6924 })
6925 }
6926 if err != nil {
6927 return nil, err
6928 }
6929 defer googleapi.CloseBody(res)
6930 if err := googleapi.CheckResponse(res); err != nil {
6931 return nil, gensupport.WrapError(err)
6932 }
6933 ret := &Operation{
6934 ServerResponse: googleapi.ServerResponse{
6935 Header: res.Header,
6936 HTTPStatusCode: res.StatusCode,
6937 },
6938 }
6939 target := &ret
6940 if err := gensupport.DecodeResponse(target, res); err != nil {
6941 return nil, err
6942 }
6943 return ret, nil
6944 }
6945
6946 type ProjectsLocationsCertificateTemplatesDeleteCall struct {
6947 s *Service
6948 name string
6949 urlParams_ gensupport.URLParams
6950 ctx_ context.Context
6951 header_ http.Header
6952 }
6953
6954
6955
6956
6957
6958 func (r *ProjectsLocationsCertificateTemplatesService) Delete(name string) *ProjectsLocationsCertificateTemplatesDeleteCall {
6959 c := &ProjectsLocationsCertificateTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6960 c.name = name
6961 return c
6962 }
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975 func (c *ProjectsLocationsCertificateTemplatesDeleteCall) RequestId(requestId string) *ProjectsLocationsCertificateTemplatesDeleteCall {
6976 c.urlParams_.Set("requestId", requestId)
6977 return c
6978 }
6979
6980
6981
6982
6983 func (c *ProjectsLocationsCertificateTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateTemplatesDeleteCall {
6984 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6985 return c
6986 }
6987
6988
6989 func (c *ProjectsLocationsCertificateTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCertificateTemplatesDeleteCall {
6990 c.ctx_ = ctx
6991 return c
6992 }
6993
6994
6995
6996 func (c *ProjectsLocationsCertificateTemplatesDeleteCall) Header() http.Header {
6997 if c.header_ == nil {
6998 c.header_ = make(http.Header)
6999 }
7000 return c.header_
7001 }
7002
7003 func (c *ProjectsLocationsCertificateTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
7004 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7005 var body io.Reader = nil
7006 c.urlParams_.Set("alt", alt)
7007 c.urlParams_.Set("prettyPrint", "false")
7008 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7009 urls += "?" + c.urlParams_.Encode()
7010 req, err := http.NewRequest("DELETE", urls, body)
7011 if err != nil {
7012 return nil, err
7013 }
7014 req.Header = reqHeaders
7015 googleapi.Expand(req.URL, map[string]string{
7016 "name": c.name,
7017 })
7018 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7019 }
7020
7021
7022
7023
7024
7025
7026 func (c *ProjectsLocationsCertificateTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7027 gensupport.SetOptions(c.urlParams_, opts...)
7028 res, err := c.doRequest("json")
7029 if res != nil && res.StatusCode == http.StatusNotModified {
7030 if res.Body != nil {
7031 res.Body.Close()
7032 }
7033 return nil, gensupport.WrapError(&googleapi.Error{
7034 Code: res.StatusCode,
7035 Header: res.Header,
7036 })
7037 }
7038 if err != nil {
7039 return nil, err
7040 }
7041 defer googleapi.CloseBody(res)
7042 if err := googleapi.CheckResponse(res); err != nil {
7043 return nil, gensupport.WrapError(err)
7044 }
7045 ret := &Operation{
7046 ServerResponse: googleapi.ServerResponse{
7047 Header: res.Header,
7048 HTTPStatusCode: res.StatusCode,
7049 },
7050 }
7051 target := &ret
7052 if err := gensupport.DecodeResponse(target, res); err != nil {
7053 return nil, err
7054 }
7055 return ret, nil
7056 }
7057
7058 type ProjectsLocationsCertificateTemplatesGetCall struct {
7059 s *Service
7060 name string
7061 urlParams_ gensupport.URLParams
7062 ifNoneMatch_ string
7063 ctx_ context.Context
7064 header_ http.Header
7065 }
7066
7067
7068
7069
7070 func (r *ProjectsLocationsCertificateTemplatesService) Get(name string) *ProjectsLocationsCertificateTemplatesGetCall {
7071 c := &ProjectsLocationsCertificateTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7072 c.name = name
7073 return c
7074 }
7075
7076
7077
7078
7079 func (c *ProjectsLocationsCertificateTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateTemplatesGetCall {
7080 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7081 return c
7082 }
7083
7084
7085
7086
7087 func (c *ProjectsLocationsCertificateTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateTemplatesGetCall {
7088 c.ifNoneMatch_ = entityTag
7089 return c
7090 }
7091
7092
7093 func (c *ProjectsLocationsCertificateTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsCertificateTemplatesGetCall {
7094 c.ctx_ = ctx
7095 return c
7096 }
7097
7098
7099
7100 func (c *ProjectsLocationsCertificateTemplatesGetCall) Header() http.Header {
7101 if c.header_ == nil {
7102 c.header_ = make(http.Header)
7103 }
7104 return c.header_
7105 }
7106
7107 func (c *ProjectsLocationsCertificateTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
7108 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7109 if c.ifNoneMatch_ != "" {
7110 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7111 }
7112 var body io.Reader = nil
7113 c.urlParams_.Set("alt", alt)
7114 c.urlParams_.Set("prettyPrint", "false")
7115 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7116 urls += "?" + c.urlParams_.Encode()
7117 req, err := http.NewRequest("GET", urls, body)
7118 if err != nil {
7119 return nil, err
7120 }
7121 req.Header = reqHeaders
7122 googleapi.Expand(req.URL, map[string]string{
7123 "name": c.name,
7124 })
7125 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7126 }
7127
7128
7129
7130
7131
7132
7133
7134 func (c *ProjectsLocationsCertificateTemplatesGetCall) Do(opts ...googleapi.CallOption) (*CertificateTemplate, error) {
7135 gensupport.SetOptions(c.urlParams_, opts...)
7136 res, err := c.doRequest("json")
7137 if res != nil && res.StatusCode == http.StatusNotModified {
7138 if res.Body != nil {
7139 res.Body.Close()
7140 }
7141 return nil, gensupport.WrapError(&googleapi.Error{
7142 Code: res.StatusCode,
7143 Header: res.Header,
7144 })
7145 }
7146 if err != nil {
7147 return nil, err
7148 }
7149 defer googleapi.CloseBody(res)
7150 if err := googleapi.CheckResponse(res); err != nil {
7151 return nil, gensupport.WrapError(err)
7152 }
7153 ret := &CertificateTemplate{
7154 ServerResponse: googleapi.ServerResponse{
7155 Header: res.Header,
7156 HTTPStatusCode: res.StatusCode,
7157 },
7158 }
7159 target := &ret
7160 if err := gensupport.DecodeResponse(target, res); err != nil {
7161 return nil, err
7162 }
7163 return ret, nil
7164 }
7165
7166 type ProjectsLocationsCertificateTemplatesGetIamPolicyCall struct {
7167 s *Service
7168 resource string
7169 urlParams_ gensupport.URLParams
7170 ifNoneMatch_ string
7171 ctx_ context.Context
7172 header_ http.Header
7173 }
7174
7175
7176
7177
7178
7179
7180
7181 func (r *ProjectsLocationsCertificateTemplatesService) GetIamPolicy(resource string) *ProjectsLocationsCertificateTemplatesGetIamPolicyCall {
7182 c := &ProjectsLocationsCertificateTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7183 c.resource = resource
7184 return c
7185 }
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199 func (c *ProjectsLocationsCertificateTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsCertificateTemplatesGetIamPolicyCall {
7200 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7201 return c
7202 }
7203
7204
7205
7206
7207 func (c *ProjectsLocationsCertificateTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateTemplatesGetIamPolicyCall {
7208 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7209 return c
7210 }
7211
7212
7213
7214
7215 func (c *ProjectsLocationsCertificateTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateTemplatesGetIamPolicyCall {
7216 c.ifNoneMatch_ = entityTag
7217 return c
7218 }
7219
7220
7221 func (c *ProjectsLocationsCertificateTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCertificateTemplatesGetIamPolicyCall {
7222 c.ctx_ = ctx
7223 return c
7224 }
7225
7226
7227
7228 func (c *ProjectsLocationsCertificateTemplatesGetIamPolicyCall) Header() http.Header {
7229 if c.header_ == nil {
7230 c.header_ = make(http.Header)
7231 }
7232 return c.header_
7233 }
7234
7235 func (c *ProjectsLocationsCertificateTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7236 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7237 if c.ifNoneMatch_ != "" {
7238 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7239 }
7240 var body io.Reader = nil
7241 c.urlParams_.Set("alt", alt)
7242 c.urlParams_.Set("prettyPrint", "false")
7243 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
7244 urls += "?" + c.urlParams_.Encode()
7245 req, err := http.NewRequest("GET", urls, body)
7246 if err != nil {
7247 return nil, err
7248 }
7249 req.Header = reqHeaders
7250 googleapi.Expand(req.URL, map[string]string{
7251 "resource": c.resource,
7252 })
7253 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7254 }
7255
7256
7257
7258
7259
7260
7261 func (c *ProjectsLocationsCertificateTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7262 gensupport.SetOptions(c.urlParams_, opts...)
7263 res, err := c.doRequest("json")
7264 if res != nil && res.StatusCode == http.StatusNotModified {
7265 if res.Body != nil {
7266 res.Body.Close()
7267 }
7268 return nil, gensupport.WrapError(&googleapi.Error{
7269 Code: res.StatusCode,
7270 Header: res.Header,
7271 })
7272 }
7273 if err != nil {
7274 return nil, err
7275 }
7276 defer googleapi.CloseBody(res)
7277 if err := googleapi.CheckResponse(res); err != nil {
7278 return nil, gensupport.WrapError(err)
7279 }
7280 ret := &Policy{
7281 ServerResponse: googleapi.ServerResponse{
7282 Header: res.Header,
7283 HTTPStatusCode: res.StatusCode,
7284 },
7285 }
7286 target := &ret
7287 if err := gensupport.DecodeResponse(target, res); err != nil {
7288 return nil, err
7289 }
7290 return ret, nil
7291 }
7292
7293 type ProjectsLocationsCertificateTemplatesListCall struct {
7294 s *Service
7295 parent string
7296 urlParams_ gensupport.URLParams
7297 ifNoneMatch_ string
7298 ctx_ context.Context
7299 header_ http.Header
7300 }
7301
7302
7303
7304
7305
7306 func (r *ProjectsLocationsCertificateTemplatesService) List(parent string) *ProjectsLocationsCertificateTemplatesListCall {
7307 c := &ProjectsLocationsCertificateTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7308 c.parent = parent
7309 return c
7310 }
7311
7312
7313
7314 func (c *ProjectsLocationsCertificateTemplatesListCall) Filter(filter string) *ProjectsLocationsCertificateTemplatesListCall {
7315 c.urlParams_.Set("filter", filter)
7316 return c
7317 }
7318
7319
7320
7321 func (c *ProjectsLocationsCertificateTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsCertificateTemplatesListCall {
7322 c.urlParams_.Set("orderBy", orderBy)
7323 return c
7324 }
7325
7326
7327
7328
7329
7330
7331 func (c *ProjectsLocationsCertificateTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsCertificateTemplatesListCall {
7332 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7333 return c
7334 }
7335
7336
7337
7338 func (c *ProjectsLocationsCertificateTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsCertificateTemplatesListCall {
7339 c.urlParams_.Set("pageToken", pageToken)
7340 return c
7341 }
7342
7343
7344
7345
7346 func (c *ProjectsLocationsCertificateTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateTemplatesListCall {
7347 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7348 return c
7349 }
7350
7351
7352
7353
7354 func (c *ProjectsLocationsCertificateTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCertificateTemplatesListCall {
7355 c.ifNoneMatch_ = entityTag
7356 return c
7357 }
7358
7359
7360 func (c *ProjectsLocationsCertificateTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsCertificateTemplatesListCall {
7361 c.ctx_ = ctx
7362 return c
7363 }
7364
7365
7366
7367 func (c *ProjectsLocationsCertificateTemplatesListCall) Header() http.Header {
7368 if c.header_ == nil {
7369 c.header_ = make(http.Header)
7370 }
7371 return c.header_
7372 }
7373
7374 func (c *ProjectsLocationsCertificateTemplatesListCall) doRequest(alt string) (*http.Response, error) {
7375 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7376 if c.ifNoneMatch_ != "" {
7377 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7378 }
7379 var body io.Reader = nil
7380 c.urlParams_.Set("alt", alt)
7381 c.urlParams_.Set("prettyPrint", "false")
7382 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/certificateTemplates")
7383 urls += "?" + c.urlParams_.Encode()
7384 req, err := http.NewRequest("GET", urls, body)
7385 if err != nil {
7386 return nil, err
7387 }
7388 req.Header = reqHeaders
7389 googleapi.Expand(req.URL, map[string]string{
7390 "parent": c.parent,
7391 })
7392 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7393 }
7394
7395
7396
7397
7398
7399
7400
7401 func (c *ProjectsLocationsCertificateTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListCertificateTemplatesResponse, error) {
7402 gensupport.SetOptions(c.urlParams_, opts...)
7403 res, err := c.doRequest("json")
7404 if res != nil && res.StatusCode == http.StatusNotModified {
7405 if res.Body != nil {
7406 res.Body.Close()
7407 }
7408 return nil, gensupport.WrapError(&googleapi.Error{
7409 Code: res.StatusCode,
7410 Header: res.Header,
7411 })
7412 }
7413 if err != nil {
7414 return nil, err
7415 }
7416 defer googleapi.CloseBody(res)
7417 if err := googleapi.CheckResponse(res); err != nil {
7418 return nil, gensupport.WrapError(err)
7419 }
7420 ret := &ListCertificateTemplatesResponse{
7421 ServerResponse: googleapi.ServerResponse{
7422 Header: res.Header,
7423 HTTPStatusCode: res.StatusCode,
7424 },
7425 }
7426 target := &ret
7427 if err := gensupport.DecodeResponse(target, res); err != nil {
7428 return nil, err
7429 }
7430 return ret, nil
7431 }
7432
7433
7434
7435
7436 func (c *ProjectsLocationsCertificateTemplatesListCall) Pages(ctx context.Context, f func(*ListCertificateTemplatesResponse) error) error {
7437 c.ctx_ = ctx
7438 defer c.PageToken(c.urlParams_.Get("pageToken"))
7439 for {
7440 x, err := c.Do()
7441 if err != nil {
7442 return err
7443 }
7444 if err := f(x); err != nil {
7445 return err
7446 }
7447 if x.NextPageToken == "" {
7448 return nil
7449 }
7450 c.PageToken(x.NextPageToken)
7451 }
7452 }
7453
7454 type ProjectsLocationsCertificateTemplatesPatchCall struct {
7455 s *Service
7456 name string
7457 certificatetemplate *CertificateTemplate
7458 urlParams_ gensupport.URLParams
7459 ctx_ context.Context
7460 header_ http.Header
7461 }
7462
7463
7464
7465
7466
7467 func (r *ProjectsLocationsCertificateTemplatesService) Patch(name string, certificatetemplate *CertificateTemplate) *ProjectsLocationsCertificateTemplatesPatchCall {
7468 c := &ProjectsLocationsCertificateTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7469 c.name = name
7470 c.certificatetemplate = certificatetemplate
7471 return c
7472 }
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485 func (c *ProjectsLocationsCertificateTemplatesPatchCall) RequestId(requestId string) *ProjectsLocationsCertificateTemplatesPatchCall {
7486 c.urlParams_.Set("requestId", requestId)
7487 return c
7488 }
7489
7490
7491
7492 func (c *ProjectsLocationsCertificateTemplatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCertificateTemplatesPatchCall {
7493 c.urlParams_.Set("updateMask", updateMask)
7494 return c
7495 }
7496
7497
7498
7499
7500 func (c *ProjectsLocationsCertificateTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateTemplatesPatchCall {
7501 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7502 return c
7503 }
7504
7505
7506 func (c *ProjectsLocationsCertificateTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsCertificateTemplatesPatchCall {
7507 c.ctx_ = ctx
7508 return c
7509 }
7510
7511
7512
7513 func (c *ProjectsLocationsCertificateTemplatesPatchCall) Header() http.Header {
7514 if c.header_ == nil {
7515 c.header_ = make(http.Header)
7516 }
7517 return c.header_
7518 }
7519
7520 func (c *ProjectsLocationsCertificateTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
7521 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7522 var body io.Reader = nil
7523 body, err := googleapi.WithoutDataWrapper.JSONReader(c.certificatetemplate)
7524 if err != nil {
7525 return nil, err
7526 }
7527 c.urlParams_.Set("alt", alt)
7528 c.urlParams_.Set("prettyPrint", "false")
7529 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7530 urls += "?" + c.urlParams_.Encode()
7531 req, err := http.NewRequest("PATCH", urls, body)
7532 if err != nil {
7533 return nil, err
7534 }
7535 req.Header = reqHeaders
7536 googleapi.Expand(req.URL, map[string]string{
7537 "name": c.name,
7538 })
7539 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7540 }
7541
7542
7543
7544
7545
7546
7547 func (c *ProjectsLocationsCertificateTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7548 gensupport.SetOptions(c.urlParams_, opts...)
7549 res, err := c.doRequest("json")
7550 if res != nil && res.StatusCode == http.StatusNotModified {
7551 if res.Body != nil {
7552 res.Body.Close()
7553 }
7554 return nil, gensupport.WrapError(&googleapi.Error{
7555 Code: res.StatusCode,
7556 Header: res.Header,
7557 })
7558 }
7559 if err != nil {
7560 return nil, err
7561 }
7562 defer googleapi.CloseBody(res)
7563 if err := googleapi.CheckResponse(res); err != nil {
7564 return nil, gensupport.WrapError(err)
7565 }
7566 ret := &Operation{
7567 ServerResponse: googleapi.ServerResponse{
7568 Header: res.Header,
7569 HTTPStatusCode: res.StatusCode,
7570 },
7571 }
7572 target := &ret
7573 if err := gensupport.DecodeResponse(target, res); err != nil {
7574 return nil, err
7575 }
7576 return ret, nil
7577 }
7578
7579 type ProjectsLocationsCertificateTemplatesSetIamPolicyCall struct {
7580 s *Service
7581 resource string
7582 setiampolicyrequest *SetIamPolicyRequest
7583 urlParams_ gensupport.URLParams
7584 ctx_ context.Context
7585 header_ http.Header
7586 }
7587
7588
7589
7590
7591
7592
7593
7594
7595 func (r *ProjectsLocationsCertificateTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsCertificateTemplatesSetIamPolicyCall {
7596 c := &ProjectsLocationsCertificateTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7597 c.resource = resource
7598 c.setiampolicyrequest = setiampolicyrequest
7599 return c
7600 }
7601
7602
7603
7604
7605 func (c *ProjectsLocationsCertificateTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateTemplatesSetIamPolicyCall {
7606 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7607 return c
7608 }
7609
7610
7611 func (c *ProjectsLocationsCertificateTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCertificateTemplatesSetIamPolicyCall {
7612 c.ctx_ = ctx
7613 return c
7614 }
7615
7616
7617
7618 func (c *ProjectsLocationsCertificateTemplatesSetIamPolicyCall) Header() http.Header {
7619 if c.header_ == nil {
7620 c.header_ = make(http.Header)
7621 }
7622 return c.header_
7623 }
7624
7625 func (c *ProjectsLocationsCertificateTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7626 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7627 var body io.Reader = nil
7628 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
7629 if err != nil {
7630 return nil, err
7631 }
7632 c.urlParams_.Set("alt", alt)
7633 c.urlParams_.Set("prettyPrint", "false")
7634 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
7635 urls += "?" + c.urlParams_.Encode()
7636 req, err := http.NewRequest("POST", urls, body)
7637 if err != nil {
7638 return nil, err
7639 }
7640 req.Header = reqHeaders
7641 googleapi.Expand(req.URL, map[string]string{
7642 "resource": c.resource,
7643 })
7644 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7645 }
7646
7647
7648
7649
7650
7651
7652 func (c *ProjectsLocationsCertificateTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7653 gensupport.SetOptions(c.urlParams_, opts...)
7654 res, err := c.doRequest("json")
7655 if res != nil && res.StatusCode == http.StatusNotModified {
7656 if res.Body != nil {
7657 res.Body.Close()
7658 }
7659 return nil, gensupport.WrapError(&googleapi.Error{
7660 Code: res.StatusCode,
7661 Header: res.Header,
7662 })
7663 }
7664 if err != nil {
7665 return nil, err
7666 }
7667 defer googleapi.CloseBody(res)
7668 if err := googleapi.CheckResponse(res); err != nil {
7669 return nil, gensupport.WrapError(err)
7670 }
7671 ret := &Policy{
7672 ServerResponse: googleapi.ServerResponse{
7673 Header: res.Header,
7674 HTTPStatusCode: res.StatusCode,
7675 },
7676 }
7677 target := &ret
7678 if err := gensupport.DecodeResponse(target, res); err != nil {
7679 return nil, err
7680 }
7681 return ret, nil
7682 }
7683
7684 type ProjectsLocationsCertificateTemplatesTestIamPermissionsCall struct {
7685 s *Service
7686 resource string
7687 testiampermissionsrequest *TestIamPermissionsRequest
7688 urlParams_ gensupport.URLParams
7689 ctx_ context.Context
7690 header_ http.Header
7691 }
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703 func (r *ProjectsLocationsCertificateTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsCertificateTemplatesTestIamPermissionsCall {
7704 c := &ProjectsLocationsCertificateTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7705 c.resource = resource
7706 c.testiampermissionsrequest = testiampermissionsrequest
7707 return c
7708 }
7709
7710
7711
7712
7713 func (c *ProjectsLocationsCertificateTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCertificateTemplatesTestIamPermissionsCall {
7714 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7715 return c
7716 }
7717
7718
7719 func (c *ProjectsLocationsCertificateTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsCertificateTemplatesTestIamPermissionsCall {
7720 c.ctx_ = ctx
7721 return c
7722 }
7723
7724
7725
7726 func (c *ProjectsLocationsCertificateTemplatesTestIamPermissionsCall) Header() http.Header {
7727 if c.header_ == nil {
7728 c.header_ = make(http.Header)
7729 }
7730 return c.header_
7731 }
7732
7733 func (c *ProjectsLocationsCertificateTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7734 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7735 var body io.Reader = nil
7736 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
7737 if err != nil {
7738 return nil, err
7739 }
7740 c.urlParams_.Set("alt", alt)
7741 c.urlParams_.Set("prettyPrint", "false")
7742 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
7743 urls += "?" + c.urlParams_.Encode()
7744 req, err := http.NewRequest("POST", urls, body)
7745 if err != nil {
7746 return nil, err
7747 }
7748 req.Header = reqHeaders
7749 googleapi.Expand(req.URL, map[string]string{
7750 "resource": c.resource,
7751 })
7752 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7753 }
7754
7755
7756
7757
7758
7759
7760
7761 func (c *ProjectsLocationsCertificateTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7762 gensupport.SetOptions(c.urlParams_, opts...)
7763 res, err := c.doRequest("json")
7764 if res != nil && res.StatusCode == http.StatusNotModified {
7765 if res.Body != nil {
7766 res.Body.Close()
7767 }
7768 return nil, gensupport.WrapError(&googleapi.Error{
7769 Code: res.StatusCode,
7770 Header: res.Header,
7771 })
7772 }
7773 if err != nil {
7774 return nil, err
7775 }
7776 defer googleapi.CloseBody(res)
7777 if err := googleapi.CheckResponse(res); err != nil {
7778 return nil, gensupport.WrapError(err)
7779 }
7780 ret := &TestIamPermissionsResponse{
7781 ServerResponse: googleapi.ServerResponse{
7782 Header: res.Header,
7783 HTTPStatusCode: res.StatusCode,
7784 },
7785 }
7786 target := &ret
7787 if err := gensupport.DecodeResponse(target, res); err != nil {
7788 return nil, err
7789 }
7790 return ret, nil
7791 }
7792
7793 type ProjectsLocationsOperationsCancelCall struct {
7794 s *Service
7795 name string
7796 canceloperationrequest *CancelOperationRequest
7797 urlParams_ gensupport.URLParams
7798 ctx_ context.Context
7799 header_ http.Header
7800 }
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
7814 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7815 c.name = name
7816 c.canceloperationrequest = canceloperationrequest
7817 return c
7818 }
7819
7820
7821
7822
7823 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
7824 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7825 return c
7826 }
7827
7828
7829 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
7830 c.ctx_ = ctx
7831 return c
7832 }
7833
7834
7835
7836 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
7837 if c.header_ == nil {
7838 c.header_ = make(http.Header)
7839 }
7840 return c.header_
7841 }
7842
7843 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
7844 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7845 var body io.Reader = nil
7846 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
7847 if err != nil {
7848 return nil, err
7849 }
7850 c.urlParams_.Set("alt", alt)
7851 c.urlParams_.Set("prettyPrint", "false")
7852 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
7853 urls += "?" + c.urlParams_.Encode()
7854 req, err := http.NewRequest("POST", urls, body)
7855 if err != nil {
7856 return nil, err
7857 }
7858 req.Header = reqHeaders
7859 googleapi.Expand(req.URL, map[string]string{
7860 "name": c.name,
7861 })
7862 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7863 }
7864
7865
7866
7867
7868
7869
7870 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7871 gensupport.SetOptions(c.urlParams_, opts...)
7872 res, err := c.doRequest("json")
7873 if res != nil && res.StatusCode == http.StatusNotModified {
7874 if res.Body != nil {
7875 res.Body.Close()
7876 }
7877 return nil, gensupport.WrapError(&googleapi.Error{
7878 Code: res.StatusCode,
7879 Header: res.Header,
7880 })
7881 }
7882 if err != nil {
7883 return nil, err
7884 }
7885 defer googleapi.CloseBody(res)
7886 if err := googleapi.CheckResponse(res); err != nil {
7887 return nil, gensupport.WrapError(err)
7888 }
7889 ret := &Empty{
7890 ServerResponse: googleapi.ServerResponse{
7891 Header: res.Header,
7892 HTTPStatusCode: res.StatusCode,
7893 },
7894 }
7895 target := &ret
7896 if err := gensupport.DecodeResponse(target, res); err != nil {
7897 return nil, err
7898 }
7899 return ret, nil
7900 }
7901
7902 type ProjectsLocationsOperationsDeleteCall struct {
7903 s *Service
7904 name string
7905 urlParams_ gensupport.URLParams
7906 ctx_ context.Context
7907 header_ http.Header
7908 }
7909
7910
7911
7912
7913
7914
7915
7916 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
7917 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7918 c.name = name
7919 return c
7920 }
7921
7922
7923
7924
7925 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
7926 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7927 return c
7928 }
7929
7930
7931 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
7932 c.ctx_ = ctx
7933 return c
7934 }
7935
7936
7937
7938 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
7939 if c.header_ == nil {
7940 c.header_ = make(http.Header)
7941 }
7942 return c.header_
7943 }
7944
7945 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
7946 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7947 var body io.Reader = nil
7948 c.urlParams_.Set("alt", alt)
7949 c.urlParams_.Set("prettyPrint", "false")
7950 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7951 urls += "?" + c.urlParams_.Encode()
7952 req, err := http.NewRequest("DELETE", urls, body)
7953 if err != nil {
7954 return nil, err
7955 }
7956 req.Header = reqHeaders
7957 googleapi.Expand(req.URL, map[string]string{
7958 "name": c.name,
7959 })
7960 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7961 }
7962
7963
7964
7965
7966
7967
7968 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7969 gensupport.SetOptions(c.urlParams_, opts...)
7970 res, err := c.doRequest("json")
7971 if res != nil && res.StatusCode == http.StatusNotModified {
7972 if res.Body != nil {
7973 res.Body.Close()
7974 }
7975 return nil, gensupport.WrapError(&googleapi.Error{
7976 Code: res.StatusCode,
7977 Header: res.Header,
7978 })
7979 }
7980 if err != nil {
7981 return nil, err
7982 }
7983 defer googleapi.CloseBody(res)
7984 if err := googleapi.CheckResponse(res); err != nil {
7985 return nil, gensupport.WrapError(err)
7986 }
7987 ret := &Empty{
7988 ServerResponse: googleapi.ServerResponse{
7989 Header: res.Header,
7990 HTTPStatusCode: res.StatusCode,
7991 },
7992 }
7993 target := &ret
7994 if err := gensupport.DecodeResponse(target, res); err != nil {
7995 return nil, err
7996 }
7997 return ret, nil
7998 }
7999
8000 type ProjectsLocationsOperationsGetCall struct {
8001 s *Service
8002 name string
8003 urlParams_ gensupport.URLParams
8004 ifNoneMatch_ string
8005 ctx_ context.Context
8006 header_ http.Header
8007 }
8008
8009
8010
8011
8012
8013
8014 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
8015 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8016 c.name = name
8017 return c
8018 }
8019
8020
8021
8022
8023 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
8024 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8025 return c
8026 }
8027
8028
8029
8030
8031 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
8032 c.ifNoneMatch_ = entityTag
8033 return c
8034 }
8035
8036
8037 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
8038 c.ctx_ = ctx
8039 return c
8040 }
8041
8042
8043
8044 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
8045 if c.header_ == nil {
8046 c.header_ = make(http.Header)
8047 }
8048 return c.header_
8049 }
8050
8051 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
8052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8053 if c.ifNoneMatch_ != "" {
8054 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8055 }
8056 var body io.Reader = nil
8057 c.urlParams_.Set("alt", alt)
8058 c.urlParams_.Set("prettyPrint", "false")
8059 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8060 urls += "?" + c.urlParams_.Encode()
8061 req, err := http.NewRequest("GET", urls, body)
8062 if err != nil {
8063 return nil, err
8064 }
8065 req.Header = reqHeaders
8066 googleapi.Expand(req.URL, map[string]string{
8067 "name": c.name,
8068 })
8069 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8070 }
8071
8072
8073
8074
8075
8076
8077 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8078 gensupport.SetOptions(c.urlParams_, opts...)
8079 res, err := c.doRequest("json")
8080 if res != nil && res.StatusCode == http.StatusNotModified {
8081 if res.Body != nil {
8082 res.Body.Close()
8083 }
8084 return nil, gensupport.WrapError(&googleapi.Error{
8085 Code: res.StatusCode,
8086 Header: res.Header,
8087 })
8088 }
8089 if err != nil {
8090 return nil, err
8091 }
8092 defer googleapi.CloseBody(res)
8093 if err := googleapi.CheckResponse(res); err != nil {
8094 return nil, gensupport.WrapError(err)
8095 }
8096 ret := &Operation{
8097 ServerResponse: googleapi.ServerResponse{
8098 Header: res.Header,
8099 HTTPStatusCode: res.StatusCode,
8100 },
8101 }
8102 target := &ret
8103 if err := gensupport.DecodeResponse(target, res); err != nil {
8104 return nil, err
8105 }
8106 return ret, nil
8107 }
8108
8109 type ProjectsLocationsOperationsListCall struct {
8110 s *Service
8111 name string
8112 urlParams_ gensupport.URLParams
8113 ifNoneMatch_ string
8114 ctx_ context.Context
8115 header_ http.Header
8116 }
8117
8118
8119
8120
8121
8122 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
8123 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8124 c.name = name
8125 return c
8126 }
8127
8128
8129 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
8130 c.urlParams_.Set("filter", filter)
8131 return c
8132 }
8133
8134
8135
8136 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
8137 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8138 return c
8139 }
8140
8141
8142
8143 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
8144 c.urlParams_.Set("pageToken", pageToken)
8145 return c
8146 }
8147
8148
8149
8150
8151 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
8152 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8153 return c
8154 }
8155
8156
8157
8158
8159 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
8160 c.ifNoneMatch_ = entityTag
8161 return c
8162 }
8163
8164
8165 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
8166 c.ctx_ = ctx
8167 return c
8168 }
8169
8170
8171
8172 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
8173 if c.header_ == nil {
8174 c.header_ = make(http.Header)
8175 }
8176 return c.header_
8177 }
8178
8179 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
8180 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8181 if c.ifNoneMatch_ != "" {
8182 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8183 }
8184 var body io.Reader = nil
8185 c.urlParams_.Set("alt", alt)
8186 c.urlParams_.Set("prettyPrint", "false")
8187 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
8188 urls += "?" + c.urlParams_.Encode()
8189 req, err := http.NewRequest("GET", urls, body)
8190 if err != nil {
8191 return nil, err
8192 }
8193 req.Header = reqHeaders
8194 googleapi.Expand(req.URL, map[string]string{
8195 "name": c.name,
8196 })
8197 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8198 }
8199
8200
8201
8202
8203
8204
8205
8206 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
8207 gensupport.SetOptions(c.urlParams_, opts...)
8208 res, err := c.doRequest("json")
8209 if res != nil && res.StatusCode == http.StatusNotModified {
8210 if res.Body != nil {
8211 res.Body.Close()
8212 }
8213 return nil, gensupport.WrapError(&googleapi.Error{
8214 Code: res.StatusCode,
8215 Header: res.Header,
8216 })
8217 }
8218 if err != nil {
8219 return nil, err
8220 }
8221 defer googleapi.CloseBody(res)
8222 if err := googleapi.CheckResponse(res); err != nil {
8223 return nil, gensupport.WrapError(err)
8224 }
8225 ret := &ListOperationsResponse{
8226 ServerResponse: googleapi.ServerResponse{
8227 Header: res.Header,
8228 HTTPStatusCode: res.StatusCode,
8229 },
8230 }
8231 target := &ret
8232 if err := gensupport.DecodeResponse(target, res); err != nil {
8233 return nil, err
8234 }
8235 return ret, nil
8236 }
8237
8238
8239
8240
8241 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
8242 c.ctx_ = ctx
8243 defer c.PageToken(c.urlParams_.Get("pageToken"))
8244 for {
8245 x, err := c.Do()
8246 if err != nil {
8247 return err
8248 }
8249 if err := f(x); err != nil {
8250 return err
8251 }
8252 if x.NextPageToken == "" {
8253 return nil
8254 }
8255 c.PageToken(x.NextPageToken)
8256 }
8257 }
8258
View as plain text