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