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