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
52
53 package dataproc
54
55 import (
56 "bytes"
57 "context"
58 "encoding/json"
59 "errors"
60 "fmt"
61 "io"
62 "net/http"
63 "net/url"
64 "strconv"
65 "strings"
66
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75
76
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90
91 const apiId = "dataproc:v1"
92 const apiName = "dataproc"
93 const apiVersion = "v1"
94 const basePath = "https://dataproc.googleapis.com/"
95 const basePathTemplate = "https://dataproc.UNIVERSE_DOMAIN/"
96 const mtlsBasePath = "https://dataproc.mtls.googleapis.com/"
97
98
99 const (
100
101
102 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
103 )
104
105
106 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
107 scopesOption := internaloption.WithDefaultScopes(
108 "https://www.googleapis.com/auth/cloud-platform",
109 )
110
111 opts = append([]option.ClientOption{scopesOption}, opts...)
112 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
113 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
114 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
115 opts = append(opts, internaloption.EnableNewAuthLibrary())
116 client, endpoint, err := htransport.NewClient(ctx, opts...)
117 if err != nil {
118 return nil, err
119 }
120 s, err := New(client)
121 if err != nil {
122 return nil, err
123 }
124 if endpoint != "" {
125 s.BasePath = endpoint
126 }
127 return s, nil
128 }
129
130
131
132
133
134
135 func New(client *http.Client) (*Service, error) {
136 if client == nil {
137 return nil, errors.New("client is nil")
138 }
139 s := &Service{client: client, BasePath: basePath}
140 s.Projects = NewProjectsService(s)
141 return s, nil
142 }
143
144 type Service struct {
145 client *http.Client
146 BasePath string
147 UserAgent string
148
149 Projects *ProjectsService
150 }
151
152 func (s *Service) userAgent() string {
153 if s.UserAgent == "" {
154 return googleapi.UserAgent
155 }
156 return googleapi.UserAgent + " " + s.UserAgent
157 }
158
159 func NewProjectsService(s *Service) *ProjectsService {
160 rs := &ProjectsService{s: s}
161 rs.Locations = NewProjectsLocationsService(s)
162 rs.Regions = NewProjectsRegionsService(s)
163 return rs
164 }
165
166 type ProjectsService struct {
167 s *Service
168
169 Locations *ProjectsLocationsService
170
171 Regions *ProjectsRegionsService
172 }
173
174 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
175 rs := &ProjectsLocationsService{s: s}
176 rs.AutoscalingPolicies = NewProjectsLocationsAutoscalingPoliciesService(s)
177 rs.Batches = NewProjectsLocationsBatchesService(s)
178 rs.Operations = NewProjectsLocationsOperationsService(s)
179 rs.SessionTemplates = NewProjectsLocationsSessionTemplatesService(s)
180 rs.Sessions = NewProjectsLocationsSessionsService(s)
181 rs.WorkflowTemplates = NewProjectsLocationsWorkflowTemplatesService(s)
182 return rs
183 }
184
185 type ProjectsLocationsService struct {
186 s *Service
187
188 AutoscalingPolicies *ProjectsLocationsAutoscalingPoliciesService
189
190 Batches *ProjectsLocationsBatchesService
191
192 Operations *ProjectsLocationsOperationsService
193
194 SessionTemplates *ProjectsLocationsSessionTemplatesService
195
196 Sessions *ProjectsLocationsSessionsService
197
198 WorkflowTemplates *ProjectsLocationsWorkflowTemplatesService
199 }
200
201 func NewProjectsLocationsAutoscalingPoliciesService(s *Service) *ProjectsLocationsAutoscalingPoliciesService {
202 rs := &ProjectsLocationsAutoscalingPoliciesService{s: s}
203 return rs
204 }
205
206 type ProjectsLocationsAutoscalingPoliciesService struct {
207 s *Service
208 }
209
210 func NewProjectsLocationsBatchesService(s *Service) *ProjectsLocationsBatchesService {
211 rs := &ProjectsLocationsBatchesService{s: s}
212 return rs
213 }
214
215 type ProjectsLocationsBatchesService struct {
216 s *Service
217 }
218
219 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
220 rs := &ProjectsLocationsOperationsService{s: s}
221 return rs
222 }
223
224 type ProjectsLocationsOperationsService struct {
225 s *Service
226 }
227
228 func NewProjectsLocationsSessionTemplatesService(s *Service) *ProjectsLocationsSessionTemplatesService {
229 rs := &ProjectsLocationsSessionTemplatesService{s: s}
230 return rs
231 }
232
233 type ProjectsLocationsSessionTemplatesService struct {
234 s *Service
235 }
236
237 func NewProjectsLocationsSessionsService(s *Service) *ProjectsLocationsSessionsService {
238 rs := &ProjectsLocationsSessionsService{s: s}
239 return rs
240 }
241
242 type ProjectsLocationsSessionsService struct {
243 s *Service
244 }
245
246 func NewProjectsLocationsWorkflowTemplatesService(s *Service) *ProjectsLocationsWorkflowTemplatesService {
247 rs := &ProjectsLocationsWorkflowTemplatesService{s: s}
248 return rs
249 }
250
251 type ProjectsLocationsWorkflowTemplatesService struct {
252 s *Service
253 }
254
255 func NewProjectsRegionsService(s *Service) *ProjectsRegionsService {
256 rs := &ProjectsRegionsService{s: s}
257 rs.AutoscalingPolicies = NewProjectsRegionsAutoscalingPoliciesService(s)
258 rs.Clusters = NewProjectsRegionsClustersService(s)
259 rs.Jobs = NewProjectsRegionsJobsService(s)
260 rs.Operations = NewProjectsRegionsOperationsService(s)
261 rs.WorkflowTemplates = NewProjectsRegionsWorkflowTemplatesService(s)
262 return rs
263 }
264
265 type ProjectsRegionsService struct {
266 s *Service
267
268 AutoscalingPolicies *ProjectsRegionsAutoscalingPoliciesService
269
270 Clusters *ProjectsRegionsClustersService
271
272 Jobs *ProjectsRegionsJobsService
273
274 Operations *ProjectsRegionsOperationsService
275
276 WorkflowTemplates *ProjectsRegionsWorkflowTemplatesService
277 }
278
279 func NewProjectsRegionsAutoscalingPoliciesService(s *Service) *ProjectsRegionsAutoscalingPoliciesService {
280 rs := &ProjectsRegionsAutoscalingPoliciesService{s: s}
281 return rs
282 }
283
284 type ProjectsRegionsAutoscalingPoliciesService struct {
285 s *Service
286 }
287
288 func NewProjectsRegionsClustersService(s *Service) *ProjectsRegionsClustersService {
289 rs := &ProjectsRegionsClustersService{s: s}
290 rs.NodeGroups = NewProjectsRegionsClustersNodeGroupsService(s)
291 return rs
292 }
293
294 type ProjectsRegionsClustersService struct {
295 s *Service
296
297 NodeGroups *ProjectsRegionsClustersNodeGroupsService
298 }
299
300 func NewProjectsRegionsClustersNodeGroupsService(s *Service) *ProjectsRegionsClustersNodeGroupsService {
301 rs := &ProjectsRegionsClustersNodeGroupsService{s: s}
302 return rs
303 }
304
305 type ProjectsRegionsClustersNodeGroupsService struct {
306 s *Service
307 }
308
309 func NewProjectsRegionsJobsService(s *Service) *ProjectsRegionsJobsService {
310 rs := &ProjectsRegionsJobsService{s: s}
311 return rs
312 }
313
314 type ProjectsRegionsJobsService struct {
315 s *Service
316 }
317
318 func NewProjectsRegionsOperationsService(s *Service) *ProjectsRegionsOperationsService {
319 rs := &ProjectsRegionsOperationsService{s: s}
320 return rs
321 }
322
323 type ProjectsRegionsOperationsService struct {
324 s *Service
325 }
326
327 func NewProjectsRegionsWorkflowTemplatesService(s *Service) *ProjectsRegionsWorkflowTemplatesService {
328 rs := &ProjectsRegionsWorkflowTemplatesService{s: s}
329 return rs
330 }
331
332 type ProjectsRegionsWorkflowTemplatesService struct {
333 s *Service
334 }
335
336
337
338
339 type AcceleratorConfig struct {
340
341
342 AcceleratorCount int64 `json:"acceleratorCount,omitempty"`
343
344
345
346
347
348
349
350
351
352
353
354 AcceleratorTypeUri string `json:"acceleratorTypeUri,omitempty"`
355
356
357
358
359
360 ForceSendFields []string `json:"-"`
361
362
363
364
365 NullFields []string `json:"-"`
366 }
367
368 func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
369 type NoMethod AcceleratorConfig
370 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
371 }
372
373
374 type AnalyzeBatchRequest struct {
375
376
377
378
379
380
381
382
383
384 RequestId string `json:"requestId,omitempty"`
385
386
387
388
389
390 ForceSendFields []string `json:"-"`
391
392
393
394
395 NullFields []string `json:"-"`
396 }
397
398 func (s *AnalyzeBatchRequest) MarshalJSON() ([]byte, error) {
399 type NoMethod AnalyzeBatchRequest
400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
401 }
402
403
404 type AnalyzeOperationMetadata struct {
405
406 AnalyzedWorkloadName string `json:"analyzedWorkloadName,omitempty"`
407
408
409
410
411
412 AnalyzedWorkloadType string `json:"analyzedWorkloadType,omitempty"`
413
414
415 AnalyzedWorkloadUuid string `json:"analyzedWorkloadUuid,omitempty"`
416
417 CreateTime string `json:"createTime,omitempty"`
418
419 Description string `json:"description,omitempty"`
420
421 DoneTime string `json:"doneTime,omitempty"`
422
423 Labels map[string]string `json:"labels,omitempty"`
424
425 Warnings []string `json:"warnings,omitempty"`
426
427
428
429
430
431 ForceSendFields []string `json:"-"`
432
433
434
435
436 NullFields []string `json:"-"`
437 }
438
439 func (s *AnalyzeOperationMetadata) MarshalJSON() ([]byte, error) {
440 type NoMethod AnalyzeOperationMetadata
441 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
442 }
443
444
445 type AutoscalingConfig struct {
446
447
448
449
450
451
452 PolicyUri string `json:"policyUri,omitempty"`
453
454
455
456
457
458 ForceSendFields []string `json:"-"`
459
460
461
462
463 NullFields []string `json:"-"`
464 }
465
466 func (s *AutoscalingConfig) MarshalJSON() ([]byte, error) {
467 type NoMethod AutoscalingConfig
468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
469 }
470
471
472
473 type AutoscalingPolicy struct {
474 BasicAlgorithm *BasicAutoscalingAlgorithm `json:"basicAlgorithm,omitempty"`
475
476
477
478 Id string `json:"id,omitempty"`
479
480
481
482
483
484
485 Labels map[string]string `json:"labels,omitempty"`
486
487
488
489
490
491
492
493
494 Name string `json:"name,omitempty"`
495
496
497 SecondaryWorkerConfig *InstanceGroupAutoscalingPolicyConfig `json:"secondaryWorkerConfig,omitempty"`
498
499
500 WorkerConfig *InstanceGroupAutoscalingPolicyConfig `json:"workerConfig,omitempty"`
501
502
503 googleapi.ServerResponse `json:"-"`
504
505
506
507
508
509 ForceSendFields []string `json:"-"`
510
511
512
513
514 NullFields []string `json:"-"`
515 }
516
517 func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) {
518 type NoMethod AutoscalingPolicy
519 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
520 }
521
522
523 type AuxiliaryNodeGroup struct {
524
525 NodeGroup *NodeGroup `json:"nodeGroup,omitempty"`
526
527
528
529
530 NodeGroupId string `json:"nodeGroupId,omitempty"`
531
532
533
534
535
536 ForceSendFields []string `json:"-"`
537
538
539
540
541 NullFields []string `json:"-"`
542 }
543
544 func (s *AuxiliaryNodeGroup) MarshalJSON() ([]byte, error) {
545 type NoMethod AuxiliaryNodeGroup
546 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
547 }
548
549
550 type AuxiliaryServicesConfig struct {
551
552
553 MetastoreConfig *MetastoreConfig `json:"metastoreConfig,omitempty"`
554
555
556 SparkHistoryServerConfig *SparkHistoryServerConfig `json:"sparkHistoryServerConfig,omitempty"`
557
558
559
560
561
562 ForceSendFields []string `json:"-"`
563
564
565
566
567 NullFields []string `json:"-"`
568 }
569
570 func (s *AuxiliaryServicesConfig) MarshalJSON() ([]byte, error) {
571 type NoMethod AuxiliaryServicesConfig
572 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
573 }
574
575
576 type BasicAutoscalingAlgorithm struct {
577
578
579
580 CooldownPeriod string `json:"cooldownPeriod,omitempty"`
581
582 SparkStandaloneConfig *SparkStandaloneAutoscalingConfig `json:"sparkStandaloneConfig,omitempty"`
583
584 YarnConfig *BasicYarnAutoscalingConfig `json:"yarnConfig,omitempty"`
585
586
587
588
589
590 ForceSendFields []string `json:"-"`
591
592
593
594
595 NullFields []string `json:"-"`
596 }
597
598 func (s *BasicAutoscalingAlgorithm) MarshalJSON() ([]byte, error) {
599 type NoMethod BasicAutoscalingAlgorithm
600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
601 }
602
603
604 type BasicYarnAutoscalingConfig struct {
605
606
607
608
609 GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"`
610
611
612
613
614
615
616
617
618 ScaleDownFactor float64 `json:"scaleDownFactor,omitempty"`
619
620
621
622
623
624
625 ScaleDownMinWorkerFraction float64 `json:"scaleDownMinWorkerFraction,omitempty"`
626
627
628
629
630
631
632
633
634 ScaleUpFactor float64 `json:"scaleUpFactor,omitempty"`
635
636
637
638
639
640
641 ScaleUpMinWorkerFraction float64 `json:"scaleUpMinWorkerFraction,omitempty"`
642
643
644
645
646
647 ForceSendFields []string `json:"-"`
648
649
650
651
652 NullFields []string `json:"-"`
653 }
654
655 func (s *BasicYarnAutoscalingConfig) MarshalJSON() ([]byte, error) {
656 type NoMethod BasicYarnAutoscalingConfig
657 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
658 }
659
660 func (s *BasicYarnAutoscalingConfig) UnmarshalJSON(data []byte) error {
661 type NoMethod BasicYarnAutoscalingConfig
662 var s1 struct {
663 ScaleDownFactor gensupport.JSONFloat64 `json:"scaleDownFactor"`
664 ScaleDownMinWorkerFraction gensupport.JSONFloat64 `json:"scaleDownMinWorkerFraction"`
665 ScaleUpFactor gensupport.JSONFloat64 `json:"scaleUpFactor"`
666 ScaleUpMinWorkerFraction gensupport.JSONFloat64 `json:"scaleUpMinWorkerFraction"`
667 *NoMethod
668 }
669 s1.NoMethod = (*NoMethod)(s)
670 if err := json.Unmarshal(data, &s1); err != nil {
671 return err
672 }
673 s.ScaleDownFactor = float64(s1.ScaleDownFactor)
674 s.ScaleDownMinWorkerFraction = float64(s1.ScaleDownMinWorkerFraction)
675 s.ScaleUpFactor = float64(s1.ScaleUpFactor)
676 s.ScaleUpMinWorkerFraction = float64(s1.ScaleUpMinWorkerFraction)
677 return nil
678 }
679
680
681 type Batch struct {
682
683 CreateTime string `json:"createTime,omitempty"`
684
685 Creator string `json:"creator,omitempty"`
686
687
688 EnvironmentConfig *EnvironmentConfig `json:"environmentConfig,omitempty"`
689
690
691
692
693
694
695 Labels map[string]string `json:"labels,omitempty"`
696
697 Name string `json:"name,omitempty"`
698
699
700 Operation string `json:"operation,omitempty"`
701
702 PysparkBatch *PySparkBatch `json:"pysparkBatch,omitempty"`
703
704 RuntimeConfig *RuntimeConfig `json:"runtimeConfig,omitempty"`
705
706 RuntimeInfo *RuntimeInfo `json:"runtimeInfo,omitempty"`
707
708 SparkBatch *SparkBatch `json:"sparkBatch,omitempty"`
709
710 SparkRBatch *SparkRBatch `json:"sparkRBatch,omitempty"`
711
712 SparkSqlBatch *SparkSqlBatch `json:"sparkSqlBatch,omitempty"`
713
714
715
716
717
718
719
720
721
722
723 State string `json:"state,omitempty"`
724
725 StateHistory []*StateHistory `json:"stateHistory,omitempty"`
726
727
728 StateMessage string `json:"stateMessage,omitempty"`
729
730 StateTime string `json:"stateTime,omitempty"`
731
732
733 Uuid string `json:"uuid,omitempty"`
734
735
736 googleapi.ServerResponse `json:"-"`
737
738
739
740
741
742 ForceSendFields []string `json:"-"`
743
744
745
746
747 NullFields []string `json:"-"`
748 }
749
750 func (s *Batch) MarshalJSON() ([]byte, error) {
751 type NoMethod Batch
752 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
753 }
754
755
756 type BatchOperationMetadata struct {
757
758 Batch string `json:"batch,omitempty"`
759
760 BatchUuid string `json:"batchUuid,omitempty"`
761
762 CreateTime string `json:"createTime,omitempty"`
763
764 Description string `json:"description,omitempty"`
765
766 DoneTime string `json:"doneTime,omitempty"`
767
768 Labels map[string]string `json:"labels,omitempty"`
769
770
771
772
773
774 OperationType string `json:"operationType,omitempty"`
775
776 Warnings []string `json:"warnings,omitempty"`
777
778
779
780
781
782 ForceSendFields []string `json:"-"`
783
784
785
786
787 NullFields []string `json:"-"`
788 }
789
790 func (s *BatchOperationMetadata) MarshalJSON() ([]byte, error) {
791 type NoMethod BatchOperationMetadata
792 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
793 }
794
795
796 type Binding struct {
797
798
799
800
801
802
803
804
805 Condition *Expr `json:"condition,omitempty"`
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865 Members []string `json:"members,omitempty"`
866
867
868
869
870
871
872 Role string `json:"role,omitempty"`
873
874
875
876
877
878 ForceSendFields []string `json:"-"`
879
880
881
882
883 NullFields []string `json:"-"`
884 }
885
886 func (s *Binding) MarshalJSON() ([]byte, error) {
887 type NoMethod Binding
888 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
889 }
890
891
892 type CancelJobRequest struct {
893 }
894
895
896
897 type Cluster struct {
898
899
900
901
902 ClusterName string `json:"clusterName,omitempty"`
903
904
905 ClusterUuid string `json:"clusterUuid,omitempty"`
906
907
908
909
910 Config *ClusterConfig `json:"config,omitempty"`
911
912
913
914
915
916
917 Labels map[string]string `json:"labels,omitempty"`
918
919
920
921 Metrics *ClusterMetrics `json:"metrics,omitempty"`
922
923
924 ProjectId string `json:"projectId,omitempty"`
925
926 Status *ClusterStatus `json:"status,omitempty"`
927
928 StatusHistory []*ClusterStatus `json:"statusHistory,omitempty"`
929
930
931
932
933
934
935 VirtualClusterConfig *VirtualClusterConfig `json:"virtualClusterConfig,omitempty"`
936
937
938 googleapi.ServerResponse `json:"-"`
939
940
941
942
943
944 ForceSendFields []string `json:"-"`
945
946
947
948
949 NullFields []string `json:"-"`
950 }
951
952 func (s *Cluster) MarshalJSON() ([]byte, error) {
953 type NoMethod Cluster
954 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
955 }
956
957
958 type ClusterConfig struct {
959
960
961 AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"`
962
963 AuxiliaryNodeGroups []*AuxiliaryNodeGroup `json:"auxiliaryNodeGroups,omitempty"`
964
965
966
967
968
969
970
971
972
973
974 ConfigBucket string `json:"configBucket,omitempty"`
975
976 DataprocMetricConfig *DataprocMetricConfig `json:"dataprocMetricConfig,omitempty"`
977
978 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
979
980 EndpointConfig *EndpointConfig `json:"endpointConfig,omitempty"`
981
982
983 GceClusterConfig *GceClusterConfig `json:"gceClusterConfig,omitempty"`
984
985
986
987
988
989 GkeClusterConfig *GkeClusterConfig `json:"gkeClusterConfig,omitempty"`
990
991
992
993
994
995
996
997
998 InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"`
999
1000 LifecycleConfig *LifecycleConfig `json:"lifecycleConfig,omitempty"`
1001
1002
1003 MasterConfig *InstanceGroupConfig `json:"masterConfig,omitempty"`
1004
1005 MetastoreConfig *MetastoreConfig `json:"metastoreConfig,omitempty"`
1006
1007
1008 SecondaryWorkerConfig *InstanceGroupConfig `json:"secondaryWorkerConfig,omitempty"`
1009
1010 SecurityConfig *SecurityConfig `json:"securityConfig,omitempty"`
1011
1012 SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"`
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024 TempBucket string `json:"tempBucket,omitempty"`
1025
1026
1027 WorkerConfig *InstanceGroupConfig `json:"workerConfig,omitempty"`
1028
1029
1030
1031
1032
1033 ForceSendFields []string `json:"-"`
1034
1035
1036
1037
1038 NullFields []string `json:"-"`
1039 }
1040
1041 func (s *ClusterConfig) MarshalJSON() ([]byte, error) {
1042 type NoMethod ClusterConfig
1043 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1044 }
1045
1046
1047
1048
1049 type ClusterMetrics struct {
1050
1051 HdfsMetrics map[string]string `json:"hdfsMetrics,omitempty"`
1052
1053 YarnMetrics map[string]string `json:"yarnMetrics,omitempty"`
1054
1055
1056
1057
1058
1059 ForceSendFields []string `json:"-"`
1060
1061
1062
1063
1064 NullFields []string `json:"-"`
1065 }
1066
1067 func (s *ClusterMetrics) MarshalJSON() ([]byte, error) {
1068 type NoMethod ClusterMetrics
1069 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1070 }
1071
1072
1073 type ClusterOperation struct {
1074
1075 Done bool `json:"done,omitempty"`
1076
1077 Error string `json:"error,omitempty"`
1078
1079 OperationId string `json:"operationId,omitempty"`
1080
1081
1082
1083
1084
1085 ForceSendFields []string `json:"-"`
1086
1087
1088
1089
1090 NullFields []string `json:"-"`
1091 }
1092
1093 func (s *ClusterOperation) MarshalJSON() ([]byte, error) {
1094 type NoMethod ClusterOperation
1095 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1096 }
1097
1098
1099 type ClusterOperationMetadata struct {
1100
1101 ChildOperationIds []string `json:"childOperationIds,omitempty"`
1102
1103 ClusterName string `json:"clusterName,omitempty"`
1104
1105 ClusterUuid string `json:"clusterUuid,omitempty"`
1106
1107 Description string `json:"description,omitempty"`
1108
1109 Labels map[string]string `json:"labels,omitempty"`
1110
1111 OperationType string `json:"operationType,omitempty"`
1112
1113 Status *ClusterOperationStatus `json:"status,omitempty"`
1114
1115 StatusHistory []*ClusterOperationStatus `json:"statusHistory,omitempty"`
1116
1117 Warnings []string `json:"warnings,omitempty"`
1118
1119
1120
1121
1122
1123 ForceSendFields []string `json:"-"`
1124
1125
1126
1127
1128 NullFields []string `json:"-"`
1129 }
1130
1131 func (s *ClusterOperationMetadata) MarshalJSON() ([]byte, error) {
1132 type NoMethod ClusterOperationMetadata
1133 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1134 }
1135
1136
1137 type ClusterOperationStatus struct {
1138
1139 Details string `json:"details,omitempty"`
1140
1141 InnerState string `json:"innerState,omitempty"`
1142
1143
1144
1145
1146
1147
1148
1149 State string `json:"state,omitempty"`
1150
1151 StateStartTime string `json:"stateStartTime,omitempty"`
1152
1153
1154
1155
1156
1157 ForceSendFields []string `json:"-"`
1158
1159
1160
1161
1162 NullFields []string `json:"-"`
1163 }
1164
1165 func (s *ClusterOperationStatus) MarshalJSON() ([]byte, error) {
1166 type NoMethod ClusterOperationStatus
1167 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1168 }
1169
1170
1171
1172 type ClusterSelector struct {
1173
1174
1175 ClusterLabels map[string]string `json:"clusterLabels,omitempty"`
1176
1177
1178
1179 Zone string `json:"zone,omitempty"`
1180
1181
1182
1183
1184
1185 ForceSendFields []string `json:"-"`
1186
1187
1188
1189
1190 NullFields []string `json:"-"`
1191 }
1192
1193 func (s *ClusterSelector) MarshalJSON() ([]byte, error) {
1194 type NoMethod ClusterSelector
1195 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1196 }
1197
1198
1199 type ClusterStatus struct {
1200
1201 Detail string `json:"detail,omitempty"`
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223 State string `json:"state,omitempty"`
1224
1225
1226
1227 StateStartTime string `json:"stateStartTime,omitempty"`
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238 Substate string `json:"substate,omitempty"`
1239
1240
1241
1242
1243
1244 ForceSendFields []string `json:"-"`
1245
1246
1247
1248
1249 NullFields []string `json:"-"`
1250 }
1251
1252 func (s *ClusterStatus) MarshalJSON() ([]byte, error) {
1253 type NoMethod ClusterStatus
1254 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1255 }
1256
1257
1258
1259 type ConfidentialInstanceConfig struct {
1260
1261
1262 EnableConfidentialCompute bool `json:"enableConfidentialCompute,omitempty"`
1263
1264
1265
1266
1267
1268 ForceSendFields []string `json:"-"`
1269
1270
1271
1272
1273 NullFields []string `json:"-"`
1274 }
1275
1276 func (s *ConfidentialInstanceConfig) MarshalJSON() ([]byte, error) {
1277 type NoMethod ConfidentialInstanceConfig
1278 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1279 }
1280
1281
1282 type DataprocMetricConfig struct {
1283
1284 Metrics []*Metric `json:"metrics,omitempty"`
1285
1286
1287
1288
1289
1290 ForceSendFields []string `json:"-"`
1291
1292
1293
1294
1295 NullFields []string `json:"-"`
1296 }
1297
1298 func (s *DataprocMetricConfig) MarshalJSON() ([]byte, error) {
1299 type NoMethod DataprocMetricConfig
1300 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1301 }
1302
1303
1304 type DiagnoseClusterRequest struct {
1305
1306
1307 DiagnosisInterval *Interval `json:"diagnosisInterval,omitempty"`
1308
1309
1310 Job string `json:"job,omitempty"`
1311
1312
1313 Jobs []string `json:"jobs,omitempty"`
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324 TarballAccess string `json:"tarballAccess,omitempty"`
1325
1326
1327
1328 TarballGcsDir string `json:"tarballGcsDir,omitempty"`
1329
1330
1331 YarnApplicationId string `json:"yarnApplicationId,omitempty"`
1332
1333
1334 YarnApplicationIds []string `json:"yarnApplicationIds,omitempty"`
1335
1336
1337
1338
1339
1340 ForceSendFields []string `json:"-"`
1341
1342
1343
1344
1345 NullFields []string `json:"-"`
1346 }
1347
1348 func (s *DiagnoseClusterRequest) MarshalJSON() ([]byte, error) {
1349 type NoMethod DiagnoseClusterRequest
1350 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1351 }
1352
1353
1354 type DiagnoseClusterResults struct {
1355
1356
1357 OutputUri string `json:"outputUri,omitempty"`
1358
1359
1360
1361
1362
1363 ForceSendFields []string `json:"-"`
1364
1365
1366
1367
1368 NullFields []string `json:"-"`
1369 }
1370
1371 func (s *DiagnoseClusterResults) MarshalJSON() ([]byte, error) {
1372 type NoMethod DiagnoseClusterResults
1373 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1374 }
1375
1376
1377
1378 type DiskConfig struct {
1379
1380 BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
1381
1382
1383
1384
1385
1386 BootDiskType string `json:"bootDiskType,omitempty"`
1387
1388
1389
1390
1391 LocalSsdInterface string `json:"localSsdInterface,omitempty"`
1392
1393
1394
1395
1396
1397
1398 NumLocalSsds int64 `json:"numLocalSsds,omitempty"`
1399
1400
1401
1402
1403
1404 ForceSendFields []string `json:"-"`
1405
1406
1407
1408
1409 NullFields []string `json:"-"`
1410 }
1411
1412 func (s *DiskConfig) MarshalJSON() ([]byte, error) {
1413 type NoMethod DiskConfig
1414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1415 }
1416
1417
1418 type DriverSchedulingConfig struct {
1419
1420 MemoryMb int64 `json:"memoryMb,omitempty"`
1421
1422 Vcores int64 `json:"vcores,omitempty"`
1423
1424
1425
1426
1427
1428 ForceSendFields []string `json:"-"`
1429
1430
1431
1432
1433 NullFields []string `json:"-"`
1434 }
1435
1436 func (s *DriverSchedulingConfig) MarshalJSON() ([]byte, error) {
1437 type NoMethod DriverSchedulingConfig
1438 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1439 }
1440
1441
1442
1443
1444
1445 type Empty struct {
1446
1447 googleapi.ServerResponse `json:"-"`
1448 }
1449
1450
1451 type EncryptionConfig struct {
1452
1453
1454
1455
1456
1457 GcePdKmsKeyName string `json:"gcePdKmsKeyName,omitempty"`
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482 KmsKey string `json:"kmsKey,omitempty"`
1483
1484
1485
1486
1487
1488 ForceSendFields []string `json:"-"`
1489
1490
1491
1492
1493 NullFields []string `json:"-"`
1494 }
1495
1496 func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
1497 type NoMethod EncryptionConfig
1498 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1499 }
1500
1501
1502 type EndpointConfig struct {
1503
1504
1505 EnableHttpPortAccess bool `json:"enableHttpPortAccess,omitempty"`
1506
1507
1508 HttpPorts map[string]string `json:"httpPorts,omitempty"`
1509
1510
1511
1512
1513
1514 ForceSendFields []string `json:"-"`
1515
1516
1517
1518
1519 NullFields []string `json:"-"`
1520 }
1521
1522 func (s *EndpointConfig) MarshalJSON() ([]byte, error) {
1523 type NoMethod EndpointConfig
1524 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1525 }
1526
1527
1528 type EnvironmentConfig struct {
1529
1530 ExecutionConfig *ExecutionConfig `json:"executionConfig,omitempty"`
1531
1532
1533 PeripheralsConfig *PeripheralsConfig `json:"peripheralsConfig,omitempty"`
1534
1535
1536
1537
1538
1539 ForceSendFields []string `json:"-"`
1540
1541
1542
1543
1544 NullFields []string `json:"-"`
1545 }
1546
1547 func (s *EnvironmentConfig) MarshalJSON() ([]byte, error) {
1548 type NoMethod EnvironmentConfig
1549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1550 }
1551
1552
1553 type ExecutionConfig struct {
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563 IdleTtl string `json:"idleTtl,omitempty"`
1564
1565 KmsKey string `json:"kmsKey,omitempty"`
1566
1567 NetworkTags []string `json:"networkTags,omitempty"`
1568
1569 NetworkUri string `json:"networkUri,omitempty"`
1570
1571 ServiceAccount string `json:"serviceAccount,omitempty"`
1572
1573
1574
1575
1576
1577
1578
1579
1580 StagingBucket string `json:"stagingBucket,omitempty"`
1581
1582 SubnetworkUri string `json:"subnetworkUri,omitempty"`
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596 Ttl string `json:"ttl,omitempty"`
1597
1598
1599
1600
1601
1602 ForceSendFields []string `json:"-"`
1603
1604
1605
1606
1607 NullFields []string `json:"-"`
1608 }
1609
1610 func (s *ExecutionConfig) MarshalJSON() ([]byte, error) {
1611 type NoMethod ExecutionConfig
1612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1613 }
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631 type Expr struct {
1632
1633
1634 Description string `json:"description,omitempty"`
1635
1636
1637 Expression string `json:"expression,omitempty"`
1638
1639
1640 Location string `json:"location,omitempty"`
1641
1642
1643
1644 Title string `json:"title,omitempty"`
1645
1646
1647
1648
1649
1650 ForceSendFields []string `json:"-"`
1651
1652
1653
1654
1655 NullFields []string `json:"-"`
1656 }
1657
1658 func (s *Expr) MarshalJSON() ([]byte, error) {
1659 type NoMethod Expr
1660 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1661 }
1662
1663
1664 type FlinkJob struct {
1665
1666
1667
1668 Args []string `json:"args,omitempty"`
1669
1670
1671 JarFileUris []string `json:"jarFileUris,omitempty"`
1672
1673 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
1674
1675
1676 MainClass string `json:"mainClass,omitempty"`
1677
1678 MainJarFileUri string `json:"mainJarFileUri,omitempty"`
1679
1680
1681
1682
1683 Properties map[string]string `json:"properties,omitempty"`
1684
1685
1686 SavepointUri string `json:"savepointUri,omitempty"`
1687
1688
1689
1690
1691
1692 ForceSendFields []string `json:"-"`
1693
1694
1695
1696
1697 NullFields []string `json:"-"`
1698 }
1699
1700 func (s *FlinkJob) MarshalJSON() ([]byte, error) {
1701 type NoMethod FlinkJob
1702 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1703 }
1704
1705
1706
1707 type GceClusterConfig struct {
1708
1709
1710
1711 ConfidentialInstanceConfig *ConfidentialInstanceConfig `json:"confidentialInstanceConfig,omitempty"`
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721 InternalIpOnly bool `json:"internalIpOnly,omitempty"`
1722
1723
1724
1725 Metadata map[string]string `json:"metadata,omitempty"`
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735 NetworkUri string `json:"networkUri,omitempty"`
1736
1737 NodeGroupAffinity *NodeGroupAffinity `json:"nodeGroupAffinity,omitempty"`
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750 PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"`
1751
1752
1753 ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"`
1754
1755
1756
1757
1758
1759
1760
1761
1762 ServiceAccount string `json:"serviceAccount,omitempty"`
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773 ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
1774
1775
1776
1777 ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
1778
1779
1780
1781
1782
1783 SubnetworkUri string `json:"subnetworkUri,omitempty"`
1784
1785
1786 Tags []string `json:"tags,omitempty"`
1787
1788
1789
1790
1791
1792
1793 ZoneUri string `json:"zoneUri,omitempty"`
1794
1795
1796
1797
1798
1799 ForceSendFields []string `json:"-"`
1800
1801
1802
1803
1804 NullFields []string `json:"-"`
1805 }
1806
1807 func (s *GceClusterConfig) MarshalJSON() ([]byte, error) {
1808 type NoMethod GceClusterConfig
1809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1810 }
1811
1812
1813 type GetIamPolicyRequest struct {
1814
1815
1816 Options *GetPolicyOptions `json:"options,omitempty"`
1817
1818
1819
1820
1821
1822 ForceSendFields []string `json:"-"`
1823
1824
1825
1826
1827 NullFields []string `json:"-"`
1828 }
1829
1830 func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1831 type NoMethod GetIamPolicyRequest
1832 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1833 }
1834
1835
1836 type GetPolicyOptions struct {
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
1849
1850
1851
1852
1853
1854 ForceSendFields []string `json:"-"`
1855
1856
1857
1858
1859 NullFields []string `json:"-"`
1860 }
1861
1862 func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
1863 type NoMethod GetPolicyOptions
1864 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1865 }
1866
1867
1868 type GkeClusterConfig struct {
1869
1870
1871
1872
1873 GkeClusterTarget string `json:"gkeClusterTarget,omitempty"`
1874
1875
1876 NamespacedGkeDeploymentTarget *NamespacedGkeDeploymentTarget `json:"namespacedGkeDeploymentTarget,omitempty"`
1877
1878
1879
1880
1881
1882 NodePoolTarget []*GkeNodePoolTarget `json:"nodePoolTarget,omitempty"`
1883
1884
1885
1886
1887
1888 ForceSendFields []string `json:"-"`
1889
1890
1891
1892
1893 NullFields []string `json:"-"`
1894 }
1895
1896 func (s *GkeClusterConfig) MarshalJSON() ([]byte, error) {
1897 type NoMethod GkeClusterConfig
1898 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1899 }
1900
1901
1902 type GkeNodeConfig struct {
1903
1904
1905 Accelerators []*GkeNodePoolAcceleratorConfig `json:"accelerators,omitempty"`
1906
1907
1908
1909
1910
1911
1912 BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty"`
1913
1914
1915
1916
1917 LocalSsdCount int64 `json:"localSsdCount,omitempty"`
1918
1919
1920 MachineType string `json:"machineType,omitempty"`
1921
1922
1923
1924
1925
1926 MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
1927
1928
1929
1930
1931
1932
1933 Preemptible bool `json:"preemptible,omitempty"`
1934
1935
1936
1937
1938
1939
1940 Spot bool `json:"spot,omitempty"`
1941
1942
1943
1944
1945
1946 ForceSendFields []string `json:"-"`
1947
1948
1949
1950
1951 NullFields []string `json:"-"`
1952 }
1953
1954 func (s *GkeNodeConfig) MarshalJSON() ([]byte, error) {
1955 type NoMethod GkeNodeConfig
1956 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1957 }
1958
1959
1960
1961 type GkeNodePoolAcceleratorConfig struct {
1962
1963 AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"`
1964
1965
1966 AcceleratorType string `json:"acceleratorType,omitempty"`
1967
1968
1969
1970 GpuPartitionSize string `json:"gpuPartitionSize,omitempty"`
1971
1972
1973
1974
1975
1976 ForceSendFields []string `json:"-"`
1977
1978
1979
1980
1981 NullFields []string `json:"-"`
1982 }
1983
1984 func (s *GkeNodePoolAcceleratorConfig) MarshalJSON() ([]byte, error) {
1985 type NoMethod GkeNodePoolAcceleratorConfig
1986 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1987 }
1988
1989
1990
1991
1992 type GkeNodePoolAutoscalingConfig struct {
1993
1994
1995
1996 MaxNodeCount int64 `json:"maxNodeCount,omitempty"`
1997
1998
1999 MinNodeCount int64 `json:"minNodeCount,omitempty"`
2000
2001
2002
2003
2004
2005 ForceSendFields []string `json:"-"`
2006
2007
2008
2009
2010 NullFields []string `json:"-"`
2011 }
2012
2013 func (s *GkeNodePoolAutoscalingConfig) MarshalJSON() ([]byte, error) {
2014 type NoMethod GkeNodePoolAutoscalingConfig
2015 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2016 }
2017
2018
2019
2020
2021 type GkeNodePoolConfig struct {
2022
2023
2024 Autoscaling *GkeNodePoolAutoscalingConfig `json:"autoscaling,omitempty"`
2025
2026 Config *GkeNodeConfig `json:"config,omitempty"`
2027
2028
2029
2030
2031
2032
2033
2034 Locations []string `json:"locations,omitempty"`
2035
2036
2037
2038
2039
2040 ForceSendFields []string `json:"-"`
2041
2042
2043
2044
2045 NullFields []string `json:"-"`
2046 }
2047
2048 func (s *GkeNodePoolConfig) MarshalJSON() ([]byte, error) {
2049 type NoMethod GkeNodePoolConfig
2050 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2051 }
2052
2053
2054 type GkeNodePoolTarget struct {
2055
2056
2057
2058 NodePool string `json:"nodePool,omitempty"`
2059
2060
2061
2062
2063
2064
2065
2066
2067 NodePoolConfig *GkeNodePoolConfig `json:"nodePoolConfig,omitempty"`
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081 Roles []string `json:"roles,omitempty"`
2082
2083
2084
2085
2086
2087 ForceSendFields []string `json:"-"`
2088
2089
2090
2091
2092 NullFields []string `json:"-"`
2093 }
2094
2095 func (s *GkeNodePoolTarget) MarshalJSON() ([]byte, error) {
2096 type NoMethod GkeNodePoolTarget
2097 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2098 }
2099
2100
2101
2102 type GoogleCloudDataprocV1WorkflowTemplateEncryptionConfig struct {
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128 KmsKey string `json:"kmsKey,omitempty"`
2129
2130
2131
2132
2133
2134 ForceSendFields []string `json:"-"`
2135
2136
2137
2138
2139 NullFields []string `json:"-"`
2140 }
2141
2142 func (s *GoogleCloudDataprocV1WorkflowTemplateEncryptionConfig) MarshalJSON() ([]byte, error) {
2143 type NoMethod GoogleCloudDataprocV1WorkflowTemplateEncryptionConfig
2144 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2145 }
2146
2147
2148
2149
2150
2151 type HadoopJob struct {
2152
2153
2154
2155 ArchiveUris []string `json:"archiveUris,omitempty"`
2156
2157
2158
2159 Args []string `json:"args,omitempty"`
2160
2161
2162
2163 FileUris []string `json:"fileUris,omitempty"`
2164
2165
2166 JarFileUris []string `json:"jarFileUris,omitempty"`
2167
2168 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
2169
2170
2171 MainClass string `json:"mainClass,omitempty"`
2172
2173
2174
2175
2176 MainJarFileUri string `json:"mainJarFileUri,omitempty"`
2177
2178
2179
2180
2181 Properties map[string]string `json:"properties,omitempty"`
2182
2183
2184
2185
2186
2187 ForceSendFields []string `json:"-"`
2188
2189
2190
2191
2192 NullFields []string `json:"-"`
2193 }
2194
2195 func (s *HadoopJob) MarshalJSON() ([]byte, error) {
2196 type NoMethod HadoopJob
2197 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2198 }
2199
2200
2201
2202 type HiveJob struct {
2203
2204
2205
2206 ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
2207
2208
2209
2210 JarFileUris []string `json:"jarFileUris,omitempty"`
2211
2212
2213
2214
2215
2216 Properties map[string]string `json:"properties,omitempty"`
2217
2218 QueryFileUri string `json:"queryFileUri,omitempty"`
2219
2220 QueryList *QueryList `json:"queryList,omitempty"`
2221
2222
2223 ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
2224
2225
2226
2227
2228
2229 ForceSendFields []string `json:"-"`
2230
2231
2232
2233
2234 NullFields []string `json:"-"`
2235 }
2236
2237 func (s *HiveJob) MarshalJSON() ([]byte, error) {
2238 type NoMethod HiveJob
2239 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2240 }
2241
2242
2243
2244 type IdentityConfig struct {
2245
2246 UserServiceAccountMapping map[string]string `json:"userServiceAccountMapping,omitempty"`
2247
2248
2249
2250
2251
2252 ForceSendFields []string `json:"-"`
2253
2254
2255
2256
2257 NullFields []string `json:"-"`
2258 }
2259
2260 func (s *IdentityConfig) MarshalJSON() ([]byte, error) {
2261 type NoMethod IdentityConfig
2262 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2263 }
2264
2265
2266 type InjectCredentialsRequest struct {
2267
2268 ClusterUuid string `json:"clusterUuid,omitempty"`
2269
2270
2271
2272
2273
2274 CredentialsCiphertext string `json:"credentialsCiphertext,omitempty"`
2275
2276
2277
2278
2279
2280 ForceSendFields []string `json:"-"`
2281
2282
2283
2284
2285 NullFields []string `json:"-"`
2286 }
2287
2288 func (s *InjectCredentialsRequest) MarshalJSON() ([]byte, error) {
2289 type NoMethod InjectCredentialsRequest
2290 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2291 }
2292
2293
2294
2295 type InstanceFlexibilityPolicy struct {
2296
2297
2298 InstanceSelectionList []*InstanceSelection `json:"instanceSelectionList,omitempty"`
2299
2300
2301 InstanceSelectionResults []*InstanceSelectionResult `json:"instanceSelectionResults,omitempty"`
2302
2303
2304
2305
2306
2307 ForceSendFields []string `json:"-"`
2308
2309
2310
2311
2312 NullFields []string `json:"-"`
2313 }
2314
2315 func (s *InstanceFlexibilityPolicy) MarshalJSON() ([]byte, error) {
2316 type NoMethod InstanceFlexibilityPolicy
2317 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2318 }
2319
2320
2321
2322 type InstanceGroupAutoscalingPolicyConfig struct {
2323
2324
2325
2326
2327
2328 MaxInstances int64 `json:"maxInstances,omitempty"`
2329
2330
2331
2332 MinInstances int64 `json:"minInstances,omitempty"`
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347 Weight int64 `json:"weight,omitempty"`
2348
2349
2350
2351
2352
2353 ForceSendFields []string `json:"-"`
2354
2355
2356
2357
2358 NullFields []string `json:"-"`
2359 }
2360
2361 func (s *InstanceGroupAutoscalingPolicyConfig) MarshalJSON() ([]byte, error) {
2362 type NoMethod InstanceGroupAutoscalingPolicyConfig
2363 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2364 }
2365
2366
2367
2368 type InstanceGroupConfig struct {
2369
2370
2371 Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"`
2372
2373 DiskConfig *DiskConfig `json:"diskConfig,omitempty"`
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383 ImageUri string `json:"imageUri,omitempty"`
2384
2385
2386 InstanceFlexibilityPolicy *InstanceFlexibilityPolicy `json:"instanceFlexibilityPolicy,omitempty"`
2387
2388
2389 InstanceNames []string `json:"instanceNames,omitempty"`
2390
2391
2392 InstanceReferences []*InstanceReference `json:"instanceReferences,omitempty"`
2393
2394
2395 IsPreemptible bool `json:"isPreemptible,omitempty"`
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405 MachineTypeUri string `json:"machineTypeUri,omitempty"`
2406
2407
2408
2409 ManagedGroupConfig *ManagedGroupConfig `json:"managedGroupConfig,omitempty"`
2410
2411
2412
2413 MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
2414
2415
2416
2417
2418
2419
2420
2421
2422 MinNumInstances int64 `json:"minNumInstances,omitempty"`
2423
2424
2425
2426 NumInstances int64 `json:"numInstances,omitempty"`
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450 Preemptibility string `json:"preemptibility,omitempty"`
2451
2452
2453 StartupConfig *StartupConfig `json:"startupConfig,omitempty"`
2454
2455
2456
2457
2458
2459 ForceSendFields []string `json:"-"`
2460
2461
2462
2463
2464 NullFields []string `json:"-"`
2465 }
2466
2467 func (s *InstanceGroupConfig) MarshalJSON() ([]byte, error) {
2468 type NoMethod InstanceGroupConfig
2469 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2470 }
2471
2472
2473 type InstanceReference struct {
2474
2475 InstanceId string `json:"instanceId,omitempty"`
2476
2477 InstanceName string `json:"instanceName,omitempty"`
2478
2479
2480 PublicEciesKey string `json:"publicEciesKey,omitempty"`
2481
2482 PublicKey string `json:"publicKey,omitempty"`
2483
2484
2485
2486
2487
2488 ForceSendFields []string `json:"-"`
2489
2490
2491
2492
2493 NullFields []string `json:"-"`
2494 }
2495
2496 func (s *InstanceReference) MarshalJSON() ([]byte, error) {
2497 type NoMethod InstanceReference
2498 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2499 }
2500
2501
2502
2503 type InstanceSelection struct {
2504
2505 MachineTypes []string `json:"machineTypes,omitempty"`
2506
2507
2508
2509
2510
2511 Rank int64 `json:"rank,omitempty"`
2512
2513
2514
2515
2516
2517 ForceSendFields []string `json:"-"`
2518
2519
2520
2521
2522 NullFields []string `json:"-"`
2523 }
2524
2525 func (s *InstanceSelection) MarshalJSON() ([]byte, error) {
2526 type NoMethod InstanceSelection
2527 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2528 }
2529
2530
2531
2532 type InstanceSelectionResult struct {
2533
2534 MachineType string `json:"machineType,omitempty"`
2535
2536 VmCount int64 `json:"vmCount,omitempty"`
2537
2538
2539
2540
2541
2542 ForceSendFields []string `json:"-"`
2543
2544
2545
2546
2547 NullFields []string `json:"-"`
2548 }
2549
2550 func (s *InstanceSelectionResult) MarshalJSON() ([]byte, error) {
2551 type NoMethod InstanceSelectionResult
2552 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2553 }
2554
2555
2556
2557 type InstantiateWorkflowTemplateRequest struct {
2558
2559
2560 Parameters map[string]string `json:"parameters,omitempty"`
2561
2562
2563
2564
2565
2566
2567 RequestId string `json:"requestId,omitempty"`
2568
2569
2570
2571
2572 Version int64 `json:"version,omitempty"`
2573
2574
2575
2576
2577
2578 ForceSendFields []string `json:"-"`
2579
2580
2581
2582
2583 NullFields []string `json:"-"`
2584 }
2585
2586 func (s *InstantiateWorkflowTemplateRequest) MarshalJSON() ([]byte, error) {
2587 type NoMethod InstantiateWorkflowTemplateRequest
2588 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2589 }
2590
2591
2592
2593
2594
2595
2596 type Interval struct {
2597
2598
2599 EndTime string `json:"endTime,omitempty"`
2600
2601
2602
2603 StartTime string `json:"startTime,omitempty"`
2604
2605
2606
2607
2608
2609 ForceSendFields []string `json:"-"`
2610
2611
2612
2613
2614 NullFields []string `json:"-"`
2615 }
2616
2617 func (s *Interval) MarshalJSON() ([]byte, error) {
2618 type NoMethod Interval
2619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2620 }
2621
2622
2623 type Job struct {
2624
2625
2626
2627 Done bool `json:"done,omitempty"`
2628
2629
2630
2631
2632 DriverControlFilesUri string `json:"driverControlFilesUri,omitempty"`
2633
2634
2635 DriverOutputResourceUri string `json:"driverOutputResourceUri,omitempty"`
2636
2637 DriverSchedulingConfig *DriverSchedulingConfig `json:"driverSchedulingConfig,omitempty"`
2638
2639 FlinkJob *FlinkJob `json:"flinkJob,omitempty"`
2640
2641 HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
2642
2643 HiveJob *HiveJob `json:"hiveJob,omitempty"`
2644
2645
2646
2647 JobUuid string `json:"jobUuid,omitempty"`
2648
2649
2650
2651
2652
2653
2654 Labels map[string]string `json:"labels,omitempty"`
2655
2656 PigJob *PigJob `json:"pigJob,omitempty"`
2657
2658
2659 Placement *JobPlacement `json:"placement,omitempty"`
2660
2661 PrestoJob *PrestoJob `json:"prestoJob,omitempty"`
2662
2663 PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
2664
2665
2666
2667
2668 Reference *JobReference `json:"reference,omitempty"`
2669
2670 Scheduling *JobScheduling `json:"scheduling,omitempty"`
2671
2672 SparkJob *SparkJob `json:"sparkJob,omitempty"`
2673
2674 SparkRJob *SparkRJob `json:"sparkRJob,omitempty"`
2675
2676 SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
2677
2678
2679 Status *JobStatus `json:"status,omitempty"`
2680
2681 StatusHistory []*JobStatus `json:"statusHistory,omitempty"`
2682
2683 TrinoJob *TrinoJob `json:"trinoJob,omitempty"`
2684
2685
2686
2687 YarnApplications []*YarnApplication `json:"yarnApplications,omitempty"`
2688
2689
2690 googleapi.ServerResponse `json:"-"`
2691
2692
2693
2694
2695
2696 ForceSendFields []string `json:"-"`
2697
2698
2699
2700
2701 NullFields []string `json:"-"`
2702 }
2703
2704 func (s *Job) MarshalJSON() ([]byte, error) {
2705 type NoMethod Job
2706 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2707 }
2708
2709
2710 type JobMetadata struct {
2711
2712 JobId string `json:"jobId,omitempty"`
2713
2714 OperationType string `json:"operationType,omitempty"`
2715
2716 StartTime string `json:"startTime,omitempty"`
2717
2718 Status *JobStatus `json:"status,omitempty"`
2719
2720
2721
2722
2723
2724 ForceSendFields []string `json:"-"`
2725
2726
2727
2728
2729 NullFields []string `json:"-"`
2730 }
2731
2732 func (s *JobMetadata) MarshalJSON() ([]byte, error) {
2733 type NoMethod JobMetadata
2734 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2735 }
2736
2737
2738 type JobPlacement struct {
2739
2740
2741 ClusterLabels map[string]string `json:"clusterLabels,omitempty"`
2742
2743
2744 ClusterName string `json:"clusterName,omitempty"`
2745
2746
2747 ClusterUuid string `json:"clusterUuid,omitempty"`
2748
2749
2750
2751
2752
2753 ForceSendFields []string `json:"-"`
2754
2755
2756
2757
2758 NullFields []string `json:"-"`
2759 }
2760
2761 func (s *JobPlacement) MarshalJSON() ([]byte, error) {
2762 type NoMethod JobPlacement
2763 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2764 }
2765
2766
2767 type JobReference struct {
2768
2769
2770
2771
2772 JobId string `json:"jobId,omitempty"`
2773
2774
2775 ProjectId string `json:"projectId,omitempty"`
2776
2777
2778
2779
2780
2781 ForceSendFields []string `json:"-"`
2782
2783
2784
2785
2786 NullFields []string `json:"-"`
2787 }
2788
2789 func (s *JobReference) MarshalJSON() ([]byte, error) {
2790 type NoMethod JobReference
2791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2792 }
2793
2794
2795 type JobScheduling struct {
2796
2797
2798
2799
2800
2801
2802
2803 MaxFailuresPerHour int64 `json:"maxFailuresPerHour,omitempty"`
2804
2805
2806
2807
2808
2809
2810 MaxFailuresTotal int64 `json:"maxFailuresTotal,omitempty"`
2811
2812
2813
2814
2815
2816 ForceSendFields []string `json:"-"`
2817
2818
2819
2820
2821 NullFields []string `json:"-"`
2822 }
2823
2824 func (s *JobScheduling) MarshalJSON() ([]byte, error) {
2825 type NoMethod JobScheduling
2826 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2827 }
2828
2829
2830 type JobStatus struct {
2831
2832
2833 Details string `json:"details,omitempty"`
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851 State string `json:"state,omitempty"`
2852
2853 StateStartTime string `json:"stateStartTime,omitempty"`
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867 Substate string `json:"substate,omitempty"`
2868
2869
2870
2871
2872
2873 ForceSendFields []string `json:"-"`
2874
2875
2876
2877
2878 NullFields []string `json:"-"`
2879 }
2880
2881 func (s *JobStatus) MarshalJSON() ([]byte, error) {
2882 type NoMethod JobStatus
2883 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2884 }
2885
2886
2887 type JupyterConfig struct {
2888
2889 DisplayName string `json:"displayName,omitempty"`
2890
2891
2892
2893
2894
2895
2896 Kernel string `json:"kernel,omitempty"`
2897
2898
2899
2900
2901
2902 ForceSendFields []string `json:"-"`
2903
2904
2905
2906
2907 NullFields []string `json:"-"`
2908 }
2909
2910 func (s *JupyterConfig) MarshalJSON() ([]byte, error) {
2911 type NoMethod JupyterConfig
2912 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2913 }
2914
2915
2916 type KerberosConfig struct {
2917
2918
2919 CrossRealmTrustAdminServer string `json:"crossRealmTrustAdminServer,omitempty"`
2920
2921
2922 CrossRealmTrustKdc string `json:"crossRealmTrustKdc,omitempty"`
2923
2924
2925 CrossRealmTrustRealm string `json:"crossRealmTrustRealm,omitempty"`
2926
2927
2928
2929
2930 CrossRealmTrustSharedPasswordUri string `json:"crossRealmTrustSharedPasswordUri,omitempty"`
2931
2932
2933 EnableKerberos bool `json:"enableKerberos,omitempty"`
2934
2935
2936 KdcDbKeyUri string `json:"kdcDbKeyUri,omitempty"`
2937
2938
2939
2940 KeyPasswordUri string `json:"keyPasswordUri,omitempty"`
2941
2942
2943
2944 KeystorePasswordUri string `json:"keystorePasswordUri,omitempty"`
2945
2946
2947
2948 KeystoreUri string `json:"keystoreUri,omitempty"`
2949
2950 KmsKeyUri string `json:"kmsKeyUri,omitempty"`
2951
2952
2953 Realm string `json:"realm,omitempty"`
2954
2955
2956 RootPrincipalPasswordUri string `json:"rootPrincipalPasswordUri,omitempty"`
2957
2958
2959
2960 TgtLifetimeHours int64 `json:"tgtLifetimeHours,omitempty"`
2961
2962
2963
2964 TruststorePasswordUri string `json:"truststorePasswordUri,omitempty"`
2965
2966
2967
2968 TruststoreUri string `json:"truststoreUri,omitempty"`
2969
2970
2971
2972
2973
2974 ForceSendFields []string `json:"-"`
2975
2976
2977
2978
2979 NullFields []string `json:"-"`
2980 }
2981
2982 func (s *KerberosConfig) MarshalJSON() ([]byte, error) {
2983 type NoMethod KerberosConfig
2984 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2985 }
2986
2987
2988
2989 type KubernetesClusterConfig struct {
2990
2991
2992 GkeClusterConfig *GkeClusterConfig `json:"gkeClusterConfig,omitempty"`
2993
2994
2995
2996
2997 KubernetesNamespace string `json:"kubernetesNamespace,omitempty"`
2998
2999
3000 KubernetesSoftwareConfig *KubernetesSoftwareConfig `json:"kubernetesSoftwareConfig,omitempty"`
3001
3002
3003
3004
3005
3006 ForceSendFields []string `json:"-"`
3007
3008
3009
3010
3011 NullFields []string `json:"-"`
3012 }
3013
3014 func (s *KubernetesClusterConfig) MarshalJSON() ([]byte, error) {
3015 type NoMethod KubernetesClusterConfig
3016 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3017 }
3018
3019
3020
3021 type KubernetesSoftwareConfig struct {
3022
3023
3024
3025
3026 ComponentVersion map[string]string `json:"componentVersion,omitempty"`
3027
3028
3029
3030
3031
3032
3033 Properties map[string]string `json:"properties,omitempty"`
3034
3035
3036
3037
3038
3039 ForceSendFields []string `json:"-"`
3040
3041
3042
3043
3044 NullFields []string `json:"-"`
3045 }
3046
3047 func (s *KubernetesSoftwareConfig) MarshalJSON() ([]byte, error) {
3048 type NoMethod KubernetesSoftwareConfig
3049 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3050 }
3051
3052
3053 type LifecycleConfig struct {
3054
3055
3056
3057 AutoDeleteTime string `json:"autoDeleteTime,omitempty"`
3058
3059
3060
3061
3062 AutoDeleteTtl string `json:"autoDeleteTtl,omitempty"`
3063
3064
3065
3066
3067
3068 IdleDeleteTtl string `json:"idleDeleteTtl,omitempty"`
3069
3070
3071
3072
3073 IdleStartTime string `json:"idleStartTime,omitempty"`
3074
3075
3076
3077
3078
3079 ForceSendFields []string `json:"-"`
3080
3081
3082
3083
3084 NullFields []string `json:"-"`
3085 }
3086
3087 func (s *LifecycleConfig) MarshalJSON() ([]byte, error) {
3088 type NoMethod LifecycleConfig
3089 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3090 }
3091
3092
3093
3094 type ListAutoscalingPoliciesResponse struct {
3095
3096
3097 NextPageToken string `json:"nextPageToken,omitempty"`
3098
3099 Policies []*AutoscalingPolicy `json:"policies,omitempty"`
3100
3101
3102 googleapi.ServerResponse `json:"-"`
3103
3104
3105
3106
3107
3108 ForceSendFields []string `json:"-"`
3109
3110
3111
3112
3113 NullFields []string `json:"-"`
3114 }
3115
3116 func (s *ListAutoscalingPoliciesResponse) MarshalJSON() ([]byte, error) {
3117 type NoMethod ListAutoscalingPoliciesResponse
3118 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3119 }
3120
3121
3122 type ListBatchesResponse struct {
3123
3124 Batches []*Batch `json:"batches,omitempty"`
3125
3126
3127 NextPageToken string `json:"nextPageToken,omitempty"`
3128
3129
3130
3131 Unreachable []string `json:"unreachable,omitempty"`
3132
3133
3134 googleapi.ServerResponse `json:"-"`
3135
3136
3137
3138
3139
3140 ForceSendFields []string `json:"-"`
3141
3142
3143
3144
3145 NullFields []string `json:"-"`
3146 }
3147
3148 func (s *ListBatchesResponse) MarshalJSON() ([]byte, error) {
3149 type NoMethod ListBatchesResponse
3150 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3151 }
3152
3153
3154 type ListClustersResponse struct {
3155
3156 Clusters []*Cluster `json:"clusters,omitempty"`
3157
3158
3159
3160 NextPageToken string `json:"nextPageToken,omitempty"`
3161
3162
3163 googleapi.ServerResponse `json:"-"`
3164
3165
3166
3167
3168
3169 ForceSendFields []string `json:"-"`
3170
3171
3172
3173
3174 NullFields []string `json:"-"`
3175 }
3176
3177 func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
3178 type NoMethod ListClustersResponse
3179 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3180 }
3181
3182
3183 type ListJobsResponse struct {
3184
3185 Jobs []*Job `json:"jobs,omitempty"`
3186
3187
3188
3189 NextPageToken string `json:"nextPageToken,omitempty"`
3190
3191
3192
3193 Unreachable []string `json:"unreachable,omitempty"`
3194
3195
3196 googleapi.ServerResponse `json:"-"`
3197
3198
3199
3200
3201
3202 ForceSendFields []string `json:"-"`
3203
3204
3205
3206
3207 NullFields []string `json:"-"`
3208 }
3209
3210 func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
3211 type NoMethod ListJobsResponse
3212 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3213 }
3214
3215
3216 type ListOperationsResponse struct {
3217
3218 NextPageToken string `json:"nextPageToken,omitempty"`
3219
3220
3221 Operations []*Operation `json:"operations,omitempty"`
3222
3223
3224 googleapi.ServerResponse `json:"-"`
3225
3226
3227
3228
3229
3230 ForceSendFields []string `json:"-"`
3231
3232
3233
3234
3235 NullFields []string `json:"-"`
3236 }
3237
3238 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
3239 type NoMethod ListOperationsResponse
3240 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3241 }
3242
3243
3244 type ListSessionTemplatesResponse struct {
3245
3246
3247 NextPageToken string `json:"nextPageToken,omitempty"`
3248
3249 SessionTemplates []*SessionTemplate `json:"sessionTemplates,omitempty"`
3250
3251
3252 googleapi.ServerResponse `json:"-"`
3253
3254
3255
3256
3257
3258 ForceSendFields []string `json:"-"`
3259
3260
3261
3262
3263 NullFields []string `json:"-"`
3264 }
3265
3266 func (s *ListSessionTemplatesResponse) MarshalJSON() ([]byte, error) {
3267 type NoMethod ListSessionTemplatesResponse
3268 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3269 }
3270
3271
3272 type ListSessionsResponse struct {
3273
3274
3275 NextPageToken string `json:"nextPageToken,omitempty"`
3276
3277 Sessions []*Session `json:"sessions,omitempty"`
3278
3279
3280 googleapi.ServerResponse `json:"-"`
3281
3282
3283
3284
3285
3286 ForceSendFields []string `json:"-"`
3287
3288
3289
3290
3291 NullFields []string `json:"-"`
3292 }
3293
3294 func (s *ListSessionsResponse) MarshalJSON() ([]byte, error) {
3295 type NoMethod ListSessionsResponse
3296 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3297 }
3298
3299
3300
3301 type ListWorkflowTemplatesResponse struct {
3302
3303
3304
3305 NextPageToken string `json:"nextPageToken,omitempty"`
3306
3307 Templates []*WorkflowTemplate `json:"templates,omitempty"`
3308
3309
3310
3311 Unreachable []string `json:"unreachable,omitempty"`
3312
3313
3314 googleapi.ServerResponse `json:"-"`
3315
3316
3317
3318
3319
3320 ForceSendFields []string `json:"-"`
3321
3322
3323
3324
3325 NullFields []string `json:"-"`
3326 }
3327
3328 func (s *ListWorkflowTemplatesResponse) MarshalJSON() ([]byte, error) {
3329 type NoMethod ListWorkflowTemplatesResponse
3330 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3331 }
3332
3333
3334 type LoggingConfig struct {
3335
3336
3337
3338 DriverLogLevels map[string]string `json:"driverLogLevels,omitempty"`
3339
3340
3341
3342
3343
3344 ForceSendFields []string `json:"-"`
3345
3346
3347
3348
3349 NullFields []string `json:"-"`
3350 }
3351
3352 func (s *LoggingConfig) MarshalJSON() ([]byte, error) {
3353 type NoMethod LoggingConfig
3354 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3355 }
3356
3357
3358 type ManagedCluster struct {
3359
3360
3361
3362
3363
3364 ClusterName string `json:"clusterName,omitempty"`
3365
3366 Config *ClusterConfig `json:"config,omitempty"`
3367
3368
3369
3370
3371
3372
3373 Labels map[string]string `json:"labels,omitempty"`
3374
3375
3376
3377
3378
3379 ForceSendFields []string `json:"-"`
3380
3381
3382
3383
3384 NullFields []string `json:"-"`
3385 }
3386
3387 func (s *ManagedCluster) MarshalJSON() ([]byte, error) {
3388 type NoMethod ManagedCluster
3389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3390 }
3391
3392
3393
3394 type ManagedGroupConfig struct {
3395
3396
3397 InstanceGroupManagerName string `json:"instanceGroupManagerName,omitempty"`
3398
3399
3400
3401 InstanceGroupManagerUri string `json:"instanceGroupManagerUri,omitempty"`
3402
3403
3404 InstanceTemplateName string `json:"instanceTemplateName,omitempty"`
3405
3406
3407
3408
3409
3410 ForceSendFields []string `json:"-"`
3411
3412
3413
3414
3415 NullFields []string `json:"-"`
3416 }
3417
3418 func (s *ManagedGroupConfig) MarshalJSON() ([]byte, error) {
3419 type NoMethod ManagedGroupConfig
3420 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3421 }
3422
3423
3424 type MetastoreConfig struct {
3425
3426
3427
3428 DataprocMetastoreService string `json:"dataprocMetastoreService,omitempty"`
3429
3430
3431
3432
3433
3434 ForceSendFields []string `json:"-"`
3435
3436
3437
3438
3439 NullFields []string `json:"-"`
3440 }
3441
3442 func (s *MetastoreConfig) MarshalJSON() ([]byte, error) {
3443 type NoMethod MetastoreConfig
3444 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3445 }
3446
3447
3448 type Metric struct {
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465 MetricOverrides []string `json:"metricOverrides,omitempty"`
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484 MetricSource string `json:"metricSource,omitempty"`
3485
3486
3487
3488
3489
3490 ForceSendFields []string `json:"-"`
3491
3492
3493
3494
3495 NullFields []string `json:"-"`
3496 }
3497
3498 func (s *Metric) MarshalJSON() ([]byte, error) {
3499 type NoMethod Metric
3500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3501 }
3502
3503
3504
3505
3506 type NamespacedGkeDeploymentTarget struct {
3507
3508
3509 ClusterNamespace string `json:"clusterNamespace,omitempty"`
3510
3511
3512 TargetGkeCluster string `json:"targetGkeCluster,omitempty"`
3513
3514
3515
3516
3517
3518 ForceSendFields []string `json:"-"`
3519
3520
3521
3522
3523 NullFields []string `json:"-"`
3524 }
3525
3526 func (s *NamespacedGkeDeploymentTarget) MarshalJSON() ([]byte, error) {
3527 type NoMethod NamespacedGkeDeploymentTarget
3528 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3529 }
3530
3531
3532
3533 type NodeGroup struct {
3534
3535
3536
3537
3538
3539 Labels map[string]string `json:"labels,omitempty"`
3540
3541 Name string `json:"name,omitempty"`
3542
3543 NodeGroupConfig *InstanceGroupConfig `json:"nodeGroupConfig,omitempty"`
3544
3545
3546
3547
3548
3549 Roles []string `json:"roles,omitempty"`
3550
3551
3552 googleapi.ServerResponse `json:"-"`
3553
3554
3555
3556
3557
3558 ForceSendFields []string `json:"-"`
3559
3560
3561
3562
3563 NullFields []string `json:"-"`
3564 }
3565
3566 func (s *NodeGroup) MarshalJSON() ([]byte, error) {
3567 type NoMethod NodeGroup
3568 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3569 }
3570
3571
3572
3573
3574 type NodeGroupAffinity struct {
3575
3576
3577
3578
3579
3580
3581 NodeGroupUri string `json:"nodeGroupUri,omitempty"`
3582
3583
3584
3585
3586
3587 ForceSendFields []string `json:"-"`
3588
3589
3590
3591
3592 NullFields []string `json:"-"`
3593 }
3594
3595 func (s *NodeGroupAffinity) MarshalJSON() ([]byte, error) {
3596 type NoMethod NodeGroupAffinity
3597 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3598 }
3599
3600
3601 type NodeGroupOperationMetadata struct {
3602
3603
3604 ClusterUuid string `json:"clusterUuid,omitempty"`
3605
3606 Description string `json:"description,omitempty"`
3607
3608 Labels map[string]string `json:"labels,omitempty"`
3609
3610 NodeGroupId string `json:"nodeGroupId,omitempty"`
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622 OperationType string `json:"operationType,omitempty"`
3623
3624 Status *ClusterOperationStatus `json:"status,omitempty"`
3625
3626 StatusHistory []*ClusterOperationStatus `json:"statusHistory,omitempty"`
3627
3628 Warnings []string `json:"warnings,omitempty"`
3629
3630
3631
3632
3633
3634 ForceSendFields []string `json:"-"`
3635
3636
3637
3638
3639 NullFields []string `json:"-"`
3640 }
3641
3642 func (s *NodeGroupOperationMetadata) MarshalJSON() ([]byte, error) {
3643 type NoMethod NodeGroupOperationMetadata
3644 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3645 }
3646
3647
3648
3649 type NodeInitializationAction struct {
3650
3651 ExecutableFile string `json:"executableFile,omitempty"`
3652
3653
3654
3655
3656
3657
3658 ExecutionTimeout string `json:"executionTimeout,omitempty"`
3659
3660
3661
3662
3663
3664 ForceSendFields []string `json:"-"`
3665
3666
3667
3668
3669 NullFields []string `json:"-"`
3670 }
3671
3672 func (s *NodeInitializationAction) MarshalJSON() ([]byte, error) {
3673 type NoMethod NodeInitializationAction
3674 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3675 }
3676
3677
3678 type NodePool struct {
3679
3680
3681
3682
3683 Id string `json:"id,omitempty"`
3684
3685
3686 InstanceNames []string `json:"instanceNames,omitempty"`
3687
3688
3689
3690
3691
3692
3693 RepairAction string `json:"repairAction,omitempty"`
3694
3695
3696
3697
3698
3699 ForceSendFields []string `json:"-"`
3700
3701
3702
3703
3704 NullFields []string `json:"-"`
3705 }
3706
3707 func (s *NodePool) MarshalJSON() ([]byte, error) {
3708 type NoMethod NodePool
3709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3710 }
3711
3712
3713
3714 type Operation struct {
3715
3716
3717 Done bool `json:"done,omitempty"`
3718
3719 Error *Status `json:"error,omitempty"`
3720
3721
3722
3723
3724 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
3725
3726
3727
3728 Name string `json:"name,omitempty"`
3729
3730
3731
3732
3733
3734
3735
3736 Response googleapi.RawMessage `json:"response,omitempty"`
3737
3738
3739 googleapi.ServerResponse `json:"-"`
3740
3741
3742
3743
3744
3745 ForceSendFields []string `json:"-"`
3746
3747
3748
3749
3750 NullFields []string `json:"-"`
3751 }
3752
3753 func (s *Operation) MarshalJSON() ([]byte, error) {
3754 type NoMethod Operation
3755 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3756 }
3757
3758
3759 type OrderedJob struct {
3760
3761 FlinkJob *FlinkJob `json:"flinkJob,omitempty"`
3762
3763 HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
3764
3765 HiveJob *HiveJob `json:"hiveJob,omitempty"`
3766
3767
3768
3769
3770
3771
3772 Labels map[string]string `json:"labels,omitempty"`
3773
3774 PigJob *PigJob `json:"pigJob,omitempty"`
3775
3776
3777 PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"`
3778
3779 PrestoJob *PrestoJob `json:"prestoJob,omitempty"`
3780
3781 PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
3782
3783 Scheduling *JobScheduling `json:"scheduling,omitempty"`
3784
3785 SparkJob *SparkJob `json:"sparkJob,omitempty"`
3786
3787 SparkRJob *SparkRJob `json:"sparkRJob,omitempty"`
3788
3789 SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
3790
3791
3792
3793
3794
3795
3796 StepId string `json:"stepId,omitempty"`
3797
3798 TrinoJob *TrinoJob `json:"trinoJob,omitempty"`
3799
3800
3801
3802
3803
3804 ForceSendFields []string `json:"-"`
3805
3806
3807
3808
3809 NullFields []string `json:"-"`
3810 }
3811
3812 func (s *OrderedJob) MarshalJSON() ([]byte, error) {
3813 type NoMethod OrderedJob
3814 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3815 }
3816
3817
3818 type ParameterValidation struct {
3819
3820 Regex *RegexValidation `json:"regex,omitempty"`
3821
3822 Values *ValueValidation `json:"values,omitempty"`
3823
3824
3825
3826
3827
3828 ForceSendFields []string `json:"-"`
3829
3830
3831
3832
3833 NullFields []string `json:"-"`
3834 }
3835
3836 func (s *ParameterValidation) MarshalJSON() ([]byte, error) {
3837 type NoMethod ParameterValidation
3838 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3839 }
3840
3841
3842 type PeripheralsConfig struct {
3843
3844
3845
3846 MetastoreService string `json:"metastoreService,omitempty"`
3847
3848
3849 SparkHistoryServerConfig *SparkHistoryServerConfig `json:"sparkHistoryServerConfig,omitempty"`
3850
3851
3852
3853
3854
3855 ForceSendFields []string `json:"-"`
3856
3857
3858
3859
3860 NullFields []string `json:"-"`
3861 }
3862
3863 func (s *PeripheralsConfig) MarshalJSON() ([]byte, error) {
3864 type NoMethod PeripheralsConfig
3865 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3866 }
3867
3868
3869
3870 type PigJob struct {
3871
3872
3873
3874 ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
3875
3876
3877 JarFileUris []string `json:"jarFileUris,omitempty"`
3878
3879 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3880
3881
3882
3883
3884
3885 Properties map[string]string `json:"properties,omitempty"`
3886
3887 QueryFileUri string `json:"queryFileUri,omitempty"`
3888
3889 QueryList *QueryList `json:"queryList,omitempty"`
3890
3891
3892 ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
3893
3894
3895
3896
3897
3898 ForceSendFields []string `json:"-"`
3899
3900
3901
3902
3903 NullFields []string `json:"-"`
3904 }
3905
3906 func (s *PigJob) MarshalJSON() ([]byte, error) {
3907 type NoMethod PigJob
3908 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3909 }
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940 type Policy struct {
3941
3942
3943
3944
3945
3946
3947
3948
3949 Bindings []*Binding `json:"bindings,omitempty"`
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961 Etag string `json:"etag,omitempty"`
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977 Version int64 `json:"version,omitempty"`
3978
3979
3980 googleapi.ServerResponse `json:"-"`
3981
3982
3983
3984
3985
3986 ForceSendFields []string `json:"-"`
3987
3988
3989
3990
3991 NullFields []string `json:"-"`
3992 }
3993
3994 func (s *Policy) MarshalJSON() ([]byte, error) {
3995 type NoMethod Policy
3996 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3997 }
3998
3999
4000
4001
4002
4003 type PrestoJob struct {
4004
4005 ClientTags []string `json:"clientTags,omitempty"`
4006
4007
4008
4009 ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
4010
4011 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
4012
4013
4014 OutputFormat string `json:"outputFormat,omitempty"`
4015
4016
4017
4018
4019 Properties map[string]string `json:"properties,omitempty"`
4020
4021 QueryFileUri string `json:"queryFileUri,omitempty"`
4022
4023 QueryList *QueryList `json:"queryList,omitempty"`
4024
4025
4026
4027
4028
4029 ForceSendFields []string `json:"-"`
4030
4031
4032
4033
4034 NullFields []string `json:"-"`
4035 }
4036
4037 func (s *PrestoJob) MarshalJSON() ([]byte, error) {
4038 type NoMethod PrestoJob
4039 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4040 }
4041
4042
4043 type PyPiRepositoryConfig struct {
4044
4045 PypiRepository string `json:"pypiRepository,omitempty"`
4046
4047
4048
4049
4050
4051 ForceSendFields []string `json:"-"`
4052
4053
4054
4055
4056 NullFields []string `json:"-"`
4057 }
4058
4059 func (s *PyPiRepositoryConfig) MarshalJSON() ([]byte, error) {
4060 type NoMethod PyPiRepositoryConfig
4061 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4062 }
4063
4064
4065
4066
4067 type PySparkBatch struct {
4068
4069
4070
4071 ArchiveUris []string `json:"archiveUris,omitempty"`
4072
4073
4074
4075 Args []string `json:"args,omitempty"`
4076
4077
4078 FileUris []string `json:"fileUris,omitempty"`
4079
4080
4081 JarFileUris []string `json:"jarFileUris,omitempty"`
4082
4083
4084 MainPythonFileUri string `json:"mainPythonFileUri,omitempty"`
4085
4086
4087 PythonFileUris []string `json:"pythonFileUris,omitempty"`
4088
4089
4090
4091
4092
4093 ForceSendFields []string `json:"-"`
4094
4095
4096
4097
4098 NullFields []string `json:"-"`
4099 }
4100
4101 func (s *PySparkBatch) MarshalJSON() ([]byte, error) {
4102 type NoMethod PySparkBatch
4103 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4104 }
4105
4106
4107
4108
4109 type PySparkJob struct {
4110
4111
4112
4113 ArchiveUris []string `json:"archiveUris,omitempty"`
4114
4115
4116
4117 Args []string `json:"args,omitempty"`
4118
4119
4120 FileUris []string `json:"fileUris,omitempty"`
4121
4122
4123 JarFileUris []string `json:"jarFileUris,omitempty"`
4124
4125 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
4126
4127
4128 MainPythonFileUri string `json:"mainPythonFileUri,omitempty"`
4129
4130
4131
4132
4133 Properties map[string]string `json:"properties,omitempty"`
4134
4135
4136 PythonFileUris []string `json:"pythonFileUris,omitempty"`
4137
4138
4139
4140
4141
4142 ForceSendFields []string `json:"-"`
4143
4144
4145
4146
4147 NullFields []string `json:"-"`
4148 }
4149
4150 func (s *PySparkJob) MarshalJSON() ([]byte, error) {
4151 type NoMethod PySparkJob
4152 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4153 }
4154
4155
4156 type QueryList struct {
4157
4158
4159
4160
4161
4162 Queries []string `json:"queries,omitempty"`
4163
4164
4165
4166
4167
4168 ForceSendFields []string `json:"-"`
4169
4170
4171
4172
4173 NullFields []string `json:"-"`
4174 }
4175
4176 func (s *QueryList) MarshalJSON() ([]byte, error) {
4177 type NoMethod QueryList
4178 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4179 }
4180
4181
4182 type RegexValidation struct {
4183
4184
4185
4186 Regexes []string `json:"regexes,omitempty"`
4187
4188
4189
4190
4191
4192 ForceSendFields []string `json:"-"`
4193
4194
4195
4196
4197 NullFields []string `json:"-"`
4198 }
4199
4200 func (s *RegexValidation) MarshalJSON() ([]byte, error) {
4201 type NoMethod RegexValidation
4202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4203 }
4204
4205
4206 type RepairClusterRequest struct {
4207
4208
4209 ClusterUuid string `json:"clusterUuid,omitempty"`
4210
4211
4212
4213
4214
4215
4216
4217
4218 GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"`
4219
4220
4221
4222 NodePools []*NodePool `json:"nodePools,omitempty"`
4223
4224
4225 ParentOperationId string `json:"parentOperationId,omitempty"`
4226
4227
4228
4229
4230
4231
4232
4233 RequestId string `json:"requestId,omitempty"`
4234
4235
4236
4237
4238
4239 ForceSendFields []string `json:"-"`
4240
4241
4242
4243
4244 NullFields []string `json:"-"`
4245 }
4246
4247 func (s *RepairClusterRequest) MarshalJSON() ([]byte, error) {
4248 type NoMethod RepairClusterRequest
4249 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4250 }
4251
4252 type RepairNodeGroupRequest struct {
4253
4254
4255 InstanceNames []string `json:"instanceNames,omitempty"`
4256
4257
4258
4259
4260
4261
4262 RepairAction string `json:"repairAction,omitempty"`
4263
4264
4265
4266
4267
4268
4269
4270 RequestId string `json:"requestId,omitempty"`
4271
4272
4273
4274
4275
4276 ForceSendFields []string `json:"-"`
4277
4278
4279
4280
4281 NullFields []string `json:"-"`
4282 }
4283
4284 func (s *RepairNodeGroupRequest) MarshalJSON() ([]byte, error) {
4285 type NoMethod RepairNodeGroupRequest
4286 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4287 }
4288
4289
4290 type RepositoryConfig struct {
4291
4292 PypiRepositoryConfig *PyPiRepositoryConfig `json:"pypiRepositoryConfig,omitempty"`
4293
4294
4295
4296
4297
4298 ForceSendFields []string `json:"-"`
4299
4300
4301
4302
4303 NullFields []string `json:"-"`
4304 }
4305
4306 func (s *RepositoryConfig) MarshalJSON() ([]byte, error) {
4307 type NoMethod RepositoryConfig
4308 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4309 }
4310
4311
4312 type ReservationAffinity struct {
4313
4314
4315
4316
4317
4318
4319
4320
4321 ConsumeReservationType string `json:"consumeReservationType,omitempty"`
4322
4323 Key string `json:"key,omitempty"`
4324
4325 Values []string `json:"values,omitempty"`
4326
4327
4328
4329
4330
4331 ForceSendFields []string `json:"-"`
4332
4333
4334
4335
4336 NullFields []string `json:"-"`
4337 }
4338
4339 func (s *ReservationAffinity) MarshalJSON() ([]byte, error) {
4340 type NoMethod ReservationAffinity
4341 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4342 }
4343
4344
4345 type ResizeNodeGroupRequest struct {
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356 GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"`
4357
4358
4359 ParentOperationId string `json:"parentOperationId,omitempty"`
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369 RequestId string `json:"requestId,omitempty"`
4370
4371
4372
4373 Size int64 `json:"size,omitempty"`
4374
4375
4376
4377
4378
4379 ForceSendFields []string `json:"-"`
4380
4381
4382
4383
4384 NullFields []string `json:"-"`
4385 }
4386
4387 func (s *ResizeNodeGroupRequest) MarshalJSON() ([]byte, error) {
4388 type NoMethod ResizeNodeGroupRequest
4389 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4390 }
4391
4392
4393 type RuntimeConfig struct {
4394
4395
4396
4397 ContainerImage string `json:"containerImage,omitempty"`
4398
4399
4400 Properties map[string]string `json:"properties,omitempty"`
4401
4402 RepositoryConfig *RepositoryConfig `json:"repositoryConfig,omitempty"`
4403
4404 Version string `json:"version,omitempty"`
4405
4406
4407
4408
4409
4410 ForceSendFields []string `json:"-"`
4411
4412
4413
4414
4415 NullFields []string `json:"-"`
4416 }
4417
4418 func (s *RuntimeConfig) MarshalJSON() ([]byte, error) {
4419 type NoMethod RuntimeConfig
4420 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4421 }
4422
4423
4424 type RuntimeInfo struct {
4425
4426
4427
4428
4429
4430
4431
4432
4433 ApproximateUsage *UsageMetrics `json:"approximateUsage,omitempty"`
4434
4435 CurrentUsage *UsageSnapshot `json:"currentUsage,omitempty"`
4436
4437
4438 DiagnosticOutputUri string `json:"diagnosticOutputUri,omitempty"`
4439
4440
4441 Endpoints map[string]string `json:"endpoints,omitempty"`
4442
4443
4444 OutputUri string `json:"outputUri,omitempty"`
4445
4446
4447
4448
4449
4450 ForceSendFields []string `json:"-"`
4451
4452
4453
4454
4455 NullFields []string `json:"-"`
4456 }
4457
4458 func (s *RuntimeInfo) MarshalJSON() ([]byte, error) {
4459 type NoMethod RuntimeInfo
4460 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4461 }
4462
4463
4464
4465 type SecurityConfig struct {
4466
4467
4468 IdentityConfig *IdentityConfig `json:"identityConfig,omitempty"`
4469
4470 KerberosConfig *KerberosConfig `json:"kerberosConfig,omitempty"`
4471
4472
4473
4474
4475
4476 ForceSendFields []string `json:"-"`
4477
4478
4479
4480
4481 NullFields []string `json:"-"`
4482 }
4483
4484 func (s *SecurityConfig) MarshalJSON() ([]byte, error) {
4485 type NoMethod SecurityConfig
4486 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4487 }
4488
4489
4490 type Session struct {
4491
4492 CreateTime string `json:"createTime,omitempty"`
4493
4494 Creator string `json:"creator,omitempty"`
4495
4496
4497 EnvironmentConfig *EnvironmentConfig `json:"environmentConfig,omitempty"`
4498
4499 JupyterSession *JupyterConfig `json:"jupyterSession,omitempty"`
4500
4501
4502
4503
4504
4505
4506 Labels map[string]string `json:"labels,omitempty"`
4507
4508 Name string `json:"name,omitempty"`
4509
4510 RuntimeConfig *RuntimeConfig `json:"runtimeConfig,omitempty"`
4511
4512 RuntimeInfo *RuntimeInfo `json:"runtimeInfo,omitempty"`
4513
4514
4515
4516
4517
4518
4519
4520 SessionTemplate string `json:"sessionTemplate,omitempty"`
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530 State string `json:"state,omitempty"`
4531
4532 StateHistory []*SessionStateHistory `json:"stateHistory,omitempty"`
4533
4534
4535 StateMessage string `json:"stateMessage,omitempty"`
4536
4537 StateTime string `json:"stateTime,omitempty"`
4538
4539 User string `json:"user,omitempty"`
4540
4541
4542 Uuid string `json:"uuid,omitempty"`
4543
4544
4545 googleapi.ServerResponse `json:"-"`
4546
4547
4548
4549
4550
4551 ForceSendFields []string `json:"-"`
4552
4553
4554
4555
4556 NullFields []string `json:"-"`
4557 }
4558
4559 func (s *Session) MarshalJSON() ([]byte, error) {
4560 type NoMethod Session
4561 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4562 }
4563
4564
4565 type SessionOperationMetadata struct {
4566
4567 CreateTime string `json:"createTime,omitempty"`
4568
4569 Description string `json:"description,omitempty"`
4570
4571 DoneTime string `json:"doneTime,omitempty"`
4572
4573 Labels map[string]string `json:"labels,omitempty"`
4574
4575
4576
4577
4578
4579
4580
4581 OperationType string `json:"operationType,omitempty"`
4582
4583 Session string `json:"session,omitempty"`
4584
4585 SessionUuid string `json:"sessionUuid,omitempty"`
4586
4587 Warnings []string `json:"warnings,omitempty"`
4588
4589
4590
4591
4592
4593 ForceSendFields []string `json:"-"`
4594
4595
4596
4597
4598 NullFields []string `json:"-"`
4599 }
4600
4601 func (s *SessionOperationMetadata) MarshalJSON() ([]byte, error) {
4602 type NoMethod SessionOperationMetadata
4603 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4604 }
4605
4606
4607 type SessionStateHistory struct {
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618 State string `json:"state,omitempty"`
4619
4620
4621 StateMessage string `json:"stateMessage,omitempty"`
4622
4623
4624 StateStartTime string `json:"stateStartTime,omitempty"`
4625
4626
4627
4628
4629
4630 ForceSendFields []string `json:"-"`
4631
4632
4633
4634
4635 NullFields []string `json:"-"`
4636 }
4637
4638 func (s *SessionStateHistory) MarshalJSON() ([]byte, error) {
4639 type NoMethod SessionStateHistory
4640 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4641 }
4642
4643
4644 type SessionTemplate struct {
4645
4646 CreateTime string `json:"createTime,omitempty"`
4647
4648
4649 Creator string `json:"creator,omitempty"`
4650
4651 Description string `json:"description,omitempty"`
4652
4653
4654 EnvironmentConfig *EnvironmentConfig `json:"environmentConfig,omitempty"`
4655
4656 JupyterSession *JupyterConfig `json:"jupyterSession,omitempty"`
4657
4658
4659
4660
4661
4662
4663 Labels map[string]string `json:"labels,omitempty"`
4664
4665 Name string `json:"name,omitempty"`
4666
4667 RuntimeConfig *RuntimeConfig `json:"runtimeConfig,omitempty"`
4668
4669 UpdateTime string `json:"updateTime,omitempty"`
4670
4671
4672 Uuid string `json:"uuid,omitempty"`
4673
4674
4675 googleapi.ServerResponse `json:"-"`
4676
4677
4678
4679
4680
4681 ForceSendFields []string `json:"-"`
4682
4683
4684
4685
4686 NullFields []string `json:"-"`
4687 }
4688
4689 func (s *SessionTemplate) MarshalJSON() ([]byte, error) {
4690 type NoMethod SessionTemplate
4691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4692 }
4693
4694
4695 type SetIamPolicyRequest struct {
4696
4697
4698
4699
4700 Policy *Policy `json:"policy,omitempty"`
4701
4702
4703
4704
4705
4706 ForceSendFields []string `json:"-"`
4707
4708
4709
4710
4711 NullFields []string `json:"-"`
4712 }
4713
4714 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
4715 type NoMethod SetIamPolicyRequest
4716 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4717 }
4718
4719
4720
4721
4722 type ShieldedInstanceConfig struct {
4723
4724
4725 EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"`
4726
4727
4728 EnableSecureBoot bool `json:"enableSecureBoot,omitempty"`
4729
4730 EnableVtpm bool `json:"enableVtpm,omitempty"`
4731
4732
4733
4734
4735
4736 ForceSendFields []string `json:"-"`
4737
4738
4739
4740
4741 NullFields []string `json:"-"`
4742 }
4743
4744 func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) {
4745 type NoMethod ShieldedInstanceConfig
4746 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4747 }
4748
4749
4750
4751 type SoftwareConfig struct {
4752
4753
4754
4755
4756
4757
4758
4759 ImageVersion string `json:"imageVersion,omitempty"`
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783 OptionalComponents []string `json:"optionalComponents,omitempty"`
4784
4785
4786
4787
4788
4789
4790
4791
4792 Properties map[string]string `json:"properties,omitempty"`
4793
4794
4795
4796
4797
4798 ForceSendFields []string `json:"-"`
4799
4800
4801
4802
4803 NullFields []string `json:"-"`
4804 }
4805
4806 func (s *SoftwareConfig) MarshalJSON() ([]byte, error) {
4807 type NoMethod SoftwareConfig
4808 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4809 }
4810
4811
4812
4813 type SparkBatch struct {
4814
4815
4816
4817 ArchiveUris []string `json:"archiveUris,omitempty"`
4818
4819
4820
4821 Args []string `json:"args,omitempty"`
4822
4823
4824 FileUris []string `json:"fileUris,omitempty"`
4825
4826
4827 JarFileUris []string `json:"jarFileUris,omitempty"`
4828
4829
4830 MainClass string `json:"mainClass,omitempty"`
4831
4832
4833 MainJarFileUri string `json:"mainJarFileUri,omitempty"`
4834
4835
4836
4837
4838
4839 ForceSendFields []string `json:"-"`
4840
4841
4842
4843
4844 NullFields []string `json:"-"`
4845 }
4846
4847 func (s *SparkBatch) MarshalJSON() ([]byte, error) {
4848 type NoMethod SparkBatch
4849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4850 }
4851
4852
4853
4854 type SparkHistoryServerConfig struct {
4855
4856
4857
4858 DataprocCluster string `json:"dataprocCluster,omitempty"`
4859
4860
4861
4862
4863
4864 ForceSendFields []string `json:"-"`
4865
4866
4867
4868
4869 NullFields []string `json:"-"`
4870 }
4871
4872 func (s *SparkHistoryServerConfig) MarshalJSON() ([]byte, error) {
4873 type NoMethod SparkHistoryServerConfig
4874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4875 }
4876
4877
4878
4879 type SparkJob struct {
4880
4881
4882
4883 ArchiveUris []string `json:"archiveUris,omitempty"`
4884
4885
4886
4887 Args []string `json:"args,omitempty"`
4888
4889
4890 FileUris []string `json:"fileUris,omitempty"`
4891
4892
4893 JarFileUris []string `json:"jarFileUris,omitempty"`
4894
4895 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
4896
4897
4898
4899 MainClass string `json:"mainClass,omitempty"`
4900
4901 MainJarFileUri string `json:"mainJarFileUri,omitempty"`
4902
4903
4904
4905
4906 Properties map[string]string `json:"properties,omitempty"`
4907
4908
4909
4910
4911
4912 ForceSendFields []string `json:"-"`
4913
4914
4915
4916
4917 NullFields []string `json:"-"`
4918 }
4919
4920 func (s *SparkJob) MarshalJSON() ([]byte, error) {
4921 type NoMethod SparkJob
4922 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4923 }
4924
4925
4926
4927 type SparkRBatch struct {
4928
4929
4930
4931 ArchiveUris []string `json:"archiveUris,omitempty"`
4932
4933
4934
4935 Args []string `json:"args,omitempty"`
4936
4937
4938 FileUris []string `json:"fileUris,omitempty"`
4939
4940
4941 MainRFileUri string `json:"mainRFileUri,omitempty"`
4942
4943
4944
4945
4946
4947 ForceSendFields []string `json:"-"`
4948
4949
4950
4951
4952 NullFields []string `json:"-"`
4953 }
4954
4955 func (s *SparkRBatch) MarshalJSON() ([]byte, error) {
4956 type NoMethod SparkRBatch
4957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4958 }
4959
4960
4961
4962 type SparkRJob struct {
4963
4964
4965
4966 ArchiveUris []string `json:"archiveUris,omitempty"`
4967
4968
4969
4970 Args []string `json:"args,omitempty"`
4971
4972
4973 FileUris []string `json:"fileUris,omitempty"`
4974
4975 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
4976
4977
4978 MainRFileUri string `json:"mainRFileUri,omitempty"`
4979
4980
4981
4982
4983 Properties map[string]string `json:"properties,omitempty"`
4984
4985
4986
4987
4988
4989 ForceSendFields []string `json:"-"`
4990
4991
4992
4993
4994 NullFields []string `json:"-"`
4995 }
4996
4997 func (s *SparkRJob) MarshalJSON() ([]byte, error) {
4998 type NoMethod SparkRJob
4999 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5000 }
5001
5002
5003
5004 type SparkSqlBatch struct {
5005
5006
5007 JarFileUris []string `json:"jarFileUris,omitempty"`
5008
5009
5010 QueryFileUri string `json:"queryFileUri,omitempty"`
5011
5012
5013 QueryVariables map[string]string `json:"queryVariables,omitempty"`
5014
5015
5016
5017
5018
5019 ForceSendFields []string `json:"-"`
5020
5021
5022
5023
5024 NullFields []string `json:"-"`
5025 }
5026
5027 func (s *SparkSqlBatch) MarshalJSON() ([]byte, error) {
5028 type NoMethod SparkSqlBatch
5029 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5030 }
5031
5032
5033
5034 type SparkSqlJob struct {
5035
5036
5037 JarFileUris []string `json:"jarFileUris,omitempty"`
5038
5039 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
5040
5041
5042
5043 Properties map[string]string `json:"properties,omitempty"`
5044
5045 QueryFileUri string `json:"queryFileUri,omitempty"`
5046
5047 QueryList *QueryList `json:"queryList,omitempty"`
5048
5049
5050 ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
5051
5052
5053
5054
5055
5056 ForceSendFields []string `json:"-"`
5057
5058
5059
5060
5061 NullFields []string `json:"-"`
5062 }
5063
5064 func (s *SparkSqlJob) MarshalJSON() ([]byte, error) {
5065 type NoMethod SparkSqlJob
5066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5067 }
5068
5069
5070
5071 type SparkStandaloneAutoscalingConfig struct {
5072
5073
5074
5075
5076 GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"`
5077
5078
5079 RemoveOnlyIdleWorkers bool `json:"removeOnlyIdleWorkers,omitempty"`
5080
5081
5082
5083
5084
5085 ScaleDownFactor float64 `json:"scaleDownFactor,omitempty"`
5086
5087
5088
5089
5090
5091
5092 ScaleDownMinWorkerFraction float64 `json:"scaleDownMinWorkerFraction,omitempty"`
5093
5094
5095
5096
5097
5098 ScaleUpFactor float64 `json:"scaleUpFactor,omitempty"`
5099
5100
5101
5102
5103
5104
5105 ScaleUpMinWorkerFraction float64 `json:"scaleUpMinWorkerFraction,omitempty"`
5106
5107
5108
5109
5110
5111 ForceSendFields []string `json:"-"`
5112
5113
5114
5115
5116 NullFields []string `json:"-"`
5117 }
5118
5119 func (s *SparkStandaloneAutoscalingConfig) MarshalJSON() ([]byte, error) {
5120 type NoMethod SparkStandaloneAutoscalingConfig
5121 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5122 }
5123
5124 func (s *SparkStandaloneAutoscalingConfig) UnmarshalJSON(data []byte) error {
5125 type NoMethod SparkStandaloneAutoscalingConfig
5126 var s1 struct {
5127 ScaleDownFactor gensupport.JSONFloat64 `json:"scaleDownFactor"`
5128 ScaleDownMinWorkerFraction gensupport.JSONFloat64 `json:"scaleDownMinWorkerFraction"`
5129 ScaleUpFactor gensupport.JSONFloat64 `json:"scaleUpFactor"`
5130 ScaleUpMinWorkerFraction gensupport.JSONFloat64 `json:"scaleUpMinWorkerFraction"`
5131 *NoMethod
5132 }
5133 s1.NoMethod = (*NoMethod)(s)
5134 if err := json.Unmarshal(data, &s1); err != nil {
5135 return err
5136 }
5137 s.ScaleDownFactor = float64(s1.ScaleDownFactor)
5138 s.ScaleDownMinWorkerFraction = float64(s1.ScaleDownMinWorkerFraction)
5139 s.ScaleUpFactor = float64(s1.ScaleUpFactor)
5140 s.ScaleUpMinWorkerFraction = float64(s1.ScaleUpMinWorkerFraction)
5141 return nil
5142 }
5143
5144
5145 type StartClusterRequest struct {
5146
5147
5148 ClusterUuid string `json:"clusterUuid,omitempty"`
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158 RequestId string `json:"requestId,omitempty"`
5159
5160
5161
5162
5163
5164 ForceSendFields []string `json:"-"`
5165
5166
5167
5168
5169 NullFields []string `json:"-"`
5170 }
5171
5172 func (s *StartClusterRequest) MarshalJSON() ([]byte, error) {
5173 type NoMethod StartClusterRequest
5174 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5175 }
5176
5177
5178
5179 type StartupConfig struct {
5180
5181
5182
5183
5184
5185
5186
5187 RequiredRegistrationFraction float64 `json:"requiredRegistrationFraction,omitempty"`
5188
5189
5190
5191
5192
5193 ForceSendFields []string `json:"-"`
5194
5195
5196
5197
5198 NullFields []string `json:"-"`
5199 }
5200
5201 func (s *StartupConfig) MarshalJSON() ([]byte, error) {
5202 type NoMethod StartupConfig
5203 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5204 }
5205
5206 func (s *StartupConfig) UnmarshalJSON(data []byte) error {
5207 type NoMethod StartupConfig
5208 var s1 struct {
5209 RequiredRegistrationFraction gensupport.JSONFloat64 `json:"requiredRegistrationFraction"`
5210 *NoMethod
5211 }
5212 s1.NoMethod = (*NoMethod)(s)
5213 if err := json.Unmarshal(data, &s1); err != nil {
5214 return err
5215 }
5216 s.RequiredRegistrationFraction = float64(s1.RequiredRegistrationFraction)
5217 return nil
5218 }
5219
5220
5221 type StateHistory struct {
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232 State string `json:"state,omitempty"`
5233
5234 StateMessage string `json:"stateMessage,omitempty"`
5235
5236
5237 StateStartTime string `json:"stateStartTime,omitempty"`
5238
5239
5240
5241
5242
5243 ForceSendFields []string `json:"-"`
5244
5245
5246
5247
5248 NullFields []string `json:"-"`
5249 }
5250
5251 func (s *StateHistory) MarshalJSON() ([]byte, error) {
5252 type NoMethod StateHistory
5253 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5254 }
5255
5256
5257
5258
5259
5260
5261
5262 type Status struct {
5263
5264 Code int64 `json:"code,omitempty"`
5265
5266
5267 Details []googleapi.RawMessage `json:"details,omitempty"`
5268
5269
5270
5271 Message string `json:"message,omitempty"`
5272
5273
5274
5275
5276
5277 ForceSendFields []string `json:"-"`
5278
5279
5280
5281
5282 NullFields []string `json:"-"`
5283 }
5284
5285 func (s *Status) MarshalJSON() ([]byte, error) {
5286 type NoMethod Status
5287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5288 }
5289
5290
5291 type StopClusterRequest struct {
5292
5293
5294 ClusterUuid string `json:"clusterUuid,omitempty"`
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304 RequestId string `json:"requestId,omitempty"`
5305
5306
5307
5308
5309
5310 ForceSendFields []string `json:"-"`
5311
5312
5313
5314
5315 NullFields []string `json:"-"`
5316 }
5317
5318 func (s *StopClusterRequest) MarshalJSON() ([]byte, error) {
5319 type NoMethod StopClusterRequest
5320 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5321 }
5322
5323
5324 type SubmitJobRequest struct {
5325
5326 Job *Job `json:"job,omitempty"`
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336 RequestId string `json:"requestId,omitempty"`
5337
5338
5339
5340
5341
5342 ForceSendFields []string `json:"-"`
5343
5344
5345
5346
5347 NullFields []string `json:"-"`
5348 }
5349
5350 func (s *SubmitJobRequest) MarshalJSON() ([]byte, error) {
5351 type NoMethod SubmitJobRequest
5352 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5353 }
5354
5355
5356
5357
5358
5359 type TemplateParameter struct {
5360
5361
5362 Description string `json:"description,omitempty"`
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386 Fields []string `json:"fields,omitempty"`
5387
5388
5389
5390
5391
5392 Name string `json:"name,omitempty"`
5393
5394
5395 Validation *ParameterValidation `json:"validation,omitempty"`
5396
5397
5398
5399
5400
5401 ForceSendFields []string `json:"-"`
5402
5403
5404
5405
5406 NullFields []string `json:"-"`
5407 }
5408
5409 func (s *TemplateParameter) MarshalJSON() ([]byte, error) {
5410 type NoMethod TemplateParameter
5411 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5412 }
5413
5414
5415 type TerminateSessionRequest struct {
5416
5417
5418
5419
5420
5421
5422
5423
5424 RequestId string `json:"requestId,omitempty"`
5425
5426
5427
5428
5429
5430 ForceSendFields []string `json:"-"`
5431
5432
5433
5434
5435 NullFields []string `json:"-"`
5436 }
5437
5438 func (s *TerminateSessionRequest) MarshalJSON() ([]byte, error) {
5439 type NoMethod TerminateSessionRequest
5440 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5441 }
5442
5443
5444 type TestIamPermissionsRequest struct {
5445
5446
5447
5448
5449 Permissions []string `json:"permissions,omitempty"`
5450
5451
5452
5453
5454
5455 ForceSendFields []string `json:"-"`
5456
5457
5458
5459
5460 NullFields []string `json:"-"`
5461 }
5462
5463 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
5464 type NoMethod TestIamPermissionsRequest
5465 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5466 }
5467
5468
5469 type TestIamPermissionsResponse struct {
5470
5471
5472 Permissions []string `json:"permissions,omitempty"`
5473
5474
5475 googleapi.ServerResponse `json:"-"`
5476
5477
5478
5479
5480
5481 ForceSendFields []string `json:"-"`
5482
5483
5484
5485
5486 NullFields []string `json:"-"`
5487 }
5488
5489 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
5490 type NoMethod TestIamPermissionsResponse
5491 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5492 }
5493
5494
5495
5496
5497
5498 type TrinoJob struct {
5499
5500 ClientTags []string `json:"clientTags,omitempty"`
5501
5502
5503
5504 ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
5505
5506 LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
5507
5508
5509 OutputFormat string `json:"outputFormat,omitempty"`
5510
5511
5512
5513
5514 Properties map[string]string `json:"properties,omitempty"`
5515
5516 QueryFileUri string `json:"queryFileUri,omitempty"`
5517
5518 QueryList *QueryList `json:"queryList,omitempty"`
5519
5520
5521
5522
5523
5524 ForceSendFields []string `json:"-"`
5525
5526
5527
5528
5529 NullFields []string `json:"-"`
5530 }
5531
5532 func (s *TrinoJob) MarshalJSON() ([]byte, error) {
5533 type NoMethod TrinoJob
5534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5535 }
5536
5537
5538
5539 type UsageMetrics struct {
5540
5541 AcceleratorType string `json:"acceleratorType,omitempty"`
5542
5543
5544
5545 MilliAcceleratorSeconds int64 `json:"milliAcceleratorSeconds,omitempty,string"`
5546
5547
5548
5549 MilliDcuSeconds int64 `json:"milliDcuSeconds,omitempty,string"`
5550
5551
5552
5553 ShuffleStorageGbSeconds int64 `json:"shuffleStorageGbSeconds,omitempty,string"`
5554
5555
5556
5557
5558
5559 ForceSendFields []string `json:"-"`
5560
5561
5562
5563
5564 NullFields []string `json:"-"`
5565 }
5566
5567 func (s *UsageMetrics) MarshalJSON() ([]byte, error) {
5568 type NoMethod UsageMetrics
5569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5570 }
5571
5572
5573
5574 type UsageSnapshot struct {
5575
5576 AcceleratorType string `json:"acceleratorType,omitempty"`
5577
5578
5579
5580 MilliAccelerator int64 `json:"milliAccelerator,omitempty,string"`
5581
5582
5583
5584 MilliDcu int64 `json:"milliDcu,omitempty,string"`
5585
5586
5587
5588 MilliDcuPremium int64 `json:"milliDcuPremium,omitempty,string"`
5589
5590
5591 ShuffleStorageGb int64 `json:"shuffleStorageGb,omitempty,string"`
5592
5593
5594
5595 ShuffleStorageGbPremium int64 `json:"shuffleStorageGbPremium,omitempty,string"`
5596
5597 SnapshotTime string `json:"snapshotTime,omitempty"`
5598
5599
5600
5601
5602
5603 ForceSendFields []string `json:"-"`
5604
5605
5606
5607
5608 NullFields []string `json:"-"`
5609 }
5610
5611 func (s *UsageSnapshot) MarshalJSON() ([]byte, error) {
5612 type NoMethod UsageSnapshot
5613 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5614 }
5615
5616
5617 type ValueValidation struct {
5618
5619 Values []string `json:"values,omitempty"`
5620
5621
5622
5623
5624
5625 ForceSendFields []string `json:"-"`
5626
5627
5628
5629
5630 NullFields []string `json:"-"`
5631 }
5632
5633 func (s *ValueValidation) MarshalJSON() ([]byte, error) {
5634 type NoMethod ValueValidation
5635 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5636 }
5637
5638
5639
5640
5641
5642 type VirtualClusterConfig struct {
5643
5644
5645 AuxiliaryServicesConfig *AuxiliaryServicesConfig `json:"auxiliaryServicesConfig,omitempty"`
5646
5647
5648 KubernetesClusterConfig *KubernetesClusterConfig `json:"kubernetesClusterConfig,omitempty"`
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659 StagingBucket string `json:"stagingBucket,omitempty"`
5660
5661
5662
5663
5664
5665 ForceSendFields []string `json:"-"`
5666
5667
5668
5669
5670 NullFields []string `json:"-"`
5671 }
5672
5673 func (s *VirtualClusterConfig) MarshalJSON() ([]byte, error) {
5674 type NoMethod VirtualClusterConfig
5675 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5676 }
5677
5678
5679 type WorkflowGraph struct {
5680
5681 Nodes []*WorkflowNode `json:"nodes,omitempty"`
5682
5683
5684
5685
5686
5687 ForceSendFields []string `json:"-"`
5688
5689
5690
5691
5692 NullFields []string `json:"-"`
5693 }
5694
5695 func (s *WorkflowGraph) MarshalJSON() ([]byte, error) {
5696 type NoMethod WorkflowGraph
5697 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5698 }
5699
5700
5701 type WorkflowMetadata struct {
5702
5703 ClusterName string `json:"clusterName,omitempty"`
5704
5705 ClusterUuid string `json:"clusterUuid,omitempty"`
5706
5707 CreateCluster *ClusterOperation `json:"createCluster,omitempty"`
5708
5709
5710 DagEndTime string `json:"dagEndTime,omitempty"`
5711
5712
5713 DagStartTime string `json:"dagStartTime,omitempty"`
5714
5715
5716
5717 DagTimeout string `json:"dagTimeout,omitempty"`
5718
5719 DeleteCluster *ClusterOperation `json:"deleteCluster,omitempty"`
5720
5721 EndTime string `json:"endTime,omitempty"`
5722
5723 Graph *WorkflowGraph `json:"graph,omitempty"`
5724
5725
5726 Parameters map[string]string `json:"parameters,omitempty"`
5727
5728 StartTime string `json:"startTime,omitempty"`
5729
5730
5731
5732
5733
5734
5735
5736 State string `json:"state,omitempty"`
5737
5738
5739
5740
5741
5742
5743
5744
5745 Template string `json:"template,omitempty"`
5746
5747
5748 Version int64 `json:"version,omitempty"`
5749
5750
5751
5752
5753
5754 ForceSendFields []string `json:"-"`
5755
5756
5757
5758
5759 NullFields []string `json:"-"`
5760 }
5761
5762 func (s *WorkflowMetadata) MarshalJSON() ([]byte, error) {
5763 type NoMethod WorkflowMetadata
5764 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5765 }
5766
5767
5768 type WorkflowNode struct {
5769
5770 Error string `json:"error,omitempty"`
5771
5772
5773 JobId string `json:"jobId,omitempty"`
5774
5775 PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"`
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786 State string `json:"state,omitempty"`
5787
5788 StepId string `json:"stepId,omitempty"`
5789
5790
5791
5792
5793
5794 ForceSendFields []string `json:"-"`
5795
5796
5797
5798
5799 NullFields []string `json:"-"`
5800 }
5801
5802 func (s *WorkflowNode) MarshalJSON() ([]byte, error) {
5803 type NoMethod WorkflowNode
5804 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5805 }
5806
5807
5808 type WorkflowTemplate struct {
5809
5810 CreateTime string `json:"createTime,omitempty"`
5811
5812
5813
5814
5815
5816
5817
5818
5819 DagTimeout string `json:"dagTimeout,omitempty"`
5820
5821
5822 EncryptionConfig *GoogleCloudDataprocV1WorkflowTemplateEncryptionConfig `json:"encryptionConfig,omitempty"`
5823 Id string `json:"id,omitempty"`
5824
5825 Jobs []*OrderedJob `json:"jobs,omitempty"`
5826
5827
5828
5829
5830
5831
5832
5833 Labels map[string]string `json:"labels,omitempty"`
5834
5835
5836
5837
5838
5839
5840
5841
5842 Name string `json:"name,omitempty"`
5843
5844
5845
5846 Parameters []*TemplateParameter `json:"parameters,omitempty"`
5847
5848 Placement *WorkflowTemplatePlacement `json:"placement,omitempty"`
5849
5850 UpdateTime string `json:"updateTime,omitempty"`
5851
5852
5853
5854
5855
5856
5857
5858
5859 Version int64 `json:"version,omitempty"`
5860
5861
5862 googleapi.ServerResponse `json:"-"`
5863
5864
5865
5866
5867
5868 ForceSendFields []string `json:"-"`
5869
5870
5871
5872
5873 NullFields []string `json:"-"`
5874 }
5875
5876 func (s *WorkflowTemplate) MarshalJSON() ([]byte, error) {
5877 type NoMethod WorkflowTemplate
5878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5879 }
5880
5881
5882
5883 type WorkflowTemplatePlacement struct {
5884
5885
5886
5887 ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"`
5888
5889 ManagedCluster *ManagedCluster `json:"managedCluster,omitempty"`
5890
5891
5892
5893
5894
5895 ForceSendFields []string `json:"-"`
5896
5897
5898
5899
5900 NullFields []string `json:"-"`
5901 }
5902
5903 func (s *WorkflowTemplatePlacement) MarshalJSON() ([]byte, error) {
5904 type NoMethod WorkflowTemplatePlacement
5905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5906 }
5907
5908
5909
5910
5911
5912
5913 type YarnApplication struct {
5914
5915 Name string `json:"name,omitempty"`
5916
5917
5918 Progress float64 `json:"progress,omitempty"`
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931 State string `json:"state,omitempty"`
5932
5933
5934
5935
5936 TrackingUrl string `json:"trackingUrl,omitempty"`
5937
5938
5939
5940
5941
5942 ForceSendFields []string `json:"-"`
5943
5944
5945
5946
5947 NullFields []string `json:"-"`
5948 }
5949
5950 func (s *YarnApplication) MarshalJSON() ([]byte, error) {
5951 type NoMethod YarnApplication
5952 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5953 }
5954
5955 func (s *YarnApplication) UnmarshalJSON(data []byte) error {
5956 type NoMethod YarnApplication
5957 var s1 struct {
5958 Progress gensupport.JSONFloat64 `json:"progress"`
5959 *NoMethod
5960 }
5961 s1.NoMethod = (*NoMethod)(s)
5962 if err := json.Unmarshal(data, &s1); err != nil {
5963 return err
5964 }
5965 s.Progress = float64(s1.Progress)
5966 return nil
5967 }
5968
5969 type ProjectsLocationsAutoscalingPoliciesCreateCall struct {
5970 s *Service
5971 parent string
5972 autoscalingpolicy *AutoscalingPolicy
5973 urlParams_ gensupport.URLParams
5974 ctx_ context.Context
5975 header_ http.Header
5976 }
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987 func (r *ProjectsLocationsAutoscalingPoliciesService) Create(parent string, autoscalingpolicy *AutoscalingPolicy) *ProjectsLocationsAutoscalingPoliciesCreateCall {
5988 c := &ProjectsLocationsAutoscalingPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5989 c.parent = parent
5990 c.autoscalingpolicy = autoscalingpolicy
5991 return c
5992 }
5993
5994
5995
5996
5997 func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesCreateCall {
5998 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5999 return c
6000 }
6001
6002
6003 func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesCreateCall {
6004 c.ctx_ = ctx
6005 return c
6006 }
6007
6008
6009
6010 func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Header() http.Header {
6011 if c.header_ == nil {
6012 c.header_ = make(http.Header)
6013 }
6014 return c.header_
6015 }
6016
6017 func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
6018 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6019 var body io.Reader = nil
6020 body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
6021 if err != nil {
6022 return nil, err
6023 }
6024 c.urlParams_.Set("alt", alt)
6025 c.urlParams_.Set("prettyPrint", "false")
6026 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autoscalingPolicies")
6027 urls += "?" + c.urlParams_.Encode()
6028 req, err := http.NewRequest("POST", urls, body)
6029 if err != nil {
6030 return nil, err
6031 }
6032 req.Header = reqHeaders
6033 googleapi.Expand(req.URL, map[string]string{
6034 "parent": c.parent,
6035 })
6036 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6037 }
6038
6039
6040
6041
6042
6043
6044
6045 func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
6046 gensupport.SetOptions(c.urlParams_, opts...)
6047 res, err := c.doRequest("json")
6048 if res != nil && res.StatusCode == http.StatusNotModified {
6049 if res.Body != nil {
6050 res.Body.Close()
6051 }
6052 return nil, gensupport.WrapError(&googleapi.Error{
6053 Code: res.StatusCode,
6054 Header: res.Header,
6055 })
6056 }
6057 if err != nil {
6058 return nil, err
6059 }
6060 defer googleapi.CloseBody(res)
6061 if err := googleapi.CheckResponse(res); err != nil {
6062 return nil, gensupport.WrapError(err)
6063 }
6064 ret := &AutoscalingPolicy{
6065 ServerResponse: googleapi.ServerResponse{
6066 Header: res.Header,
6067 HTTPStatusCode: res.StatusCode,
6068 },
6069 }
6070 target := &ret
6071 if err := gensupport.DecodeResponse(target, res); err != nil {
6072 return nil, err
6073 }
6074 return ret, nil
6075 }
6076
6077 type ProjectsLocationsAutoscalingPoliciesDeleteCall struct {
6078 s *Service
6079 name string
6080 urlParams_ gensupport.URLParams
6081 ctx_ context.Context
6082 header_ http.Header
6083 }
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096 func (r *ProjectsLocationsAutoscalingPoliciesService) Delete(name string) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
6097 c := &ProjectsLocationsAutoscalingPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6098 c.name = name
6099 return c
6100 }
6101
6102
6103
6104
6105 func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
6106 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6107 return c
6108 }
6109
6110
6111 func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
6112 c.ctx_ = ctx
6113 return c
6114 }
6115
6116
6117
6118 func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Header() http.Header {
6119 if c.header_ == nil {
6120 c.header_ = make(http.Header)
6121 }
6122 return c.header_
6123 }
6124
6125 func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
6126 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6127 var body io.Reader = nil
6128 c.urlParams_.Set("alt", alt)
6129 c.urlParams_.Set("prettyPrint", "false")
6130 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6131 urls += "?" + c.urlParams_.Encode()
6132 req, err := http.NewRequest("DELETE", urls, body)
6133 if err != nil {
6134 return nil, err
6135 }
6136 req.Header = reqHeaders
6137 googleapi.Expand(req.URL, map[string]string{
6138 "name": c.name,
6139 })
6140 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6141 }
6142
6143
6144
6145
6146
6147
6148 func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6149 gensupport.SetOptions(c.urlParams_, opts...)
6150 res, err := c.doRequest("json")
6151 if res != nil && res.StatusCode == http.StatusNotModified {
6152 if res.Body != nil {
6153 res.Body.Close()
6154 }
6155 return nil, gensupport.WrapError(&googleapi.Error{
6156 Code: res.StatusCode,
6157 Header: res.Header,
6158 })
6159 }
6160 if err != nil {
6161 return nil, err
6162 }
6163 defer googleapi.CloseBody(res)
6164 if err := googleapi.CheckResponse(res); err != nil {
6165 return nil, gensupport.WrapError(err)
6166 }
6167 ret := &Empty{
6168 ServerResponse: googleapi.ServerResponse{
6169 Header: res.Header,
6170 HTTPStatusCode: res.StatusCode,
6171 },
6172 }
6173 target := &ret
6174 if err := gensupport.DecodeResponse(target, res); err != nil {
6175 return nil, err
6176 }
6177 return ret, nil
6178 }
6179
6180 type ProjectsLocationsAutoscalingPoliciesGetCall struct {
6181 s *Service
6182 name string
6183 urlParams_ gensupport.URLParams
6184 ifNoneMatch_ string
6185 ctx_ context.Context
6186 header_ http.Header
6187 }
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199 func (r *ProjectsLocationsAutoscalingPoliciesService) Get(name string) *ProjectsLocationsAutoscalingPoliciesGetCall {
6200 c := &ProjectsLocationsAutoscalingPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6201 c.name = name
6202 return c
6203 }
6204
6205
6206
6207
6208 func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesGetCall {
6209 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6210 return c
6211 }
6212
6213
6214
6215
6216 func (c *ProjectsLocationsAutoscalingPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesGetCall {
6217 c.ifNoneMatch_ = entityTag
6218 return c
6219 }
6220
6221
6222 func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesGetCall {
6223 c.ctx_ = ctx
6224 return c
6225 }
6226
6227
6228
6229 func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Header() http.Header {
6230 if c.header_ == nil {
6231 c.header_ = make(http.Header)
6232 }
6233 return c.header_
6234 }
6235
6236 func (c *ProjectsLocationsAutoscalingPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
6237 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6238 if c.ifNoneMatch_ != "" {
6239 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6240 }
6241 var body io.Reader = nil
6242 c.urlParams_.Set("alt", alt)
6243 c.urlParams_.Set("prettyPrint", "false")
6244 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6245 urls += "?" + c.urlParams_.Encode()
6246 req, err := http.NewRequest("GET", urls, body)
6247 if err != nil {
6248 return nil, err
6249 }
6250 req.Header = reqHeaders
6251 googleapi.Expand(req.URL, map[string]string{
6252 "name": c.name,
6253 })
6254 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6255 }
6256
6257
6258
6259
6260
6261
6262
6263 func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
6264 gensupport.SetOptions(c.urlParams_, opts...)
6265 res, err := c.doRequest("json")
6266 if res != nil && res.StatusCode == http.StatusNotModified {
6267 if res.Body != nil {
6268 res.Body.Close()
6269 }
6270 return nil, gensupport.WrapError(&googleapi.Error{
6271 Code: res.StatusCode,
6272 Header: res.Header,
6273 })
6274 }
6275 if err != nil {
6276 return nil, err
6277 }
6278 defer googleapi.CloseBody(res)
6279 if err := googleapi.CheckResponse(res); err != nil {
6280 return nil, gensupport.WrapError(err)
6281 }
6282 ret := &AutoscalingPolicy{
6283 ServerResponse: googleapi.ServerResponse{
6284 Header: res.Header,
6285 HTTPStatusCode: res.StatusCode,
6286 },
6287 }
6288 target := &ret
6289 if err := gensupport.DecodeResponse(target, res); err != nil {
6290 return nil, err
6291 }
6292 return ret, nil
6293 }
6294
6295 type ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall struct {
6296 s *Service
6297 resource string
6298 getiampolicyrequest *GetIamPolicyRequest
6299 urlParams_ gensupport.URLParams
6300 ctx_ context.Context
6301 header_ http.Header
6302 }
6303
6304
6305
6306
6307
6308
6309
6310 func (r *ProjectsLocationsAutoscalingPoliciesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
6311 c := &ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6312 c.resource = resource
6313 c.getiampolicyrequest = getiampolicyrequest
6314 return c
6315 }
6316
6317
6318
6319
6320 func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
6321 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6322 return c
6323 }
6324
6325
6326 func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
6327 c.ctx_ = ctx
6328 return c
6329 }
6330
6331
6332
6333 func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Header() http.Header {
6334 if c.header_ == nil {
6335 c.header_ = make(http.Header)
6336 }
6337 return c.header_
6338 }
6339
6340 func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6341 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6342 var body io.Reader = nil
6343 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
6344 if err != nil {
6345 return nil, err
6346 }
6347 c.urlParams_.Set("alt", alt)
6348 c.urlParams_.Set("prettyPrint", "false")
6349 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
6350 urls += "?" + c.urlParams_.Encode()
6351 req, err := http.NewRequest("POST", urls, body)
6352 if err != nil {
6353 return nil, err
6354 }
6355 req.Header = reqHeaders
6356 googleapi.Expand(req.URL, map[string]string{
6357 "resource": c.resource,
6358 })
6359 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6360 }
6361
6362
6363
6364
6365
6366
6367 func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6368 gensupport.SetOptions(c.urlParams_, opts...)
6369 res, err := c.doRequest("json")
6370 if res != nil && res.StatusCode == http.StatusNotModified {
6371 if res.Body != nil {
6372 res.Body.Close()
6373 }
6374 return nil, gensupport.WrapError(&googleapi.Error{
6375 Code: res.StatusCode,
6376 Header: res.Header,
6377 })
6378 }
6379 if err != nil {
6380 return nil, err
6381 }
6382 defer googleapi.CloseBody(res)
6383 if err := googleapi.CheckResponse(res); err != nil {
6384 return nil, gensupport.WrapError(err)
6385 }
6386 ret := &Policy{
6387 ServerResponse: googleapi.ServerResponse{
6388 Header: res.Header,
6389 HTTPStatusCode: res.StatusCode,
6390 },
6391 }
6392 target := &ret
6393 if err := gensupport.DecodeResponse(target, res); err != nil {
6394 return nil, err
6395 }
6396 return ret, nil
6397 }
6398
6399 type ProjectsLocationsAutoscalingPoliciesListCall struct {
6400 s *Service
6401 parent string
6402 urlParams_ gensupport.URLParams
6403 ifNoneMatch_ string
6404 ctx_ context.Context
6405 header_ http.Header
6406 }
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417 func (r *ProjectsLocationsAutoscalingPoliciesService) List(parent string) *ProjectsLocationsAutoscalingPoliciesListCall {
6418 c := &ProjectsLocationsAutoscalingPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6419 c.parent = parent
6420 return c
6421 }
6422
6423
6424
6425
6426 func (c *ProjectsLocationsAutoscalingPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsAutoscalingPoliciesListCall {
6427 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6428 return c
6429 }
6430
6431
6432
6433 func (c *ProjectsLocationsAutoscalingPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsAutoscalingPoliciesListCall {
6434 c.urlParams_.Set("pageToken", pageToken)
6435 return c
6436 }
6437
6438
6439
6440
6441 func (c *ProjectsLocationsAutoscalingPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesListCall {
6442 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6443 return c
6444 }
6445
6446
6447
6448
6449 func (c *ProjectsLocationsAutoscalingPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesListCall {
6450 c.ifNoneMatch_ = entityTag
6451 return c
6452 }
6453
6454
6455 func (c *ProjectsLocationsAutoscalingPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesListCall {
6456 c.ctx_ = ctx
6457 return c
6458 }
6459
6460
6461
6462 func (c *ProjectsLocationsAutoscalingPoliciesListCall) Header() http.Header {
6463 if c.header_ == nil {
6464 c.header_ = make(http.Header)
6465 }
6466 return c.header_
6467 }
6468
6469 func (c *ProjectsLocationsAutoscalingPoliciesListCall) doRequest(alt string) (*http.Response, error) {
6470 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6471 if c.ifNoneMatch_ != "" {
6472 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6473 }
6474 var body io.Reader = nil
6475 c.urlParams_.Set("alt", alt)
6476 c.urlParams_.Set("prettyPrint", "false")
6477 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autoscalingPolicies")
6478 urls += "?" + c.urlParams_.Encode()
6479 req, err := http.NewRequest("GET", urls, body)
6480 if err != nil {
6481 return nil, err
6482 }
6483 req.Header = reqHeaders
6484 googleapi.Expand(req.URL, map[string]string{
6485 "parent": c.parent,
6486 })
6487 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6488 }
6489
6490
6491
6492
6493
6494
6495
6496 func (c *ProjectsLocationsAutoscalingPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAutoscalingPoliciesResponse, error) {
6497 gensupport.SetOptions(c.urlParams_, opts...)
6498 res, err := c.doRequest("json")
6499 if res != nil && res.StatusCode == http.StatusNotModified {
6500 if res.Body != nil {
6501 res.Body.Close()
6502 }
6503 return nil, gensupport.WrapError(&googleapi.Error{
6504 Code: res.StatusCode,
6505 Header: res.Header,
6506 })
6507 }
6508 if err != nil {
6509 return nil, err
6510 }
6511 defer googleapi.CloseBody(res)
6512 if err := googleapi.CheckResponse(res); err != nil {
6513 return nil, gensupport.WrapError(err)
6514 }
6515 ret := &ListAutoscalingPoliciesResponse{
6516 ServerResponse: googleapi.ServerResponse{
6517 Header: res.Header,
6518 HTTPStatusCode: res.StatusCode,
6519 },
6520 }
6521 target := &ret
6522 if err := gensupport.DecodeResponse(target, res); err != nil {
6523 return nil, err
6524 }
6525 return ret, nil
6526 }
6527
6528
6529
6530
6531 func (c *ProjectsLocationsAutoscalingPoliciesListCall) Pages(ctx context.Context, f func(*ListAutoscalingPoliciesResponse) error) error {
6532 c.ctx_ = ctx
6533 defer c.PageToken(c.urlParams_.Get("pageToken"))
6534 for {
6535 x, err := c.Do()
6536 if err != nil {
6537 return err
6538 }
6539 if err := f(x); err != nil {
6540 return err
6541 }
6542 if x.NextPageToken == "" {
6543 return nil
6544 }
6545 c.PageToken(x.NextPageToken)
6546 }
6547 }
6548
6549 type ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall struct {
6550 s *Service
6551 resource string
6552 setiampolicyrequest *SetIamPolicyRequest
6553 urlParams_ gensupport.URLParams
6554 ctx_ context.Context
6555 header_ http.Header
6556 }
6557
6558
6559
6560
6561
6562
6563
6564
6565 func (r *ProjectsLocationsAutoscalingPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
6566 c := &ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6567 c.resource = resource
6568 c.setiampolicyrequest = setiampolicyrequest
6569 return c
6570 }
6571
6572
6573
6574
6575 func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
6576 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6577 return c
6578 }
6579
6580
6581 func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
6582 c.ctx_ = ctx
6583 return c
6584 }
6585
6586
6587
6588 func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Header() http.Header {
6589 if c.header_ == nil {
6590 c.header_ = make(http.Header)
6591 }
6592 return c.header_
6593 }
6594
6595 func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6596 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6597 var body io.Reader = nil
6598 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
6599 if err != nil {
6600 return nil, err
6601 }
6602 c.urlParams_.Set("alt", alt)
6603 c.urlParams_.Set("prettyPrint", "false")
6604 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
6605 urls += "?" + c.urlParams_.Encode()
6606 req, err := http.NewRequest("POST", urls, body)
6607 if err != nil {
6608 return nil, err
6609 }
6610 req.Header = reqHeaders
6611 googleapi.Expand(req.URL, map[string]string{
6612 "resource": c.resource,
6613 })
6614 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6615 }
6616
6617
6618
6619
6620
6621
6622 func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6623 gensupport.SetOptions(c.urlParams_, opts...)
6624 res, err := c.doRequest("json")
6625 if res != nil && res.StatusCode == http.StatusNotModified {
6626 if res.Body != nil {
6627 res.Body.Close()
6628 }
6629 return nil, gensupport.WrapError(&googleapi.Error{
6630 Code: res.StatusCode,
6631 Header: res.Header,
6632 })
6633 }
6634 if err != nil {
6635 return nil, err
6636 }
6637 defer googleapi.CloseBody(res)
6638 if err := googleapi.CheckResponse(res); err != nil {
6639 return nil, gensupport.WrapError(err)
6640 }
6641 ret := &Policy{
6642 ServerResponse: googleapi.ServerResponse{
6643 Header: res.Header,
6644 HTTPStatusCode: res.StatusCode,
6645 },
6646 }
6647 target := &ret
6648 if err := gensupport.DecodeResponse(target, res); err != nil {
6649 return nil, err
6650 }
6651 return ret, nil
6652 }
6653
6654 type ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall struct {
6655 s *Service
6656 resource string
6657 testiampermissionsrequest *TestIamPermissionsRequest
6658 urlParams_ gensupport.URLParams
6659 ctx_ context.Context
6660 header_ http.Header
6661 }
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673 func (r *ProjectsLocationsAutoscalingPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
6674 c := &ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6675 c.resource = resource
6676 c.testiampermissionsrequest = testiampermissionsrequest
6677 return c
6678 }
6679
6680
6681
6682
6683 func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
6684 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6685 return c
6686 }
6687
6688
6689 func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
6690 c.ctx_ = ctx
6691 return c
6692 }
6693
6694
6695
6696 func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Header() http.Header {
6697 if c.header_ == nil {
6698 c.header_ = make(http.Header)
6699 }
6700 return c.header_
6701 }
6702
6703 func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
6704 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6705 var body io.Reader = nil
6706 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
6707 if err != nil {
6708 return nil, err
6709 }
6710 c.urlParams_.Set("alt", alt)
6711 c.urlParams_.Set("prettyPrint", "false")
6712 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
6713 urls += "?" + c.urlParams_.Encode()
6714 req, err := http.NewRequest("POST", urls, body)
6715 if err != nil {
6716 return nil, err
6717 }
6718 req.Header = reqHeaders
6719 googleapi.Expand(req.URL, map[string]string{
6720 "resource": c.resource,
6721 })
6722 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6723 }
6724
6725
6726
6727
6728
6729
6730
6731 func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
6732 gensupport.SetOptions(c.urlParams_, opts...)
6733 res, err := c.doRequest("json")
6734 if res != nil && res.StatusCode == http.StatusNotModified {
6735 if res.Body != nil {
6736 res.Body.Close()
6737 }
6738 return nil, gensupport.WrapError(&googleapi.Error{
6739 Code: res.StatusCode,
6740 Header: res.Header,
6741 })
6742 }
6743 if err != nil {
6744 return nil, err
6745 }
6746 defer googleapi.CloseBody(res)
6747 if err := googleapi.CheckResponse(res); err != nil {
6748 return nil, gensupport.WrapError(err)
6749 }
6750 ret := &TestIamPermissionsResponse{
6751 ServerResponse: googleapi.ServerResponse{
6752 Header: res.Header,
6753 HTTPStatusCode: res.StatusCode,
6754 },
6755 }
6756 target := &ret
6757 if err := gensupport.DecodeResponse(target, res); err != nil {
6758 return nil, err
6759 }
6760 return ret, nil
6761 }
6762
6763 type ProjectsLocationsAutoscalingPoliciesUpdateCall struct {
6764 s *Service
6765 name string
6766 autoscalingpolicy *AutoscalingPolicy
6767 urlParams_ gensupport.URLParams
6768 ctx_ context.Context
6769 header_ http.Header
6770 }
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783 func (r *ProjectsLocationsAutoscalingPoliciesService) Update(name string, autoscalingpolicy *AutoscalingPolicy) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
6784 c := &ProjectsLocationsAutoscalingPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6785 c.name = name
6786 c.autoscalingpolicy = autoscalingpolicy
6787 return c
6788 }
6789
6790
6791
6792
6793 func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
6794 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6795 return c
6796 }
6797
6798
6799 func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
6800 c.ctx_ = ctx
6801 return c
6802 }
6803
6804
6805
6806 func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Header() http.Header {
6807 if c.header_ == nil {
6808 c.header_ = make(http.Header)
6809 }
6810 return c.header_
6811 }
6812
6813 func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
6814 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6815 var body io.Reader = nil
6816 body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
6817 if err != nil {
6818 return nil, err
6819 }
6820 c.urlParams_.Set("alt", alt)
6821 c.urlParams_.Set("prettyPrint", "false")
6822 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6823 urls += "?" + c.urlParams_.Encode()
6824 req, err := http.NewRequest("PUT", urls, body)
6825 if err != nil {
6826 return nil, err
6827 }
6828 req.Header = reqHeaders
6829 googleapi.Expand(req.URL, map[string]string{
6830 "name": c.name,
6831 })
6832 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6833 }
6834
6835
6836
6837
6838
6839
6840
6841 func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
6842 gensupport.SetOptions(c.urlParams_, opts...)
6843 res, err := c.doRequest("json")
6844 if res != nil && res.StatusCode == http.StatusNotModified {
6845 if res.Body != nil {
6846 res.Body.Close()
6847 }
6848 return nil, gensupport.WrapError(&googleapi.Error{
6849 Code: res.StatusCode,
6850 Header: res.Header,
6851 })
6852 }
6853 if err != nil {
6854 return nil, err
6855 }
6856 defer googleapi.CloseBody(res)
6857 if err := googleapi.CheckResponse(res); err != nil {
6858 return nil, gensupport.WrapError(err)
6859 }
6860 ret := &AutoscalingPolicy{
6861 ServerResponse: googleapi.ServerResponse{
6862 Header: res.Header,
6863 HTTPStatusCode: res.StatusCode,
6864 },
6865 }
6866 target := &ret
6867 if err := gensupport.DecodeResponse(target, res); err != nil {
6868 return nil, err
6869 }
6870 return ret, nil
6871 }
6872
6873 type ProjectsLocationsBatchesAnalyzeCall struct {
6874 s *Service
6875 name string
6876 analyzebatchrequest *AnalyzeBatchRequest
6877 urlParams_ gensupport.URLParams
6878 ctx_ context.Context
6879 header_ http.Header
6880 }
6881
6882
6883
6884
6885
6886 func (r *ProjectsLocationsBatchesService) Analyze(name string, analyzebatchrequest *AnalyzeBatchRequest) *ProjectsLocationsBatchesAnalyzeCall {
6887 c := &ProjectsLocationsBatchesAnalyzeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6888 c.name = name
6889 c.analyzebatchrequest = analyzebatchrequest
6890 return c
6891 }
6892
6893
6894
6895
6896 func (c *ProjectsLocationsBatchesAnalyzeCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchesAnalyzeCall {
6897 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6898 return c
6899 }
6900
6901
6902 func (c *ProjectsLocationsBatchesAnalyzeCall) Context(ctx context.Context) *ProjectsLocationsBatchesAnalyzeCall {
6903 c.ctx_ = ctx
6904 return c
6905 }
6906
6907
6908
6909 func (c *ProjectsLocationsBatchesAnalyzeCall) Header() http.Header {
6910 if c.header_ == nil {
6911 c.header_ = make(http.Header)
6912 }
6913 return c.header_
6914 }
6915
6916 func (c *ProjectsLocationsBatchesAnalyzeCall) doRequest(alt string) (*http.Response, error) {
6917 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6918 var body io.Reader = nil
6919 body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyzebatchrequest)
6920 if err != nil {
6921 return nil, err
6922 }
6923 c.urlParams_.Set("alt", alt)
6924 c.urlParams_.Set("prettyPrint", "false")
6925 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:analyze")
6926 urls += "?" + c.urlParams_.Encode()
6927 req, err := http.NewRequest("POST", urls, body)
6928 if err != nil {
6929 return nil, err
6930 }
6931 req.Header = reqHeaders
6932 googleapi.Expand(req.URL, map[string]string{
6933 "name": c.name,
6934 })
6935 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6936 }
6937
6938
6939
6940
6941
6942
6943 func (c *ProjectsLocationsBatchesAnalyzeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6944 gensupport.SetOptions(c.urlParams_, opts...)
6945 res, err := c.doRequest("json")
6946 if res != nil && res.StatusCode == http.StatusNotModified {
6947 if res.Body != nil {
6948 res.Body.Close()
6949 }
6950 return nil, gensupport.WrapError(&googleapi.Error{
6951 Code: res.StatusCode,
6952 Header: res.Header,
6953 })
6954 }
6955 if err != nil {
6956 return nil, err
6957 }
6958 defer googleapi.CloseBody(res)
6959 if err := googleapi.CheckResponse(res); err != nil {
6960 return nil, gensupport.WrapError(err)
6961 }
6962 ret := &Operation{
6963 ServerResponse: googleapi.ServerResponse{
6964 Header: res.Header,
6965 HTTPStatusCode: res.StatusCode,
6966 },
6967 }
6968 target := &ret
6969 if err := gensupport.DecodeResponse(target, res); err != nil {
6970 return nil, err
6971 }
6972 return ret, nil
6973 }
6974
6975 type ProjectsLocationsBatchesCreateCall struct {
6976 s *Service
6977 parent string
6978 batch *Batch
6979 urlParams_ gensupport.URLParams
6980 ctx_ context.Context
6981 header_ http.Header
6982 }
6983
6984
6985
6986
6987 func (r *ProjectsLocationsBatchesService) Create(parent string, batch *Batch) *ProjectsLocationsBatchesCreateCall {
6988 c := &ProjectsLocationsBatchesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6989 c.parent = parent
6990 c.batch = batch
6991 return c
6992 }
6993
6994
6995
6996
6997 func (c *ProjectsLocationsBatchesCreateCall) BatchId(batchId string) *ProjectsLocationsBatchesCreateCall {
6998 c.urlParams_.Set("batchId", batchId)
6999 return c
7000 }
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011 func (c *ProjectsLocationsBatchesCreateCall) RequestId(requestId string) *ProjectsLocationsBatchesCreateCall {
7012 c.urlParams_.Set("requestId", requestId)
7013 return c
7014 }
7015
7016
7017
7018
7019 func (c *ProjectsLocationsBatchesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchesCreateCall {
7020 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7021 return c
7022 }
7023
7024
7025 func (c *ProjectsLocationsBatchesCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchesCreateCall {
7026 c.ctx_ = ctx
7027 return c
7028 }
7029
7030
7031
7032 func (c *ProjectsLocationsBatchesCreateCall) Header() http.Header {
7033 if c.header_ == nil {
7034 c.header_ = make(http.Header)
7035 }
7036 return c.header_
7037 }
7038
7039 func (c *ProjectsLocationsBatchesCreateCall) doRequest(alt string) (*http.Response, error) {
7040 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7041 var body io.Reader = nil
7042 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batch)
7043 if err != nil {
7044 return nil, err
7045 }
7046 c.urlParams_.Set("alt", alt)
7047 c.urlParams_.Set("prettyPrint", "false")
7048 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batches")
7049 urls += "?" + c.urlParams_.Encode()
7050 req, err := http.NewRequest("POST", urls, body)
7051 if err != nil {
7052 return nil, err
7053 }
7054 req.Header = reqHeaders
7055 googleapi.Expand(req.URL, map[string]string{
7056 "parent": c.parent,
7057 })
7058 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7059 }
7060
7061
7062
7063
7064
7065
7066 func (c *ProjectsLocationsBatchesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7067 gensupport.SetOptions(c.urlParams_, opts...)
7068 res, err := c.doRequest("json")
7069 if res != nil && res.StatusCode == http.StatusNotModified {
7070 if res.Body != nil {
7071 res.Body.Close()
7072 }
7073 return nil, gensupport.WrapError(&googleapi.Error{
7074 Code: res.StatusCode,
7075 Header: res.Header,
7076 })
7077 }
7078 if err != nil {
7079 return nil, err
7080 }
7081 defer googleapi.CloseBody(res)
7082 if err := googleapi.CheckResponse(res); err != nil {
7083 return nil, gensupport.WrapError(err)
7084 }
7085 ret := &Operation{
7086 ServerResponse: googleapi.ServerResponse{
7087 Header: res.Header,
7088 HTTPStatusCode: res.StatusCode,
7089 },
7090 }
7091 target := &ret
7092 if err := gensupport.DecodeResponse(target, res); err != nil {
7093 return nil, err
7094 }
7095 return ret, nil
7096 }
7097
7098 type ProjectsLocationsBatchesDeleteCall struct {
7099 s *Service
7100 name string
7101 urlParams_ gensupport.URLParams
7102 ctx_ context.Context
7103 header_ http.Header
7104 }
7105
7106
7107
7108
7109
7110
7111
7112 func (r *ProjectsLocationsBatchesService) Delete(name string) *ProjectsLocationsBatchesDeleteCall {
7113 c := &ProjectsLocationsBatchesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7114 c.name = name
7115 return c
7116 }
7117
7118
7119
7120
7121 func (c *ProjectsLocationsBatchesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchesDeleteCall {
7122 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7123 return c
7124 }
7125
7126
7127 func (c *ProjectsLocationsBatchesDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchesDeleteCall {
7128 c.ctx_ = ctx
7129 return c
7130 }
7131
7132
7133
7134 func (c *ProjectsLocationsBatchesDeleteCall) Header() http.Header {
7135 if c.header_ == nil {
7136 c.header_ = make(http.Header)
7137 }
7138 return c.header_
7139 }
7140
7141 func (c *ProjectsLocationsBatchesDeleteCall) doRequest(alt string) (*http.Response, error) {
7142 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7143 var body io.Reader = nil
7144 c.urlParams_.Set("alt", alt)
7145 c.urlParams_.Set("prettyPrint", "false")
7146 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7147 urls += "?" + c.urlParams_.Encode()
7148 req, err := http.NewRequest("DELETE", urls, body)
7149 if err != nil {
7150 return nil, err
7151 }
7152 req.Header = reqHeaders
7153 googleapi.Expand(req.URL, map[string]string{
7154 "name": c.name,
7155 })
7156 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7157 }
7158
7159
7160
7161
7162
7163
7164 func (c *ProjectsLocationsBatchesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7165 gensupport.SetOptions(c.urlParams_, opts...)
7166 res, err := c.doRequest("json")
7167 if res != nil && res.StatusCode == http.StatusNotModified {
7168 if res.Body != nil {
7169 res.Body.Close()
7170 }
7171 return nil, gensupport.WrapError(&googleapi.Error{
7172 Code: res.StatusCode,
7173 Header: res.Header,
7174 })
7175 }
7176 if err != nil {
7177 return nil, err
7178 }
7179 defer googleapi.CloseBody(res)
7180 if err := googleapi.CheckResponse(res); err != nil {
7181 return nil, gensupport.WrapError(err)
7182 }
7183 ret := &Empty{
7184 ServerResponse: googleapi.ServerResponse{
7185 Header: res.Header,
7186 HTTPStatusCode: res.StatusCode,
7187 },
7188 }
7189 target := &ret
7190 if err := gensupport.DecodeResponse(target, res); err != nil {
7191 return nil, err
7192 }
7193 return ret, nil
7194 }
7195
7196 type ProjectsLocationsBatchesGetCall struct {
7197 s *Service
7198 name string
7199 urlParams_ gensupport.URLParams
7200 ifNoneMatch_ string
7201 ctx_ context.Context
7202 header_ http.Header
7203 }
7204
7205
7206
7207
7208
7209 func (r *ProjectsLocationsBatchesService) Get(name string) *ProjectsLocationsBatchesGetCall {
7210 c := &ProjectsLocationsBatchesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7211 c.name = name
7212 return c
7213 }
7214
7215
7216
7217
7218 func (c *ProjectsLocationsBatchesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchesGetCall {
7219 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7220 return c
7221 }
7222
7223
7224
7225
7226 func (c *ProjectsLocationsBatchesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchesGetCall {
7227 c.ifNoneMatch_ = entityTag
7228 return c
7229 }
7230
7231
7232 func (c *ProjectsLocationsBatchesGetCall) Context(ctx context.Context) *ProjectsLocationsBatchesGetCall {
7233 c.ctx_ = ctx
7234 return c
7235 }
7236
7237
7238
7239 func (c *ProjectsLocationsBatchesGetCall) Header() http.Header {
7240 if c.header_ == nil {
7241 c.header_ = make(http.Header)
7242 }
7243 return c.header_
7244 }
7245
7246 func (c *ProjectsLocationsBatchesGetCall) doRequest(alt string) (*http.Response, error) {
7247 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7248 if c.ifNoneMatch_ != "" {
7249 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7250 }
7251 var body io.Reader = nil
7252 c.urlParams_.Set("alt", alt)
7253 c.urlParams_.Set("prettyPrint", "false")
7254 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7255 urls += "?" + c.urlParams_.Encode()
7256 req, err := http.NewRequest("GET", urls, body)
7257 if err != nil {
7258 return nil, err
7259 }
7260 req.Header = reqHeaders
7261 googleapi.Expand(req.URL, map[string]string{
7262 "name": c.name,
7263 })
7264 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7265 }
7266
7267
7268
7269
7270
7271
7272 func (c *ProjectsLocationsBatchesGetCall) Do(opts ...googleapi.CallOption) (*Batch, error) {
7273 gensupport.SetOptions(c.urlParams_, opts...)
7274 res, err := c.doRequest("json")
7275 if res != nil && res.StatusCode == http.StatusNotModified {
7276 if res.Body != nil {
7277 res.Body.Close()
7278 }
7279 return nil, gensupport.WrapError(&googleapi.Error{
7280 Code: res.StatusCode,
7281 Header: res.Header,
7282 })
7283 }
7284 if err != nil {
7285 return nil, err
7286 }
7287 defer googleapi.CloseBody(res)
7288 if err := googleapi.CheckResponse(res); err != nil {
7289 return nil, gensupport.WrapError(err)
7290 }
7291 ret := &Batch{
7292 ServerResponse: googleapi.ServerResponse{
7293 Header: res.Header,
7294 HTTPStatusCode: res.StatusCode,
7295 },
7296 }
7297 target := &ret
7298 if err := gensupport.DecodeResponse(target, res); err != nil {
7299 return nil, err
7300 }
7301 return ret, nil
7302 }
7303
7304 type ProjectsLocationsBatchesListCall struct {
7305 s *Service
7306 parent string
7307 urlParams_ gensupport.URLParams
7308 ifNoneMatch_ string
7309 ctx_ context.Context
7310 header_ http.Header
7311 }
7312
7313
7314
7315
7316 func (r *ProjectsLocationsBatchesService) List(parent string) *ProjectsLocationsBatchesListCall {
7317 c := &ProjectsLocationsBatchesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7318 c.parent = parent
7319 return c
7320 }
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333 func (c *ProjectsLocationsBatchesListCall) Filter(filter string) *ProjectsLocationsBatchesListCall {
7334 c.urlParams_.Set("filter", filter)
7335 return c
7336 }
7337
7338
7339
7340
7341
7342 func (c *ProjectsLocationsBatchesListCall) OrderBy(orderBy string) *ProjectsLocationsBatchesListCall {
7343 c.urlParams_.Set("orderBy", orderBy)
7344 return c
7345 }
7346
7347
7348
7349
7350 func (c *ProjectsLocationsBatchesListCall) PageSize(pageSize int64) *ProjectsLocationsBatchesListCall {
7351 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7352 return c
7353 }
7354
7355
7356
7357
7358 func (c *ProjectsLocationsBatchesListCall) PageToken(pageToken string) *ProjectsLocationsBatchesListCall {
7359 c.urlParams_.Set("pageToken", pageToken)
7360 return c
7361 }
7362
7363
7364
7365
7366 func (c *ProjectsLocationsBatchesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchesListCall {
7367 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7368 return c
7369 }
7370
7371
7372
7373
7374 func (c *ProjectsLocationsBatchesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchesListCall {
7375 c.ifNoneMatch_ = entityTag
7376 return c
7377 }
7378
7379
7380 func (c *ProjectsLocationsBatchesListCall) Context(ctx context.Context) *ProjectsLocationsBatchesListCall {
7381 c.ctx_ = ctx
7382 return c
7383 }
7384
7385
7386
7387 func (c *ProjectsLocationsBatchesListCall) Header() http.Header {
7388 if c.header_ == nil {
7389 c.header_ = make(http.Header)
7390 }
7391 return c.header_
7392 }
7393
7394 func (c *ProjectsLocationsBatchesListCall) doRequest(alt string) (*http.Response, error) {
7395 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7396 if c.ifNoneMatch_ != "" {
7397 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7398 }
7399 var body io.Reader = nil
7400 c.urlParams_.Set("alt", alt)
7401 c.urlParams_.Set("prettyPrint", "false")
7402 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batches")
7403 urls += "?" + c.urlParams_.Encode()
7404 req, err := http.NewRequest("GET", urls, body)
7405 if err != nil {
7406 return nil, err
7407 }
7408 req.Header = reqHeaders
7409 googleapi.Expand(req.URL, map[string]string{
7410 "parent": c.parent,
7411 })
7412 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7413 }
7414
7415
7416
7417
7418
7419
7420
7421 func (c *ProjectsLocationsBatchesListCall) Do(opts ...googleapi.CallOption) (*ListBatchesResponse, error) {
7422 gensupport.SetOptions(c.urlParams_, opts...)
7423 res, err := c.doRequest("json")
7424 if res != nil && res.StatusCode == http.StatusNotModified {
7425 if res.Body != nil {
7426 res.Body.Close()
7427 }
7428 return nil, gensupport.WrapError(&googleapi.Error{
7429 Code: res.StatusCode,
7430 Header: res.Header,
7431 })
7432 }
7433 if err != nil {
7434 return nil, err
7435 }
7436 defer googleapi.CloseBody(res)
7437 if err := googleapi.CheckResponse(res); err != nil {
7438 return nil, gensupport.WrapError(err)
7439 }
7440 ret := &ListBatchesResponse{
7441 ServerResponse: googleapi.ServerResponse{
7442 Header: res.Header,
7443 HTTPStatusCode: res.StatusCode,
7444 },
7445 }
7446 target := &ret
7447 if err := gensupport.DecodeResponse(target, res); err != nil {
7448 return nil, err
7449 }
7450 return ret, nil
7451 }
7452
7453
7454
7455
7456 func (c *ProjectsLocationsBatchesListCall) Pages(ctx context.Context, f func(*ListBatchesResponse) error) error {
7457 c.ctx_ = ctx
7458 defer c.PageToken(c.urlParams_.Get("pageToken"))
7459 for {
7460 x, err := c.Do()
7461 if err != nil {
7462 return err
7463 }
7464 if err := f(x); err != nil {
7465 return err
7466 }
7467 if x.NextPageToken == "" {
7468 return nil
7469 }
7470 c.PageToken(x.NextPageToken)
7471 }
7472 }
7473
7474 type ProjectsLocationsOperationsCancelCall struct {
7475 s *Service
7476 name string
7477 urlParams_ gensupport.URLParams
7478 ctx_ context.Context
7479 header_ http.Header
7480 }
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493 func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall {
7494 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7495 c.name = name
7496 return c
7497 }
7498
7499
7500
7501
7502 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
7503 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7504 return c
7505 }
7506
7507
7508 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
7509 c.ctx_ = ctx
7510 return c
7511 }
7512
7513
7514
7515 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
7516 if c.header_ == nil {
7517 c.header_ = make(http.Header)
7518 }
7519 return c.header_
7520 }
7521
7522 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
7523 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7524 var body io.Reader = nil
7525 c.urlParams_.Set("alt", alt)
7526 c.urlParams_.Set("prettyPrint", "false")
7527 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
7528 urls += "?" + c.urlParams_.Encode()
7529 req, err := http.NewRequest("POST", urls, body)
7530 if err != nil {
7531 return nil, err
7532 }
7533 req.Header = reqHeaders
7534 googleapi.Expand(req.URL, map[string]string{
7535 "name": c.name,
7536 })
7537 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7538 }
7539
7540
7541
7542
7543
7544
7545 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7546 gensupport.SetOptions(c.urlParams_, opts...)
7547 res, err := c.doRequest("json")
7548 if res != nil && res.StatusCode == http.StatusNotModified {
7549 if res.Body != nil {
7550 res.Body.Close()
7551 }
7552 return nil, gensupport.WrapError(&googleapi.Error{
7553 Code: res.StatusCode,
7554 Header: res.Header,
7555 })
7556 }
7557 if err != nil {
7558 return nil, err
7559 }
7560 defer googleapi.CloseBody(res)
7561 if err := googleapi.CheckResponse(res); err != nil {
7562 return nil, gensupport.WrapError(err)
7563 }
7564 ret := &Empty{
7565 ServerResponse: googleapi.ServerResponse{
7566 Header: res.Header,
7567 HTTPStatusCode: res.StatusCode,
7568 },
7569 }
7570 target := &ret
7571 if err := gensupport.DecodeResponse(target, res); err != nil {
7572 return nil, err
7573 }
7574 return ret, nil
7575 }
7576
7577 type ProjectsLocationsOperationsDeleteCall struct {
7578 s *Service
7579 name string
7580 urlParams_ gensupport.URLParams
7581 ctx_ context.Context
7582 header_ http.Header
7583 }
7584
7585
7586
7587
7588
7589
7590
7591 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
7592 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7593 c.name = name
7594 return c
7595 }
7596
7597
7598
7599
7600 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
7601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7602 return c
7603 }
7604
7605
7606 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
7607 c.ctx_ = ctx
7608 return c
7609 }
7610
7611
7612
7613 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
7614 if c.header_ == nil {
7615 c.header_ = make(http.Header)
7616 }
7617 return c.header_
7618 }
7619
7620 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
7621 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7622 var body io.Reader = nil
7623 c.urlParams_.Set("alt", alt)
7624 c.urlParams_.Set("prettyPrint", "false")
7625 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7626 urls += "?" + c.urlParams_.Encode()
7627 req, err := http.NewRequest("DELETE", urls, body)
7628 if err != nil {
7629 return nil, err
7630 }
7631 req.Header = reqHeaders
7632 googleapi.Expand(req.URL, map[string]string{
7633 "name": c.name,
7634 })
7635 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7636 }
7637
7638
7639
7640
7641
7642
7643 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7644 gensupport.SetOptions(c.urlParams_, opts...)
7645 res, err := c.doRequest("json")
7646 if res != nil && res.StatusCode == http.StatusNotModified {
7647 if res.Body != nil {
7648 res.Body.Close()
7649 }
7650 return nil, gensupport.WrapError(&googleapi.Error{
7651 Code: res.StatusCode,
7652 Header: res.Header,
7653 })
7654 }
7655 if err != nil {
7656 return nil, err
7657 }
7658 defer googleapi.CloseBody(res)
7659 if err := googleapi.CheckResponse(res); err != nil {
7660 return nil, gensupport.WrapError(err)
7661 }
7662 ret := &Empty{
7663 ServerResponse: googleapi.ServerResponse{
7664 Header: res.Header,
7665 HTTPStatusCode: res.StatusCode,
7666 },
7667 }
7668 target := &ret
7669 if err := gensupport.DecodeResponse(target, res); err != nil {
7670 return nil, err
7671 }
7672 return ret, nil
7673 }
7674
7675 type ProjectsLocationsOperationsGetCall struct {
7676 s *Service
7677 name string
7678 urlParams_ gensupport.URLParams
7679 ifNoneMatch_ string
7680 ctx_ context.Context
7681 header_ http.Header
7682 }
7683
7684
7685
7686
7687
7688
7689 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
7690 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7691 c.name = name
7692 return c
7693 }
7694
7695
7696
7697
7698 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
7699 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7700 return c
7701 }
7702
7703
7704
7705
7706 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
7707 c.ifNoneMatch_ = entityTag
7708 return c
7709 }
7710
7711
7712 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
7713 c.ctx_ = ctx
7714 return c
7715 }
7716
7717
7718
7719 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
7720 if c.header_ == nil {
7721 c.header_ = make(http.Header)
7722 }
7723 return c.header_
7724 }
7725
7726 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
7727 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7728 if c.ifNoneMatch_ != "" {
7729 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7730 }
7731 var body io.Reader = nil
7732 c.urlParams_.Set("alt", alt)
7733 c.urlParams_.Set("prettyPrint", "false")
7734 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7735 urls += "?" + c.urlParams_.Encode()
7736 req, err := http.NewRequest("GET", urls, body)
7737 if err != nil {
7738 return nil, err
7739 }
7740 req.Header = reqHeaders
7741 googleapi.Expand(req.URL, map[string]string{
7742 "name": c.name,
7743 })
7744 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7745 }
7746
7747
7748
7749
7750
7751
7752 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7753 gensupport.SetOptions(c.urlParams_, opts...)
7754 res, err := c.doRequest("json")
7755 if res != nil && res.StatusCode == http.StatusNotModified {
7756 if res.Body != nil {
7757 res.Body.Close()
7758 }
7759 return nil, gensupport.WrapError(&googleapi.Error{
7760 Code: res.StatusCode,
7761 Header: res.Header,
7762 })
7763 }
7764 if err != nil {
7765 return nil, err
7766 }
7767 defer googleapi.CloseBody(res)
7768 if err := googleapi.CheckResponse(res); err != nil {
7769 return nil, gensupport.WrapError(err)
7770 }
7771 ret := &Operation{
7772 ServerResponse: googleapi.ServerResponse{
7773 Header: res.Header,
7774 HTTPStatusCode: res.StatusCode,
7775 },
7776 }
7777 target := &ret
7778 if err := gensupport.DecodeResponse(target, res); err != nil {
7779 return nil, err
7780 }
7781 return ret, nil
7782 }
7783
7784 type ProjectsLocationsOperationsListCall struct {
7785 s *Service
7786 name string
7787 urlParams_ gensupport.URLParams
7788 ifNoneMatch_ string
7789 ctx_ context.Context
7790 header_ http.Header
7791 }
7792
7793
7794
7795
7796
7797 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
7798 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7799 c.name = name
7800 return c
7801 }
7802
7803
7804 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
7805 c.urlParams_.Set("filter", filter)
7806 return c
7807 }
7808
7809
7810
7811 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
7812 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7813 return c
7814 }
7815
7816
7817
7818 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
7819 c.urlParams_.Set("pageToken", pageToken)
7820 return c
7821 }
7822
7823
7824
7825
7826 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
7827 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7828 return c
7829 }
7830
7831
7832
7833
7834 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
7835 c.ifNoneMatch_ = entityTag
7836 return c
7837 }
7838
7839
7840 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
7841 c.ctx_ = ctx
7842 return c
7843 }
7844
7845
7846
7847 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
7848 if c.header_ == nil {
7849 c.header_ = make(http.Header)
7850 }
7851 return c.header_
7852 }
7853
7854 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
7855 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7856 if c.ifNoneMatch_ != "" {
7857 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7858 }
7859 var body io.Reader = nil
7860 c.urlParams_.Set("alt", alt)
7861 c.urlParams_.Set("prettyPrint", "false")
7862 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7863 urls += "?" + c.urlParams_.Encode()
7864 req, err := http.NewRequest("GET", urls, body)
7865 if err != nil {
7866 return nil, err
7867 }
7868 req.Header = reqHeaders
7869 googleapi.Expand(req.URL, map[string]string{
7870 "name": c.name,
7871 })
7872 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7873 }
7874
7875
7876
7877
7878
7879
7880
7881 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
7882 gensupport.SetOptions(c.urlParams_, opts...)
7883 res, err := c.doRequest("json")
7884 if res != nil && res.StatusCode == http.StatusNotModified {
7885 if res.Body != nil {
7886 res.Body.Close()
7887 }
7888 return nil, gensupport.WrapError(&googleapi.Error{
7889 Code: res.StatusCode,
7890 Header: res.Header,
7891 })
7892 }
7893 if err != nil {
7894 return nil, err
7895 }
7896 defer googleapi.CloseBody(res)
7897 if err := googleapi.CheckResponse(res); err != nil {
7898 return nil, gensupport.WrapError(err)
7899 }
7900 ret := &ListOperationsResponse{
7901 ServerResponse: googleapi.ServerResponse{
7902 Header: res.Header,
7903 HTTPStatusCode: res.StatusCode,
7904 },
7905 }
7906 target := &ret
7907 if err := gensupport.DecodeResponse(target, res); err != nil {
7908 return nil, err
7909 }
7910 return ret, nil
7911 }
7912
7913
7914
7915
7916 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
7917 c.ctx_ = ctx
7918 defer c.PageToken(c.urlParams_.Get("pageToken"))
7919 for {
7920 x, err := c.Do()
7921 if err != nil {
7922 return err
7923 }
7924 if err := f(x); err != nil {
7925 return err
7926 }
7927 if x.NextPageToken == "" {
7928 return nil
7929 }
7930 c.PageToken(x.NextPageToken)
7931 }
7932 }
7933
7934 type ProjectsLocationsSessionTemplatesCreateCall struct {
7935 s *Service
7936 parent string
7937 sessiontemplate *SessionTemplate
7938 urlParams_ gensupport.URLParams
7939 ctx_ context.Context
7940 header_ http.Header
7941 }
7942
7943
7944
7945
7946 func (r *ProjectsLocationsSessionTemplatesService) Create(parent string, sessiontemplate *SessionTemplate) *ProjectsLocationsSessionTemplatesCreateCall {
7947 c := &ProjectsLocationsSessionTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7948 c.parent = parent
7949 c.sessiontemplate = sessiontemplate
7950 return c
7951 }
7952
7953
7954
7955
7956 func (c *ProjectsLocationsSessionTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionTemplatesCreateCall {
7957 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7958 return c
7959 }
7960
7961
7962 func (c *ProjectsLocationsSessionTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsSessionTemplatesCreateCall {
7963 c.ctx_ = ctx
7964 return c
7965 }
7966
7967
7968
7969 func (c *ProjectsLocationsSessionTemplatesCreateCall) Header() http.Header {
7970 if c.header_ == nil {
7971 c.header_ = make(http.Header)
7972 }
7973 return c.header_
7974 }
7975
7976 func (c *ProjectsLocationsSessionTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
7977 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7978 var body io.Reader = nil
7979 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sessiontemplate)
7980 if err != nil {
7981 return nil, err
7982 }
7983 c.urlParams_.Set("alt", alt)
7984 c.urlParams_.Set("prettyPrint", "false")
7985 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessionTemplates")
7986 urls += "?" + c.urlParams_.Encode()
7987 req, err := http.NewRequest("POST", urls, body)
7988 if err != nil {
7989 return nil, err
7990 }
7991 req.Header = reqHeaders
7992 googleapi.Expand(req.URL, map[string]string{
7993 "parent": c.parent,
7994 })
7995 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7996 }
7997
7998
7999
8000
8001
8002
8003
8004 func (c *ProjectsLocationsSessionTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*SessionTemplate, error) {
8005 gensupport.SetOptions(c.urlParams_, opts...)
8006 res, err := c.doRequest("json")
8007 if res != nil && res.StatusCode == http.StatusNotModified {
8008 if res.Body != nil {
8009 res.Body.Close()
8010 }
8011 return nil, gensupport.WrapError(&googleapi.Error{
8012 Code: res.StatusCode,
8013 Header: res.Header,
8014 })
8015 }
8016 if err != nil {
8017 return nil, err
8018 }
8019 defer googleapi.CloseBody(res)
8020 if err := googleapi.CheckResponse(res); err != nil {
8021 return nil, gensupport.WrapError(err)
8022 }
8023 ret := &SessionTemplate{
8024 ServerResponse: googleapi.ServerResponse{
8025 Header: res.Header,
8026 HTTPStatusCode: res.StatusCode,
8027 },
8028 }
8029 target := &ret
8030 if err := gensupport.DecodeResponse(target, res); err != nil {
8031 return nil, err
8032 }
8033 return ret, nil
8034 }
8035
8036 type ProjectsLocationsSessionTemplatesDeleteCall struct {
8037 s *Service
8038 name string
8039 urlParams_ gensupport.URLParams
8040 ctx_ context.Context
8041 header_ http.Header
8042 }
8043
8044
8045
8046
8047 func (r *ProjectsLocationsSessionTemplatesService) Delete(name string) *ProjectsLocationsSessionTemplatesDeleteCall {
8048 c := &ProjectsLocationsSessionTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8049 c.name = name
8050 return c
8051 }
8052
8053
8054
8055
8056 func (c *ProjectsLocationsSessionTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionTemplatesDeleteCall {
8057 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8058 return c
8059 }
8060
8061
8062 func (c *ProjectsLocationsSessionTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSessionTemplatesDeleteCall {
8063 c.ctx_ = ctx
8064 return c
8065 }
8066
8067
8068
8069 func (c *ProjectsLocationsSessionTemplatesDeleteCall) Header() http.Header {
8070 if c.header_ == nil {
8071 c.header_ = make(http.Header)
8072 }
8073 return c.header_
8074 }
8075
8076 func (c *ProjectsLocationsSessionTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
8077 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8078 var body io.Reader = nil
8079 c.urlParams_.Set("alt", alt)
8080 c.urlParams_.Set("prettyPrint", "false")
8081 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8082 urls += "?" + c.urlParams_.Encode()
8083 req, err := http.NewRequest("DELETE", urls, body)
8084 if err != nil {
8085 return nil, err
8086 }
8087 req.Header = reqHeaders
8088 googleapi.Expand(req.URL, map[string]string{
8089 "name": c.name,
8090 })
8091 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8092 }
8093
8094
8095
8096
8097
8098
8099 func (c *ProjectsLocationsSessionTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8100 gensupport.SetOptions(c.urlParams_, opts...)
8101 res, err := c.doRequest("json")
8102 if res != nil && res.StatusCode == http.StatusNotModified {
8103 if res.Body != nil {
8104 res.Body.Close()
8105 }
8106 return nil, gensupport.WrapError(&googleapi.Error{
8107 Code: res.StatusCode,
8108 Header: res.Header,
8109 })
8110 }
8111 if err != nil {
8112 return nil, err
8113 }
8114 defer googleapi.CloseBody(res)
8115 if err := googleapi.CheckResponse(res); err != nil {
8116 return nil, gensupport.WrapError(err)
8117 }
8118 ret := &Empty{
8119 ServerResponse: googleapi.ServerResponse{
8120 Header: res.Header,
8121 HTTPStatusCode: res.StatusCode,
8122 },
8123 }
8124 target := &ret
8125 if err := gensupport.DecodeResponse(target, res); err != nil {
8126 return nil, err
8127 }
8128 return ret, nil
8129 }
8130
8131 type ProjectsLocationsSessionTemplatesGetCall struct {
8132 s *Service
8133 name string
8134 urlParams_ gensupport.URLParams
8135 ifNoneMatch_ string
8136 ctx_ context.Context
8137 header_ http.Header
8138 }
8139
8140
8141
8142
8143 func (r *ProjectsLocationsSessionTemplatesService) Get(name string) *ProjectsLocationsSessionTemplatesGetCall {
8144 c := &ProjectsLocationsSessionTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8145 c.name = name
8146 return c
8147 }
8148
8149
8150
8151
8152 func (c *ProjectsLocationsSessionTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionTemplatesGetCall {
8153 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8154 return c
8155 }
8156
8157
8158
8159
8160 func (c *ProjectsLocationsSessionTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSessionTemplatesGetCall {
8161 c.ifNoneMatch_ = entityTag
8162 return c
8163 }
8164
8165
8166 func (c *ProjectsLocationsSessionTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsSessionTemplatesGetCall {
8167 c.ctx_ = ctx
8168 return c
8169 }
8170
8171
8172
8173 func (c *ProjectsLocationsSessionTemplatesGetCall) Header() http.Header {
8174 if c.header_ == nil {
8175 c.header_ = make(http.Header)
8176 }
8177 return c.header_
8178 }
8179
8180 func (c *ProjectsLocationsSessionTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
8181 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8182 if c.ifNoneMatch_ != "" {
8183 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8184 }
8185 var body io.Reader = nil
8186 c.urlParams_.Set("alt", alt)
8187 c.urlParams_.Set("prettyPrint", "false")
8188 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8189 urls += "?" + c.urlParams_.Encode()
8190 req, err := http.NewRequest("GET", urls, body)
8191 if err != nil {
8192 return nil, err
8193 }
8194 req.Header = reqHeaders
8195 googleapi.Expand(req.URL, map[string]string{
8196 "name": c.name,
8197 })
8198 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8199 }
8200
8201
8202
8203
8204
8205
8206
8207 func (c *ProjectsLocationsSessionTemplatesGetCall) Do(opts ...googleapi.CallOption) (*SessionTemplate, error) {
8208 gensupport.SetOptions(c.urlParams_, opts...)
8209 res, err := c.doRequest("json")
8210 if res != nil && res.StatusCode == http.StatusNotModified {
8211 if res.Body != nil {
8212 res.Body.Close()
8213 }
8214 return nil, gensupport.WrapError(&googleapi.Error{
8215 Code: res.StatusCode,
8216 Header: res.Header,
8217 })
8218 }
8219 if err != nil {
8220 return nil, err
8221 }
8222 defer googleapi.CloseBody(res)
8223 if err := googleapi.CheckResponse(res); err != nil {
8224 return nil, gensupport.WrapError(err)
8225 }
8226 ret := &SessionTemplate{
8227 ServerResponse: googleapi.ServerResponse{
8228 Header: res.Header,
8229 HTTPStatusCode: res.StatusCode,
8230 },
8231 }
8232 target := &ret
8233 if err := gensupport.DecodeResponse(target, res); err != nil {
8234 return nil, err
8235 }
8236 return ret, nil
8237 }
8238
8239 type ProjectsLocationsSessionTemplatesListCall struct {
8240 s *Service
8241 parent string
8242 urlParams_ gensupport.URLParams
8243 ifNoneMatch_ string
8244 ctx_ context.Context
8245 header_ http.Header
8246 }
8247
8248
8249
8250
8251 func (r *ProjectsLocationsSessionTemplatesService) List(parent string) *ProjectsLocationsSessionTemplatesListCall {
8252 c := &ProjectsLocationsSessionTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8253 c.parent = parent
8254 return c
8255 }
8256
8257
8258
8259
8260 func (c *ProjectsLocationsSessionTemplatesListCall) Filter(filter string) *ProjectsLocationsSessionTemplatesListCall {
8261 c.urlParams_.Set("filter", filter)
8262 return c
8263 }
8264
8265
8266
8267
8268 func (c *ProjectsLocationsSessionTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsSessionTemplatesListCall {
8269 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8270 return c
8271 }
8272
8273
8274
8275
8276 func (c *ProjectsLocationsSessionTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsSessionTemplatesListCall {
8277 c.urlParams_.Set("pageToken", pageToken)
8278 return c
8279 }
8280
8281
8282
8283
8284 func (c *ProjectsLocationsSessionTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionTemplatesListCall {
8285 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8286 return c
8287 }
8288
8289
8290
8291
8292 func (c *ProjectsLocationsSessionTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSessionTemplatesListCall {
8293 c.ifNoneMatch_ = entityTag
8294 return c
8295 }
8296
8297
8298 func (c *ProjectsLocationsSessionTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsSessionTemplatesListCall {
8299 c.ctx_ = ctx
8300 return c
8301 }
8302
8303
8304
8305 func (c *ProjectsLocationsSessionTemplatesListCall) Header() http.Header {
8306 if c.header_ == nil {
8307 c.header_ = make(http.Header)
8308 }
8309 return c.header_
8310 }
8311
8312 func (c *ProjectsLocationsSessionTemplatesListCall) doRequest(alt string) (*http.Response, error) {
8313 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8314 if c.ifNoneMatch_ != "" {
8315 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8316 }
8317 var body io.Reader = nil
8318 c.urlParams_.Set("alt", alt)
8319 c.urlParams_.Set("prettyPrint", "false")
8320 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessionTemplates")
8321 urls += "?" + c.urlParams_.Encode()
8322 req, err := http.NewRequest("GET", urls, body)
8323 if err != nil {
8324 return nil, err
8325 }
8326 req.Header = reqHeaders
8327 googleapi.Expand(req.URL, map[string]string{
8328 "parent": c.parent,
8329 })
8330 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8331 }
8332
8333
8334
8335
8336
8337
8338
8339 func (c *ProjectsLocationsSessionTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListSessionTemplatesResponse, error) {
8340 gensupport.SetOptions(c.urlParams_, opts...)
8341 res, err := c.doRequest("json")
8342 if res != nil && res.StatusCode == http.StatusNotModified {
8343 if res.Body != nil {
8344 res.Body.Close()
8345 }
8346 return nil, gensupport.WrapError(&googleapi.Error{
8347 Code: res.StatusCode,
8348 Header: res.Header,
8349 })
8350 }
8351 if err != nil {
8352 return nil, err
8353 }
8354 defer googleapi.CloseBody(res)
8355 if err := googleapi.CheckResponse(res); err != nil {
8356 return nil, gensupport.WrapError(err)
8357 }
8358 ret := &ListSessionTemplatesResponse{
8359 ServerResponse: googleapi.ServerResponse{
8360 Header: res.Header,
8361 HTTPStatusCode: res.StatusCode,
8362 },
8363 }
8364 target := &ret
8365 if err := gensupport.DecodeResponse(target, res); err != nil {
8366 return nil, err
8367 }
8368 return ret, nil
8369 }
8370
8371
8372
8373
8374 func (c *ProjectsLocationsSessionTemplatesListCall) Pages(ctx context.Context, f func(*ListSessionTemplatesResponse) error) error {
8375 c.ctx_ = ctx
8376 defer c.PageToken(c.urlParams_.Get("pageToken"))
8377 for {
8378 x, err := c.Do()
8379 if err != nil {
8380 return err
8381 }
8382 if err := f(x); err != nil {
8383 return err
8384 }
8385 if x.NextPageToken == "" {
8386 return nil
8387 }
8388 c.PageToken(x.NextPageToken)
8389 }
8390 }
8391
8392 type ProjectsLocationsSessionTemplatesPatchCall struct {
8393 s *Service
8394 name string
8395 sessiontemplate *SessionTemplate
8396 urlParams_ gensupport.URLParams
8397 ctx_ context.Context
8398 header_ http.Header
8399 }
8400
8401
8402
8403
8404 func (r *ProjectsLocationsSessionTemplatesService) Patch(name string, sessiontemplate *SessionTemplate) *ProjectsLocationsSessionTemplatesPatchCall {
8405 c := &ProjectsLocationsSessionTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8406 c.name = name
8407 c.sessiontemplate = sessiontemplate
8408 return c
8409 }
8410
8411
8412
8413
8414 func (c *ProjectsLocationsSessionTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionTemplatesPatchCall {
8415 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8416 return c
8417 }
8418
8419
8420 func (c *ProjectsLocationsSessionTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsSessionTemplatesPatchCall {
8421 c.ctx_ = ctx
8422 return c
8423 }
8424
8425
8426
8427 func (c *ProjectsLocationsSessionTemplatesPatchCall) Header() http.Header {
8428 if c.header_ == nil {
8429 c.header_ = make(http.Header)
8430 }
8431 return c.header_
8432 }
8433
8434 func (c *ProjectsLocationsSessionTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
8435 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8436 var body io.Reader = nil
8437 body, err := googleapi.WithoutDataWrapper.JSONReader(c.sessiontemplate)
8438 if err != nil {
8439 return nil, err
8440 }
8441 c.urlParams_.Set("alt", alt)
8442 c.urlParams_.Set("prettyPrint", "false")
8443 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8444 urls += "?" + c.urlParams_.Encode()
8445 req, err := http.NewRequest("PATCH", urls, body)
8446 if err != nil {
8447 return nil, err
8448 }
8449 req.Header = reqHeaders
8450 googleapi.Expand(req.URL, map[string]string{
8451 "name": c.name,
8452 })
8453 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8454 }
8455
8456
8457
8458
8459
8460
8461
8462 func (c *ProjectsLocationsSessionTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*SessionTemplate, error) {
8463 gensupport.SetOptions(c.urlParams_, opts...)
8464 res, err := c.doRequest("json")
8465 if res != nil && res.StatusCode == http.StatusNotModified {
8466 if res.Body != nil {
8467 res.Body.Close()
8468 }
8469 return nil, gensupport.WrapError(&googleapi.Error{
8470 Code: res.StatusCode,
8471 Header: res.Header,
8472 })
8473 }
8474 if err != nil {
8475 return nil, err
8476 }
8477 defer googleapi.CloseBody(res)
8478 if err := googleapi.CheckResponse(res); err != nil {
8479 return nil, gensupport.WrapError(err)
8480 }
8481 ret := &SessionTemplate{
8482 ServerResponse: googleapi.ServerResponse{
8483 Header: res.Header,
8484 HTTPStatusCode: res.StatusCode,
8485 },
8486 }
8487 target := &ret
8488 if err := gensupport.DecodeResponse(target, res); err != nil {
8489 return nil, err
8490 }
8491 return ret, nil
8492 }
8493
8494 type ProjectsLocationsSessionsCreateCall struct {
8495 s *Service
8496 parent string
8497 session *Session
8498 urlParams_ gensupport.URLParams
8499 ctx_ context.Context
8500 header_ http.Header
8501 }
8502
8503
8504
8505
8506 func (r *ProjectsLocationsSessionsService) Create(parent string, session *Session) *ProjectsLocationsSessionsCreateCall {
8507 c := &ProjectsLocationsSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8508 c.parent = parent
8509 c.session = session
8510 return c
8511 }
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521 func (c *ProjectsLocationsSessionsCreateCall) RequestId(requestId string) *ProjectsLocationsSessionsCreateCall {
8522 c.urlParams_.Set("requestId", requestId)
8523 return c
8524 }
8525
8526
8527
8528
8529 func (c *ProjectsLocationsSessionsCreateCall) SessionId(sessionId string) *ProjectsLocationsSessionsCreateCall {
8530 c.urlParams_.Set("sessionId", sessionId)
8531 return c
8532 }
8533
8534
8535
8536
8537 func (c *ProjectsLocationsSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionsCreateCall {
8538 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8539 return c
8540 }
8541
8542
8543 func (c *ProjectsLocationsSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsSessionsCreateCall {
8544 c.ctx_ = ctx
8545 return c
8546 }
8547
8548
8549
8550 func (c *ProjectsLocationsSessionsCreateCall) Header() http.Header {
8551 if c.header_ == nil {
8552 c.header_ = make(http.Header)
8553 }
8554 return c.header_
8555 }
8556
8557 func (c *ProjectsLocationsSessionsCreateCall) doRequest(alt string) (*http.Response, error) {
8558 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8559 var body io.Reader = nil
8560 body, err := googleapi.WithoutDataWrapper.JSONReader(c.session)
8561 if err != nil {
8562 return nil, err
8563 }
8564 c.urlParams_.Set("alt", alt)
8565 c.urlParams_.Set("prettyPrint", "false")
8566 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions")
8567 urls += "?" + c.urlParams_.Encode()
8568 req, err := http.NewRequest("POST", urls, body)
8569 if err != nil {
8570 return nil, err
8571 }
8572 req.Header = reqHeaders
8573 googleapi.Expand(req.URL, map[string]string{
8574 "parent": c.parent,
8575 })
8576 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8577 }
8578
8579
8580
8581
8582
8583
8584 func (c *ProjectsLocationsSessionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8585 gensupport.SetOptions(c.urlParams_, opts...)
8586 res, err := c.doRequest("json")
8587 if res != nil && res.StatusCode == http.StatusNotModified {
8588 if res.Body != nil {
8589 res.Body.Close()
8590 }
8591 return nil, gensupport.WrapError(&googleapi.Error{
8592 Code: res.StatusCode,
8593 Header: res.Header,
8594 })
8595 }
8596 if err != nil {
8597 return nil, err
8598 }
8599 defer googleapi.CloseBody(res)
8600 if err := googleapi.CheckResponse(res); err != nil {
8601 return nil, gensupport.WrapError(err)
8602 }
8603 ret := &Operation{
8604 ServerResponse: googleapi.ServerResponse{
8605 Header: res.Header,
8606 HTTPStatusCode: res.StatusCode,
8607 },
8608 }
8609 target := &ret
8610 if err := gensupport.DecodeResponse(target, res); err != nil {
8611 return nil, err
8612 }
8613 return ret, nil
8614 }
8615
8616 type ProjectsLocationsSessionsDeleteCall struct {
8617 s *Service
8618 name string
8619 urlParams_ gensupport.URLParams
8620 ctx_ context.Context
8621 header_ http.Header
8622 }
8623
8624
8625
8626
8627
8628 func (r *ProjectsLocationsSessionsService) Delete(name string) *ProjectsLocationsSessionsDeleteCall {
8629 c := &ProjectsLocationsSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8630 c.name = name
8631 return c
8632 }
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642 func (c *ProjectsLocationsSessionsDeleteCall) RequestId(requestId string) *ProjectsLocationsSessionsDeleteCall {
8643 c.urlParams_.Set("requestId", requestId)
8644 return c
8645 }
8646
8647
8648
8649
8650 func (c *ProjectsLocationsSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionsDeleteCall {
8651 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8652 return c
8653 }
8654
8655
8656 func (c *ProjectsLocationsSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSessionsDeleteCall {
8657 c.ctx_ = ctx
8658 return c
8659 }
8660
8661
8662
8663 func (c *ProjectsLocationsSessionsDeleteCall) Header() http.Header {
8664 if c.header_ == nil {
8665 c.header_ = make(http.Header)
8666 }
8667 return c.header_
8668 }
8669
8670 func (c *ProjectsLocationsSessionsDeleteCall) doRequest(alt string) (*http.Response, error) {
8671 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8672 var body io.Reader = nil
8673 c.urlParams_.Set("alt", alt)
8674 c.urlParams_.Set("prettyPrint", "false")
8675 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8676 urls += "?" + c.urlParams_.Encode()
8677 req, err := http.NewRequest("DELETE", urls, body)
8678 if err != nil {
8679 return nil, err
8680 }
8681 req.Header = reqHeaders
8682 googleapi.Expand(req.URL, map[string]string{
8683 "name": c.name,
8684 })
8685 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8686 }
8687
8688
8689
8690
8691
8692
8693 func (c *ProjectsLocationsSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8694 gensupport.SetOptions(c.urlParams_, opts...)
8695 res, err := c.doRequest("json")
8696 if res != nil && res.StatusCode == http.StatusNotModified {
8697 if res.Body != nil {
8698 res.Body.Close()
8699 }
8700 return nil, gensupport.WrapError(&googleapi.Error{
8701 Code: res.StatusCode,
8702 Header: res.Header,
8703 })
8704 }
8705 if err != nil {
8706 return nil, err
8707 }
8708 defer googleapi.CloseBody(res)
8709 if err := googleapi.CheckResponse(res); err != nil {
8710 return nil, gensupport.WrapError(err)
8711 }
8712 ret := &Operation{
8713 ServerResponse: googleapi.ServerResponse{
8714 Header: res.Header,
8715 HTTPStatusCode: res.StatusCode,
8716 },
8717 }
8718 target := &ret
8719 if err := gensupport.DecodeResponse(target, res); err != nil {
8720 return nil, err
8721 }
8722 return ret, nil
8723 }
8724
8725 type ProjectsLocationsSessionsGetCall struct {
8726 s *Service
8727 name string
8728 urlParams_ gensupport.URLParams
8729 ifNoneMatch_ string
8730 ctx_ context.Context
8731 header_ http.Header
8732 }
8733
8734
8735
8736
8737 func (r *ProjectsLocationsSessionsService) Get(name string) *ProjectsLocationsSessionsGetCall {
8738 c := &ProjectsLocationsSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8739 c.name = name
8740 return c
8741 }
8742
8743
8744
8745
8746 func (c *ProjectsLocationsSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionsGetCall {
8747 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8748 return c
8749 }
8750
8751
8752
8753
8754 func (c *ProjectsLocationsSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSessionsGetCall {
8755 c.ifNoneMatch_ = entityTag
8756 return c
8757 }
8758
8759
8760 func (c *ProjectsLocationsSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsSessionsGetCall {
8761 c.ctx_ = ctx
8762 return c
8763 }
8764
8765
8766
8767 func (c *ProjectsLocationsSessionsGetCall) Header() http.Header {
8768 if c.header_ == nil {
8769 c.header_ = make(http.Header)
8770 }
8771 return c.header_
8772 }
8773
8774 func (c *ProjectsLocationsSessionsGetCall) doRequest(alt string) (*http.Response, error) {
8775 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8776 if c.ifNoneMatch_ != "" {
8777 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8778 }
8779 var body io.Reader = nil
8780 c.urlParams_.Set("alt", alt)
8781 c.urlParams_.Set("prettyPrint", "false")
8782 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8783 urls += "?" + c.urlParams_.Encode()
8784 req, err := http.NewRequest("GET", urls, body)
8785 if err != nil {
8786 return nil, err
8787 }
8788 req.Header = reqHeaders
8789 googleapi.Expand(req.URL, map[string]string{
8790 "name": c.name,
8791 })
8792 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8793 }
8794
8795
8796
8797
8798
8799
8800 func (c *ProjectsLocationsSessionsGetCall) Do(opts ...googleapi.CallOption) (*Session, error) {
8801 gensupport.SetOptions(c.urlParams_, opts...)
8802 res, err := c.doRequest("json")
8803 if res != nil && res.StatusCode == http.StatusNotModified {
8804 if res.Body != nil {
8805 res.Body.Close()
8806 }
8807 return nil, gensupport.WrapError(&googleapi.Error{
8808 Code: res.StatusCode,
8809 Header: res.Header,
8810 })
8811 }
8812 if err != nil {
8813 return nil, err
8814 }
8815 defer googleapi.CloseBody(res)
8816 if err := googleapi.CheckResponse(res); err != nil {
8817 return nil, gensupport.WrapError(err)
8818 }
8819 ret := &Session{
8820 ServerResponse: googleapi.ServerResponse{
8821 Header: res.Header,
8822 HTTPStatusCode: res.StatusCode,
8823 },
8824 }
8825 target := &ret
8826 if err := gensupport.DecodeResponse(target, res); err != nil {
8827 return nil, err
8828 }
8829 return ret, nil
8830 }
8831
8832 type ProjectsLocationsSessionsListCall struct {
8833 s *Service
8834 parent string
8835 urlParams_ gensupport.URLParams
8836 ifNoneMatch_ string
8837 ctx_ context.Context
8838 header_ http.Header
8839 }
8840
8841
8842
8843
8844 func (r *ProjectsLocationsSessionsService) List(parent string) *ProjectsLocationsSessionsListCall {
8845 c := &ProjectsLocationsSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8846 c.parent = parent
8847 return c
8848 }
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862 func (c *ProjectsLocationsSessionsListCall) Filter(filter string) *ProjectsLocationsSessionsListCall {
8863 c.urlParams_.Set("filter", filter)
8864 return c
8865 }
8866
8867
8868
8869
8870 func (c *ProjectsLocationsSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsSessionsListCall {
8871 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8872 return c
8873 }
8874
8875
8876
8877
8878 func (c *ProjectsLocationsSessionsListCall) PageToken(pageToken string) *ProjectsLocationsSessionsListCall {
8879 c.urlParams_.Set("pageToken", pageToken)
8880 return c
8881 }
8882
8883
8884
8885
8886 func (c *ProjectsLocationsSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionsListCall {
8887 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8888 return c
8889 }
8890
8891
8892
8893
8894 func (c *ProjectsLocationsSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSessionsListCall {
8895 c.ifNoneMatch_ = entityTag
8896 return c
8897 }
8898
8899
8900 func (c *ProjectsLocationsSessionsListCall) Context(ctx context.Context) *ProjectsLocationsSessionsListCall {
8901 c.ctx_ = ctx
8902 return c
8903 }
8904
8905
8906
8907 func (c *ProjectsLocationsSessionsListCall) Header() http.Header {
8908 if c.header_ == nil {
8909 c.header_ = make(http.Header)
8910 }
8911 return c.header_
8912 }
8913
8914 func (c *ProjectsLocationsSessionsListCall) doRequest(alt string) (*http.Response, error) {
8915 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8916 if c.ifNoneMatch_ != "" {
8917 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8918 }
8919 var body io.Reader = nil
8920 c.urlParams_.Set("alt", alt)
8921 c.urlParams_.Set("prettyPrint", "false")
8922 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions")
8923 urls += "?" + c.urlParams_.Encode()
8924 req, err := http.NewRequest("GET", urls, body)
8925 if err != nil {
8926 return nil, err
8927 }
8928 req.Header = reqHeaders
8929 googleapi.Expand(req.URL, map[string]string{
8930 "parent": c.parent,
8931 })
8932 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8933 }
8934
8935
8936
8937
8938
8939
8940
8941 func (c *ProjectsLocationsSessionsListCall) Do(opts ...googleapi.CallOption) (*ListSessionsResponse, error) {
8942 gensupport.SetOptions(c.urlParams_, opts...)
8943 res, err := c.doRequest("json")
8944 if res != nil && res.StatusCode == http.StatusNotModified {
8945 if res.Body != nil {
8946 res.Body.Close()
8947 }
8948 return nil, gensupport.WrapError(&googleapi.Error{
8949 Code: res.StatusCode,
8950 Header: res.Header,
8951 })
8952 }
8953 if err != nil {
8954 return nil, err
8955 }
8956 defer googleapi.CloseBody(res)
8957 if err := googleapi.CheckResponse(res); err != nil {
8958 return nil, gensupport.WrapError(err)
8959 }
8960 ret := &ListSessionsResponse{
8961 ServerResponse: googleapi.ServerResponse{
8962 Header: res.Header,
8963 HTTPStatusCode: res.StatusCode,
8964 },
8965 }
8966 target := &ret
8967 if err := gensupport.DecodeResponse(target, res); err != nil {
8968 return nil, err
8969 }
8970 return ret, nil
8971 }
8972
8973
8974
8975
8976 func (c *ProjectsLocationsSessionsListCall) Pages(ctx context.Context, f func(*ListSessionsResponse) error) error {
8977 c.ctx_ = ctx
8978 defer c.PageToken(c.urlParams_.Get("pageToken"))
8979 for {
8980 x, err := c.Do()
8981 if err != nil {
8982 return err
8983 }
8984 if err := f(x); err != nil {
8985 return err
8986 }
8987 if x.NextPageToken == "" {
8988 return nil
8989 }
8990 c.PageToken(x.NextPageToken)
8991 }
8992 }
8993
8994 type ProjectsLocationsSessionsTerminateCall struct {
8995 s *Service
8996 name string
8997 terminatesessionrequest *TerminateSessionRequest
8998 urlParams_ gensupport.URLParams
8999 ctx_ context.Context
9000 header_ http.Header
9001 }
9002
9003
9004
9005
9006 func (r *ProjectsLocationsSessionsService) Terminate(name string, terminatesessionrequest *TerminateSessionRequest) *ProjectsLocationsSessionsTerminateCall {
9007 c := &ProjectsLocationsSessionsTerminateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9008 c.name = name
9009 c.terminatesessionrequest = terminatesessionrequest
9010 return c
9011 }
9012
9013
9014
9015
9016 func (c *ProjectsLocationsSessionsTerminateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSessionsTerminateCall {
9017 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9018 return c
9019 }
9020
9021
9022 func (c *ProjectsLocationsSessionsTerminateCall) Context(ctx context.Context) *ProjectsLocationsSessionsTerminateCall {
9023 c.ctx_ = ctx
9024 return c
9025 }
9026
9027
9028
9029 func (c *ProjectsLocationsSessionsTerminateCall) Header() http.Header {
9030 if c.header_ == nil {
9031 c.header_ = make(http.Header)
9032 }
9033 return c.header_
9034 }
9035
9036 func (c *ProjectsLocationsSessionsTerminateCall) doRequest(alt string) (*http.Response, error) {
9037 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9038 var body io.Reader = nil
9039 body, err := googleapi.WithoutDataWrapper.JSONReader(c.terminatesessionrequest)
9040 if err != nil {
9041 return nil, err
9042 }
9043 c.urlParams_.Set("alt", alt)
9044 c.urlParams_.Set("prettyPrint", "false")
9045 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:terminate")
9046 urls += "?" + c.urlParams_.Encode()
9047 req, err := http.NewRequest("POST", urls, body)
9048 if err != nil {
9049 return nil, err
9050 }
9051 req.Header = reqHeaders
9052 googleapi.Expand(req.URL, map[string]string{
9053 "name": c.name,
9054 })
9055 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9056 }
9057
9058
9059
9060
9061
9062
9063 func (c *ProjectsLocationsSessionsTerminateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9064 gensupport.SetOptions(c.urlParams_, opts...)
9065 res, err := c.doRequest("json")
9066 if res != nil && res.StatusCode == http.StatusNotModified {
9067 if res.Body != nil {
9068 res.Body.Close()
9069 }
9070 return nil, gensupport.WrapError(&googleapi.Error{
9071 Code: res.StatusCode,
9072 Header: res.Header,
9073 })
9074 }
9075 if err != nil {
9076 return nil, err
9077 }
9078 defer googleapi.CloseBody(res)
9079 if err := googleapi.CheckResponse(res); err != nil {
9080 return nil, gensupport.WrapError(err)
9081 }
9082 ret := &Operation{
9083 ServerResponse: googleapi.ServerResponse{
9084 Header: res.Header,
9085 HTTPStatusCode: res.StatusCode,
9086 },
9087 }
9088 target := &ret
9089 if err := gensupport.DecodeResponse(target, res); err != nil {
9090 return nil, err
9091 }
9092 return ret, nil
9093 }
9094
9095 type ProjectsLocationsWorkflowTemplatesCreateCall struct {
9096 s *Service
9097 parent string
9098 workflowtemplate *WorkflowTemplate
9099 urlParams_ gensupport.URLParams
9100 ctx_ context.Context
9101 header_ http.Header
9102 }
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113 func (r *ProjectsLocationsWorkflowTemplatesService) Create(parent string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesCreateCall {
9114 c := &ProjectsLocationsWorkflowTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9115 c.parent = parent
9116 c.workflowtemplate = workflowtemplate
9117 return c
9118 }
9119
9120
9121
9122
9123 func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesCreateCall {
9124 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9125 return c
9126 }
9127
9128
9129 func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesCreateCall {
9130 c.ctx_ = ctx
9131 return c
9132 }
9133
9134
9135
9136 func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Header() http.Header {
9137 if c.header_ == nil {
9138 c.header_ = make(http.Header)
9139 }
9140 return c.header_
9141 }
9142
9143 func (c *ProjectsLocationsWorkflowTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
9144 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9145 var body io.Reader = nil
9146 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
9147 if err != nil {
9148 return nil, err
9149 }
9150 c.urlParams_.Set("alt", alt)
9151 c.urlParams_.Set("prettyPrint", "false")
9152 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates")
9153 urls += "?" + c.urlParams_.Encode()
9154 req, err := http.NewRequest("POST", urls, body)
9155 if err != nil {
9156 return nil, err
9157 }
9158 req.Header = reqHeaders
9159 googleapi.Expand(req.URL, map[string]string{
9160 "parent": c.parent,
9161 })
9162 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9163 }
9164
9165
9166
9167
9168
9169
9170
9171 func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
9172 gensupport.SetOptions(c.urlParams_, opts...)
9173 res, err := c.doRequest("json")
9174 if res != nil && res.StatusCode == http.StatusNotModified {
9175 if res.Body != nil {
9176 res.Body.Close()
9177 }
9178 return nil, gensupport.WrapError(&googleapi.Error{
9179 Code: res.StatusCode,
9180 Header: res.Header,
9181 })
9182 }
9183 if err != nil {
9184 return nil, err
9185 }
9186 defer googleapi.CloseBody(res)
9187 if err := googleapi.CheckResponse(res); err != nil {
9188 return nil, gensupport.WrapError(err)
9189 }
9190 ret := &WorkflowTemplate{
9191 ServerResponse: googleapi.ServerResponse{
9192 Header: res.Header,
9193 HTTPStatusCode: res.StatusCode,
9194 },
9195 }
9196 target := &ret
9197 if err := gensupport.DecodeResponse(target, res); err != nil {
9198 return nil, err
9199 }
9200 return ret, nil
9201 }
9202
9203 type ProjectsLocationsWorkflowTemplatesDeleteCall struct {
9204 s *Service
9205 name string
9206 urlParams_ gensupport.URLParams
9207 ctx_ context.Context
9208 header_ http.Header
9209 }
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222 func (r *ProjectsLocationsWorkflowTemplatesService) Delete(name string) *ProjectsLocationsWorkflowTemplatesDeleteCall {
9223 c := &ProjectsLocationsWorkflowTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9224 c.name = name
9225 return c
9226 }
9227
9228
9229
9230
9231 func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Version(version int64) *ProjectsLocationsWorkflowTemplatesDeleteCall {
9232 c.urlParams_.Set("version", fmt.Sprint(version))
9233 return c
9234 }
9235
9236
9237
9238
9239 func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesDeleteCall {
9240 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9241 return c
9242 }
9243
9244
9245 func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesDeleteCall {
9246 c.ctx_ = ctx
9247 return c
9248 }
9249
9250
9251
9252 func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Header() http.Header {
9253 if c.header_ == nil {
9254 c.header_ = make(http.Header)
9255 }
9256 return c.header_
9257 }
9258
9259 func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
9260 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9261 var body io.Reader = nil
9262 c.urlParams_.Set("alt", alt)
9263 c.urlParams_.Set("prettyPrint", "false")
9264 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9265 urls += "?" + c.urlParams_.Encode()
9266 req, err := http.NewRequest("DELETE", urls, body)
9267 if err != nil {
9268 return nil, err
9269 }
9270 req.Header = reqHeaders
9271 googleapi.Expand(req.URL, map[string]string{
9272 "name": c.name,
9273 })
9274 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9275 }
9276
9277
9278
9279
9280
9281
9282 func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9283 gensupport.SetOptions(c.urlParams_, opts...)
9284 res, err := c.doRequest("json")
9285 if res != nil && res.StatusCode == http.StatusNotModified {
9286 if res.Body != nil {
9287 res.Body.Close()
9288 }
9289 return nil, gensupport.WrapError(&googleapi.Error{
9290 Code: res.StatusCode,
9291 Header: res.Header,
9292 })
9293 }
9294 if err != nil {
9295 return nil, err
9296 }
9297 defer googleapi.CloseBody(res)
9298 if err := googleapi.CheckResponse(res); err != nil {
9299 return nil, gensupport.WrapError(err)
9300 }
9301 ret := &Empty{
9302 ServerResponse: googleapi.ServerResponse{
9303 Header: res.Header,
9304 HTTPStatusCode: res.StatusCode,
9305 },
9306 }
9307 target := &ret
9308 if err := gensupport.DecodeResponse(target, res); err != nil {
9309 return nil, err
9310 }
9311 return ret, nil
9312 }
9313
9314 type ProjectsLocationsWorkflowTemplatesGetCall struct {
9315 s *Service
9316 name string
9317 urlParams_ gensupport.URLParams
9318 ifNoneMatch_ string
9319 ctx_ context.Context
9320 header_ http.Header
9321 }
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334 func (r *ProjectsLocationsWorkflowTemplatesService) Get(name string) *ProjectsLocationsWorkflowTemplatesGetCall {
9335 c := &ProjectsLocationsWorkflowTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9336 c.name = name
9337 return c
9338 }
9339
9340
9341
9342
9343 func (c *ProjectsLocationsWorkflowTemplatesGetCall) Version(version int64) *ProjectsLocationsWorkflowTemplatesGetCall {
9344 c.urlParams_.Set("version", fmt.Sprint(version))
9345 return c
9346 }
9347
9348
9349
9350
9351 func (c *ProjectsLocationsWorkflowTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesGetCall {
9352 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9353 return c
9354 }
9355
9356
9357
9358
9359 func (c *ProjectsLocationsWorkflowTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesGetCall {
9360 c.ifNoneMatch_ = entityTag
9361 return c
9362 }
9363
9364
9365 func (c *ProjectsLocationsWorkflowTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesGetCall {
9366 c.ctx_ = ctx
9367 return c
9368 }
9369
9370
9371
9372 func (c *ProjectsLocationsWorkflowTemplatesGetCall) Header() http.Header {
9373 if c.header_ == nil {
9374 c.header_ = make(http.Header)
9375 }
9376 return c.header_
9377 }
9378
9379 func (c *ProjectsLocationsWorkflowTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
9380 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9381 if c.ifNoneMatch_ != "" {
9382 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9383 }
9384 var body io.Reader = nil
9385 c.urlParams_.Set("alt", alt)
9386 c.urlParams_.Set("prettyPrint", "false")
9387 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9388 urls += "?" + c.urlParams_.Encode()
9389 req, err := http.NewRequest("GET", urls, body)
9390 if err != nil {
9391 return nil, err
9392 }
9393 req.Header = reqHeaders
9394 googleapi.Expand(req.URL, map[string]string{
9395 "name": c.name,
9396 })
9397 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9398 }
9399
9400
9401
9402
9403
9404
9405
9406 func (c *ProjectsLocationsWorkflowTemplatesGetCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
9407 gensupport.SetOptions(c.urlParams_, opts...)
9408 res, err := c.doRequest("json")
9409 if res != nil && res.StatusCode == http.StatusNotModified {
9410 if res.Body != nil {
9411 res.Body.Close()
9412 }
9413 return nil, gensupport.WrapError(&googleapi.Error{
9414 Code: res.StatusCode,
9415 Header: res.Header,
9416 })
9417 }
9418 if err != nil {
9419 return nil, err
9420 }
9421 defer googleapi.CloseBody(res)
9422 if err := googleapi.CheckResponse(res); err != nil {
9423 return nil, gensupport.WrapError(err)
9424 }
9425 ret := &WorkflowTemplate{
9426 ServerResponse: googleapi.ServerResponse{
9427 Header: res.Header,
9428 HTTPStatusCode: res.StatusCode,
9429 },
9430 }
9431 target := &ret
9432 if err := gensupport.DecodeResponse(target, res); err != nil {
9433 return nil, err
9434 }
9435 return ret, nil
9436 }
9437
9438 type ProjectsLocationsWorkflowTemplatesGetIamPolicyCall struct {
9439 s *Service
9440 resource string
9441 getiampolicyrequest *GetIamPolicyRequest
9442 urlParams_ gensupport.URLParams
9443 ctx_ context.Context
9444 header_ http.Header
9445 }
9446
9447
9448
9449
9450
9451
9452
9453 func (r *ProjectsLocationsWorkflowTemplatesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
9454 c := &ProjectsLocationsWorkflowTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9455 c.resource = resource
9456 c.getiampolicyrequest = getiampolicyrequest
9457 return c
9458 }
9459
9460
9461
9462
9463 func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
9464 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9465 return c
9466 }
9467
9468
9469 func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
9470 c.ctx_ = ctx
9471 return c
9472 }
9473
9474
9475
9476 func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Header() http.Header {
9477 if c.header_ == nil {
9478 c.header_ = make(http.Header)
9479 }
9480 return c.header_
9481 }
9482
9483 func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9484 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9485 var body io.Reader = nil
9486 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
9487 if err != nil {
9488 return nil, err
9489 }
9490 c.urlParams_.Set("alt", alt)
9491 c.urlParams_.Set("prettyPrint", "false")
9492 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
9493 urls += "?" + c.urlParams_.Encode()
9494 req, err := http.NewRequest("POST", urls, body)
9495 if err != nil {
9496 return nil, err
9497 }
9498 req.Header = reqHeaders
9499 googleapi.Expand(req.URL, map[string]string{
9500 "resource": c.resource,
9501 })
9502 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9503 }
9504
9505
9506
9507
9508
9509
9510 func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9511 gensupport.SetOptions(c.urlParams_, opts...)
9512 res, err := c.doRequest("json")
9513 if res != nil && res.StatusCode == http.StatusNotModified {
9514 if res.Body != nil {
9515 res.Body.Close()
9516 }
9517 return nil, gensupport.WrapError(&googleapi.Error{
9518 Code: res.StatusCode,
9519 Header: res.Header,
9520 })
9521 }
9522 if err != nil {
9523 return nil, err
9524 }
9525 defer googleapi.CloseBody(res)
9526 if err := googleapi.CheckResponse(res); err != nil {
9527 return nil, gensupport.WrapError(err)
9528 }
9529 ret := &Policy{
9530 ServerResponse: googleapi.ServerResponse{
9531 Header: res.Header,
9532 HTTPStatusCode: res.StatusCode,
9533 },
9534 }
9535 target := &ret
9536 if err := gensupport.DecodeResponse(target, res); err != nil {
9537 return nil, err
9538 }
9539 return ret, nil
9540 }
9541
9542 type ProjectsLocationsWorkflowTemplatesInstantiateCall struct {
9543 s *Service
9544 name string
9545 instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest
9546 urlParams_ gensupport.URLParams
9547 ctx_ context.Context
9548 header_ http.Header
9549 }
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570 func (r *ProjectsLocationsWorkflowTemplatesService) Instantiate(name string, instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
9571 c := &ProjectsLocationsWorkflowTemplatesInstantiateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9572 c.name = name
9573 c.instantiateworkflowtemplaterequest = instantiateworkflowtemplaterequest
9574 return c
9575 }
9576
9577
9578
9579
9580 func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
9581 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9582 return c
9583 }
9584
9585
9586 func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
9587 c.ctx_ = ctx
9588 return c
9589 }
9590
9591
9592
9593 func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Header() http.Header {
9594 if c.header_ == nil {
9595 c.header_ = make(http.Header)
9596 }
9597 return c.header_
9598 }
9599
9600 func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) doRequest(alt string) (*http.Response, error) {
9601 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9602 var body io.Reader = nil
9603 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantiateworkflowtemplaterequest)
9604 if err != nil {
9605 return nil, err
9606 }
9607 c.urlParams_.Set("alt", alt)
9608 c.urlParams_.Set("prettyPrint", "false")
9609 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:instantiate")
9610 urls += "?" + c.urlParams_.Encode()
9611 req, err := http.NewRequest("POST", urls, body)
9612 if err != nil {
9613 return nil, err
9614 }
9615 req.Header = reqHeaders
9616 googleapi.Expand(req.URL, map[string]string{
9617 "name": c.name,
9618 })
9619 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9620 }
9621
9622
9623
9624
9625
9626
9627 func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9628 gensupport.SetOptions(c.urlParams_, opts...)
9629 res, err := c.doRequest("json")
9630 if res != nil && res.StatusCode == http.StatusNotModified {
9631 if res.Body != nil {
9632 res.Body.Close()
9633 }
9634 return nil, gensupport.WrapError(&googleapi.Error{
9635 Code: res.StatusCode,
9636 Header: res.Header,
9637 })
9638 }
9639 if err != nil {
9640 return nil, err
9641 }
9642 defer googleapi.CloseBody(res)
9643 if err := googleapi.CheckResponse(res); err != nil {
9644 return nil, gensupport.WrapError(err)
9645 }
9646 ret := &Operation{
9647 ServerResponse: googleapi.ServerResponse{
9648 Header: res.Header,
9649 HTTPStatusCode: res.StatusCode,
9650 },
9651 }
9652 target := &ret
9653 if err := gensupport.DecodeResponse(target, res); err != nil {
9654 return nil, err
9655 }
9656 return ret, nil
9657 }
9658
9659 type ProjectsLocationsWorkflowTemplatesInstantiateInlineCall struct {
9660 s *Service
9661 parent string
9662 workflowtemplate *WorkflowTemplate
9663 urlParams_ gensupport.URLParams
9664 ctx_ context.Context
9665 header_ http.Header
9666 }
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689 func (r *ProjectsLocationsWorkflowTemplatesService) InstantiateInline(parent string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
9690 c := &ProjectsLocationsWorkflowTemplatesInstantiateInlineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9691 c.parent = parent
9692 c.workflowtemplate = workflowtemplate
9693 return c
9694 }
9695
9696
9697
9698
9699
9700
9701
9702
9703 func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) RequestId(requestId string) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
9704 c.urlParams_.Set("requestId", requestId)
9705 return c
9706 }
9707
9708
9709
9710
9711 func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
9712 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9713 return c
9714 }
9715
9716
9717 func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
9718 c.ctx_ = ctx
9719 return c
9720 }
9721
9722
9723
9724 func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Header() http.Header {
9725 if c.header_ == nil {
9726 c.header_ = make(http.Header)
9727 }
9728 return c.header_
9729 }
9730
9731 func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) doRequest(alt string) (*http.Response, error) {
9732 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9733 var body io.Reader = nil
9734 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
9735 if err != nil {
9736 return nil, err
9737 }
9738 c.urlParams_.Set("alt", alt)
9739 c.urlParams_.Set("prettyPrint", "false")
9740 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates:instantiateInline")
9741 urls += "?" + c.urlParams_.Encode()
9742 req, err := http.NewRequest("POST", urls, body)
9743 if err != nil {
9744 return nil, err
9745 }
9746 req.Header = reqHeaders
9747 googleapi.Expand(req.URL, map[string]string{
9748 "parent": c.parent,
9749 })
9750 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9751 }
9752
9753
9754
9755
9756
9757
9758 func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9759 gensupport.SetOptions(c.urlParams_, opts...)
9760 res, err := c.doRequest("json")
9761 if res != nil && res.StatusCode == http.StatusNotModified {
9762 if res.Body != nil {
9763 res.Body.Close()
9764 }
9765 return nil, gensupport.WrapError(&googleapi.Error{
9766 Code: res.StatusCode,
9767 Header: res.Header,
9768 })
9769 }
9770 if err != nil {
9771 return nil, err
9772 }
9773 defer googleapi.CloseBody(res)
9774 if err := googleapi.CheckResponse(res); err != nil {
9775 return nil, gensupport.WrapError(err)
9776 }
9777 ret := &Operation{
9778 ServerResponse: googleapi.ServerResponse{
9779 Header: res.Header,
9780 HTTPStatusCode: res.StatusCode,
9781 },
9782 }
9783 target := &ret
9784 if err := gensupport.DecodeResponse(target, res); err != nil {
9785 return nil, err
9786 }
9787 return ret, nil
9788 }
9789
9790 type ProjectsLocationsWorkflowTemplatesListCall struct {
9791 s *Service
9792 parent string
9793 urlParams_ gensupport.URLParams
9794 ifNoneMatch_ string
9795 ctx_ context.Context
9796 header_ http.Header
9797 }
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808 func (r *ProjectsLocationsWorkflowTemplatesService) List(parent string) *ProjectsLocationsWorkflowTemplatesListCall {
9809 c := &ProjectsLocationsWorkflowTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9810 c.parent = parent
9811 return c
9812 }
9813
9814
9815
9816 func (c *ProjectsLocationsWorkflowTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowTemplatesListCall {
9817 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9818 return c
9819 }
9820
9821
9822
9823 func (c *ProjectsLocationsWorkflowTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowTemplatesListCall {
9824 c.urlParams_.Set("pageToken", pageToken)
9825 return c
9826 }
9827
9828
9829
9830
9831 func (c *ProjectsLocationsWorkflowTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesListCall {
9832 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9833 return c
9834 }
9835
9836
9837
9838
9839 func (c *ProjectsLocationsWorkflowTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesListCall {
9840 c.ifNoneMatch_ = entityTag
9841 return c
9842 }
9843
9844
9845 func (c *ProjectsLocationsWorkflowTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesListCall {
9846 c.ctx_ = ctx
9847 return c
9848 }
9849
9850
9851
9852 func (c *ProjectsLocationsWorkflowTemplatesListCall) Header() http.Header {
9853 if c.header_ == nil {
9854 c.header_ = make(http.Header)
9855 }
9856 return c.header_
9857 }
9858
9859 func (c *ProjectsLocationsWorkflowTemplatesListCall) doRequest(alt string) (*http.Response, error) {
9860 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9861 if c.ifNoneMatch_ != "" {
9862 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9863 }
9864 var body io.Reader = nil
9865 c.urlParams_.Set("alt", alt)
9866 c.urlParams_.Set("prettyPrint", "false")
9867 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates")
9868 urls += "?" + c.urlParams_.Encode()
9869 req, err := http.NewRequest("GET", urls, body)
9870 if err != nil {
9871 return nil, err
9872 }
9873 req.Header = reqHeaders
9874 googleapi.Expand(req.URL, map[string]string{
9875 "parent": c.parent,
9876 })
9877 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9878 }
9879
9880
9881
9882
9883
9884
9885
9886 func (c *ProjectsLocationsWorkflowTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListWorkflowTemplatesResponse, error) {
9887 gensupport.SetOptions(c.urlParams_, opts...)
9888 res, err := c.doRequest("json")
9889 if res != nil && res.StatusCode == http.StatusNotModified {
9890 if res.Body != nil {
9891 res.Body.Close()
9892 }
9893 return nil, gensupport.WrapError(&googleapi.Error{
9894 Code: res.StatusCode,
9895 Header: res.Header,
9896 })
9897 }
9898 if err != nil {
9899 return nil, err
9900 }
9901 defer googleapi.CloseBody(res)
9902 if err := googleapi.CheckResponse(res); err != nil {
9903 return nil, gensupport.WrapError(err)
9904 }
9905 ret := &ListWorkflowTemplatesResponse{
9906 ServerResponse: googleapi.ServerResponse{
9907 Header: res.Header,
9908 HTTPStatusCode: res.StatusCode,
9909 },
9910 }
9911 target := &ret
9912 if err := gensupport.DecodeResponse(target, res); err != nil {
9913 return nil, err
9914 }
9915 return ret, nil
9916 }
9917
9918
9919
9920
9921 func (c *ProjectsLocationsWorkflowTemplatesListCall) Pages(ctx context.Context, f func(*ListWorkflowTemplatesResponse) error) error {
9922 c.ctx_ = ctx
9923 defer c.PageToken(c.urlParams_.Get("pageToken"))
9924 for {
9925 x, err := c.Do()
9926 if err != nil {
9927 return err
9928 }
9929 if err := f(x); err != nil {
9930 return err
9931 }
9932 if x.NextPageToken == "" {
9933 return nil
9934 }
9935 c.PageToken(x.NextPageToken)
9936 }
9937 }
9938
9939 type ProjectsLocationsWorkflowTemplatesSetIamPolicyCall struct {
9940 s *Service
9941 resource string
9942 setiampolicyrequest *SetIamPolicyRequest
9943 urlParams_ gensupport.URLParams
9944 ctx_ context.Context
9945 header_ http.Header
9946 }
9947
9948
9949
9950
9951
9952
9953
9954
9955 func (r *ProjectsLocationsWorkflowTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
9956 c := &ProjectsLocationsWorkflowTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9957 c.resource = resource
9958 c.setiampolicyrequest = setiampolicyrequest
9959 return c
9960 }
9961
9962
9963
9964
9965 func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
9966 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9967 return c
9968 }
9969
9970
9971 func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
9972 c.ctx_ = ctx
9973 return c
9974 }
9975
9976
9977
9978 func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Header() http.Header {
9979 if c.header_ == nil {
9980 c.header_ = make(http.Header)
9981 }
9982 return c.header_
9983 }
9984
9985 func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9987 var body io.Reader = nil
9988 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
9989 if err != nil {
9990 return nil, err
9991 }
9992 c.urlParams_.Set("alt", alt)
9993 c.urlParams_.Set("prettyPrint", "false")
9994 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
9995 urls += "?" + c.urlParams_.Encode()
9996 req, err := http.NewRequest("POST", urls, body)
9997 if err != nil {
9998 return nil, err
9999 }
10000 req.Header = reqHeaders
10001 googleapi.Expand(req.URL, map[string]string{
10002 "resource": c.resource,
10003 })
10004 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10005 }
10006
10007
10008
10009
10010
10011
10012 func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10013 gensupport.SetOptions(c.urlParams_, opts...)
10014 res, err := c.doRequest("json")
10015 if res != nil && res.StatusCode == http.StatusNotModified {
10016 if res.Body != nil {
10017 res.Body.Close()
10018 }
10019 return nil, gensupport.WrapError(&googleapi.Error{
10020 Code: res.StatusCode,
10021 Header: res.Header,
10022 })
10023 }
10024 if err != nil {
10025 return nil, err
10026 }
10027 defer googleapi.CloseBody(res)
10028 if err := googleapi.CheckResponse(res); err != nil {
10029 return nil, gensupport.WrapError(err)
10030 }
10031 ret := &Policy{
10032 ServerResponse: googleapi.ServerResponse{
10033 Header: res.Header,
10034 HTTPStatusCode: res.StatusCode,
10035 },
10036 }
10037 target := &ret
10038 if err := gensupport.DecodeResponse(target, res); err != nil {
10039 return nil, err
10040 }
10041 return ret, nil
10042 }
10043
10044 type ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall struct {
10045 s *Service
10046 resource string
10047 testiampermissionsrequest *TestIamPermissionsRequest
10048 urlParams_ gensupport.URLParams
10049 ctx_ context.Context
10050 header_ http.Header
10051 }
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063 func (r *ProjectsLocationsWorkflowTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
10064 c := &ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10065 c.resource = resource
10066 c.testiampermissionsrequest = testiampermissionsrequest
10067 return c
10068 }
10069
10070
10071
10072
10073 func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
10074 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10075 return c
10076 }
10077
10078
10079 func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
10080 c.ctx_ = ctx
10081 return c
10082 }
10083
10084
10085
10086 func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Header() http.Header {
10087 if c.header_ == nil {
10088 c.header_ = make(http.Header)
10089 }
10090 return c.header_
10091 }
10092
10093 func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
10094 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10095 var body io.Reader = nil
10096 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
10097 if err != nil {
10098 return nil, err
10099 }
10100 c.urlParams_.Set("alt", alt)
10101 c.urlParams_.Set("prettyPrint", "false")
10102 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
10103 urls += "?" + c.urlParams_.Encode()
10104 req, err := http.NewRequest("POST", urls, body)
10105 if err != nil {
10106 return nil, err
10107 }
10108 req.Header = reqHeaders
10109 googleapi.Expand(req.URL, map[string]string{
10110 "resource": c.resource,
10111 })
10112 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10113 }
10114
10115
10116
10117
10118
10119
10120
10121 func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
10122 gensupport.SetOptions(c.urlParams_, opts...)
10123 res, err := c.doRequest("json")
10124 if res != nil && res.StatusCode == http.StatusNotModified {
10125 if res.Body != nil {
10126 res.Body.Close()
10127 }
10128 return nil, gensupport.WrapError(&googleapi.Error{
10129 Code: res.StatusCode,
10130 Header: res.Header,
10131 })
10132 }
10133 if err != nil {
10134 return nil, err
10135 }
10136 defer googleapi.CloseBody(res)
10137 if err := googleapi.CheckResponse(res); err != nil {
10138 return nil, gensupport.WrapError(err)
10139 }
10140 ret := &TestIamPermissionsResponse{
10141 ServerResponse: googleapi.ServerResponse{
10142 Header: res.Header,
10143 HTTPStatusCode: res.StatusCode,
10144 },
10145 }
10146 target := &ret
10147 if err := gensupport.DecodeResponse(target, res); err != nil {
10148 return nil, err
10149 }
10150 return ret, nil
10151 }
10152
10153 type ProjectsLocationsWorkflowTemplatesUpdateCall struct {
10154 s *Service
10155 name string
10156 workflowtemplate *WorkflowTemplate
10157 urlParams_ gensupport.URLParams
10158 ctx_ context.Context
10159 header_ http.Header
10160 }
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173 func (r *ProjectsLocationsWorkflowTemplatesService) Update(name string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesUpdateCall {
10174 c := &ProjectsLocationsWorkflowTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10175 c.name = name
10176 c.workflowtemplate = workflowtemplate
10177 return c
10178 }
10179
10180
10181
10182
10183 func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesUpdateCall {
10184 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10185 return c
10186 }
10187
10188
10189 func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesUpdateCall {
10190 c.ctx_ = ctx
10191 return c
10192 }
10193
10194
10195
10196 func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Header() http.Header {
10197 if c.header_ == nil {
10198 c.header_ = make(http.Header)
10199 }
10200 return c.header_
10201 }
10202
10203 func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
10204 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10205 var body io.Reader = nil
10206 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
10207 if err != nil {
10208 return nil, err
10209 }
10210 c.urlParams_.Set("alt", alt)
10211 c.urlParams_.Set("prettyPrint", "false")
10212 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10213 urls += "?" + c.urlParams_.Encode()
10214 req, err := http.NewRequest("PUT", urls, body)
10215 if err != nil {
10216 return nil, err
10217 }
10218 req.Header = reqHeaders
10219 googleapi.Expand(req.URL, map[string]string{
10220 "name": c.name,
10221 })
10222 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10223 }
10224
10225
10226
10227
10228
10229
10230
10231 func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
10232 gensupport.SetOptions(c.urlParams_, opts...)
10233 res, err := c.doRequest("json")
10234 if res != nil && res.StatusCode == http.StatusNotModified {
10235 if res.Body != nil {
10236 res.Body.Close()
10237 }
10238 return nil, gensupport.WrapError(&googleapi.Error{
10239 Code: res.StatusCode,
10240 Header: res.Header,
10241 })
10242 }
10243 if err != nil {
10244 return nil, err
10245 }
10246 defer googleapi.CloseBody(res)
10247 if err := googleapi.CheckResponse(res); err != nil {
10248 return nil, gensupport.WrapError(err)
10249 }
10250 ret := &WorkflowTemplate{
10251 ServerResponse: googleapi.ServerResponse{
10252 Header: res.Header,
10253 HTTPStatusCode: res.StatusCode,
10254 },
10255 }
10256 target := &ret
10257 if err := gensupport.DecodeResponse(target, res); err != nil {
10258 return nil, err
10259 }
10260 return ret, nil
10261 }
10262
10263 type ProjectsRegionsAutoscalingPoliciesCreateCall struct {
10264 s *Service
10265 parent string
10266 autoscalingpolicy *AutoscalingPolicy
10267 urlParams_ gensupport.URLParams
10268 ctx_ context.Context
10269 header_ http.Header
10270 }
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281 func (r *ProjectsRegionsAutoscalingPoliciesService) Create(parent string, autoscalingpolicy *AutoscalingPolicy) *ProjectsRegionsAutoscalingPoliciesCreateCall {
10282 c := &ProjectsRegionsAutoscalingPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10283 c.parent = parent
10284 c.autoscalingpolicy = autoscalingpolicy
10285 return c
10286 }
10287
10288
10289
10290
10291 func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesCreateCall {
10292 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10293 return c
10294 }
10295
10296
10297 func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesCreateCall {
10298 c.ctx_ = ctx
10299 return c
10300 }
10301
10302
10303
10304 func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Header() http.Header {
10305 if c.header_ == nil {
10306 c.header_ = make(http.Header)
10307 }
10308 return c.header_
10309 }
10310
10311 func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
10312 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10313 var body io.Reader = nil
10314 body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
10315 if err != nil {
10316 return nil, err
10317 }
10318 c.urlParams_.Set("alt", alt)
10319 c.urlParams_.Set("prettyPrint", "false")
10320 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autoscalingPolicies")
10321 urls += "?" + c.urlParams_.Encode()
10322 req, err := http.NewRequest("POST", urls, body)
10323 if err != nil {
10324 return nil, err
10325 }
10326 req.Header = reqHeaders
10327 googleapi.Expand(req.URL, map[string]string{
10328 "parent": c.parent,
10329 })
10330 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10331 }
10332
10333
10334
10335
10336
10337
10338
10339 func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
10340 gensupport.SetOptions(c.urlParams_, opts...)
10341 res, err := c.doRequest("json")
10342 if res != nil && res.StatusCode == http.StatusNotModified {
10343 if res.Body != nil {
10344 res.Body.Close()
10345 }
10346 return nil, gensupport.WrapError(&googleapi.Error{
10347 Code: res.StatusCode,
10348 Header: res.Header,
10349 })
10350 }
10351 if err != nil {
10352 return nil, err
10353 }
10354 defer googleapi.CloseBody(res)
10355 if err := googleapi.CheckResponse(res); err != nil {
10356 return nil, gensupport.WrapError(err)
10357 }
10358 ret := &AutoscalingPolicy{
10359 ServerResponse: googleapi.ServerResponse{
10360 Header: res.Header,
10361 HTTPStatusCode: res.StatusCode,
10362 },
10363 }
10364 target := &ret
10365 if err := gensupport.DecodeResponse(target, res); err != nil {
10366 return nil, err
10367 }
10368 return ret, nil
10369 }
10370
10371 type ProjectsRegionsAutoscalingPoliciesDeleteCall struct {
10372 s *Service
10373 name string
10374 urlParams_ gensupport.URLParams
10375 ctx_ context.Context
10376 header_ http.Header
10377 }
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390 func (r *ProjectsRegionsAutoscalingPoliciesService) Delete(name string) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
10391 c := &ProjectsRegionsAutoscalingPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10392 c.name = name
10393 return c
10394 }
10395
10396
10397
10398
10399 func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
10400 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10401 return c
10402 }
10403
10404
10405 func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
10406 c.ctx_ = ctx
10407 return c
10408 }
10409
10410
10411
10412 func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Header() http.Header {
10413 if c.header_ == nil {
10414 c.header_ = make(http.Header)
10415 }
10416 return c.header_
10417 }
10418
10419 func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
10420 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10421 var body io.Reader = nil
10422 c.urlParams_.Set("alt", alt)
10423 c.urlParams_.Set("prettyPrint", "false")
10424 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10425 urls += "?" + c.urlParams_.Encode()
10426 req, err := http.NewRequest("DELETE", urls, body)
10427 if err != nil {
10428 return nil, err
10429 }
10430 req.Header = reqHeaders
10431 googleapi.Expand(req.URL, map[string]string{
10432 "name": c.name,
10433 })
10434 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10435 }
10436
10437
10438
10439
10440
10441
10442 func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10443 gensupport.SetOptions(c.urlParams_, opts...)
10444 res, err := c.doRequest("json")
10445 if res != nil && res.StatusCode == http.StatusNotModified {
10446 if res.Body != nil {
10447 res.Body.Close()
10448 }
10449 return nil, gensupport.WrapError(&googleapi.Error{
10450 Code: res.StatusCode,
10451 Header: res.Header,
10452 })
10453 }
10454 if err != nil {
10455 return nil, err
10456 }
10457 defer googleapi.CloseBody(res)
10458 if err := googleapi.CheckResponse(res); err != nil {
10459 return nil, gensupport.WrapError(err)
10460 }
10461 ret := &Empty{
10462 ServerResponse: googleapi.ServerResponse{
10463 Header: res.Header,
10464 HTTPStatusCode: res.StatusCode,
10465 },
10466 }
10467 target := &ret
10468 if err := gensupport.DecodeResponse(target, res); err != nil {
10469 return nil, err
10470 }
10471 return ret, nil
10472 }
10473
10474 type ProjectsRegionsAutoscalingPoliciesGetCall struct {
10475 s *Service
10476 name string
10477 urlParams_ gensupport.URLParams
10478 ifNoneMatch_ string
10479 ctx_ context.Context
10480 header_ http.Header
10481 }
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493 func (r *ProjectsRegionsAutoscalingPoliciesService) Get(name string) *ProjectsRegionsAutoscalingPoliciesGetCall {
10494 c := &ProjectsRegionsAutoscalingPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10495 c.name = name
10496 return c
10497 }
10498
10499
10500
10501
10502 func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesGetCall {
10503 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10504 return c
10505 }
10506
10507
10508
10509
10510 func (c *ProjectsRegionsAutoscalingPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesGetCall {
10511 c.ifNoneMatch_ = entityTag
10512 return c
10513 }
10514
10515
10516 func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesGetCall {
10517 c.ctx_ = ctx
10518 return c
10519 }
10520
10521
10522
10523 func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Header() http.Header {
10524 if c.header_ == nil {
10525 c.header_ = make(http.Header)
10526 }
10527 return c.header_
10528 }
10529
10530 func (c *ProjectsRegionsAutoscalingPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
10531 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10532 if c.ifNoneMatch_ != "" {
10533 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10534 }
10535 var body io.Reader = nil
10536 c.urlParams_.Set("alt", alt)
10537 c.urlParams_.Set("prettyPrint", "false")
10538 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10539 urls += "?" + c.urlParams_.Encode()
10540 req, err := http.NewRequest("GET", urls, body)
10541 if err != nil {
10542 return nil, err
10543 }
10544 req.Header = reqHeaders
10545 googleapi.Expand(req.URL, map[string]string{
10546 "name": c.name,
10547 })
10548 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10549 }
10550
10551
10552
10553
10554
10555
10556
10557 func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
10558 gensupport.SetOptions(c.urlParams_, opts...)
10559 res, err := c.doRequest("json")
10560 if res != nil && res.StatusCode == http.StatusNotModified {
10561 if res.Body != nil {
10562 res.Body.Close()
10563 }
10564 return nil, gensupport.WrapError(&googleapi.Error{
10565 Code: res.StatusCode,
10566 Header: res.Header,
10567 })
10568 }
10569 if err != nil {
10570 return nil, err
10571 }
10572 defer googleapi.CloseBody(res)
10573 if err := googleapi.CheckResponse(res); err != nil {
10574 return nil, gensupport.WrapError(err)
10575 }
10576 ret := &AutoscalingPolicy{
10577 ServerResponse: googleapi.ServerResponse{
10578 Header: res.Header,
10579 HTTPStatusCode: res.StatusCode,
10580 },
10581 }
10582 target := &ret
10583 if err := gensupport.DecodeResponse(target, res); err != nil {
10584 return nil, err
10585 }
10586 return ret, nil
10587 }
10588
10589 type ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall struct {
10590 s *Service
10591 resource string
10592 getiampolicyrequest *GetIamPolicyRequest
10593 urlParams_ gensupport.URLParams
10594 ctx_ context.Context
10595 header_ http.Header
10596 }
10597
10598
10599
10600
10601
10602
10603
10604 func (r *ProjectsRegionsAutoscalingPoliciesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
10605 c := &ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10606 c.resource = resource
10607 c.getiampolicyrequest = getiampolicyrequest
10608 return c
10609 }
10610
10611
10612
10613
10614 func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
10615 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10616 return c
10617 }
10618
10619
10620 func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
10621 c.ctx_ = ctx
10622 return c
10623 }
10624
10625
10626
10627 func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Header() http.Header {
10628 if c.header_ == nil {
10629 c.header_ = make(http.Header)
10630 }
10631 return c.header_
10632 }
10633
10634 func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10635 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10636 var body io.Reader = nil
10637 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
10638 if err != nil {
10639 return nil, err
10640 }
10641 c.urlParams_.Set("alt", alt)
10642 c.urlParams_.Set("prettyPrint", "false")
10643 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
10644 urls += "?" + c.urlParams_.Encode()
10645 req, err := http.NewRequest("POST", urls, body)
10646 if err != nil {
10647 return nil, err
10648 }
10649 req.Header = reqHeaders
10650 googleapi.Expand(req.URL, map[string]string{
10651 "resource": c.resource,
10652 })
10653 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10654 }
10655
10656
10657
10658
10659
10660
10661 func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10662 gensupport.SetOptions(c.urlParams_, opts...)
10663 res, err := c.doRequest("json")
10664 if res != nil && res.StatusCode == http.StatusNotModified {
10665 if res.Body != nil {
10666 res.Body.Close()
10667 }
10668 return nil, gensupport.WrapError(&googleapi.Error{
10669 Code: res.StatusCode,
10670 Header: res.Header,
10671 })
10672 }
10673 if err != nil {
10674 return nil, err
10675 }
10676 defer googleapi.CloseBody(res)
10677 if err := googleapi.CheckResponse(res); err != nil {
10678 return nil, gensupport.WrapError(err)
10679 }
10680 ret := &Policy{
10681 ServerResponse: googleapi.ServerResponse{
10682 Header: res.Header,
10683 HTTPStatusCode: res.StatusCode,
10684 },
10685 }
10686 target := &ret
10687 if err := gensupport.DecodeResponse(target, res); err != nil {
10688 return nil, err
10689 }
10690 return ret, nil
10691 }
10692
10693 type ProjectsRegionsAutoscalingPoliciesListCall struct {
10694 s *Service
10695 parent string
10696 urlParams_ gensupport.URLParams
10697 ifNoneMatch_ string
10698 ctx_ context.Context
10699 header_ http.Header
10700 }
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711 func (r *ProjectsRegionsAutoscalingPoliciesService) List(parent string) *ProjectsRegionsAutoscalingPoliciesListCall {
10712 c := &ProjectsRegionsAutoscalingPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10713 c.parent = parent
10714 return c
10715 }
10716
10717
10718
10719
10720 func (c *ProjectsRegionsAutoscalingPoliciesListCall) PageSize(pageSize int64) *ProjectsRegionsAutoscalingPoliciesListCall {
10721 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10722 return c
10723 }
10724
10725
10726
10727 func (c *ProjectsRegionsAutoscalingPoliciesListCall) PageToken(pageToken string) *ProjectsRegionsAutoscalingPoliciesListCall {
10728 c.urlParams_.Set("pageToken", pageToken)
10729 return c
10730 }
10731
10732
10733
10734
10735 func (c *ProjectsRegionsAutoscalingPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesListCall {
10736 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10737 return c
10738 }
10739
10740
10741
10742
10743 func (c *ProjectsRegionsAutoscalingPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesListCall {
10744 c.ifNoneMatch_ = entityTag
10745 return c
10746 }
10747
10748
10749 func (c *ProjectsRegionsAutoscalingPoliciesListCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesListCall {
10750 c.ctx_ = ctx
10751 return c
10752 }
10753
10754
10755
10756 func (c *ProjectsRegionsAutoscalingPoliciesListCall) Header() http.Header {
10757 if c.header_ == nil {
10758 c.header_ = make(http.Header)
10759 }
10760 return c.header_
10761 }
10762
10763 func (c *ProjectsRegionsAutoscalingPoliciesListCall) doRequest(alt string) (*http.Response, error) {
10764 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10765 if c.ifNoneMatch_ != "" {
10766 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10767 }
10768 var body io.Reader = nil
10769 c.urlParams_.Set("alt", alt)
10770 c.urlParams_.Set("prettyPrint", "false")
10771 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autoscalingPolicies")
10772 urls += "?" + c.urlParams_.Encode()
10773 req, err := http.NewRequest("GET", urls, body)
10774 if err != nil {
10775 return nil, err
10776 }
10777 req.Header = reqHeaders
10778 googleapi.Expand(req.URL, map[string]string{
10779 "parent": c.parent,
10780 })
10781 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10782 }
10783
10784
10785
10786
10787
10788
10789
10790 func (c *ProjectsRegionsAutoscalingPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAutoscalingPoliciesResponse, error) {
10791 gensupport.SetOptions(c.urlParams_, opts...)
10792 res, err := c.doRequest("json")
10793 if res != nil && res.StatusCode == http.StatusNotModified {
10794 if res.Body != nil {
10795 res.Body.Close()
10796 }
10797 return nil, gensupport.WrapError(&googleapi.Error{
10798 Code: res.StatusCode,
10799 Header: res.Header,
10800 })
10801 }
10802 if err != nil {
10803 return nil, err
10804 }
10805 defer googleapi.CloseBody(res)
10806 if err := googleapi.CheckResponse(res); err != nil {
10807 return nil, gensupport.WrapError(err)
10808 }
10809 ret := &ListAutoscalingPoliciesResponse{
10810 ServerResponse: googleapi.ServerResponse{
10811 Header: res.Header,
10812 HTTPStatusCode: res.StatusCode,
10813 },
10814 }
10815 target := &ret
10816 if err := gensupport.DecodeResponse(target, res); err != nil {
10817 return nil, err
10818 }
10819 return ret, nil
10820 }
10821
10822
10823
10824
10825 func (c *ProjectsRegionsAutoscalingPoliciesListCall) Pages(ctx context.Context, f func(*ListAutoscalingPoliciesResponse) error) error {
10826 c.ctx_ = ctx
10827 defer c.PageToken(c.urlParams_.Get("pageToken"))
10828 for {
10829 x, err := c.Do()
10830 if err != nil {
10831 return err
10832 }
10833 if err := f(x); err != nil {
10834 return err
10835 }
10836 if x.NextPageToken == "" {
10837 return nil
10838 }
10839 c.PageToken(x.NextPageToken)
10840 }
10841 }
10842
10843 type ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall struct {
10844 s *Service
10845 resource string
10846 setiampolicyrequest *SetIamPolicyRequest
10847 urlParams_ gensupport.URLParams
10848 ctx_ context.Context
10849 header_ http.Header
10850 }
10851
10852
10853
10854
10855
10856
10857
10858
10859 func (r *ProjectsRegionsAutoscalingPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
10860 c := &ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10861 c.resource = resource
10862 c.setiampolicyrequest = setiampolicyrequest
10863 return c
10864 }
10865
10866
10867
10868
10869 func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
10870 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10871 return c
10872 }
10873
10874
10875 func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
10876 c.ctx_ = ctx
10877 return c
10878 }
10879
10880
10881
10882 func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Header() http.Header {
10883 if c.header_ == nil {
10884 c.header_ = make(http.Header)
10885 }
10886 return c.header_
10887 }
10888
10889 func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10890 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10891 var body io.Reader = nil
10892 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
10893 if err != nil {
10894 return nil, err
10895 }
10896 c.urlParams_.Set("alt", alt)
10897 c.urlParams_.Set("prettyPrint", "false")
10898 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
10899 urls += "?" + c.urlParams_.Encode()
10900 req, err := http.NewRequest("POST", urls, body)
10901 if err != nil {
10902 return nil, err
10903 }
10904 req.Header = reqHeaders
10905 googleapi.Expand(req.URL, map[string]string{
10906 "resource": c.resource,
10907 })
10908 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10909 }
10910
10911
10912
10913
10914
10915
10916 func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10917 gensupport.SetOptions(c.urlParams_, opts...)
10918 res, err := c.doRequest("json")
10919 if res != nil && res.StatusCode == http.StatusNotModified {
10920 if res.Body != nil {
10921 res.Body.Close()
10922 }
10923 return nil, gensupport.WrapError(&googleapi.Error{
10924 Code: res.StatusCode,
10925 Header: res.Header,
10926 })
10927 }
10928 if err != nil {
10929 return nil, err
10930 }
10931 defer googleapi.CloseBody(res)
10932 if err := googleapi.CheckResponse(res); err != nil {
10933 return nil, gensupport.WrapError(err)
10934 }
10935 ret := &Policy{
10936 ServerResponse: googleapi.ServerResponse{
10937 Header: res.Header,
10938 HTTPStatusCode: res.StatusCode,
10939 },
10940 }
10941 target := &ret
10942 if err := gensupport.DecodeResponse(target, res); err != nil {
10943 return nil, err
10944 }
10945 return ret, nil
10946 }
10947
10948 type ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall struct {
10949 s *Service
10950 resource string
10951 testiampermissionsrequest *TestIamPermissionsRequest
10952 urlParams_ gensupport.URLParams
10953 ctx_ context.Context
10954 header_ http.Header
10955 }
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967 func (r *ProjectsRegionsAutoscalingPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
10968 c := &ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10969 c.resource = resource
10970 c.testiampermissionsrequest = testiampermissionsrequest
10971 return c
10972 }
10973
10974
10975
10976
10977 func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
10978 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10979 return c
10980 }
10981
10982
10983 func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
10984 c.ctx_ = ctx
10985 return c
10986 }
10987
10988
10989
10990 func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Header() http.Header {
10991 if c.header_ == nil {
10992 c.header_ = make(http.Header)
10993 }
10994 return c.header_
10995 }
10996
10997 func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
10998 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10999 var body io.Reader = nil
11000 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
11001 if err != nil {
11002 return nil, err
11003 }
11004 c.urlParams_.Set("alt", alt)
11005 c.urlParams_.Set("prettyPrint", "false")
11006 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
11007 urls += "?" + c.urlParams_.Encode()
11008 req, err := http.NewRequest("POST", urls, body)
11009 if err != nil {
11010 return nil, err
11011 }
11012 req.Header = reqHeaders
11013 googleapi.Expand(req.URL, map[string]string{
11014 "resource": c.resource,
11015 })
11016 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11017 }
11018
11019
11020
11021
11022
11023
11024
11025 func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
11026 gensupport.SetOptions(c.urlParams_, opts...)
11027 res, err := c.doRequest("json")
11028 if res != nil && res.StatusCode == http.StatusNotModified {
11029 if res.Body != nil {
11030 res.Body.Close()
11031 }
11032 return nil, gensupport.WrapError(&googleapi.Error{
11033 Code: res.StatusCode,
11034 Header: res.Header,
11035 })
11036 }
11037 if err != nil {
11038 return nil, err
11039 }
11040 defer googleapi.CloseBody(res)
11041 if err := googleapi.CheckResponse(res); err != nil {
11042 return nil, gensupport.WrapError(err)
11043 }
11044 ret := &TestIamPermissionsResponse{
11045 ServerResponse: googleapi.ServerResponse{
11046 Header: res.Header,
11047 HTTPStatusCode: res.StatusCode,
11048 },
11049 }
11050 target := &ret
11051 if err := gensupport.DecodeResponse(target, res); err != nil {
11052 return nil, err
11053 }
11054 return ret, nil
11055 }
11056
11057 type ProjectsRegionsAutoscalingPoliciesUpdateCall struct {
11058 s *Service
11059 name string
11060 autoscalingpolicy *AutoscalingPolicy
11061 urlParams_ gensupport.URLParams
11062 ctx_ context.Context
11063 header_ http.Header
11064 }
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077 func (r *ProjectsRegionsAutoscalingPoliciesService) Update(name string, autoscalingpolicy *AutoscalingPolicy) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
11078 c := &ProjectsRegionsAutoscalingPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11079 c.name = name
11080 c.autoscalingpolicy = autoscalingpolicy
11081 return c
11082 }
11083
11084
11085
11086
11087 func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
11088 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11089 return c
11090 }
11091
11092
11093 func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
11094 c.ctx_ = ctx
11095 return c
11096 }
11097
11098
11099
11100 func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Header() http.Header {
11101 if c.header_ == nil {
11102 c.header_ = make(http.Header)
11103 }
11104 return c.header_
11105 }
11106
11107 func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
11108 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11109 var body io.Reader = nil
11110 body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
11111 if err != nil {
11112 return nil, err
11113 }
11114 c.urlParams_.Set("alt", alt)
11115 c.urlParams_.Set("prettyPrint", "false")
11116 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11117 urls += "?" + c.urlParams_.Encode()
11118 req, err := http.NewRequest("PUT", urls, body)
11119 if err != nil {
11120 return nil, err
11121 }
11122 req.Header = reqHeaders
11123 googleapi.Expand(req.URL, map[string]string{
11124 "name": c.name,
11125 })
11126 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11127 }
11128
11129
11130
11131
11132
11133
11134
11135 func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
11136 gensupport.SetOptions(c.urlParams_, opts...)
11137 res, err := c.doRequest("json")
11138 if res != nil && res.StatusCode == http.StatusNotModified {
11139 if res.Body != nil {
11140 res.Body.Close()
11141 }
11142 return nil, gensupport.WrapError(&googleapi.Error{
11143 Code: res.StatusCode,
11144 Header: res.Header,
11145 })
11146 }
11147 if err != nil {
11148 return nil, err
11149 }
11150 defer googleapi.CloseBody(res)
11151 if err := googleapi.CheckResponse(res); err != nil {
11152 return nil, gensupport.WrapError(err)
11153 }
11154 ret := &AutoscalingPolicy{
11155 ServerResponse: googleapi.ServerResponse{
11156 Header: res.Header,
11157 HTTPStatusCode: res.StatusCode,
11158 },
11159 }
11160 target := &ret
11161 if err := gensupport.DecodeResponse(target, res); err != nil {
11162 return nil, err
11163 }
11164 return ret, nil
11165 }
11166
11167 type ProjectsRegionsClustersCreateCall struct {
11168 s *Service
11169 projectId string
11170 region string
11171 cluster *Cluster
11172 urlParams_ gensupport.URLParams
11173 ctx_ context.Context
11174 header_ http.Header
11175 }
11176
11177
11178
11179
11180
11181
11182
11183
11184 func (r *ProjectsRegionsClustersService) Create(projectId string, region string, cluster *Cluster) *ProjectsRegionsClustersCreateCall {
11185 c := &ProjectsRegionsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11186 c.projectId = projectId
11187 c.region = region
11188 c.cluster = cluster
11189 return c
11190 }
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207 func (c *ProjectsRegionsClustersCreateCall) ActionOnFailedPrimaryWorkers(actionOnFailedPrimaryWorkers string) *ProjectsRegionsClustersCreateCall {
11208 c.urlParams_.Set("actionOnFailedPrimaryWorkers", actionOnFailedPrimaryWorkers)
11209 return c
11210 }
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221 func (c *ProjectsRegionsClustersCreateCall) RequestId(requestId string) *ProjectsRegionsClustersCreateCall {
11222 c.urlParams_.Set("requestId", requestId)
11223 return c
11224 }
11225
11226
11227
11228
11229 func (c *ProjectsRegionsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersCreateCall {
11230 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11231 return c
11232 }
11233
11234
11235 func (c *ProjectsRegionsClustersCreateCall) Context(ctx context.Context) *ProjectsRegionsClustersCreateCall {
11236 c.ctx_ = ctx
11237 return c
11238 }
11239
11240
11241
11242 func (c *ProjectsRegionsClustersCreateCall) Header() http.Header {
11243 if c.header_ == nil {
11244 c.header_ = make(http.Header)
11245 }
11246 return c.header_
11247 }
11248
11249 func (c *ProjectsRegionsClustersCreateCall) doRequest(alt string) (*http.Response, error) {
11250 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11251 var body io.Reader = nil
11252 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
11253 if err != nil {
11254 return nil, err
11255 }
11256 c.urlParams_.Set("alt", alt)
11257 c.urlParams_.Set("prettyPrint", "false")
11258 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters")
11259 urls += "?" + c.urlParams_.Encode()
11260 req, err := http.NewRequest("POST", urls, body)
11261 if err != nil {
11262 return nil, err
11263 }
11264 req.Header = reqHeaders
11265 googleapi.Expand(req.URL, map[string]string{
11266 "projectId": c.projectId,
11267 "region": c.region,
11268 })
11269 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11270 }
11271
11272
11273
11274
11275
11276
11277 func (c *ProjectsRegionsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11278 gensupport.SetOptions(c.urlParams_, opts...)
11279 res, err := c.doRequest("json")
11280 if res != nil && res.StatusCode == http.StatusNotModified {
11281 if res.Body != nil {
11282 res.Body.Close()
11283 }
11284 return nil, gensupport.WrapError(&googleapi.Error{
11285 Code: res.StatusCode,
11286 Header: res.Header,
11287 })
11288 }
11289 if err != nil {
11290 return nil, err
11291 }
11292 defer googleapi.CloseBody(res)
11293 if err := googleapi.CheckResponse(res); err != nil {
11294 return nil, gensupport.WrapError(err)
11295 }
11296 ret := &Operation{
11297 ServerResponse: googleapi.ServerResponse{
11298 Header: res.Header,
11299 HTTPStatusCode: res.StatusCode,
11300 },
11301 }
11302 target := &ret
11303 if err := gensupport.DecodeResponse(target, res); err != nil {
11304 return nil, err
11305 }
11306 return ret, nil
11307 }
11308
11309 type ProjectsRegionsClustersDeleteCall struct {
11310 s *Service
11311 projectId string
11312 region string
11313 clusterName string
11314 urlParams_ gensupport.URLParams
11315 ctx_ context.Context
11316 header_ http.Header
11317 }
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327 func (r *ProjectsRegionsClustersService) Delete(projectId string, region string, clusterName string) *ProjectsRegionsClustersDeleteCall {
11328 c := &ProjectsRegionsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11329 c.projectId = projectId
11330 c.region = region
11331 c.clusterName = clusterName
11332 return c
11333 }
11334
11335
11336
11337
11338 func (c *ProjectsRegionsClustersDeleteCall) ClusterUuid(clusterUuid string) *ProjectsRegionsClustersDeleteCall {
11339 c.urlParams_.Set("clusterUuid", clusterUuid)
11340 return c
11341 }
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351 func (c *ProjectsRegionsClustersDeleteCall) GracefulTerminationTimeout(gracefulTerminationTimeout string) *ProjectsRegionsClustersDeleteCall {
11352 c.urlParams_.Set("gracefulTerminationTimeout", gracefulTerminationTimeout)
11353 return c
11354 }
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365 func (c *ProjectsRegionsClustersDeleteCall) RequestId(requestId string) *ProjectsRegionsClustersDeleteCall {
11366 c.urlParams_.Set("requestId", requestId)
11367 return c
11368 }
11369
11370
11371
11372
11373 func (c *ProjectsRegionsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDeleteCall {
11374 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11375 return c
11376 }
11377
11378
11379 func (c *ProjectsRegionsClustersDeleteCall) Context(ctx context.Context) *ProjectsRegionsClustersDeleteCall {
11380 c.ctx_ = ctx
11381 return c
11382 }
11383
11384
11385
11386 func (c *ProjectsRegionsClustersDeleteCall) Header() http.Header {
11387 if c.header_ == nil {
11388 c.header_ = make(http.Header)
11389 }
11390 return c.header_
11391 }
11392
11393 func (c *ProjectsRegionsClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
11394 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11395 var body io.Reader = nil
11396 c.urlParams_.Set("alt", alt)
11397 c.urlParams_.Set("prettyPrint", "false")
11398 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}")
11399 urls += "?" + c.urlParams_.Encode()
11400 req, err := http.NewRequest("DELETE", urls, body)
11401 if err != nil {
11402 return nil, err
11403 }
11404 req.Header = reqHeaders
11405 googleapi.Expand(req.URL, map[string]string{
11406 "projectId": c.projectId,
11407 "region": c.region,
11408 "clusterName": c.clusterName,
11409 })
11410 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11411 }
11412
11413
11414
11415
11416
11417
11418 func (c *ProjectsRegionsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11419 gensupport.SetOptions(c.urlParams_, opts...)
11420 res, err := c.doRequest("json")
11421 if res != nil && res.StatusCode == http.StatusNotModified {
11422 if res.Body != nil {
11423 res.Body.Close()
11424 }
11425 return nil, gensupport.WrapError(&googleapi.Error{
11426 Code: res.StatusCode,
11427 Header: res.Header,
11428 })
11429 }
11430 if err != nil {
11431 return nil, err
11432 }
11433 defer googleapi.CloseBody(res)
11434 if err := googleapi.CheckResponse(res); err != nil {
11435 return nil, gensupport.WrapError(err)
11436 }
11437 ret := &Operation{
11438 ServerResponse: googleapi.ServerResponse{
11439 Header: res.Header,
11440 HTTPStatusCode: res.StatusCode,
11441 },
11442 }
11443 target := &ret
11444 if err := gensupport.DecodeResponse(target, res); err != nil {
11445 return nil, err
11446 }
11447 return ret, nil
11448 }
11449
11450 type ProjectsRegionsClustersDiagnoseCall struct {
11451 s *Service
11452 projectId string
11453 region string
11454 clusterName string
11455 diagnoseclusterrequest *DiagnoseClusterRequest
11456 urlParams_ gensupport.URLParams
11457 ctx_ context.Context
11458 header_ http.Header
11459 }
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472 func (r *ProjectsRegionsClustersService) Diagnose(projectId string, region string, clusterName string, diagnoseclusterrequest *DiagnoseClusterRequest) *ProjectsRegionsClustersDiagnoseCall {
11473 c := &ProjectsRegionsClustersDiagnoseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11474 c.projectId = projectId
11475 c.region = region
11476 c.clusterName = clusterName
11477 c.diagnoseclusterrequest = diagnoseclusterrequest
11478 return c
11479 }
11480
11481
11482
11483
11484 func (c *ProjectsRegionsClustersDiagnoseCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDiagnoseCall {
11485 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11486 return c
11487 }
11488
11489
11490 func (c *ProjectsRegionsClustersDiagnoseCall) Context(ctx context.Context) *ProjectsRegionsClustersDiagnoseCall {
11491 c.ctx_ = ctx
11492 return c
11493 }
11494
11495
11496
11497 func (c *ProjectsRegionsClustersDiagnoseCall) Header() http.Header {
11498 if c.header_ == nil {
11499 c.header_ = make(http.Header)
11500 }
11501 return c.header_
11502 }
11503
11504 func (c *ProjectsRegionsClustersDiagnoseCall) doRequest(alt string) (*http.Response, error) {
11505 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11506 var body io.Reader = nil
11507 body, err := googleapi.WithoutDataWrapper.JSONReader(c.diagnoseclusterrequest)
11508 if err != nil {
11509 return nil, err
11510 }
11511 c.urlParams_.Set("alt", alt)
11512 c.urlParams_.Set("prettyPrint", "false")
11513 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose")
11514 urls += "?" + c.urlParams_.Encode()
11515 req, err := http.NewRequest("POST", urls, body)
11516 if err != nil {
11517 return nil, err
11518 }
11519 req.Header = reqHeaders
11520 googleapi.Expand(req.URL, map[string]string{
11521 "projectId": c.projectId,
11522 "region": c.region,
11523 "clusterName": c.clusterName,
11524 })
11525 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11526 }
11527
11528
11529
11530
11531
11532
11533 func (c *ProjectsRegionsClustersDiagnoseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11534 gensupport.SetOptions(c.urlParams_, opts...)
11535 res, err := c.doRequest("json")
11536 if res != nil && res.StatusCode == http.StatusNotModified {
11537 if res.Body != nil {
11538 res.Body.Close()
11539 }
11540 return nil, gensupport.WrapError(&googleapi.Error{
11541 Code: res.StatusCode,
11542 Header: res.Header,
11543 })
11544 }
11545 if err != nil {
11546 return nil, err
11547 }
11548 defer googleapi.CloseBody(res)
11549 if err := googleapi.CheckResponse(res); err != nil {
11550 return nil, gensupport.WrapError(err)
11551 }
11552 ret := &Operation{
11553 ServerResponse: googleapi.ServerResponse{
11554 Header: res.Header,
11555 HTTPStatusCode: res.StatusCode,
11556 },
11557 }
11558 target := &ret
11559 if err := gensupport.DecodeResponse(target, res); err != nil {
11560 return nil, err
11561 }
11562 return ret, nil
11563 }
11564
11565 type ProjectsRegionsClustersGetCall struct {
11566 s *Service
11567 projectId string
11568 region string
11569 clusterName string
11570 urlParams_ gensupport.URLParams
11571 ifNoneMatch_ string
11572 ctx_ context.Context
11573 header_ http.Header
11574 }
11575
11576
11577
11578
11579
11580
11581
11582 func (r *ProjectsRegionsClustersService) Get(projectId string, region string, clusterName string) *ProjectsRegionsClustersGetCall {
11583 c := &ProjectsRegionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11584 c.projectId = projectId
11585 c.region = region
11586 c.clusterName = clusterName
11587 return c
11588 }
11589
11590
11591
11592
11593 func (c *ProjectsRegionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetCall {
11594 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11595 return c
11596 }
11597
11598
11599
11600
11601 func (c *ProjectsRegionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersGetCall {
11602 c.ifNoneMatch_ = entityTag
11603 return c
11604 }
11605
11606
11607 func (c *ProjectsRegionsClustersGetCall) Context(ctx context.Context) *ProjectsRegionsClustersGetCall {
11608 c.ctx_ = ctx
11609 return c
11610 }
11611
11612
11613
11614 func (c *ProjectsRegionsClustersGetCall) Header() http.Header {
11615 if c.header_ == nil {
11616 c.header_ = make(http.Header)
11617 }
11618 return c.header_
11619 }
11620
11621 func (c *ProjectsRegionsClustersGetCall) doRequest(alt string) (*http.Response, error) {
11622 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11623 if c.ifNoneMatch_ != "" {
11624 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11625 }
11626 var body io.Reader = nil
11627 c.urlParams_.Set("alt", alt)
11628 c.urlParams_.Set("prettyPrint", "false")
11629 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}")
11630 urls += "?" + c.urlParams_.Encode()
11631 req, err := http.NewRequest("GET", urls, body)
11632 if err != nil {
11633 return nil, err
11634 }
11635 req.Header = reqHeaders
11636 googleapi.Expand(req.URL, map[string]string{
11637 "projectId": c.projectId,
11638 "region": c.region,
11639 "clusterName": c.clusterName,
11640 })
11641 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11642 }
11643
11644
11645
11646
11647
11648
11649 func (c *ProjectsRegionsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
11650 gensupport.SetOptions(c.urlParams_, opts...)
11651 res, err := c.doRequest("json")
11652 if res != nil && res.StatusCode == http.StatusNotModified {
11653 if res.Body != nil {
11654 res.Body.Close()
11655 }
11656 return nil, gensupport.WrapError(&googleapi.Error{
11657 Code: res.StatusCode,
11658 Header: res.Header,
11659 })
11660 }
11661 if err != nil {
11662 return nil, err
11663 }
11664 defer googleapi.CloseBody(res)
11665 if err := googleapi.CheckResponse(res); err != nil {
11666 return nil, gensupport.WrapError(err)
11667 }
11668 ret := &Cluster{
11669 ServerResponse: googleapi.ServerResponse{
11670 Header: res.Header,
11671 HTTPStatusCode: res.StatusCode,
11672 },
11673 }
11674 target := &ret
11675 if err := gensupport.DecodeResponse(target, res); err != nil {
11676 return nil, err
11677 }
11678 return ret, nil
11679 }
11680
11681 type ProjectsRegionsClustersGetIamPolicyCall struct {
11682 s *Service
11683 resource string
11684 getiampolicyrequest *GetIamPolicyRequest
11685 urlParams_ gensupport.URLParams
11686 ctx_ context.Context
11687 header_ http.Header
11688 }
11689
11690
11691
11692
11693
11694
11695
11696 func (r *ProjectsRegionsClustersService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsClustersGetIamPolicyCall {
11697 c := &ProjectsRegionsClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11698 c.resource = resource
11699 c.getiampolicyrequest = getiampolicyrequest
11700 return c
11701 }
11702
11703
11704
11705
11706 func (c *ProjectsRegionsClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetIamPolicyCall {
11707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11708 return c
11709 }
11710
11711
11712 func (c *ProjectsRegionsClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsClustersGetIamPolicyCall {
11713 c.ctx_ = ctx
11714 return c
11715 }
11716
11717
11718
11719 func (c *ProjectsRegionsClustersGetIamPolicyCall) Header() http.Header {
11720 if c.header_ == nil {
11721 c.header_ = make(http.Header)
11722 }
11723 return c.header_
11724 }
11725
11726 func (c *ProjectsRegionsClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11727 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11728 var body io.Reader = nil
11729 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
11730 if err != nil {
11731 return nil, err
11732 }
11733 c.urlParams_.Set("alt", alt)
11734 c.urlParams_.Set("prettyPrint", "false")
11735 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
11736 urls += "?" + c.urlParams_.Encode()
11737 req, err := http.NewRequest("POST", urls, body)
11738 if err != nil {
11739 return nil, err
11740 }
11741 req.Header = reqHeaders
11742 googleapi.Expand(req.URL, map[string]string{
11743 "resource": c.resource,
11744 })
11745 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11746 }
11747
11748
11749
11750
11751
11752
11753 func (c *ProjectsRegionsClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11754 gensupport.SetOptions(c.urlParams_, opts...)
11755 res, err := c.doRequest("json")
11756 if res != nil && res.StatusCode == http.StatusNotModified {
11757 if res.Body != nil {
11758 res.Body.Close()
11759 }
11760 return nil, gensupport.WrapError(&googleapi.Error{
11761 Code: res.StatusCode,
11762 Header: res.Header,
11763 })
11764 }
11765 if err != nil {
11766 return nil, err
11767 }
11768 defer googleapi.CloseBody(res)
11769 if err := googleapi.CheckResponse(res); err != nil {
11770 return nil, gensupport.WrapError(err)
11771 }
11772 ret := &Policy{
11773 ServerResponse: googleapi.ServerResponse{
11774 Header: res.Header,
11775 HTTPStatusCode: res.StatusCode,
11776 },
11777 }
11778 target := &ret
11779 if err := gensupport.DecodeResponse(target, res); err != nil {
11780 return nil, err
11781 }
11782 return ret, nil
11783 }
11784
11785 type ProjectsRegionsClustersInjectCredentialsCall struct {
11786 s *Service
11787 project string
11788 region string
11789 cluster string
11790 injectcredentialsrequest *InjectCredentialsRequest
11791 urlParams_ gensupport.URLParams
11792 ctx_ context.Context
11793 header_ http.Header
11794 }
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804 func (r *ProjectsRegionsClustersService) InjectCredentials(project string, region string, cluster string, injectcredentialsrequest *InjectCredentialsRequest) *ProjectsRegionsClustersInjectCredentialsCall {
11805 c := &ProjectsRegionsClustersInjectCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11806 c.project = project
11807 c.region = region
11808 c.cluster = cluster
11809 c.injectcredentialsrequest = injectcredentialsrequest
11810 return c
11811 }
11812
11813
11814
11815
11816 func (c *ProjectsRegionsClustersInjectCredentialsCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersInjectCredentialsCall {
11817 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11818 return c
11819 }
11820
11821
11822 func (c *ProjectsRegionsClustersInjectCredentialsCall) Context(ctx context.Context) *ProjectsRegionsClustersInjectCredentialsCall {
11823 c.ctx_ = ctx
11824 return c
11825 }
11826
11827
11828
11829 func (c *ProjectsRegionsClustersInjectCredentialsCall) Header() http.Header {
11830 if c.header_ == nil {
11831 c.header_ = make(http.Header)
11832 }
11833 return c.header_
11834 }
11835
11836 func (c *ProjectsRegionsClustersInjectCredentialsCall) doRequest(alt string) (*http.Response, error) {
11837 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11838 var body io.Reader = nil
11839 body, err := googleapi.WithoutDataWrapper.JSONReader(c.injectcredentialsrequest)
11840 if err != nil {
11841 return nil, err
11842 }
11843 c.urlParams_.Set("alt", alt)
11844 c.urlParams_.Set("prettyPrint", "false")
11845 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+project}/{+region}/{+cluster}:injectCredentials")
11846 urls += "?" + c.urlParams_.Encode()
11847 req, err := http.NewRequest("POST", urls, body)
11848 if err != nil {
11849 return nil, err
11850 }
11851 req.Header = reqHeaders
11852 googleapi.Expand(req.URL, map[string]string{
11853 "project": c.project,
11854 "region": c.region,
11855 "cluster": c.cluster,
11856 })
11857 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11858 }
11859
11860
11861
11862
11863
11864
11865 func (c *ProjectsRegionsClustersInjectCredentialsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11866 gensupport.SetOptions(c.urlParams_, opts...)
11867 res, err := c.doRequest("json")
11868 if res != nil && res.StatusCode == http.StatusNotModified {
11869 if res.Body != nil {
11870 res.Body.Close()
11871 }
11872 return nil, gensupport.WrapError(&googleapi.Error{
11873 Code: res.StatusCode,
11874 Header: res.Header,
11875 })
11876 }
11877 if err != nil {
11878 return nil, err
11879 }
11880 defer googleapi.CloseBody(res)
11881 if err := googleapi.CheckResponse(res); err != nil {
11882 return nil, gensupport.WrapError(err)
11883 }
11884 ret := &Operation{
11885 ServerResponse: googleapi.ServerResponse{
11886 Header: res.Header,
11887 HTTPStatusCode: res.StatusCode,
11888 },
11889 }
11890 target := &ret
11891 if err := gensupport.DecodeResponse(target, res); err != nil {
11892 return nil, err
11893 }
11894 return ret, nil
11895 }
11896
11897 type ProjectsRegionsClustersListCall struct {
11898 s *Service
11899 projectId string
11900 region string
11901 urlParams_ gensupport.URLParams
11902 ifNoneMatch_ string
11903 ctx_ context.Context
11904 header_ http.Header
11905 }
11906
11907
11908
11909
11910
11911
11912 func (r *ProjectsRegionsClustersService) List(projectId string, region string) *ProjectsRegionsClustersListCall {
11913 c := &ProjectsRegionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11914 c.projectId = projectId
11915 c.region = region
11916 return c
11917 }
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931 func (c *ProjectsRegionsClustersListCall) Filter(filter string) *ProjectsRegionsClustersListCall {
11932 c.urlParams_.Set("filter", filter)
11933 return c
11934 }
11935
11936
11937
11938 func (c *ProjectsRegionsClustersListCall) PageSize(pageSize int64) *ProjectsRegionsClustersListCall {
11939 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11940 return c
11941 }
11942
11943
11944
11945 func (c *ProjectsRegionsClustersListCall) PageToken(pageToken string) *ProjectsRegionsClustersListCall {
11946 c.urlParams_.Set("pageToken", pageToken)
11947 return c
11948 }
11949
11950
11951
11952
11953 func (c *ProjectsRegionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersListCall {
11954 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11955 return c
11956 }
11957
11958
11959
11960
11961 func (c *ProjectsRegionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersListCall {
11962 c.ifNoneMatch_ = entityTag
11963 return c
11964 }
11965
11966
11967 func (c *ProjectsRegionsClustersListCall) Context(ctx context.Context) *ProjectsRegionsClustersListCall {
11968 c.ctx_ = ctx
11969 return c
11970 }
11971
11972
11973
11974 func (c *ProjectsRegionsClustersListCall) Header() http.Header {
11975 if c.header_ == nil {
11976 c.header_ = make(http.Header)
11977 }
11978 return c.header_
11979 }
11980
11981 func (c *ProjectsRegionsClustersListCall) doRequest(alt string) (*http.Response, error) {
11982 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
11983 if c.ifNoneMatch_ != "" {
11984 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11985 }
11986 var body io.Reader = nil
11987 c.urlParams_.Set("alt", alt)
11988 c.urlParams_.Set("prettyPrint", "false")
11989 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters")
11990 urls += "?" + c.urlParams_.Encode()
11991 req, err := http.NewRequest("GET", urls, body)
11992 if err != nil {
11993 return nil, err
11994 }
11995 req.Header = reqHeaders
11996 googleapi.Expand(req.URL, map[string]string{
11997 "projectId": c.projectId,
11998 "region": c.region,
11999 })
12000 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12001 }
12002
12003
12004
12005
12006
12007
12008
12009 func (c *ProjectsRegionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
12010 gensupport.SetOptions(c.urlParams_, opts...)
12011 res, err := c.doRequest("json")
12012 if res != nil && res.StatusCode == http.StatusNotModified {
12013 if res.Body != nil {
12014 res.Body.Close()
12015 }
12016 return nil, gensupport.WrapError(&googleapi.Error{
12017 Code: res.StatusCode,
12018 Header: res.Header,
12019 })
12020 }
12021 if err != nil {
12022 return nil, err
12023 }
12024 defer googleapi.CloseBody(res)
12025 if err := googleapi.CheckResponse(res); err != nil {
12026 return nil, gensupport.WrapError(err)
12027 }
12028 ret := &ListClustersResponse{
12029 ServerResponse: googleapi.ServerResponse{
12030 Header: res.Header,
12031 HTTPStatusCode: res.StatusCode,
12032 },
12033 }
12034 target := &ret
12035 if err := gensupport.DecodeResponse(target, res); err != nil {
12036 return nil, err
12037 }
12038 return ret, nil
12039 }
12040
12041
12042
12043
12044 func (c *ProjectsRegionsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error {
12045 c.ctx_ = ctx
12046 defer c.PageToken(c.urlParams_.Get("pageToken"))
12047 for {
12048 x, err := c.Do()
12049 if err != nil {
12050 return err
12051 }
12052 if err := f(x); err != nil {
12053 return err
12054 }
12055 if x.NextPageToken == "" {
12056 return nil
12057 }
12058 c.PageToken(x.NextPageToken)
12059 }
12060 }
12061
12062 type ProjectsRegionsClustersPatchCall struct {
12063 s *Service
12064 projectId string
12065 region string
12066 clusterName string
12067 cluster *Cluster
12068 urlParams_ gensupport.URLParams
12069 ctx_ context.Context
12070 header_ http.Header
12071 }
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082 func (r *ProjectsRegionsClustersService) Patch(projectId string, region string, clusterName string, cluster *Cluster) *ProjectsRegionsClustersPatchCall {
12083 c := &ProjectsRegionsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12084 c.projectId = projectId
12085 c.region = region
12086 c.clusterName = clusterName
12087 c.cluster = cluster
12088 return c
12089 }
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100 func (c *ProjectsRegionsClustersPatchCall) GracefulDecommissionTimeout(gracefulDecommissionTimeout string) *ProjectsRegionsClustersPatchCall {
12101 c.urlParams_.Set("gracefulDecommissionTimeout", gracefulDecommissionTimeout)
12102 return c
12103 }
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114 func (c *ProjectsRegionsClustersPatchCall) RequestId(requestId string) *ProjectsRegionsClustersPatchCall {
12115 c.urlParams_.Set("requestId", requestId)
12116 return c
12117 }
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134 func (c *ProjectsRegionsClustersPatchCall) UpdateMask(updateMask string) *ProjectsRegionsClustersPatchCall {
12135 c.urlParams_.Set("updateMask", updateMask)
12136 return c
12137 }
12138
12139
12140
12141
12142 func (c *ProjectsRegionsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersPatchCall {
12143 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12144 return c
12145 }
12146
12147
12148 func (c *ProjectsRegionsClustersPatchCall) Context(ctx context.Context) *ProjectsRegionsClustersPatchCall {
12149 c.ctx_ = ctx
12150 return c
12151 }
12152
12153
12154
12155 func (c *ProjectsRegionsClustersPatchCall) Header() http.Header {
12156 if c.header_ == nil {
12157 c.header_ = make(http.Header)
12158 }
12159 return c.header_
12160 }
12161
12162 func (c *ProjectsRegionsClustersPatchCall) doRequest(alt string) (*http.Response, error) {
12163 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12164 var body io.Reader = nil
12165 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
12166 if err != nil {
12167 return nil, err
12168 }
12169 c.urlParams_.Set("alt", alt)
12170 c.urlParams_.Set("prettyPrint", "false")
12171 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}")
12172 urls += "?" + c.urlParams_.Encode()
12173 req, err := http.NewRequest("PATCH", urls, body)
12174 if err != nil {
12175 return nil, err
12176 }
12177 req.Header = reqHeaders
12178 googleapi.Expand(req.URL, map[string]string{
12179 "projectId": c.projectId,
12180 "region": c.region,
12181 "clusterName": c.clusterName,
12182 })
12183 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12184 }
12185
12186
12187
12188
12189
12190
12191 func (c *ProjectsRegionsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12192 gensupport.SetOptions(c.urlParams_, opts...)
12193 res, err := c.doRequest("json")
12194 if res != nil && res.StatusCode == http.StatusNotModified {
12195 if res.Body != nil {
12196 res.Body.Close()
12197 }
12198 return nil, gensupport.WrapError(&googleapi.Error{
12199 Code: res.StatusCode,
12200 Header: res.Header,
12201 })
12202 }
12203 if err != nil {
12204 return nil, err
12205 }
12206 defer googleapi.CloseBody(res)
12207 if err := googleapi.CheckResponse(res); err != nil {
12208 return nil, gensupport.WrapError(err)
12209 }
12210 ret := &Operation{
12211 ServerResponse: googleapi.ServerResponse{
12212 Header: res.Header,
12213 HTTPStatusCode: res.StatusCode,
12214 },
12215 }
12216 target := &ret
12217 if err := gensupport.DecodeResponse(target, res); err != nil {
12218 return nil, err
12219 }
12220 return ret, nil
12221 }
12222
12223 type ProjectsRegionsClustersRepairCall struct {
12224 s *Service
12225 projectId string
12226 region string
12227 clusterName string
12228 repairclusterrequest *RepairClusterRequest
12229 urlParams_ gensupport.URLParams
12230 ctx_ context.Context
12231 header_ http.Header
12232 }
12233
12234
12235
12236
12237
12238
12239
12240 func (r *ProjectsRegionsClustersService) Repair(projectId string, region string, clusterName string, repairclusterrequest *RepairClusterRequest) *ProjectsRegionsClustersRepairCall {
12241 c := &ProjectsRegionsClustersRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12242 c.projectId = projectId
12243 c.region = region
12244 c.clusterName = clusterName
12245 c.repairclusterrequest = repairclusterrequest
12246 return c
12247 }
12248
12249
12250
12251
12252 func (c *ProjectsRegionsClustersRepairCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersRepairCall {
12253 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12254 return c
12255 }
12256
12257
12258 func (c *ProjectsRegionsClustersRepairCall) Context(ctx context.Context) *ProjectsRegionsClustersRepairCall {
12259 c.ctx_ = ctx
12260 return c
12261 }
12262
12263
12264
12265 func (c *ProjectsRegionsClustersRepairCall) Header() http.Header {
12266 if c.header_ == nil {
12267 c.header_ = make(http.Header)
12268 }
12269 return c.header_
12270 }
12271
12272 func (c *ProjectsRegionsClustersRepairCall) doRequest(alt string) (*http.Response, error) {
12273 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12274 var body io.Reader = nil
12275 body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairclusterrequest)
12276 if err != nil {
12277 return nil, err
12278 }
12279 c.urlParams_.Set("alt", alt)
12280 c.urlParams_.Set("prettyPrint", "false")
12281 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:repair")
12282 urls += "?" + c.urlParams_.Encode()
12283 req, err := http.NewRequest("POST", urls, body)
12284 if err != nil {
12285 return nil, err
12286 }
12287 req.Header = reqHeaders
12288 googleapi.Expand(req.URL, map[string]string{
12289 "projectId": c.projectId,
12290 "region": c.region,
12291 "clusterName": c.clusterName,
12292 })
12293 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12294 }
12295
12296
12297
12298
12299
12300
12301 func (c *ProjectsRegionsClustersRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12302 gensupport.SetOptions(c.urlParams_, opts...)
12303 res, err := c.doRequest("json")
12304 if res != nil && res.StatusCode == http.StatusNotModified {
12305 if res.Body != nil {
12306 res.Body.Close()
12307 }
12308 return nil, gensupport.WrapError(&googleapi.Error{
12309 Code: res.StatusCode,
12310 Header: res.Header,
12311 })
12312 }
12313 if err != nil {
12314 return nil, err
12315 }
12316 defer googleapi.CloseBody(res)
12317 if err := googleapi.CheckResponse(res); err != nil {
12318 return nil, gensupport.WrapError(err)
12319 }
12320 ret := &Operation{
12321 ServerResponse: googleapi.ServerResponse{
12322 Header: res.Header,
12323 HTTPStatusCode: res.StatusCode,
12324 },
12325 }
12326 target := &ret
12327 if err := gensupport.DecodeResponse(target, res); err != nil {
12328 return nil, err
12329 }
12330 return ret, nil
12331 }
12332
12333 type ProjectsRegionsClustersSetIamPolicyCall struct {
12334 s *Service
12335 resource string
12336 setiampolicyrequest *SetIamPolicyRequest
12337 urlParams_ gensupport.URLParams
12338 ctx_ context.Context
12339 header_ http.Header
12340 }
12341
12342
12343
12344
12345
12346
12347
12348
12349 func (r *ProjectsRegionsClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsClustersSetIamPolicyCall {
12350 c := &ProjectsRegionsClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12351 c.resource = resource
12352 c.setiampolicyrequest = setiampolicyrequest
12353 return c
12354 }
12355
12356
12357
12358
12359 func (c *ProjectsRegionsClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersSetIamPolicyCall {
12360 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12361 return c
12362 }
12363
12364
12365 func (c *ProjectsRegionsClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsClustersSetIamPolicyCall {
12366 c.ctx_ = ctx
12367 return c
12368 }
12369
12370
12371
12372 func (c *ProjectsRegionsClustersSetIamPolicyCall) Header() http.Header {
12373 if c.header_ == nil {
12374 c.header_ = make(http.Header)
12375 }
12376 return c.header_
12377 }
12378
12379 func (c *ProjectsRegionsClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12380 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12381 var body io.Reader = nil
12382 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
12383 if err != nil {
12384 return nil, err
12385 }
12386 c.urlParams_.Set("alt", alt)
12387 c.urlParams_.Set("prettyPrint", "false")
12388 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
12389 urls += "?" + c.urlParams_.Encode()
12390 req, err := http.NewRequest("POST", urls, body)
12391 if err != nil {
12392 return nil, err
12393 }
12394 req.Header = reqHeaders
12395 googleapi.Expand(req.URL, map[string]string{
12396 "resource": c.resource,
12397 })
12398 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12399 }
12400
12401
12402
12403
12404
12405
12406 func (c *ProjectsRegionsClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12407 gensupport.SetOptions(c.urlParams_, opts...)
12408 res, err := c.doRequest("json")
12409 if res != nil && res.StatusCode == http.StatusNotModified {
12410 if res.Body != nil {
12411 res.Body.Close()
12412 }
12413 return nil, gensupport.WrapError(&googleapi.Error{
12414 Code: res.StatusCode,
12415 Header: res.Header,
12416 })
12417 }
12418 if err != nil {
12419 return nil, err
12420 }
12421 defer googleapi.CloseBody(res)
12422 if err := googleapi.CheckResponse(res); err != nil {
12423 return nil, gensupport.WrapError(err)
12424 }
12425 ret := &Policy{
12426 ServerResponse: googleapi.ServerResponse{
12427 Header: res.Header,
12428 HTTPStatusCode: res.StatusCode,
12429 },
12430 }
12431 target := &ret
12432 if err := gensupport.DecodeResponse(target, res); err != nil {
12433 return nil, err
12434 }
12435 return ret, nil
12436 }
12437
12438 type ProjectsRegionsClustersStartCall struct {
12439 s *Service
12440 projectId string
12441 region string
12442 clusterName string
12443 startclusterrequest *StartClusterRequest
12444 urlParams_ gensupport.URLParams
12445 ctx_ context.Context
12446 header_ http.Header
12447 }
12448
12449
12450
12451
12452
12453
12454
12455 func (r *ProjectsRegionsClustersService) Start(projectId string, region string, clusterName string, startclusterrequest *StartClusterRequest) *ProjectsRegionsClustersStartCall {
12456 c := &ProjectsRegionsClustersStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12457 c.projectId = projectId
12458 c.region = region
12459 c.clusterName = clusterName
12460 c.startclusterrequest = startclusterrequest
12461 return c
12462 }
12463
12464
12465
12466
12467 func (c *ProjectsRegionsClustersStartCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersStartCall {
12468 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12469 return c
12470 }
12471
12472
12473 func (c *ProjectsRegionsClustersStartCall) Context(ctx context.Context) *ProjectsRegionsClustersStartCall {
12474 c.ctx_ = ctx
12475 return c
12476 }
12477
12478
12479
12480 func (c *ProjectsRegionsClustersStartCall) Header() http.Header {
12481 if c.header_ == nil {
12482 c.header_ = make(http.Header)
12483 }
12484 return c.header_
12485 }
12486
12487 func (c *ProjectsRegionsClustersStartCall) doRequest(alt string) (*http.Response, error) {
12488 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12489 var body io.Reader = nil
12490 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startclusterrequest)
12491 if err != nil {
12492 return nil, err
12493 }
12494 c.urlParams_.Set("alt", alt)
12495 c.urlParams_.Set("prettyPrint", "false")
12496 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:start")
12497 urls += "?" + c.urlParams_.Encode()
12498 req, err := http.NewRequest("POST", urls, body)
12499 if err != nil {
12500 return nil, err
12501 }
12502 req.Header = reqHeaders
12503 googleapi.Expand(req.URL, map[string]string{
12504 "projectId": c.projectId,
12505 "region": c.region,
12506 "clusterName": c.clusterName,
12507 })
12508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12509 }
12510
12511
12512
12513
12514
12515
12516 func (c *ProjectsRegionsClustersStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12517 gensupport.SetOptions(c.urlParams_, opts...)
12518 res, err := c.doRequest("json")
12519 if res != nil && res.StatusCode == http.StatusNotModified {
12520 if res.Body != nil {
12521 res.Body.Close()
12522 }
12523 return nil, gensupport.WrapError(&googleapi.Error{
12524 Code: res.StatusCode,
12525 Header: res.Header,
12526 })
12527 }
12528 if err != nil {
12529 return nil, err
12530 }
12531 defer googleapi.CloseBody(res)
12532 if err := googleapi.CheckResponse(res); err != nil {
12533 return nil, gensupport.WrapError(err)
12534 }
12535 ret := &Operation{
12536 ServerResponse: googleapi.ServerResponse{
12537 Header: res.Header,
12538 HTTPStatusCode: res.StatusCode,
12539 },
12540 }
12541 target := &ret
12542 if err := gensupport.DecodeResponse(target, res); err != nil {
12543 return nil, err
12544 }
12545 return ret, nil
12546 }
12547
12548 type ProjectsRegionsClustersStopCall struct {
12549 s *Service
12550 projectId string
12551 region string
12552 clusterName string
12553 stopclusterrequest *StopClusterRequest
12554 urlParams_ gensupport.URLParams
12555 ctx_ context.Context
12556 header_ http.Header
12557 }
12558
12559
12560
12561
12562
12563
12564
12565 func (r *ProjectsRegionsClustersService) Stop(projectId string, region string, clusterName string, stopclusterrequest *StopClusterRequest) *ProjectsRegionsClustersStopCall {
12566 c := &ProjectsRegionsClustersStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12567 c.projectId = projectId
12568 c.region = region
12569 c.clusterName = clusterName
12570 c.stopclusterrequest = stopclusterrequest
12571 return c
12572 }
12573
12574
12575
12576
12577 func (c *ProjectsRegionsClustersStopCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersStopCall {
12578 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12579 return c
12580 }
12581
12582
12583 func (c *ProjectsRegionsClustersStopCall) Context(ctx context.Context) *ProjectsRegionsClustersStopCall {
12584 c.ctx_ = ctx
12585 return c
12586 }
12587
12588
12589
12590 func (c *ProjectsRegionsClustersStopCall) Header() http.Header {
12591 if c.header_ == nil {
12592 c.header_ = make(http.Header)
12593 }
12594 return c.header_
12595 }
12596
12597 func (c *ProjectsRegionsClustersStopCall) doRequest(alt string) (*http.Response, error) {
12598 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12599 var body io.Reader = nil
12600 body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopclusterrequest)
12601 if err != nil {
12602 return nil, err
12603 }
12604 c.urlParams_.Set("alt", alt)
12605 c.urlParams_.Set("prettyPrint", "false")
12606 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:stop")
12607 urls += "?" + c.urlParams_.Encode()
12608 req, err := http.NewRequest("POST", urls, body)
12609 if err != nil {
12610 return nil, err
12611 }
12612 req.Header = reqHeaders
12613 googleapi.Expand(req.URL, map[string]string{
12614 "projectId": c.projectId,
12615 "region": c.region,
12616 "clusterName": c.clusterName,
12617 })
12618 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12619 }
12620
12621
12622
12623
12624
12625
12626 func (c *ProjectsRegionsClustersStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12627 gensupport.SetOptions(c.urlParams_, opts...)
12628 res, err := c.doRequest("json")
12629 if res != nil && res.StatusCode == http.StatusNotModified {
12630 if res.Body != nil {
12631 res.Body.Close()
12632 }
12633 return nil, gensupport.WrapError(&googleapi.Error{
12634 Code: res.StatusCode,
12635 Header: res.Header,
12636 })
12637 }
12638 if err != nil {
12639 return nil, err
12640 }
12641 defer googleapi.CloseBody(res)
12642 if err := googleapi.CheckResponse(res); err != nil {
12643 return nil, gensupport.WrapError(err)
12644 }
12645 ret := &Operation{
12646 ServerResponse: googleapi.ServerResponse{
12647 Header: res.Header,
12648 HTTPStatusCode: res.StatusCode,
12649 },
12650 }
12651 target := &ret
12652 if err := gensupport.DecodeResponse(target, res); err != nil {
12653 return nil, err
12654 }
12655 return ret, nil
12656 }
12657
12658 type ProjectsRegionsClustersTestIamPermissionsCall struct {
12659 s *Service
12660 resource string
12661 testiampermissionsrequest *TestIamPermissionsRequest
12662 urlParams_ gensupport.URLParams
12663 ctx_ context.Context
12664 header_ http.Header
12665 }
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677 func (r *ProjectsRegionsClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsClustersTestIamPermissionsCall {
12678 c := &ProjectsRegionsClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12679 c.resource = resource
12680 c.testiampermissionsrequest = testiampermissionsrequest
12681 return c
12682 }
12683
12684
12685
12686
12687 func (c *ProjectsRegionsClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersTestIamPermissionsCall {
12688 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12689 return c
12690 }
12691
12692
12693 func (c *ProjectsRegionsClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsClustersTestIamPermissionsCall {
12694 c.ctx_ = ctx
12695 return c
12696 }
12697
12698
12699
12700 func (c *ProjectsRegionsClustersTestIamPermissionsCall) Header() http.Header {
12701 if c.header_ == nil {
12702 c.header_ = make(http.Header)
12703 }
12704 return c.header_
12705 }
12706
12707 func (c *ProjectsRegionsClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
12708 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12709 var body io.Reader = nil
12710 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
12711 if err != nil {
12712 return nil, err
12713 }
12714 c.urlParams_.Set("alt", alt)
12715 c.urlParams_.Set("prettyPrint", "false")
12716 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
12717 urls += "?" + c.urlParams_.Encode()
12718 req, err := http.NewRequest("POST", urls, body)
12719 if err != nil {
12720 return nil, err
12721 }
12722 req.Header = reqHeaders
12723 googleapi.Expand(req.URL, map[string]string{
12724 "resource": c.resource,
12725 })
12726 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12727 }
12728
12729
12730
12731
12732
12733
12734
12735 func (c *ProjectsRegionsClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
12736 gensupport.SetOptions(c.urlParams_, opts...)
12737 res, err := c.doRequest("json")
12738 if res != nil && res.StatusCode == http.StatusNotModified {
12739 if res.Body != nil {
12740 res.Body.Close()
12741 }
12742 return nil, gensupport.WrapError(&googleapi.Error{
12743 Code: res.StatusCode,
12744 Header: res.Header,
12745 })
12746 }
12747 if err != nil {
12748 return nil, err
12749 }
12750 defer googleapi.CloseBody(res)
12751 if err := googleapi.CheckResponse(res); err != nil {
12752 return nil, gensupport.WrapError(err)
12753 }
12754 ret := &TestIamPermissionsResponse{
12755 ServerResponse: googleapi.ServerResponse{
12756 Header: res.Header,
12757 HTTPStatusCode: res.StatusCode,
12758 },
12759 }
12760 target := &ret
12761 if err := gensupport.DecodeResponse(target, res); err != nil {
12762 return nil, err
12763 }
12764 return ret, nil
12765 }
12766
12767 type ProjectsRegionsClustersNodeGroupsCreateCall struct {
12768 s *Service
12769 parent string
12770 nodegroup *NodeGroup
12771 urlParams_ gensupport.URLParams
12772 ctx_ context.Context
12773 header_ http.Header
12774 }
12775
12776
12777
12778
12779
12780
12781
12782 func (r *ProjectsRegionsClustersNodeGroupsService) Create(parent string, nodegroup *NodeGroup) *ProjectsRegionsClustersNodeGroupsCreateCall {
12783 c := &ProjectsRegionsClustersNodeGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12784 c.parent = parent
12785 c.nodegroup = nodegroup
12786 return c
12787 }
12788
12789
12790
12791
12792
12793 func (c *ProjectsRegionsClustersNodeGroupsCreateCall) NodeGroupId(nodeGroupId string) *ProjectsRegionsClustersNodeGroupsCreateCall {
12794 c.urlParams_.Set("nodeGroupId", nodeGroupId)
12795 return c
12796 }
12797
12798
12799
12800 func (c *ProjectsRegionsClustersNodeGroupsCreateCall) ParentOperationId(parentOperationId string) *ProjectsRegionsClustersNodeGroupsCreateCall {
12801 c.urlParams_.Set("parentOperationId", parentOperationId)
12802 return c
12803 }
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814 func (c *ProjectsRegionsClustersNodeGroupsCreateCall) RequestId(requestId string) *ProjectsRegionsClustersNodeGroupsCreateCall {
12815 c.urlParams_.Set("requestId", requestId)
12816 return c
12817 }
12818
12819
12820
12821
12822 func (c *ProjectsRegionsClustersNodeGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersNodeGroupsCreateCall {
12823 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12824 return c
12825 }
12826
12827
12828 func (c *ProjectsRegionsClustersNodeGroupsCreateCall) Context(ctx context.Context) *ProjectsRegionsClustersNodeGroupsCreateCall {
12829 c.ctx_ = ctx
12830 return c
12831 }
12832
12833
12834
12835 func (c *ProjectsRegionsClustersNodeGroupsCreateCall) Header() http.Header {
12836 if c.header_ == nil {
12837 c.header_ = make(http.Header)
12838 }
12839 return c.header_
12840 }
12841
12842 func (c *ProjectsRegionsClustersNodeGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
12843 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
12844 var body io.Reader = nil
12845 body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroup)
12846 if err != nil {
12847 return nil, err
12848 }
12849 c.urlParams_.Set("alt", alt)
12850 c.urlParams_.Set("prettyPrint", "false")
12851 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nodeGroups")
12852 urls += "?" + c.urlParams_.Encode()
12853 req, err := http.NewRequest("POST", urls, body)
12854 if err != nil {
12855 return nil, err
12856 }
12857 req.Header = reqHeaders
12858 googleapi.Expand(req.URL, map[string]string{
12859 "parent": c.parent,
12860 })
12861 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12862 }
12863
12864
12865
12866
12867
12868
12869 func (c *ProjectsRegionsClustersNodeGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12870 gensupport.SetOptions(c.urlParams_, opts...)
12871 res, err := c.doRequest("json")
12872 if res != nil && res.StatusCode == http.StatusNotModified {
12873 if res.Body != nil {
12874 res.Body.Close()
12875 }
12876 return nil, gensupport.WrapError(&googleapi.Error{
12877 Code: res.StatusCode,
12878 Header: res.Header,
12879 })
12880 }
12881 if err != nil {
12882 return nil, err
12883 }
12884 defer googleapi.CloseBody(res)
12885 if err := googleapi.CheckResponse(res); err != nil {
12886 return nil, gensupport.WrapError(err)
12887 }
12888 ret := &Operation{
12889 ServerResponse: googleapi.ServerResponse{
12890 Header: res.Header,
12891 HTTPStatusCode: res.StatusCode,
12892 },
12893 }
12894 target := &ret
12895 if err := gensupport.DecodeResponse(target, res); err != nil {
12896 return nil, err
12897 }
12898 return ret, nil
12899 }
12900
12901 type ProjectsRegionsClustersNodeGroupsGetCall struct {
12902 s *Service
12903 name string
12904 urlParams_ gensupport.URLParams
12905 ifNoneMatch_ string
12906 ctx_ context.Context
12907 header_ http.Header
12908 }
12909
12910
12911
12912
12913
12914
12915 func (r *ProjectsRegionsClustersNodeGroupsService) Get(name string) *ProjectsRegionsClustersNodeGroupsGetCall {
12916 c := &ProjectsRegionsClustersNodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12917 c.name = name
12918 return c
12919 }
12920
12921
12922
12923
12924 func (c *ProjectsRegionsClustersNodeGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersNodeGroupsGetCall {
12925 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12926 return c
12927 }
12928
12929
12930
12931
12932 func (c *ProjectsRegionsClustersNodeGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersNodeGroupsGetCall {
12933 c.ifNoneMatch_ = entityTag
12934 return c
12935 }
12936
12937
12938 func (c *ProjectsRegionsClustersNodeGroupsGetCall) Context(ctx context.Context) *ProjectsRegionsClustersNodeGroupsGetCall {
12939 c.ctx_ = ctx
12940 return c
12941 }
12942
12943
12944
12945 func (c *ProjectsRegionsClustersNodeGroupsGetCall) Header() http.Header {
12946 if c.header_ == nil {
12947 c.header_ = make(http.Header)
12948 }
12949 return c.header_
12950 }
12951
12952 func (c *ProjectsRegionsClustersNodeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
12953 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12954 if c.ifNoneMatch_ != "" {
12955 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12956 }
12957 var body io.Reader = nil
12958 c.urlParams_.Set("alt", alt)
12959 c.urlParams_.Set("prettyPrint", "false")
12960 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12961 urls += "?" + c.urlParams_.Encode()
12962 req, err := http.NewRequest("GET", urls, body)
12963 if err != nil {
12964 return nil, err
12965 }
12966 req.Header = reqHeaders
12967 googleapi.Expand(req.URL, map[string]string{
12968 "name": c.name,
12969 })
12970 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12971 }
12972
12973
12974
12975
12976
12977
12978 func (c *ProjectsRegionsClustersNodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) {
12979 gensupport.SetOptions(c.urlParams_, opts...)
12980 res, err := c.doRequest("json")
12981 if res != nil && res.StatusCode == http.StatusNotModified {
12982 if res.Body != nil {
12983 res.Body.Close()
12984 }
12985 return nil, gensupport.WrapError(&googleapi.Error{
12986 Code: res.StatusCode,
12987 Header: res.Header,
12988 })
12989 }
12990 if err != nil {
12991 return nil, err
12992 }
12993 defer googleapi.CloseBody(res)
12994 if err := googleapi.CheckResponse(res); err != nil {
12995 return nil, gensupport.WrapError(err)
12996 }
12997 ret := &NodeGroup{
12998 ServerResponse: googleapi.ServerResponse{
12999 Header: res.Header,
13000 HTTPStatusCode: res.StatusCode,
13001 },
13002 }
13003 target := &ret
13004 if err := gensupport.DecodeResponse(target, res); err != nil {
13005 return nil, err
13006 }
13007 return ret, nil
13008 }
13009
13010 type ProjectsRegionsClustersNodeGroupsRepairCall struct {
13011 s *Service
13012 name string
13013 repairnodegrouprequest *RepairNodeGroupRequest
13014 urlParams_ gensupport.URLParams
13015 ctx_ context.Context
13016 header_ http.Header
13017 }
13018
13019
13020
13021
13022
13023
13024 func (r *ProjectsRegionsClustersNodeGroupsService) Repair(name string, repairnodegrouprequest *RepairNodeGroupRequest) *ProjectsRegionsClustersNodeGroupsRepairCall {
13025 c := &ProjectsRegionsClustersNodeGroupsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13026 c.name = name
13027 c.repairnodegrouprequest = repairnodegrouprequest
13028 return c
13029 }
13030
13031
13032
13033
13034 func (c *ProjectsRegionsClustersNodeGroupsRepairCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersNodeGroupsRepairCall {
13035 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13036 return c
13037 }
13038
13039
13040 func (c *ProjectsRegionsClustersNodeGroupsRepairCall) Context(ctx context.Context) *ProjectsRegionsClustersNodeGroupsRepairCall {
13041 c.ctx_ = ctx
13042 return c
13043 }
13044
13045
13046
13047 func (c *ProjectsRegionsClustersNodeGroupsRepairCall) Header() http.Header {
13048 if c.header_ == nil {
13049 c.header_ = make(http.Header)
13050 }
13051 return c.header_
13052 }
13053
13054 func (c *ProjectsRegionsClustersNodeGroupsRepairCall) doRequest(alt string) (*http.Response, error) {
13055 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13056 var body io.Reader = nil
13057 body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairnodegrouprequest)
13058 if err != nil {
13059 return nil, err
13060 }
13061 c.urlParams_.Set("alt", alt)
13062 c.urlParams_.Set("prettyPrint", "false")
13063 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:repair")
13064 urls += "?" + c.urlParams_.Encode()
13065 req, err := http.NewRequest("POST", urls, body)
13066 if err != nil {
13067 return nil, err
13068 }
13069 req.Header = reqHeaders
13070 googleapi.Expand(req.URL, map[string]string{
13071 "name": c.name,
13072 })
13073 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13074 }
13075
13076
13077
13078
13079
13080
13081 func (c *ProjectsRegionsClustersNodeGroupsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13082 gensupport.SetOptions(c.urlParams_, opts...)
13083 res, err := c.doRequest("json")
13084 if res != nil && res.StatusCode == http.StatusNotModified {
13085 if res.Body != nil {
13086 res.Body.Close()
13087 }
13088 return nil, gensupport.WrapError(&googleapi.Error{
13089 Code: res.StatusCode,
13090 Header: res.Header,
13091 })
13092 }
13093 if err != nil {
13094 return nil, err
13095 }
13096 defer googleapi.CloseBody(res)
13097 if err := googleapi.CheckResponse(res); err != nil {
13098 return nil, gensupport.WrapError(err)
13099 }
13100 ret := &Operation{
13101 ServerResponse: googleapi.ServerResponse{
13102 Header: res.Header,
13103 HTTPStatusCode: res.StatusCode,
13104 },
13105 }
13106 target := &ret
13107 if err := gensupport.DecodeResponse(target, res); err != nil {
13108 return nil, err
13109 }
13110 return ret, nil
13111 }
13112
13113 type ProjectsRegionsClustersNodeGroupsResizeCall struct {
13114 s *Service
13115 name string
13116 resizenodegrouprequest *ResizeNodeGroupRequest
13117 urlParams_ gensupport.URLParams
13118 ctx_ context.Context
13119 header_ http.Header
13120 }
13121
13122
13123
13124
13125
13126
13127
13128
13129 func (r *ProjectsRegionsClustersNodeGroupsService) Resize(name string, resizenodegrouprequest *ResizeNodeGroupRequest) *ProjectsRegionsClustersNodeGroupsResizeCall {
13130 c := &ProjectsRegionsClustersNodeGroupsResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13131 c.name = name
13132 c.resizenodegrouprequest = resizenodegrouprequest
13133 return c
13134 }
13135
13136
13137
13138
13139 func (c *ProjectsRegionsClustersNodeGroupsResizeCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersNodeGroupsResizeCall {
13140 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13141 return c
13142 }
13143
13144
13145 func (c *ProjectsRegionsClustersNodeGroupsResizeCall) Context(ctx context.Context) *ProjectsRegionsClustersNodeGroupsResizeCall {
13146 c.ctx_ = ctx
13147 return c
13148 }
13149
13150
13151
13152 func (c *ProjectsRegionsClustersNodeGroupsResizeCall) Header() http.Header {
13153 if c.header_ == nil {
13154 c.header_ = make(http.Header)
13155 }
13156 return c.header_
13157 }
13158
13159 func (c *ProjectsRegionsClustersNodeGroupsResizeCall) doRequest(alt string) (*http.Response, error) {
13160 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13161 var body io.Reader = nil
13162 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resizenodegrouprequest)
13163 if err != nil {
13164 return nil, err
13165 }
13166 c.urlParams_.Set("alt", alt)
13167 c.urlParams_.Set("prettyPrint", "false")
13168 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resize")
13169 urls += "?" + c.urlParams_.Encode()
13170 req, err := http.NewRequest("POST", urls, body)
13171 if err != nil {
13172 return nil, err
13173 }
13174 req.Header = reqHeaders
13175 googleapi.Expand(req.URL, map[string]string{
13176 "name": c.name,
13177 })
13178 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13179 }
13180
13181
13182
13183
13184
13185
13186 func (c *ProjectsRegionsClustersNodeGroupsResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13187 gensupport.SetOptions(c.urlParams_, opts...)
13188 res, err := c.doRequest("json")
13189 if res != nil && res.StatusCode == http.StatusNotModified {
13190 if res.Body != nil {
13191 res.Body.Close()
13192 }
13193 return nil, gensupport.WrapError(&googleapi.Error{
13194 Code: res.StatusCode,
13195 Header: res.Header,
13196 })
13197 }
13198 if err != nil {
13199 return nil, err
13200 }
13201 defer googleapi.CloseBody(res)
13202 if err := googleapi.CheckResponse(res); err != nil {
13203 return nil, gensupport.WrapError(err)
13204 }
13205 ret := &Operation{
13206 ServerResponse: googleapi.ServerResponse{
13207 Header: res.Header,
13208 HTTPStatusCode: res.StatusCode,
13209 },
13210 }
13211 target := &ret
13212 if err := gensupport.DecodeResponse(target, res); err != nil {
13213 return nil, err
13214 }
13215 return ret, nil
13216 }
13217
13218 type ProjectsRegionsJobsCancelCall struct {
13219 s *Service
13220 projectId string
13221 region string
13222 jobId string
13223 canceljobrequest *CancelJobRequest
13224 urlParams_ gensupport.URLParams
13225 ctx_ context.Context
13226 header_ http.Header
13227 }
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239 func (r *ProjectsRegionsJobsService) Cancel(projectId string, region string, jobId string, canceljobrequest *CancelJobRequest) *ProjectsRegionsJobsCancelCall {
13240 c := &ProjectsRegionsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13241 c.projectId = projectId
13242 c.region = region
13243 c.jobId = jobId
13244 c.canceljobrequest = canceljobrequest
13245 return c
13246 }
13247
13248
13249
13250
13251 func (c *ProjectsRegionsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsCancelCall {
13252 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13253 return c
13254 }
13255
13256
13257 func (c *ProjectsRegionsJobsCancelCall) Context(ctx context.Context) *ProjectsRegionsJobsCancelCall {
13258 c.ctx_ = ctx
13259 return c
13260 }
13261
13262
13263
13264 func (c *ProjectsRegionsJobsCancelCall) Header() http.Header {
13265 if c.header_ == nil {
13266 c.header_ = make(http.Header)
13267 }
13268 return c.header_
13269 }
13270
13271 func (c *ProjectsRegionsJobsCancelCall) doRequest(alt string) (*http.Response, error) {
13272 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13273 var body io.Reader = nil
13274 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceljobrequest)
13275 if err != nil {
13276 return nil, err
13277 }
13278 c.urlParams_.Set("alt", alt)
13279 c.urlParams_.Set("prettyPrint", "false")
13280 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel")
13281 urls += "?" + c.urlParams_.Encode()
13282 req, err := http.NewRequest("POST", urls, body)
13283 if err != nil {
13284 return nil, err
13285 }
13286 req.Header = reqHeaders
13287 googleapi.Expand(req.URL, map[string]string{
13288 "projectId": c.projectId,
13289 "region": c.region,
13290 "jobId": c.jobId,
13291 })
13292 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13293 }
13294
13295
13296
13297
13298
13299
13300 func (c *ProjectsRegionsJobsCancelCall) Do(opts ...googleapi.CallOption) (*Job, error) {
13301 gensupport.SetOptions(c.urlParams_, opts...)
13302 res, err := c.doRequest("json")
13303 if res != nil && res.StatusCode == http.StatusNotModified {
13304 if res.Body != nil {
13305 res.Body.Close()
13306 }
13307 return nil, gensupport.WrapError(&googleapi.Error{
13308 Code: res.StatusCode,
13309 Header: res.Header,
13310 })
13311 }
13312 if err != nil {
13313 return nil, err
13314 }
13315 defer googleapi.CloseBody(res)
13316 if err := googleapi.CheckResponse(res); err != nil {
13317 return nil, gensupport.WrapError(err)
13318 }
13319 ret := &Job{
13320 ServerResponse: googleapi.ServerResponse{
13321 Header: res.Header,
13322 HTTPStatusCode: res.StatusCode,
13323 },
13324 }
13325 target := &ret
13326 if err := gensupport.DecodeResponse(target, res); err != nil {
13327 return nil, err
13328 }
13329 return ret, nil
13330 }
13331
13332 type ProjectsRegionsJobsDeleteCall struct {
13333 s *Service
13334 projectId string
13335 region string
13336 jobId string
13337 urlParams_ gensupport.URLParams
13338 ctx_ context.Context
13339 header_ http.Header
13340 }
13341
13342
13343
13344
13345
13346
13347
13348
13349 func (r *ProjectsRegionsJobsService) Delete(projectId string, region string, jobId string) *ProjectsRegionsJobsDeleteCall {
13350 c := &ProjectsRegionsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13351 c.projectId = projectId
13352 c.region = region
13353 c.jobId = jobId
13354 return c
13355 }
13356
13357
13358
13359
13360 func (c *ProjectsRegionsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsDeleteCall {
13361 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13362 return c
13363 }
13364
13365
13366 func (c *ProjectsRegionsJobsDeleteCall) Context(ctx context.Context) *ProjectsRegionsJobsDeleteCall {
13367 c.ctx_ = ctx
13368 return c
13369 }
13370
13371
13372
13373 func (c *ProjectsRegionsJobsDeleteCall) Header() http.Header {
13374 if c.header_ == nil {
13375 c.header_ = make(http.Header)
13376 }
13377 return c.header_
13378 }
13379
13380 func (c *ProjectsRegionsJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
13381 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13382 var body io.Reader = nil
13383 c.urlParams_.Set("alt", alt)
13384 c.urlParams_.Set("prettyPrint", "false")
13385 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs/{jobId}")
13386 urls += "?" + c.urlParams_.Encode()
13387 req, err := http.NewRequest("DELETE", urls, body)
13388 if err != nil {
13389 return nil, err
13390 }
13391 req.Header = reqHeaders
13392 googleapi.Expand(req.URL, map[string]string{
13393 "projectId": c.projectId,
13394 "region": c.region,
13395 "jobId": c.jobId,
13396 })
13397 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13398 }
13399
13400
13401
13402
13403
13404
13405 func (c *ProjectsRegionsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13406 gensupport.SetOptions(c.urlParams_, opts...)
13407 res, err := c.doRequest("json")
13408 if res != nil && res.StatusCode == http.StatusNotModified {
13409 if res.Body != nil {
13410 res.Body.Close()
13411 }
13412 return nil, gensupport.WrapError(&googleapi.Error{
13413 Code: res.StatusCode,
13414 Header: res.Header,
13415 })
13416 }
13417 if err != nil {
13418 return nil, err
13419 }
13420 defer googleapi.CloseBody(res)
13421 if err := googleapi.CheckResponse(res); err != nil {
13422 return nil, gensupport.WrapError(err)
13423 }
13424 ret := &Empty{
13425 ServerResponse: googleapi.ServerResponse{
13426 Header: res.Header,
13427 HTTPStatusCode: res.StatusCode,
13428 },
13429 }
13430 target := &ret
13431 if err := gensupport.DecodeResponse(target, res); err != nil {
13432 return nil, err
13433 }
13434 return ret, nil
13435 }
13436
13437 type ProjectsRegionsJobsGetCall struct {
13438 s *Service
13439 projectId string
13440 region string
13441 jobId string
13442 urlParams_ gensupport.URLParams
13443 ifNoneMatch_ string
13444 ctx_ context.Context
13445 header_ http.Header
13446 }
13447
13448
13449
13450
13451
13452
13453
13454 func (r *ProjectsRegionsJobsService) Get(projectId string, region string, jobId string) *ProjectsRegionsJobsGetCall {
13455 c := &ProjectsRegionsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13456 c.projectId = projectId
13457 c.region = region
13458 c.jobId = jobId
13459 return c
13460 }
13461
13462
13463
13464
13465 func (c *ProjectsRegionsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetCall {
13466 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13467 return c
13468 }
13469
13470
13471
13472
13473 func (c *ProjectsRegionsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsGetCall {
13474 c.ifNoneMatch_ = entityTag
13475 return c
13476 }
13477
13478
13479 func (c *ProjectsRegionsJobsGetCall) Context(ctx context.Context) *ProjectsRegionsJobsGetCall {
13480 c.ctx_ = ctx
13481 return c
13482 }
13483
13484
13485
13486 func (c *ProjectsRegionsJobsGetCall) Header() http.Header {
13487 if c.header_ == nil {
13488 c.header_ = make(http.Header)
13489 }
13490 return c.header_
13491 }
13492
13493 func (c *ProjectsRegionsJobsGetCall) doRequest(alt string) (*http.Response, error) {
13494 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13495 if c.ifNoneMatch_ != "" {
13496 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13497 }
13498 var body io.Reader = nil
13499 c.urlParams_.Set("alt", alt)
13500 c.urlParams_.Set("prettyPrint", "false")
13501 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs/{jobId}")
13502 urls += "?" + c.urlParams_.Encode()
13503 req, err := http.NewRequest("GET", urls, body)
13504 if err != nil {
13505 return nil, err
13506 }
13507 req.Header = reqHeaders
13508 googleapi.Expand(req.URL, map[string]string{
13509 "projectId": c.projectId,
13510 "region": c.region,
13511 "jobId": c.jobId,
13512 })
13513 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13514 }
13515
13516
13517
13518
13519
13520
13521 func (c *ProjectsRegionsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
13522 gensupport.SetOptions(c.urlParams_, opts...)
13523 res, err := c.doRequest("json")
13524 if res != nil && res.StatusCode == http.StatusNotModified {
13525 if res.Body != nil {
13526 res.Body.Close()
13527 }
13528 return nil, gensupport.WrapError(&googleapi.Error{
13529 Code: res.StatusCode,
13530 Header: res.Header,
13531 })
13532 }
13533 if err != nil {
13534 return nil, err
13535 }
13536 defer googleapi.CloseBody(res)
13537 if err := googleapi.CheckResponse(res); err != nil {
13538 return nil, gensupport.WrapError(err)
13539 }
13540 ret := &Job{
13541 ServerResponse: googleapi.ServerResponse{
13542 Header: res.Header,
13543 HTTPStatusCode: res.StatusCode,
13544 },
13545 }
13546 target := &ret
13547 if err := gensupport.DecodeResponse(target, res); err != nil {
13548 return nil, err
13549 }
13550 return ret, nil
13551 }
13552
13553 type ProjectsRegionsJobsGetIamPolicyCall struct {
13554 s *Service
13555 resource string
13556 getiampolicyrequest *GetIamPolicyRequest
13557 urlParams_ gensupport.URLParams
13558 ctx_ context.Context
13559 header_ http.Header
13560 }
13561
13562
13563
13564
13565
13566
13567
13568 func (r *ProjectsRegionsJobsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsJobsGetIamPolicyCall {
13569 c := &ProjectsRegionsJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13570 c.resource = resource
13571 c.getiampolicyrequest = getiampolicyrequest
13572 return c
13573 }
13574
13575
13576
13577
13578 func (c *ProjectsRegionsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetIamPolicyCall {
13579 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13580 return c
13581 }
13582
13583
13584 func (c *ProjectsRegionsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsJobsGetIamPolicyCall {
13585 c.ctx_ = ctx
13586 return c
13587 }
13588
13589
13590
13591 func (c *ProjectsRegionsJobsGetIamPolicyCall) Header() http.Header {
13592 if c.header_ == nil {
13593 c.header_ = make(http.Header)
13594 }
13595 return c.header_
13596 }
13597
13598 func (c *ProjectsRegionsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13599 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13600 var body io.Reader = nil
13601 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
13602 if err != nil {
13603 return nil, err
13604 }
13605 c.urlParams_.Set("alt", alt)
13606 c.urlParams_.Set("prettyPrint", "false")
13607 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
13608 urls += "?" + c.urlParams_.Encode()
13609 req, err := http.NewRequest("POST", urls, body)
13610 if err != nil {
13611 return nil, err
13612 }
13613 req.Header = reqHeaders
13614 googleapi.Expand(req.URL, map[string]string{
13615 "resource": c.resource,
13616 })
13617 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13618 }
13619
13620
13621
13622
13623
13624
13625 func (c *ProjectsRegionsJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13626 gensupport.SetOptions(c.urlParams_, opts...)
13627 res, err := c.doRequest("json")
13628 if res != nil && res.StatusCode == http.StatusNotModified {
13629 if res.Body != nil {
13630 res.Body.Close()
13631 }
13632 return nil, gensupport.WrapError(&googleapi.Error{
13633 Code: res.StatusCode,
13634 Header: res.Header,
13635 })
13636 }
13637 if err != nil {
13638 return nil, err
13639 }
13640 defer googleapi.CloseBody(res)
13641 if err := googleapi.CheckResponse(res); err != nil {
13642 return nil, gensupport.WrapError(err)
13643 }
13644 ret := &Policy{
13645 ServerResponse: googleapi.ServerResponse{
13646 Header: res.Header,
13647 HTTPStatusCode: res.StatusCode,
13648 },
13649 }
13650 target := &ret
13651 if err := gensupport.DecodeResponse(target, res); err != nil {
13652 return nil, err
13653 }
13654 return ret, nil
13655 }
13656
13657 type ProjectsRegionsJobsListCall struct {
13658 s *Service
13659 projectId string
13660 region string
13661 urlParams_ gensupport.URLParams
13662 ifNoneMatch_ string
13663 ctx_ context.Context
13664 header_ http.Header
13665 }
13666
13667
13668
13669
13670
13671
13672 func (r *ProjectsRegionsJobsService) List(projectId string, region string) *ProjectsRegionsJobsListCall {
13673 c := &ProjectsRegionsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13674 c.projectId = projectId
13675 c.region = region
13676 return c
13677 }
13678
13679
13680
13681 func (c *ProjectsRegionsJobsListCall) ClusterName(clusterName string) *ProjectsRegionsJobsListCall {
13682 c.urlParams_.Set("clusterName", clusterName)
13683 return c
13684 }
13685
13686
13687
13688
13689
13690
13691
13692
13693 func (c *ProjectsRegionsJobsListCall) Filter(filter string) *ProjectsRegionsJobsListCall {
13694 c.urlParams_.Set("filter", filter)
13695 return c
13696 }
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712 func (c *ProjectsRegionsJobsListCall) JobStateMatcher(jobStateMatcher string) *ProjectsRegionsJobsListCall {
13713 c.urlParams_.Set("jobStateMatcher", jobStateMatcher)
13714 return c
13715 }
13716
13717
13718
13719 func (c *ProjectsRegionsJobsListCall) PageSize(pageSize int64) *ProjectsRegionsJobsListCall {
13720 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13721 return c
13722 }
13723
13724
13725
13726 func (c *ProjectsRegionsJobsListCall) PageToken(pageToken string) *ProjectsRegionsJobsListCall {
13727 c.urlParams_.Set("pageToken", pageToken)
13728 return c
13729 }
13730
13731
13732
13733
13734 func (c *ProjectsRegionsJobsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsListCall {
13735 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13736 return c
13737 }
13738
13739
13740
13741
13742 func (c *ProjectsRegionsJobsListCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsListCall {
13743 c.ifNoneMatch_ = entityTag
13744 return c
13745 }
13746
13747
13748 func (c *ProjectsRegionsJobsListCall) Context(ctx context.Context) *ProjectsRegionsJobsListCall {
13749 c.ctx_ = ctx
13750 return c
13751 }
13752
13753
13754
13755 func (c *ProjectsRegionsJobsListCall) Header() http.Header {
13756 if c.header_ == nil {
13757 c.header_ = make(http.Header)
13758 }
13759 return c.header_
13760 }
13761
13762 func (c *ProjectsRegionsJobsListCall) doRequest(alt string) (*http.Response, error) {
13763 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13764 if c.ifNoneMatch_ != "" {
13765 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13766 }
13767 var body io.Reader = nil
13768 c.urlParams_.Set("alt", alt)
13769 c.urlParams_.Set("prettyPrint", "false")
13770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs")
13771 urls += "?" + c.urlParams_.Encode()
13772 req, err := http.NewRequest("GET", urls, body)
13773 if err != nil {
13774 return nil, err
13775 }
13776 req.Header = reqHeaders
13777 googleapi.Expand(req.URL, map[string]string{
13778 "projectId": c.projectId,
13779 "region": c.region,
13780 })
13781 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13782 }
13783
13784
13785
13786
13787
13788
13789
13790 func (c *ProjectsRegionsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
13791 gensupport.SetOptions(c.urlParams_, opts...)
13792 res, err := c.doRequest("json")
13793 if res != nil && res.StatusCode == http.StatusNotModified {
13794 if res.Body != nil {
13795 res.Body.Close()
13796 }
13797 return nil, gensupport.WrapError(&googleapi.Error{
13798 Code: res.StatusCode,
13799 Header: res.Header,
13800 })
13801 }
13802 if err != nil {
13803 return nil, err
13804 }
13805 defer googleapi.CloseBody(res)
13806 if err := googleapi.CheckResponse(res); err != nil {
13807 return nil, gensupport.WrapError(err)
13808 }
13809 ret := &ListJobsResponse{
13810 ServerResponse: googleapi.ServerResponse{
13811 Header: res.Header,
13812 HTTPStatusCode: res.StatusCode,
13813 },
13814 }
13815 target := &ret
13816 if err := gensupport.DecodeResponse(target, res); err != nil {
13817 return nil, err
13818 }
13819 return ret, nil
13820 }
13821
13822
13823
13824
13825 func (c *ProjectsRegionsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
13826 c.ctx_ = ctx
13827 defer c.PageToken(c.urlParams_.Get("pageToken"))
13828 for {
13829 x, err := c.Do()
13830 if err != nil {
13831 return err
13832 }
13833 if err := f(x); err != nil {
13834 return err
13835 }
13836 if x.NextPageToken == "" {
13837 return nil
13838 }
13839 c.PageToken(x.NextPageToken)
13840 }
13841 }
13842
13843 type ProjectsRegionsJobsPatchCall struct {
13844 s *Service
13845 projectId string
13846 region string
13847 jobId string
13848 job *Job
13849 urlParams_ gensupport.URLParams
13850 ctx_ context.Context
13851 header_ http.Header
13852 }
13853
13854
13855
13856
13857
13858
13859
13860 func (r *ProjectsRegionsJobsService) Patch(projectId string, region string, jobId string, job *Job) *ProjectsRegionsJobsPatchCall {
13861 c := &ProjectsRegionsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13862 c.projectId = projectId
13863 c.region = region
13864 c.jobId = jobId
13865 c.job = job
13866 return c
13867 }
13868
13869
13870
13871
13872
13873
13874 func (c *ProjectsRegionsJobsPatchCall) UpdateMask(updateMask string) *ProjectsRegionsJobsPatchCall {
13875 c.urlParams_.Set("updateMask", updateMask)
13876 return c
13877 }
13878
13879
13880
13881
13882 func (c *ProjectsRegionsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsPatchCall {
13883 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13884 return c
13885 }
13886
13887
13888 func (c *ProjectsRegionsJobsPatchCall) Context(ctx context.Context) *ProjectsRegionsJobsPatchCall {
13889 c.ctx_ = ctx
13890 return c
13891 }
13892
13893
13894
13895 func (c *ProjectsRegionsJobsPatchCall) Header() http.Header {
13896 if c.header_ == nil {
13897 c.header_ = make(http.Header)
13898 }
13899 return c.header_
13900 }
13901
13902 func (c *ProjectsRegionsJobsPatchCall) doRequest(alt string) (*http.Response, error) {
13903 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13904 var body io.Reader = nil
13905 body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
13906 if err != nil {
13907 return nil, err
13908 }
13909 c.urlParams_.Set("alt", alt)
13910 c.urlParams_.Set("prettyPrint", "false")
13911 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs/{jobId}")
13912 urls += "?" + c.urlParams_.Encode()
13913 req, err := http.NewRequest("PATCH", urls, body)
13914 if err != nil {
13915 return nil, err
13916 }
13917 req.Header = reqHeaders
13918 googleapi.Expand(req.URL, map[string]string{
13919 "projectId": c.projectId,
13920 "region": c.region,
13921 "jobId": c.jobId,
13922 })
13923 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13924 }
13925
13926
13927
13928
13929
13930
13931 func (c *ProjectsRegionsJobsPatchCall) Do(opts ...googleapi.CallOption) (*Job, error) {
13932 gensupport.SetOptions(c.urlParams_, opts...)
13933 res, err := c.doRequest("json")
13934 if res != nil && res.StatusCode == http.StatusNotModified {
13935 if res.Body != nil {
13936 res.Body.Close()
13937 }
13938 return nil, gensupport.WrapError(&googleapi.Error{
13939 Code: res.StatusCode,
13940 Header: res.Header,
13941 })
13942 }
13943 if err != nil {
13944 return nil, err
13945 }
13946 defer googleapi.CloseBody(res)
13947 if err := googleapi.CheckResponse(res); err != nil {
13948 return nil, gensupport.WrapError(err)
13949 }
13950 ret := &Job{
13951 ServerResponse: googleapi.ServerResponse{
13952 Header: res.Header,
13953 HTTPStatusCode: res.StatusCode,
13954 },
13955 }
13956 target := &ret
13957 if err := gensupport.DecodeResponse(target, res); err != nil {
13958 return nil, err
13959 }
13960 return ret, nil
13961 }
13962
13963 type ProjectsRegionsJobsSetIamPolicyCall struct {
13964 s *Service
13965 resource string
13966 setiampolicyrequest *SetIamPolicyRequest
13967 urlParams_ gensupport.URLParams
13968 ctx_ context.Context
13969 header_ http.Header
13970 }
13971
13972
13973
13974
13975
13976
13977
13978
13979 func (r *ProjectsRegionsJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsJobsSetIamPolicyCall {
13980 c := &ProjectsRegionsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13981 c.resource = resource
13982 c.setiampolicyrequest = setiampolicyrequest
13983 return c
13984 }
13985
13986
13987
13988
13989 func (c *ProjectsRegionsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSetIamPolicyCall {
13990 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13991 return c
13992 }
13993
13994
13995 func (c *ProjectsRegionsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsJobsSetIamPolicyCall {
13996 c.ctx_ = ctx
13997 return c
13998 }
13999
14000
14001
14002 func (c *ProjectsRegionsJobsSetIamPolicyCall) Header() http.Header {
14003 if c.header_ == nil {
14004 c.header_ = make(http.Header)
14005 }
14006 return c.header_
14007 }
14008
14009 func (c *ProjectsRegionsJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14010 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14011 var body io.Reader = nil
14012 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
14013 if err != nil {
14014 return nil, err
14015 }
14016 c.urlParams_.Set("alt", alt)
14017 c.urlParams_.Set("prettyPrint", "false")
14018 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
14019 urls += "?" + c.urlParams_.Encode()
14020 req, err := http.NewRequest("POST", urls, body)
14021 if err != nil {
14022 return nil, err
14023 }
14024 req.Header = reqHeaders
14025 googleapi.Expand(req.URL, map[string]string{
14026 "resource": c.resource,
14027 })
14028 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14029 }
14030
14031
14032
14033
14034
14035
14036 func (c *ProjectsRegionsJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14037 gensupport.SetOptions(c.urlParams_, opts...)
14038 res, err := c.doRequest("json")
14039 if res != nil && res.StatusCode == http.StatusNotModified {
14040 if res.Body != nil {
14041 res.Body.Close()
14042 }
14043 return nil, gensupport.WrapError(&googleapi.Error{
14044 Code: res.StatusCode,
14045 Header: res.Header,
14046 })
14047 }
14048 if err != nil {
14049 return nil, err
14050 }
14051 defer googleapi.CloseBody(res)
14052 if err := googleapi.CheckResponse(res); err != nil {
14053 return nil, gensupport.WrapError(err)
14054 }
14055 ret := &Policy{
14056 ServerResponse: googleapi.ServerResponse{
14057 Header: res.Header,
14058 HTTPStatusCode: res.StatusCode,
14059 },
14060 }
14061 target := &ret
14062 if err := gensupport.DecodeResponse(target, res); err != nil {
14063 return nil, err
14064 }
14065 return ret, nil
14066 }
14067
14068 type ProjectsRegionsJobsSubmitCall struct {
14069 s *Service
14070 projectId string
14071 region string
14072 submitjobrequest *SubmitJobRequest
14073 urlParams_ gensupport.URLParams
14074 ctx_ context.Context
14075 header_ http.Header
14076 }
14077
14078
14079
14080
14081
14082
14083 func (r *ProjectsRegionsJobsService) Submit(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitCall {
14084 c := &ProjectsRegionsJobsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14085 c.projectId = projectId
14086 c.region = region
14087 c.submitjobrequest = submitjobrequest
14088 return c
14089 }
14090
14091
14092
14093
14094 func (c *ProjectsRegionsJobsSubmitCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitCall {
14095 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14096 return c
14097 }
14098
14099
14100 func (c *ProjectsRegionsJobsSubmitCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitCall {
14101 c.ctx_ = ctx
14102 return c
14103 }
14104
14105
14106
14107 func (c *ProjectsRegionsJobsSubmitCall) Header() http.Header {
14108 if c.header_ == nil {
14109 c.header_ = make(http.Header)
14110 }
14111 return c.header_
14112 }
14113
14114 func (c *ProjectsRegionsJobsSubmitCall) doRequest(alt string) (*http.Response, error) {
14115 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14116 var body io.Reader = nil
14117 body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitjobrequest)
14118 if err != nil {
14119 return nil, err
14120 }
14121 c.urlParams_.Set("alt", alt)
14122 c.urlParams_.Set("prettyPrint", "false")
14123 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs:submit")
14124 urls += "?" + c.urlParams_.Encode()
14125 req, err := http.NewRequest("POST", urls, body)
14126 if err != nil {
14127 return nil, err
14128 }
14129 req.Header = reqHeaders
14130 googleapi.Expand(req.URL, map[string]string{
14131 "projectId": c.projectId,
14132 "region": c.region,
14133 })
14134 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14135 }
14136
14137
14138
14139
14140
14141
14142 func (c *ProjectsRegionsJobsSubmitCall) Do(opts ...googleapi.CallOption) (*Job, error) {
14143 gensupport.SetOptions(c.urlParams_, opts...)
14144 res, err := c.doRequest("json")
14145 if res != nil && res.StatusCode == http.StatusNotModified {
14146 if res.Body != nil {
14147 res.Body.Close()
14148 }
14149 return nil, gensupport.WrapError(&googleapi.Error{
14150 Code: res.StatusCode,
14151 Header: res.Header,
14152 })
14153 }
14154 if err != nil {
14155 return nil, err
14156 }
14157 defer googleapi.CloseBody(res)
14158 if err := googleapi.CheckResponse(res); err != nil {
14159 return nil, gensupport.WrapError(err)
14160 }
14161 ret := &Job{
14162 ServerResponse: googleapi.ServerResponse{
14163 Header: res.Header,
14164 HTTPStatusCode: res.StatusCode,
14165 },
14166 }
14167 target := &ret
14168 if err := gensupport.DecodeResponse(target, res); err != nil {
14169 return nil, err
14170 }
14171 return ret, nil
14172 }
14173
14174 type ProjectsRegionsJobsSubmitAsOperationCall struct {
14175 s *Service
14176 projectId string
14177 region string
14178 submitjobrequest *SubmitJobRequest
14179 urlParams_ gensupport.URLParams
14180 ctx_ context.Context
14181 header_ http.Header
14182 }
14183
14184
14185
14186
14187
14188
14189 func (r *ProjectsRegionsJobsService) SubmitAsOperation(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitAsOperationCall {
14190 c := &ProjectsRegionsJobsSubmitAsOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14191 c.projectId = projectId
14192 c.region = region
14193 c.submitjobrequest = submitjobrequest
14194 return c
14195 }
14196
14197
14198
14199
14200 func (c *ProjectsRegionsJobsSubmitAsOperationCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitAsOperationCall {
14201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14202 return c
14203 }
14204
14205
14206 func (c *ProjectsRegionsJobsSubmitAsOperationCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitAsOperationCall {
14207 c.ctx_ = ctx
14208 return c
14209 }
14210
14211
14212
14213 func (c *ProjectsRegionsJobsSubmitAsOperationCall) Header() http.Header {
14214 if c.header_ == nil {
14215 c.header_ = make(http.Header)
14216 }
14217 return c.header_
14218 }
14219
14220 func (c *ProjectsRegionsJobsSubmitAsOperationCall) doRequest(alt string) (*http.Response, error) {
14221 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14222 var body io.Reader = nil
14223 body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitjobrequest)
14224 if err != nil {
14225 return nil, err
14226 }
14227 c.urlParams_.Set("alt", alt)
14228 c.urlParams_.Set("prettyPrint", "false")
14229 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs:submitAsOperation")
14230 urls += "?" + c.urlParams_.Encode()
14231 req, err := http.NewRequest("POST", urls, body)
14232 if err != nil {
14233 return nil, err
14234 }
14235 req.Header = reqHeaders
14236 googleapi.Expand(req.URL, map[string]string{
14237 "projectId": c.projectId,
14238 "region": c.region,
14239 })
14240 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14241 }
14242
14243
14244
14245
14246
14247
14248 func (c *ProjectsRegionsJobsSubmitAsOperationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14249 gensupport.SetOptions(c.urlParams_, opts...)
14250 res, err := c.doRequest("json")
14251 if res != nil && res.StatusCode == http.StatusNotModified {
14252 if res.Body != nil {
14253 res.Body.Close()
14254 }
14255 return nil, gensupport.WrapError(&googleapi.Error{
14256 Code: res.StatusCode,
14257 Header: res.Header,
14258 })
14259 }
14260 if err != nil {
14261 return nil, err
14262 }
14263 defer googleapi.CloseBody(res)
14264 if err := googleapi.CheckResponse(res); err != nil {
14265 return nil, gensupport.WrapError(err)
14266 }
14267 ret := &Operation{
14268 ServerResponse: googleapi.ServerResponse{
14269 Header: res.Header,
14270 HTTPStatusCode: res.StatusCode,
14271 },
14272 }
14273 target := &ret
14274 if err := gensupport.DecodeResponse(target, res); err != nil {
14275 return nil, err
14276 }
14277 return ret, nil
14278 }
14279
14280 type ProjectsRegionsJobsTestIamPermissionsCall struct {
14281 s *Service
14282 resource string
14283 testiampermissionsrequest *TestIamPermissionsRequest
14284 urlParams_ gensupport.URLParams
14285 ctx_ context.Context
14286 header_ http.Header
14287 }
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299 func (r *ProjectsRegionsJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsJobsTestIamPermissionsCall {
14300 c := &ProjectsRegionsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14301 c.resource = resource
14302 c.testiampermissionsrequest = testiampermissionsrequest
14303 return c
14304 }
14305
14306
14307
14308
14309 func (c *ProjectsRegionsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsTestIamPermissionsCall {
14310 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14311 return c
14312 }
14313
14314
14315 func (c *ProjectsRegionsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsJobsTestIamPermissionsCall {
14316 c.ctx_ = ctx
14317 return c
14318 }
14319
14320
14321
14322 func (c *ProjectsRegionsJobsTestIamPermissionsCall) Header() http.Header {
14323 if c.header_ == nil {
14324 c.header_ = make(http.Header)
14325 }
14326 return c.header_
14327 }
14328
14329 func (c *ProjectsRegionsJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
14330 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14331 var body io.Reader = nil
14332 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
14333 if err != nil {
14334 return nil, err
14335 }
14336 c.urlParams_.Set("alt", alt)
14337 c.urlParams_.Set("prettyPrint", "false")
14338 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
14339 urls += "?" + c.urlParams_.Encode()
14340 req, err := http.NewRequest("POST", urls, body)
14341 if err != nil {
14342 return nil, err
14343 }
14344 req.Header = reqHeaders
14345 googleapi.Expand(req.URL, map[string]string{
14346 "resource": c.resource,
14347 })
14348 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14349 }
14350
14351
14352
14353
14354
14355
14356
14357 func (c *ProjectsRegionsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
14358 gensupport.SetOptions(c.urlParams_, opts...)
14359 res, err := c.doRequest("json")
14360 if res != nil && res.StatusCode == http.StatusNotModified {
14361 if res.Body != nil {
14362 res.Body.Close()
14363 }
14364 return nil, gensupport.WrapError(&googleapi.Error{
14365 Code: res.StatusCode,
14366 Header: res.Header,
14367 })
14368 }
14369 if err != nil {
14370 return nil, err
14371 }
14372 defer googleapi.CloseBody(res)
14373 if err := googleapi.CheckResponse(res); err != nil {
14374 return nil, gensupport.WrapError(err)
14375 }
14376 ret := &TestIamPermissionsResponse{
14377 ServerResponse: googleapi.ServerResponse{
14378 Header: res.Header,
14379 HTTPStatusCode: res.StatusCode,
14380 },
14381 }
14382 target := &ret
14383 if err := gensupport.DecodeResponse(target, res); err != nil {
14384 return nil, err
14385 }
14386 return ret, nil
14387 }
14388
14389 type ProjectsRegionsOperationsCancelCall struct {
14390 s *Service
14391 name string
14392 urlParams_ gensupport.URLParams
14393 ctx_ context.Context
14394 header_ http.Header
14395 }
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408 func (r *ProjectsRegionsOperationsService) Cancel(name string) *ProjectsRegionsOperationsCancelCall {
14409 c := &ProjectsRegionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14410 c.name = name
14411 return c
14412 }
14413
14414
14415
14416
14417 func (c *ProjectsRegionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsCancelCall {
14418 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14419 return c
14420 }
14421
14422
14423 func (c *ProjectsRegionsOperationsCancelCall) Context(ctx context.Context) *ProjectsRegionsOperationsCancelCall {
14424 c.ctx_ = ctx
14425 return c
14426 }
14427
14428
14429
14430 func (c *ProjectsRegionsOperationsCancelCall) Header() http.Header {
14431 if c.header_ == nil {
14432 c.header_ = make(http.Header)
14433 }
14434 return c.header_
14435 }
14436
14437 func (c *ProjectsRegionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
14438 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14439 var body io.Reader = nil
14440 c.urlParams_.Set("alt", alt)
14441 c.urlParams_.Set("prettyPrint", "false")
14442 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
14443 urls += "?" + c.urlParams_.Encode()
14444 req, err := http.NewRequest("POST", urls, body)
14445 if err != nil {
14446 return nil, err
14447 }
14448 req.Header = reqHeaders
14449 googleapi.Expand(req.URL, map[string]string{
14450 "name": c.name,
14451 })
14452 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14453 }
14454
14455
14456
14457
14458
14459
14460 func (c *ProjectsRegionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14461 gensupport.SetOptions(c.urlParams_, opts...)
14462 res, err := c.doRequest("json")
14463 if res != nil && res.StatusCode == http.StatusNotModified {
14464 if res.Body != nil {
14465 res.Body.Close()
14466 }
14467 return nil, gensupport.WrapError(&googleapi.Error{
14468 Code: res.StatusCode,
14469 Header: res.Header,
14470 })
14471 }
14472 if err != nil {
14473 return nil, err
14474 }
14475 defer googleapi.CloseBody(res)
14476 if err := googleapi.CheckResponse(res); err != nil {
14477 return nil, gensupport.WrapError(err)
14478 }
14479 ret := &Empty{
14480 ServerResponse: googleapi.ServerResponse{
14481 Header: res.Header,
14482 HTTPStatusCode: res.StatusCode,
14483 },
14484 }
14485 target := &ret
14486 if err := gensupport.DecodeResponse(target, res); err != nil {
14487 return nil, err
14488 }
14489 return ret, nil
14490 }
14491
14492 type ProjectsRegionsOperationsDeleteCall struct {
14493 s *Service
14494 name string
14495 urlParams_ gensupport.URLParams
14496 ctx_ context.Context
14497 header_ http.Header
14498 }
14499
14500
14501
14502
14503
14504
14505
14506 func (r *ProjectsRegionsOperationsService) Delete(name string) *ProjectsRegionsOperationsDeleteCall {
14507 c := &ProjectsRegionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14508 c.name = name
14509 return c
14510 }
14511
14512
14513
14514
14515 func (c *ProjectsRegionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsDeleteCall {
14516 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14517 return c
14518 }
14519
14520
14521 func (c *ProjectsRegionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsRegionsOperationsDeleteCall {
14522 c.ctx_ = ctx
14523 return c
14524 }
14525
14526
14527
14528 func (c *ProjectsRegionsOperationsDeleteCall) Header() http.Header {
14529 if c.header_ == nil {
14530 c.header_ = make(http.Header)
14531 }
14532 return c.header_
14533 }
14534
14535 func (c *ProjectsRegionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
14536 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14537 var body io.Reader = nil
14538 c.urlParams_.Set("alt", alt)
14539 c.urlParams_.Set("prettyPrint", "false")
14540 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14541 urls += "?" + c.urlParams_.Encode()
14542 req, err := http.NewRequest("DELETE", urls, body)
14543 if err != nil {
14544 return nil, err
14545 }
14546 req.Header = reqHeaders
14547 googleapi.Expand(req.URL, map[string]string{
14548 "name": c.name,
14549 })
14550 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14551 }
14552
14553
14554
14555
14556
14557
14558 func (c *ProjectsRegionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14559 gensupport.SetOptions(c.urlParams_, opts...)
14560 res, err := c.doRequest("json")
14561 if res != nil && res.StatusCode == http.StatusNotModified {
14562 if res.Body != nil {
14563 res.Body.Close()
14564 }
14565 return nil, gensupport.WrapError(&googleapi.Error{
14566 Code: res.StatusCode,
14567 Header: res.Header,
14568 })
14569 }
14570 if err != nil {
14571 return nil, err
14572 }
14573 defer googleapi.CloseBody(res)
14574 if err := googleapi.CheckResponse(res); err != nil {
14575 return nil, gensupport.WrapError(err)
14576 }
14577 ret := &Empty{
14578 ServerResponse: googleapi.ServerResponse{
14579 Header: res.Header,
14580 HTTPStatusCode: res.StatusCode,
14581 },
14582 }
14583 target := &ret
14584 if err := gensupport.DecodeResponse(target, res); err != nil {
14585 return nil, err
14586 }
14587 return ret, nil
14588 }
14589
14590 type ProjectsRegionsOperationsGetCall struct {
14591 s *Service
14592 name string
14593 urlParams_ gensupport.URLParams
14594 ifNoneMatch_ string
14595 ctx_ context.Context
14596 header_ http.Header
14597 }
14598
14599
14600
14601
14602
14603
14604 func (r *ProjectsRegionsOperationsService) Get(name string) *ProjectsRegionsOperationsGetCall {
14605 c := &ProjectsRegionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14606 c.name = name
14607 return c
14608 }
14609
14610
14611
14612
14613 func (c *ProjectsRegionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsGetCall {
14614 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14615 return c
14616 }
14617
14618
14619
14620
14621 func (c *ProjectsRegionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsGetCall {
14622 c.ifNoneMatch_ = entityTag
14623 return c
14624 }
14625
14626
14627 func (c *ProjectsRegionsOperationsGetCall) Context(ctx context.Context) *ProjectsRegionsOperationsGetCall {
14628 c.ctx_ = ctx
14629 return c
14630 }
14631
14632
14633
14634 func (c *ProjectsRegionsOperationsGetCall) Header() http.Header {
14635 if c.header_ == nil {
14636 c.header_ = make(http.Header)
14637 }
14638 return c.header_
14639 }
14640
14641 func (c *ProjectsRegionsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
14642 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14643 if c.ifNoneMatch_ != "" {
14644 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14645 }
14646 var body io.Reader = nil
14647 c.urlParams_.Set("alt", alt)
14648 c.urlParams_.Set("prettyPrint", "false")
14649 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14650 urls += "?" + c.urlParams_.Encode()
14651 req, err := http.NewRequest("GET", urls, body)
14652 if err != nil {
14653 return nil, err
14654 }
14655 req.Header = reqHeaders
14656 googleapi.Expand(req.URL, map[string]string{
14657 "name": c.name,
14658 })
14659 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14660 }
14661
14662
14663
14664
14665
14666
14667 func (c *ProjectsRegionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14668 gensupport.SetOptions(c.urlParams_, opts...)
14669 res, err := c.doRequest("json")
14670 if res != nil && res.StatusCode == http.StatusNotModified {
14671 if res.Body != nil {
14672 res.Body.Close()
14673 }
14674 return nil, gensupport.WrapError(&googleapi.Error{
14675 Code: res.StatusCode,
14676 Header: res.Header,
14677 })
14678 }
14679 if err != nil {
14680 return nil, err
14681 }
14682 defer googleapi.CloseBody(res)
14683 if err := googleapi.CheckResponse(res); err != nil {
14684 return nil, gensupport.WrapError(err)
14685 }
14686 ret := &Operation{
14687 ServerResponse: googleapi.ServerResponse{
14688 Header: res.Header,
14689 HTTPStatusCode: res.StatusCode,
14690 },
14691 }
14692 target := &ret
14693 if err := gensupport.DecodeResponse(target, res); err != nil {
14694 return nil, err
14695 }
14696 return ret, nil
14697 }
14698
14699 type ProjectsRegionsOperationsGetIamPolicyCall struct {
14700 s *Service
14701 resource string
14702 getiampolicyrequest *GetIamPolicyRequest
14703 urlParams_ gensupport.URLParams
14704 ctx_ context.Context
14705 header_ http.Header
14706 }
14707
14708
14709
14710
14711
14712
14713
14714 func (r *ProjectsRegionsOperationsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsOperationsGetIamPolicyCall {
14715 c := &ProjectsRegionsOperationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14716 c.resource = resource
14717 c.getiampolicyrequest = getiampolicyrequest
14718 return c
14719 }
14720
14721
14722
14723
14724 func (c *ProjectsRegionsOperationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsGetIamPolicyCall {
14725 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14726 return c
14727 }
14728
14729
14730 func (c *ProjectsRegionsOperationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsOperationsGetIamPolicyCall {
14731 c.ctx_ = ctx
14732 return c
14733 }
14734
14735
14736
14737 func (c *ProjectsRegionsOperationsGetIamPolicyCall) Header() http.Header {
14738 if c.header_ == nil {
14739 c.header_ = make(http.Header)
14740 }
14741 return c.header_
14742 }
14743
14744 func (c *ProjectsRegionsOperationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14745 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14746 var body io.Reader = nil
14747 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
14748 if err != nil {
14749 return nil, err
14750 }
14751 c.urlParams_.Set("alt", alt)
14752 c.urlParams_.Set("prettyPrint", "false")
14753 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
14754 urls += "?" + c.urlParams_.Encode()
14755 req, err := http.NewRequest("POST", urls, body)
14756 if err != nil {
14757 return nil, err
14758 }
14759 req.Header = reqHeaders
14760 googleapi.Expand(req.URL, map[string]string{
14761 "resource": c.resource,
14762 })
14763 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14764 }
14765
14766
14767
14768
14769
14770
14771 func (c *ProjectsRegionsOperationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14772 gensupport.SetOptions(c.urlParams_, opts...)
14773 res, err := c.doRequest("json")
14774 if res != nil && res.StatusCode == http.StatusNotModified {
14775 if res.Body != nil {
14776 res.Body.Close()
14777 }
14778 return nil, gensupport.WrapError(&googleapi.Error{
14779 Code: res.StatusCode,
14780 Header: res.Header,
14781 })
14782 }
14783 if err != nil {
14784 return nil, err
14785 }
14786 defer googleapi.CloseBody(res)
14787 if err := googleapi.CheckResponse(res); err != nil {
14788 return nil, gensupport.WrapError(err)
14789 }
14790 ret := &Policy{
14791 ServerResponse: googleapi.ServerResponse{
14792 Header: res.Header,
14793 HTTPStatusCode: res.StatusCode,
14794 },
14795 }
14796 target := &ret
14797 if err := gensupport.DecodeResponse(target, res); err != nil {
14798 return nil, err
14799 }
14800 return ret, nil
14801 }
14802
14803 type ProjectsRegionsOperationsListCall struct {
14804 s *Service
14805 name string
14806 urlParams_ gensupport.URLParams
14807 ifNoneMatch_ string
14808 ctx_ context.Context
14809 header_ http.Header
14810 }
14811
14812
14813
14814
14815
14816 func (r *ProjectsRegionsOperationsService) List(name string) *ProjectsRegionsOperationsListCall {
14817 c := &ProjectsRegionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14818 c.name = name
14819 return c
14820 }
14821
14822
14823 func (c *ProjectsRegionsOperationsListCall) Filter(filter string) *ProjectsRegionsOperationsListCall {
14824 c.urlParams_.Set("filter", filter)
14825 return c
14826 }
14827
14828
14829
14830 func (c *ProjectsRegionsOperationsListCall) PageSize(pageSize int64) *ProjectsRegionsOperationsListCall {
14831 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14832 return c
14833 }
14834
14835
14836
14837 func (c *ProjectsRegionsOperationsListCall) PageToken(pageToken string) *ProjectsRegionsOperationsListCall {
14838 c.urlParams_.Set("pageToken", pageToken)
14839 return c
14840 }
14841
14842
14843
14844
14845 func (c *ProjectsRegionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsListCall {
14846 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14847 return c
14848 }
14849
14850
14851
14852
14853 func (c *ProjectsRegionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsListCall {
14854 c.ifNoneMatch_ = entityTag
14855 return c
14856 }
14857
14858
14859 func (c *ProjectsRegionsOperationsListCall) Context(ctx context.Context) *ProjectsRegionsOperationsListCall {
14860 c.ctx_ = ctx
14861 return c
14862 }
14863
14864
14865
14866 func (c *ProjectsRegionsOperationsListCall) Header() http.Header {
14867 if c.header_ == nil {
14868 c.header_ = make(http.Header)
14869 }
14870 return c.header_
14871 }
14872
14873 func (c *ProjectsRegionsOperationsListCall) doRequest(alt string) (*http.Response, error) {
14874 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14875 if c.ifNoneMatch_ != "" {
14876 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14877 }
14878 var body io.Reader = nil
14879 c.urlParams_.Set("alt", alt)
14880 c.urlParams_.Set("prettyPrint", "false")
14881 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14882 urls += "?" + c.urlParams_.Encode()
14883 req, err := http.NewRequest("GET", urls, body)
14884 if err != nil {
14885 return nil, err
14886 }
14887 req.Header = reqHeaders
14888 googleapi.Expand(req.URL, map[string]string{
14889 "name": c.name,
14890 })
14891 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14892 }
14893
14894
14895
14896
14897
14898
14899
14900 func (c *ProjectsRegionsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
14901 gensupport.SetOptions(c.urlParams_, opts...)
14902 res, err := c.doRequest("json")
14903 if res != nil && res.StatusCode == http.StatusNotModified {
14904 if res.Body != nil {
14905 res.Body.Close()
14906 }
14907 return nil, gensupport.WrapError(&googleapi.Error{
14908 Code: res.StatusCode,
14909 Header: res.Header,
14910 })
14911 }
14912 if err != nil {
14913 return nil, err
14914 }
14915 defer googleapi.CloseBody(res)
14916 if err := googleapi.CheckResponse(res); err != nil {
14917 return nil, gensupport.WrapError(err)
14918 }
14919 ret := &ListOperationsResponse{
14920 ServerResponse: googleapi.ServerResponse{
14921 Header: res.Header,
14922 HTTPStatusCode: res.StatusCode,
14923 },
14924 }
14925 target := &ret
14926 if err := gensupport.DecodeResponse(target, res); err != nil {
14927 return nil, err
14928 }
14929 return ret, nil
14930 }
14931
14932
14933
14934
14935 func (c *ProjectsRegionsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
14936 c.ctx_ = ctx
14937 defer c.PageToken(c.urlParams_.Get("pageToken"))
14938 for {
14939 x, err := c.Do()
14940 if err != nil {
14941 return err
14942 }
14943 if err := f(x); err != nil {
14944 return err
14945 }
14946 if x.NextPageToken == "" {
14947 return nil
14948 }
14949 c.PageToken(x.NextPageToken)
14950 }
14951 }
14952
14953 type ProjectsRegionsOperationsSetIamPolicyCall struct {
14954 s *Service
14955 resource string
14956 setiampolicyrequest *SetIamPolicyRequest
14957 urlParams_ gensupport.URLParams
14958 ctx_ context.Context
14959 header_ http.Header
14960 }
14961
14962
14963
14964
14965
14966
14967
14968
14969 func (r *ProjectsRegionsOperationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsOperationsSetIamPolicyCall {
14970 c := &ProjectsRegionsOperationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14971 c.resource = resource
14972 c.setiampolicyrequest = setiampolicyrequest
14973 return c
14974 }
14975
14976
14977
14978
14979 func (c *ProjectsRegionsOperationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsSetIamPolicyCall {
14980 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14981 return c
14982 }
14983
14984
14985 func (c *ProjectsRegionsOperationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsOperationsSetIamPolicyCall {
14986 c.ctx_ = ctx
14987 return c
14988 }
14989
14990
14991
14992 func (c *ProjectsRegionsOperationsSetIamPolicyCall) Header() http.Header {
14993 if c.header_ == nil {
14994 c.header_ = make(http.Header)
14995 }
14996 return c.header_
14997 }
14998
14999 func (c *ProjectsRegionsOperationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
15000 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15001 var body io.Reader = nil
15002 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
15003 if err != nil {
15004 return nil, err
15005 }
15006 c.urlParams_.Set("alt", alt)
15007 c.urlParams_.Set("prettyPrint", "false")
15008 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
15009 urls += "?" + c.urlParams_.Encode()
15010 req, err := http.NewRequest("POST", urls, body)
15011 if err != nil {
15012 return nil, err
15013 }
15014 req.Header = reqHeaders
15015 googleapi.Expand(req.URL, map[string]string{
15016 "resource": c.resource,
15017 })
15018 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15019 }
15020
15021
15022
15023
15024
15025
15026 func (c *ProjectsRegionsOperationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
15027 gensupport.SetOptions(c.urlParams_, opts...)
15028 res, err := c.doRequest("json")
15029 if res != nil && res.StatusCode == http.StatusNotModified {
15030 if res.Body != nil {
15031 res.Body.Close()
15032 }
15033 return nil, gensupport.WrapError(&googleapi.Error{
15034 Code: res.StatusCode,
15035 Header: res.Header,
15036 })
15037 }
15038 if err != nil {
15039 return nil, err
15040 }
15041 defer googleapi.CloseBody(res)
15042 if err := googleapi.CheckResponse(res); err != nil {
15043 return nil, gensupport.WrapError(err)
15044 }
15045 ret := &Policy{
15046 ServerResponse: googleapi.ServerResponse{
15047 Header: res.Header,
15048 HTTPStatusCode: res.StatusCode,
15049 },
15050 }
15051 target := &ret
15052 if err := gensupport.DecodeResponse(target, res); err != nil {
15053 return nil, err
15054 }
15055 return ret, nil
15056 }
15057
15058 type ProjectsRegionsOperationsTestIamPermissionsCall struct {
15059 s *Service
15060 resource string
15061 testiampermissionsrequest *TestIamPermissionsRequest
15062 urlParams_ gensupport.URLParams
15063 ctx_ context.Context
15064 header_ http.Header
15065 }
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077 func (r *ProjectsRegionsOperationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsOperationsTestIamPermissionsCall {
15078 c := &ProjectsRegionsOperationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15079 c.resource = resource
15080 c.testiampermissionsrequest = testiampermissionsrequest
15081 return c
15082 }
15083
15084
15085
15086
15087 func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsTestIamPermissionsCall {
15088 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15089 return c
15090 }
15091
15092
15093 func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsOperationsTestIamPermissionsCall {
15094 c.ctx_ = ctx
15095 return c
15096 }
15097
15098
15099
15100 func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Header() http.Header {
15101 if c.header_ == nil {
15102 c.header_ = make(http.Header)
15103 }
15104 return c.header_
15105 }
15106
15107 func (c *ProjectsRegionsOperationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
15108 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15109 var body io.Reader = nil
15110 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
15111 if err != nil {
15112 return nil, err
15113 }
15114 c.urlParams_.Set("alt", alt)
15115 c.urlParams_.Set("prettyPrint", "false")
15116 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
15117 urls += "?" + c.urlParams_.Encode()
15118 req, err := http.NewRequest("POST", urls, body)
15119 if err != nil {
15120 return nil, err
15121 }
15122 req.Header = reqHeaders
15123 googleapi.Expand(req.URL, map[string]string{
15124 "resource": c.resource,
15125 })
15126 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15127 }
15128
15129
15130
15131
15132
15133
15134
15135 func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
15136 gensupport.SetOptions(c.urlParams_, opts...)
15137 res, err := c.doRequest("json")
15138 if res != nil && res.StatusCode == http.StatusNotModified {
15139 if res.Body != nil {
15140 res.Body.Close()
15141 }
15142 return nil, gensupport.WrapError(&googleapi.Error{
15143 Code: res.StatusCode,
15144 Header: res.Header,
15145 })
15146 }
15147 if err != nil {
15148 return nil, err
15149 }
15150 defer googleapi.CloseBody(res)
15151 if err := googleapi.CheckResponse(res); err != nil {
15152 return nil, gensupport.WrapError(err)
15153 }
15154 ret := &TestIamPermissionsResponse{
15155 ServerResponse: googleapi.ServerResponse{
15156 Header: res.Header,
15157 HTTPStatusCode: res.StatusCode,
15158 },
15159 }
15160 target := &ret
15161 if err := gensupport.DecodeResponse(target, res); err != nil {
15162 return nil, err
15163 }
15164 return ret, nil
15165 }
15166
15167 type ProjectsRegionsWorkflowTemplatesCreateCall struct {
15168 s *Service
15169 parent string
15170 workflowtemplate *WorkflowTemplate
15171 urlParams_ gensupport.URLParams
15172 ctx_ context.Context
15173 header_ http.Header
15174 }
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185 func (r *ProjectsRegionsWorkflowTemplatesService) Create(parent string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesCreateCall {
15186 c := &ProjectsRegionsWorkflowTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15187 c.parent = parent
15188 c.workflowtemplate = workflowtemplate
15189 return c
15190 }
15191
15192
15193
15194
15195 func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesCreateCall {
15196 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15197 return c
15198 }
15199
15200
15201 func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesCreateCall {
15202 c.ctx_ = ctx
15203 return c
15204 }
15205
15206
15207
15208 func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Header() http.Header {
15209 if c.header_ == nil {
15210 c.header_ = make(http.Header)
15211 }
15212 return c.header_
15213 }
15214
15215 func (c *ProjectsRegionsWorkflowTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
15216 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15217 var body io.Reader = nil
15218 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
15219 if err != nil {
15220 return nil, err
15221 }
15222 c.urlParams_.Set("alt", alt)
15223 c.urlParams_.Set("prettyPrint", "false")
15224 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates")
15225 urls += "?" + c.urlParams_.Encode()
15226 req, err := http.NewRequest("POST", urls, body)
15227 if err != nil {
15228 return nil, err
15229 }
15230 req.Header = reqHeaders
15231 googleapi.Expand(req.URL, map[string]string{
15232 "parent": c.parent,
15233 })
15234 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15235 }
15236
15237
15238
15239
15240
15241
15242
15243 func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
15244 gensupport.SetOptions(c.urlParams_, opts...)
15245 res, err := c.doRequest("json")
15246 if res != nil && res.StatusCode == http.StatusNotModified {
15247 if res.Body != nil {
15248 res.Body.Close()
15249 }
15250 return nil, gensupport.WrapError(&googleapi.Error{
15251 Code: res.StatusCode,
15252 Header: res.Header,
15253 })
15254 }
15255 if err != nil {
15256 return nil, err
15257 }
15258 defer googleapi.CloseBody(res)
15259 if err := googleapi.CheckResponse(res); err != nil {
15260 return nil, gensupport.WrapError(err)
15261 }
15262 ret := &WorkflowTemplate{
15263 ServerResponse: googleapi.ServerResponse{
15264 Header: res.Header,
15265 HTTPStatusCode: res.StatusCode,
15266 },
15267 }
15268 target := &ret
15269 if err := gensupport.DecodeResponse(target, res); err != nil {
15270 return nil, err
15271 }
15272 return ret, nil
15273 }
15274
15275 type ProjectsRegionsWorkflowTemplatesDeleteCall struct {
15276 s *Service
15277 name string
15278 urlParams_ gensupport.URLParams
15279 ctx_ context.Context
15280 header_ http.Header
15281 }
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294 func (r *ProjectsRegionsWorkflowTemplatesService) Delete(name string) *ProjectsRegionsWorkflowTemplatesDeleteCall {
15295 c := &ProjectsRegionsWorkflowTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15296 c.name = name
15297 return c
15298 }
15299
15300
15301
15302
15303 func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Version(version int64) *ProjectsRegionsWorkflowTemplatesDeleteCall {
15304 c.urlParams_.Set("version", fmt.Sprint(version))
15305 return c
15306 }
15307
15308
15309
15310
15311 func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesDeleteCall {
15312 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15313 return c
15314 }
15315
15316
15317 func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesDeleteCall {
15318 c.ctx_ = ctx
15319 return c
15320 }
15321
15322
15323
15324 func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Header() http.Header {
15325 if c.header_ == nil {
15326 c.header_ = make(http.Header)
15327 }
15328 return c.header_
15329 }
15330
15331 func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
15332 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15333 var body io.Reader = nil
15334 c.urlParams_.Set("alt", alt)
15335 c.urlParams_.Set("prettyPrint", "false")
15336 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15337 urls += "?" + c.urlParams_.Encode()
15338 req, err := http.NewRequest("DELETE", urls, body)
15339 if err != nil {
15340 return nil, err
15341 }
15342 req.Header = reqHeaders
15343 googleapi.Expand(req.URL, map[string]string{
15344 "name": c.name,
15345 })
15346 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15347 }
15348
15349
15350
15351
15352
15353
15354 func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
15355 gensupport.SetOptions(c.urlParams_, opts...)
15356 res, err := c.doRequest("json")
15357 if res != nil && res.StatusCode == http.StatusNotModified {
15358 if res.Body != nil {
15359 res.Body.Close()
15360 }
15361 return nil, gensupport.WrapError(&googleapi.Error{
15362 Code: res.StatusCode,
15363 Header: res.Header,
15364 })
15365 }
15366 if err != nil {
15367 return nil, err
15368 }
15369 defer googleapi.CloseBody(res)
15370 if err := googleapi.CheckResponse(res); err != nil {
15371 return nil, gensupport.WrapError(err)
15372 }
15373 ret := &Empty{
15374 ServerResponse: googleapi.ServerResponse{
15375 Header: res.Header,
15376 HTTPStatusCode: res.StatusCode,
15377 },
15378 }
15379 target := &ret
15380 if err := gensupport.DecodeResponse(target, res); err != nil {
15381 return nil, err
15382 }
15383 return ret, nil
15384 }
15385
15386 type ProjectsRegionsWorkflowTemplatesGetCall struct {
15387 s *Service
15388 name string
15389 urlParams_ gensupport.URLParams
15390 ifNoneMatch_ string
15391 ctx_ context.Context
15392 header_ http.Header
15393 }
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406 func (r *ProjectsRegionsWorkflowTemplatesService) Get(name string) *ProjectsRegionsWorkflowTemplatesGetCall {
15407 c := &ProjectsRegionsWorkflowTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15408 c.name = name
15409 return c
15410 }
15411
15412
15413
15414
15415 func (c *ProjectsRegionsWorkflowTemplatesGetCall) Version(version int64) *ProjectsRegionsWorkflowTemplatesGetCall {
15416 c.urlParams_.Set("version", fmt.Sprint(version))
15417 return c
15418 }
15419
15420
15421
15422
15423 func (c *ProjectsRegionsWorkflowTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesGetCall {
15424 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15425 return c
15426 }
15427
15428
15429
15430
15431 func (c *ProjectsRegionsWorkflowTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesGetCall {
15432 c.ifNoneMatch_ = entityTag
15433 return c
15434 }
15435
15436
15437 func (c *ProjectsRegionsWorkflowTemplatesGetCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesGetCall {
15438 c.ctx_ = ctx
15439 return c
15440 }
15441
15442
15443
15444 func (c *ProjectsRegionsWorkflowTemplatesGetCall) Header() http.Header {
15445 if c.header_ == nil {
15446 c.header_ = make(http.Header)
15447 }
15448 return c.header_
15449 }
15450
15451 func (c *ProjectsRegionsWorkflowTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
15452 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15453 if c.ifNoneMatch_ != "" {
15454 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15455 }
15456 var body io.Reader = nil
15457 c.urlParams_.Set("alt", alt)
15458 c.urlParams_.Set("prettyPrint", "false")
15459 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15460 urls += "?" + c.urlParams_.Encode()
15461 req, err := http.NewRequest("GET", urls, body)
15462 if err != nil {
15463 return nil, err
15464 }
15465 req.Header = reqHeaders
15466 googleapi.Expand(req.URL, map[string]string{
15467 "name": c.name,
15468 })
15469 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15470 }
15471
15472
15473
15474
15475
15476
15477
15478 func (c *ProjectsRegionsWorkflowTemplatesGetCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
15479 gensupport.SetOptions(c.urlParams_, opts...)
15480 res, err := c.doRequest("json")
15481 if res != nil && res.StatusCode == http.StatusNotModified {
15482 if res.Body != nil {
15483 res.Body.Close()
15484 }
15485 return nil, gensupport.WrapError(&googleapi.Error{
15486 Code: res.StatusCode,
15487 Header: res.Header,
15488 })
15489 }
15490 if err != nil {
15491 return nil, err
15492 }
15493 defer googleapi.CloseBody(res)
15494 if err := googleapi.CheckResponse(res); err != nil {
15495 return nil, gensupport.WrapError(err)
15496 }
15497 ret := &WorkflowTemplate{
15498 ServerResponse: googleapi.ServerResponse{
15499 Header: res.Header,
15500 HTTPStatusCode: res.StatusCode,
15501 },
15502 }
15503 target := &ret
15504 if err := gensupport.DecodeResponse(target, res); err != nil {
15505 return nil, err
15506 }
15507 return ret, nil
15508 }
15509
15510 type ProjectsRegionsWorkflowTemplatesGetIamPolicyCall struct {
15511 s *Service
15512 resource string
15513 getiampolicyrequest *GetIamPolicyRequest
15514 urlParams_ gensupport.URLParams
15515 ctx_ context.Context
15516 header_ http.Header
15517 }
15518
15519
15520
15521
15522
15523
15524
15525 func (r *ProjectsRegionsWorkflowTemplatesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
15526 c := &ProjectsRegionsWorkflowTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15527 c.resource = resource
15528 c.getiampolicyrequest = getiampolicyrequest
15529 return c
15530 }
15531
15532
15533
15534
15535 func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
15536 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15537 return c
15538 }
15539
15540
15541 func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
15542 c.ctx_ = ctx
15543 return c
15544 }
15545
15546
15547
15548 func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Header() http.Header {
15549 if c.header_ == nil {
15550 c.header_ = make(http.Header)
15551 }
15552 return c.header_
15553 }
15554
15555 func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
15556 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15557 var body io.Reader = nil
15558 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
15559 if err != nil {
15560 return nil, err
15561 }
15562 c.urlParams_.Set("alt", alt)
15563 c.urlParams_.Set("prettyPrint", "false")
15564 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
15565 urls += "?" + c.urlParams_.Encode()
15566 req, err := http.NewRequest("POST", urls, body)
15567 if err != nil {
15568 return nil, err
15569 }
15570 req.Header = reqHeaders
15571 googleapi.Expand(req.URL, map[string]string{
15572 "resource": c.resource,
15573 })
15574 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15575 }
15576
15577
15578
15579
15580
15581
15582 func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
15583 gensupport.SetOptions(c.urlParams_, opts...)
15584 res, err := c.doRequest("json")
15585 if res != nil && res.StatusCode == http.StatusNotModified {
15586 if res.Body != nil {
15587 res.Body.Close()
15588 }
15589 return nil, gensupport.WrapError(&googleapi.Error{
15590 Code: res.StatusCode,
15591 Header: res.Header,
15592 })
15593 }
15594 if err != nil {
15595 return nil, err
15596 }
15597 defer googleapi.CloseBody(res)
15598 if err := googleapi.CheckResponse(res); err != nil {
15599 return nil, gensupport.WrapError(err)
15600 }
15601 ret := &Policy{
15602 ServerResponse: googleapi.ServerResponse{
15603 Header: res.Header,
15604 HTTPStatusCode: res.StatusCode,
15605 },
15606 }
15607 target := &ret
15608 if err := gensupport.DecodeResponse(target, res); err != nil {
15609 return nil, err
15610 }
15611 return ret, nil
15612 }
15613
15614 type ProjectsRegionsWorkflowTemplatesInstantiateCall struct {
15615 s *Service
15616 name string
15617 instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest
15618 urlParams_ gensupport.URLParams
15619 ctx_ context.Context
15620 header_ http.Header
15621 }
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642 func (r *ProjectsRegionsWorkflowTemplatesService) Instantiate(name string, instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
15643 c := &ProjectsRegionsWorkflowTemplatesInstantiateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15644 c.name = name
15645 c.instantiateworkflowtemplaterequest = instantiateworkflowtemplaterequest
15646 return c
15647 }
15648
15649
15650
15651
15652 func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
15653 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15654 return c
15655 }
15656
15657
15658 func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
15659 c.ctx_ = ctx
15660 return c
15661 }
15662
15663
15664
15665 func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Header() http.Header {
15666 if c.header_ == nil {
15667 c.header_ = make(http.Header)
15668 }
15669 return c.header_
15670 }
15671
15672 func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) doRequest(alt string) (*http.Response, error) {
15673 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15674 var body io.Reader = nil
15675 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantiateworkflowtemplaterequest)
15676 if err != nil {
15677 return nil, err
15678 }
15679 c.urlParams_.Set("alt", alt)
15680 c.urlParams_.Set("prettyPrint", "false")
15681 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:instantiate")
15682 urls += "?" + c.urlParams_.Encode()
15683 req, err := http.NewRequest("POST", urls, body)
15684 if err != nil {
15685 return nil, err
15686 }
15687 req.Header = reqHeaders
15688 googleapi.Expand(req.URL, map[string]string{
15689 "name": c.name,
15690 })
15691 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15692 }
15693
15694
15695
15696
15697
15698
15699 func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15700 gensupport.SetOptions(c.urlParams_, opts...)
15701 res, err := c.doRequest("json")
15702 if res != nil && res.StatusCode == http.StatusNotModified {
15703 if res.Body != nil {
15704 res.Body.Close()
15705 }
15706 return nil, gensupport.WrapError(&googleapi.Error{
15707 Code: res.StatusCode,
15708 Header: res.Header,
15709 })
15710 }
15711 if err != nil {
15712 return nil, err
15713 }
15714 defer googleapi.CloseBody(res)
15715 if err := googleapi.CheckResponse(res); err != nil {
15716 return nil, gensupport.WrapError(err)
15717 }
15718 ret := &Operation{
15719 ServerResponse: googleapi.ServerResponse{
15720 Header: res.Header,
15721 HTTPStatusCode: res.StatusCode,
15722 },
15723 }
15724 target := &ret
15725 if err := gensupport.DecodeResponse(target, res); err != nil {
15726 return nil, err
15727 }
15728 return ret, nil
15729 }
15730
15731 type ProjectsRegionsWorkflowTemplatesInstantiateInlineCall struct {
15732 s *Service
15733 parent string
15734 workflowtemplate *WorkflowTemplate
15735 urlParams_ gensupport.URLParams
15736 ctx_ context.Context
15737 header_ http.Header
15738 }
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761 func (r *ProjectsRegionsWorkflowTemplatesService) InstantiateInline(parent string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
15762 c := &ProjectsRegionsWorkflowTemplatesInstantiateInlineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15763 c.parent = parent
15764 c.workflowtemplate = workflowtemplate
15765 return c
15766 }
15767
15768
15769
15770
15771
15772
15773
15774
15775 func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) RequestId(requestId string) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
15776 c.urlParams_.Set("requestId", requestId)
15777 return c
15778 }
15779
15780
15781
15782
15783 func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
15784 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15785 return c
15786 }
15787
15788
15789 func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
15790 c.ctx_ = ctx
15791 return c
15792 }
15793
15794
15795
15796 func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Header() http.Header {
15797 if c.header_ == nil {
15798 c.header_ = make(http.Header)
15799 }
15800 return c.header_
15801 }
15802
15803 func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) doRequest(alt string) (*http.Response, error) {
15804 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15805 var body io.Reader = nil
15806 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
15807 if err != nil {
15808 return nil, err
15809 }
15810 c.urlParams_.Set("alt", alt)
15811 c.urlParams_.Set("prettyPrint", "false")
15812 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates:instantiateInline")
15813 urls += "?" + c.urlParams_.Encode()
15814 req, err := http.NewRequest("POST", urls, body)
15815 if err != nil {
15816 return nil, err
15817 }
15818 req.Header = reqHeaders
15819 googleapi.Expand(req.URL, map[string]string{
15820 "parent": c.parent,
15821 })
15822 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15823 }
15824
15825
15826
15827
15828
15829
15830 func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15831 gensupport.SetOptions(c.urlParams_, opts...)
15832 res, err := c.doRequest("json")
15833 if res != nil && res.StatusCode == http.StatusNotModified {
15834 if res.Body != nil {
15835 res.Body.Close()
15836 }
15837 return nil, gensupport.WrapError(&googleapi.Error{
15838 Code: res.StatusCode,
15839 Header: res.Header,
15840 })
15841 }
15842 if err != nil {
15843 return nil, err
15844 }
15845 defer googleapi.CloseBody(res)
15846 if err := googleapi.CheckResponse(res); err != nil {
15847 return nil, gensupport.WrapError(err)
15848 }
15849 ret := &Operation{
15850 ServerResponse: googleapi.ServerResponse{
15851 Header: res.Header,
15852 HTTPStatusCode: res.StatusCode,
15853 },
15854 }
15855 target := &ret
15856 if err := gensupport.DecodeResponse(target, res); err != nil {
15857 return nil, err
15858 }
15859 return ret, nil
15860 }
15861
15862 type ProjectsRegionsWorkflowTemplatesListCall struct {
15863 s *Service
15864 parent string
15865 urlParams_ gensupport.URLParams
15866 ifNoneMatch_ string
15867 ctx_ context.Context
15868 header_ http.Header
15869 }
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880 func (r *ProjectsRegionsWorkflowTemplatesService) List(parent string) *ProjectsRegionsWorkflowTemplatesListCall {
15881 c := &ProjectsRegionsWorkflowTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15882 c.parent = parent
15883 return c
15884 }
15885
15886
15887
15888 func (c *ProjectsRegionsWorkflowTemplatesListCall) PageSize(pageSize int64) *ProjectsRegionsWorkflowTemplatesListCall {
15889 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15890 return c
15891 }
15892
15893
15894
15895 func (c *ProjectsRegionsWorkflowTemplatesListCall) PageToken(pageToken string) *ProjectsRegionsWorkflowTemplatesListCall {
15896 c.urlParams_.Set("pageToken", pageToken)
15897 return c
15898 }
15899
15900
15901
15902
15903 func (c *ProjectsRegionsWorkflowTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesListCall {
15904 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15905 return c
15906 }
15907
15908
15909
15910
15911 func (c *ProjectsRegionsWorkflowTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesListCall {
15912 c.ifNoneMatch_ = entityTag
15913 return c
15914 }
15915
15916
15917 func (c *ProjectsRegionsWorkflowTemplatesListCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesListCall {
15918 c.ctx_ = ctx
15919 return c
15920 }
15921
15922
15923
15924 func (c *ProjectsRegionsWorkflowTemplatesListCall) Header() http.Header {
15925 if c.header_ == nil {
15926 c.header_ = make(http.Header)
15927 }
15928 return c.header_
15929 }
15930
15931 func (c *ProjectsRegionsWorkflowTemplatesListCall) doRequest(alt string) (*http.Response, error) {
15932 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15933 if c.ifNoneMatch_ != "" {
15934 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15935 }
15936 var body io.Reader = nil
15937 c.urlParams_.Set("alt", alt)
15938 c.urlParams_.Set("prettyPrint", "false")
15939 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates")
15940 urls += "?" + c.urlParams_.Encode()
15941 req, err := http.NewRequest("GET", urls, body)
15942 if err != nil {
15943 return nil, err
15944 }
15945 req.Header = reqHeaders
15946 googleapi.Expand(req.URL, map[string]string{
15947 "parent": c.parent,
15948 })
15949 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15950 }
15951
15952
15953
15954
15955
15956
15957
15958 func (c *ProjectsRegionsWorkflowTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListWorkflowTemplatesResponse, error) {
15959 gensupport.SetOptions(c.urlParams_, opts...)
15960 res, err := c.doRequest("json")
15961 if res != nil && res.StatusCode == http.StatusNotModified {
15962 if res.Body != nil {
15963 res.Body.Close()
15964 }
15965 return nil, gensupport.WrapError(&googleapi.Error{
15966 Code: res.StatusCode,
15967 Header: res.Header,
15968 })
15969 }
15970 if err != nil {
15971 return nil, err
15972 }
15973 defer googleapi.CloseBody(res)
15974 if err := googleapi.CheckResponse(res); err != nil {
15975 return nil, gensupport.WrapError(err)
15976 }
15977 ret := &ListWorkflowTemplatesResponse{
15978 ServerResponse: googleapi.ServerResponse{
15979 Header: res.Header,
15980 HTTPStatusCode: res.StatusCode,
15981 },
15982 }
15983 target := &ret
15984 if err := gensupport.DecodeResponse(target, res); err != nil {
15985 return nil, err
15986 }
15987 return ret, nil
15988 }
15989
15990
15991
15992
15993 func (c *ProjectsRegionsWorkflowTemplatesListCall) Pages(ctx context.Context, f func(*ListWorkflowTemplatesResponse) error) error {
15994 c.ctx_ = ctx
15995 defer c.PageToken(c.urlParams_.Get("pageToken"))
15996 for {
15997 x, err := c.Do()
15998 if err != nil {
15999 return err
16000 }
16001 if err := f(x); err != nil {
16002 return err
16003 }
16004 if x.NextPageToken == "" {
16005 return nil
16006 }
16007 c.PageToken(x.NextPageToken)
16008 }
16009 }
16010
16011 type ProjectsRegionsWorkflowTemplatesSetIamPolicyCall struct {
16012 s *Service
16013 resource string
16014 setiampolicyrequest *SetIamPolicyRequest
16015 urlParams_ gensupport.URLParams
16016 ctx_ context.Context
16017 header_ http.Header
16018 }
16019
16020
16021
16022
16023
16024
16025
16026
16027 func (r *ProjectsRegionsWorkflowTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
16028 c := &ProjectsRegionsWorkflowTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16029 c.resource = resource
16030 c.setiampolicyrequest = setiampolicyrequest
16031 return c
16032 }
16033
16034
16035
16036
16037 func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
16038 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16039 return c
16040 }
16041
16042
16043 func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
16044 c.ctx_ = ctx
16045 return c
16046 }
16047
16048
16049
16050 func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Header() http.Header {
16051 if c.header_ == nil {
16052 c.header_ = make(http.Header)
16053 }
16054 return c.header_
16055 }
16056
16057 func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
16058 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16059 var body io.Reader = nil
16060 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
16061 if err != nil {
16062 return nil, err
16063 }
16064 c.urlParams_.Set("alt", alt)
16065 c.urlParams_.Set("prettyPrint", "false")
16066 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
16067 urls += "?" + c.urlParams_.Encode()
16068 req, err := http.NewRequest("POST", urls, body)
16069 if err != nil {
16070 return nil, err
16071 }
16072 req.Header = reqHeaders
16073 googleapi.Expand(req.URL, map[string]string{
16074 "resource": c.resource,
16075 })
16076 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16077 }
16078
16079
16080
16081
16082
16083
16084 func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
16085 gensupport.SetOptions(c.urlParams_, opts...)
16086 res, err := c.doRequest("json")
16087 if res != nil && res.StatusCode == http.StatusNotModified {
16088 if res.Body != nil {
16089 res.Body.Close()
16090 }
16091 return nil, gensupport.WrapError(&googleapi.Error{
16092 Code: res.StatusCode,
16093 Header: res.Header,
16094 })
16095 }
16096 if err != nil {
16097 return nil, err
16098 }
16099 defer googleapi.CloseBody(res)
16100 if err := googleapi.CheckResponse(res); err != nil {
16101 return nil, gensupport.WrapError(err)
16102 }
16103 ret := &Policy{
16104 ServerResponse: googleapi.ServerResponse{
16105 Header: res.Header,
16106 HTTPStatusCode: res.StatusCode,
16107 },
16108 }
16109 target := &ret
16110 if err := gensupport.DecodeResponse(target, res); err != nil {
16111 return nil, err
16112 }
16113 return ret, nil
16114 }
16115
16116 type ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall struct {
16117 s *Service
16118 resource string
16119 testiampermissionsrequest *TestIamPermissionsRequest
16120 urlParams_ gensupport.URLParams
16121 ctx_ context.Context
16122 header_ http.Header
16123 }
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135 func (r *ProjectsRegionsWorkflowTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
16136 c := &ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16137 c.resource = resource
16138 c.testiampermissionsrequest = testiampermissionsrequest
16139 return c
16140 }
16141
16142
16143
16144
16145 func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
16146 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16147 return c
16148 }
16149
16150
16151 func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
16152 c.ctx_ = ctx
16153 return c
16154 }
16155
16156
16157
16158 func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Header() http.Header {
16159 if c.header_ == nil {
16160 c.header_ = make(http.Header)
16161 }
16162 return c.header_
16163 }
16164
16165 func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
16166 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16167 var body io.Reader = nil
16168 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
16169 if err != nil {
16170 return nil, err
16171 }
16172 c.urlParams_.Set("alt", alt)
16173 c.urlParams_.Set("prettyPrint", "false")
16174 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
16175 urls += "?" + c.urlParams_.Encode()
16176 req, err := http.NewRequest("POST", urls, body)
16177 if err != nil {
16178 return nil, err
16179 }
16180 req.Header = reqHeaders
16181 googleapi.Expand(req.URL, map[string]string{
16182 "resource": c.resource,
16183 })
16184 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16185 }
16186
16187
16188
16189
16190
16191
16192
16193 func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
16194 gensupport.SetOptions(c.urlParams_, opts...)
16195 res, err := c.doRequest("json")
16196 if res != nil && res.StatusCode == http.StatusNotModified {
16197 if res.Body != nil {
16198 res.Body.Close()
16199 }
16200 return nil, gensupport.WrapError(&googleapi.Error{
16201 Code: res.StatusCode,
16202 Header: res.Header,
16203 })
16204 }
16205 if err != nil {
16206 return nil, err
16207 }
16208 defer googleapi.CloseBody(res)
16209 if err := googleapi.CheckResponse(res); err != nil {
16210 return nil, gensupport.WrapError(err)
16211 }
16212 ret := &TestIamPermissionsResponse{
16213 ServerResponse: googleapi.ServerResponse{
16214 Header: res.Header,
16215 HTTPStatusCode: res.StatusCode,
16216 },
16217 }
16218 target := &ret
16219 if err := gensupport.DecodeResponse(target, res); err != nil {
16220 return nil, err
16221 }
16222 return ret, nil
16223 }
16224
16225 type ProjectsRegionsWorkflowTemplatesUpdateCall struct {
16226 s *Service
16227 name string
16228 workflowtemplate *WorkflowTemplate
16229 urlParams_ gensupport.URLParams
16230 ctx_ context.Context
16231 header_ http.Header
16232 }
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245 func (r *ProjectsRegionsWorkflowTemplatesService) Update(name string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesUpdateCall {
16246 c := &ProjectsRegionsWorkflowTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16247 c.name = name
16248 c.workflowtemplate = workflowtemplate
16249 return c
16250 }
16251
16252
16253
16254
16255 func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesUpdateCall {
16256 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16257 return c
16258 }
16259
16260
16261 func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesUpdateCall {
16262 c.ctx_ = ctx
16263 return c
16264 }
16265
16266
16267
16268 func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Header() http.Header {
16269 if c.header_ == nil {
16270 c.header_ = make(http.Header)
16271 }
16272 return c.header_
16273 }
16274
16275 func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
16276 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16277 var body io.Reader = nil
16278 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
16279 if err != nil {
16280 return nil, err
16281 }
16282 c.urlParams_.Set("alt", alt)
16283 c.urlParams_.Set("prettyPrint", "false")
16284 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16285 urls += "?" + c.urlParams_.Encode()
16286 req, err := http.NewRequest("PUT", urls, body)
16287 if err != nil {
16288 return nil, err
16289 }
16290 req.Header = reqHeaders
16291 googleapi.Expand(req.URL, map[string]string{
16292 "name": c.name,
16293 })
16294 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16295 }
16296
16297
16298
16299
16300
16301
16302
16303 func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
16304 gensupport.SetOptions(c.urlParams_, opts...)
16305 res, err := c.doRequest("json")
16306 if res != nil && res.StatusCode == http.StatusNotModified {
16307 if res.Body != nil {
16308 res.Body.Close()
16309 }
16310 return nil, gensupport.WrapError(&googleapi.Error{
16311 Code: res.StatusCode,
16312 Header: res.Header,
16313 })
16314 }
16315 if err != nil {
16316 return nil, err
16317 }
16318 defer googleapi.CloseBody(res)
16319 if err := googleapi.CheckResponse(res); err != nil {
16320 return nil, gensupport.WrapError(err)
16321 }
16322 ret := &WorkflowTemplate{
16323 ServerResponse: googleapi.ServerResponse{
16324 Header: res.Header,
16325 HTTPStatusCode: res.StatusCode,
16326 },
16327 }
16328 target := &ret
16329 if err := gensupport.DecodeResponse(target, res); err != nil {
16330 return nil, err
16331 }
16332 return ret, nil
16333 }
16334
View as plain text