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