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