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