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