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 notebooks
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 = "notebooks:v1"
90 const apiName = "notebooks"
91 const apiVersion = "v1"
92 const basePath = "https://notebooks.googleapis.com/"
93 const basePathTemplate = "https://notebooks.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://notebooks.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type Service struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Environments = NewProjectsLocationsEnvironmentsService(s)
172 rs.Executions = NewProjectsLocationsExecutionsService(s)
173 rs.Instances = NewProjectsLocationsInstancesService(s)
174 rs.Operations = NewProjectsLocationsOperationsService(s)
175 rs.Runtimes = NewProjectsLocationsRuntimesService(s)
176 rs.Schedules = NewProjectsLocationsSchedulesService(s)
177 return rs
178 }
179
180 type ProjectsLocationsService struct {
181 s *Service
182
183 Environments *ProjectsLocationsEnvironmentsService
184
185 Executions *ProjectsLocationsExecutionsService
186
187 Instances *ProjectsLocationsInstancesService
188
189 Operations *ProjectsLocationsOperationsService
190
191 Runtimes *ProjectsLocationsRuntimesService
192
193 Schedules *ProjectsLocationsSchedulesService
194 }
195
196 func NewProjectsLocationsEnvironmentsService(s *Service) *ProjectsLocationsEnvironmentsService {
197 rs := &ProjectsLocationsEnvironmentsService{s: s}
198 return rs
199 }
200
201 type ProjectsLocationsEnvironmentsService struct {
202 s *Service
203 }
204
205 func NewProjectsLocationsExecutionsService(s *Service) *ProjectsLocationsExecutionsService {
206 rs := &ProjectsLocationsExecutionsService{s: s}
207 return rs
208 }
209
210 type ProjectsLocationsExecutionsService struct {
211 s *Service
212 }
213
214 func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
215 rs := &ProjectsLocationsInstancesService{s: s}
216 return rs
217 }
218
219 type ProjectsLocationsInstancesService struct {
220 s *Service
221 }
222
223 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
224 rs := &ProjectsLocationsOperationsService{s: s}
225 return rs
226 }
227
228 type ProjectsLocationsOperationsService struct {
229 s *Service
230 }
231
232 func NewProjectsLocationsRuntimesService(s *Service) *ProjectsLocationsRuntimesService {
233 rs := &ProjectsLocationsRuntimesService{s: s}
234 return rs
235 }
236
237 type ProjectsLocationsRuntimesService struct {
238 s *Service
239 }
240
241 func NewProjectsLocationsSchedulesService(s *Service) *ProjectsLocationsSchedulesService {
242 rs := &ProjectsLocationsSchedulesService{s: s}
243 return rs
244 }
245
246 type ProjectsLocationsSchedulesService struct {
247 s *Service
248 }
249
250
251
252
253
254 type AcceleratorConfig struct {
255
256 CoreCount int64 `json:"coreCount,omitempty,string"`
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277 Type string `json:"type,omitempty"`
278
279
280
281
282
283 ForceSendFields []string `json:"-"`
284
285
286
287
288 NullFields []string `json:"-"`
289 }
290
291 func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
292 type NoMethod AcceleratorConfig
293 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
294 }
295
296
297 type Binding struct {
298
299
300
301
302
303
304
305
306 Condition *Expr `json:"condition,omitempty"`
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369 Members []string `json:"members,omitempty"`
370
371
372
373
374
375
376 Role string `json:"role,omitempty"`
377
378
379
380
381
382 ForceSendFields []string `json:"-"`
383
384
385
386
387 NullFields []string `json:"-"`
388 }
389
390 func (s *Binding) MarshalJSON() ([]byte, error) {
391 type NoMethod Binding
392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
393 }
394
395
396
397 type BootImage struct {
398 }
399
400
401 type CancelOperationRequest struct {
402 }
403
404
405
406 type ContainerImage struct {
407
408
409 Repository string `json:"repository,omitempty"`
410
411
412 Tag string `json:"tag,omitempty"`
413
414
415
416
417
418 ForceSendFields []string `json:"-"`
419
420
421
422
423 NullFields []string `json:"-"`
424 }
425
426 func (s *ContainerImage) MarshalJSON() ([]byte, error) {
427 type NoMethod ContainerImage
428 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
429 }
430
431
432 type DataprocParameters struct {
433
434
435 Cluster string `json:"cluster,omitempty"`
436
437
438
439
440
441 ForceSendFields []string `json:"-"`
442
443
444
445
446 NullFields []string `json:"-"`
447 }
448
449 func (s *DataprocParameters) MarshalJSON() ([]byte, error) {
450 type NoMethod DataprocParameters
451 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
452 }
453
454
455
456 type DiagnoseInstanceRequest struct {
457
458
459 DiagnosticConfig *DiagnosticConfig `json:"diagnosticConfig,omitempty"`
460
461
462 TimeoutMinutes int64 `json:"timeoutMinutes,omitempty"`
463
464
465
466
467
468 ForceSendFields []string `json:"-"`
469
470
471
472
473 NullFields []string `json:"-"`
474 }
475
476 func (s *DiagnoseInstanceRequest) MarshalJSON() ([]byte, error) {
477 type NoMethod DiagnoseInstanceRequest
478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
479 }
480
481
482
483 type DiagnoseRuntimeRequest struct {
484
485
486 DiagnosticConfig *DiagnosticConfig `json:"diagnosticConfig,omitempty"`
487
488
489 TimeoutMinutes int64 `json:"timeoutMinutes,omitempty"`
490
491
492
493
494
495 ForceSendFields []string `json:"-"`
496
497
498
499
500 NullFields []string `json:"-"`
501 }
502
503 func (s *DiagnoseRuntimeRequest) MarshalJSON() ([]byte, error) {
504 type NoMethod DiagnoseRuntimeRequest
505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
506 }
507
508
509 type DiagnosticConfig struct {
510
511
512 CopyHomeFilesFlagEnabled bool `json:"copyHomeFilesFlagEnabled,omitempty"`
513
514
515
516
517
518
519
520 GcsBucket string `json:"gcsBucket,omitempty"`
521
522
523 PacketCaptureFlagEnabled bool `json:"packetCaptureFlagEnabled,omitempty"`
524
525
526
527
528
529 RelativePath string `json:"relativePath,omitempty"`
530
531 RepairFlagEnabled bool `json:"repairFlagEnabled,omitempty"`
532
533
534
535
536
537 ForceSendFields []string `json:"-"`
538
539
540
541
542 NullFields []string `json:"-"`
543 }
544
545 func (s *DiagnosticConfig) MarshalJSON() ([]byte, error) {
546 type NoMethod DiagnosticConfig
547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
548 }
549
550
551 type Disk struct {
552
553
554 AutoDelete bool `json:"autoDelete,omitempty"`
555
556
557 Boot bool `json:"boot,omitempty"`
558
559
560
561
562
563
564
565 DeviceName string `json:"deviceName,omitempty"`
566
567 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
568
569
570
571 GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"`
572
573
574
575 Index int64 `json:"index,omitempty,string"`
576
577
578
579
580
581
582 Interface string `json:"interface,omitempty"`
583
584 Kind string `json:"kind,omitempty"`
585
586
587
588 Licenses []string `json:"licenses,omitempty"`
589
590
591
592 Mode string `json:"mode,omitempty"`
593
594
595 Source string `json:"source,omitempty"`
596
597
598 Type string `json:"type,omitempty"`
599
600
601
602
603
604 ForceSendFields []string `json:"-"`
605
606
607
608
609 NullFields []string `json:"-"`
610 }
611
612 func (s *Disk) MarshalJSON() ([]byte, error) {
613 type NoMethod Disk
614 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
615 }
616
617
618
619
620
621 type Empty struct {
622
623 googleapi.ServerResponse `json:"-"`
624 }
625
626
627
628 type EncryptionConfig struct {
629
630
631
632
633
634 KmsKey string `json:"kmsKey,omitempty"`
635
636
637
638
639
640 ForceSendFields []string `json:"-"`
641
642
643
644
645 NullFields []string `json:"-"`
646 }
647
648 func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
649 type NoMethod EncryptionConfig
650 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
651 }
652
653
654
655 type Environment struct {
656
657 ContainerImage *ContainerImage `json:"containerImage,omitempty"`
658
659 CreateTime string `json:"createTime,omitempty"`
660
661 Description string `json:"description,omitempty"`
662
663 DisplayName string `json:"displayName,omitempty"`
664
665
666 Name string `json:"name,omitempty"`
667
668
669
670 PostStartupScript string `json:"postStartupScript,omitempty"`
671
672 VmImage *VmImage `json:"vmImage,omitempty"`
673
674
675 googleapi.ServerResponse `json:"-"`
676
677
678
679
680
681 ForceSendFields []string `json:"-"`
682
683
684
685
686 NullFields []string `json:"-"`
687 }
688
689 func (s *Environment) MarshalJSON() ([]byte, error) {
690 type NoMethod Environment
691 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
692 }
693
694
695
696 type Event struct {
697
698
699 Details map[string]string `json:"details,omitempty"`
700
701 ReportTime string `json:"reportTime,omitempty"`
702
703
704
705
706
707
708
709
710
711
712
713
714 Type string `json:"type,omitempty"`
715
716
717
718
719
720 ForceSendFields []string `json:"-"`
721
722
723
724
725 NullFields []string `json:"-"`
726 }
727
728 func (s *Event) MarshalJSON() ([]byte, error) {
729 type NoMethod Event
730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
731 }
732
733
734 type Execution struct {
735
736 CreateTime string `json:"createTime,omitempty"`
737
738 Description string `json:"description,omitempty"`
739
740
741 DisplayName string `json:"displayName,omitempty"`
742
743
744 ExecutionTemplate *ExecutionTemplate `json:"executionTemplate,omitempty"`
745
746
747 JobUri string `json:"jobUri,omitempty"`
748
749
750 Name string `json:"name,omitempty"`
751
752 OutputNotebookFile string `json:"outputNotebookFile,omitempty"`
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770 State string `json:"state,omitempty"`
771
772 UpdateTime string `json:"updateTime,omitempty"`
773
774
775 googleapi.ServerResponse `json:"-"`
776
777
778
779
780
781 ForceSendFields []string `json:"-"`
782
783
784
785
786 NullFields []string `json:"-"`
787 }
788
789 func (s *Execution) MarshalJSON() ([]byte, error) {
790 type NoMethod Execution
791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
792 }
793
794
795 type ExecutionTemplate struct {
796
797
798 AcceleratorConfig *SchedulerAcceleratorConfig `json:"acceleratorConfig,omitempty"`
799
800
801
802
803 ContainerImageUri string `json:"containerImageUri,omitempty"`
804
805 DataprocParameters *DataprocParameters `json:"dataprocParameters,omitempty"`
806
807
808
809
810 InputNotebookFile string `json:"inputNotebookFile,omitempty"`
811
812
813
814
815
816
817
818
819 JobType string `json:"jobType,omitempty"`
820
821
822
823 KernelSpec string `json:"kernelSpec,omitempty"`
824
825
826
827
828 Labels map[string]string `json:"labels,omitempty"`
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846 MasterType string `json:"masterType,omitempty"`
847
848
849
850 OutputNotebookFolder string `json:"outputNotebookFolder,omitempty"`
851
852 Parameters string `json:"parameters,omitempty"`
853
854
855
856
857
858
859 ParamsYamlFile string `json:"paramsYamlFile,omitempty"`
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876 ScaleTier string `json:"scaleTier,omitempty"`
877
878
879
880 ServiceAccount string `json:"serviceAccount,omitempty"`
881
882
883
884 Tensorboard string `json:"tensorboard,omitempty"`
885
886 VertexAiParameters *VertexAIParameters `json:"vertexAiParameters,omitempty"`
887
888
889
890
891
892 ForceSendFields []string `json:"-"`
893
894
895
896
897 NullFields []string `json:"-"`
898 }
899
900 func (s *ExecutionTemplate) MarshalJSON() ([]byte, error) {
901 type NoMethod ExecutionTemplate
902 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
903 }
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921 type Expr struct {
922
923
924 Description string `json:"description,omitempty"`
925
926
927 Expression string `json:"expression,omitempty"`
928
929
930 Location string `json:"location,omitempty"`
931
932
933
934 Title string `json:"title,omitempty"`
935
936
937
938
939
940 ForceSendFields []string `json:"-"`
941
942
943
944
945 NullFields []string `json:"-"`
946 }
947
948 func (s *Expr) MarshalJSON() ([]byte, error) {
949 type NoMethod Expr
950 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
951 }
952
953
954
955 type GetInstanceHealthResponse struct {
956
957
958
959
960 HealthInfo map[string]string `json:"healthInfo,omitempty"`
961
962
963
964
965
966
967
968
969
970
971
972
973 HealthState string `json:"healthState,omitempty"`
974
975
976 googleapi.ServerResponse `json:"-"`
977
978
979
980
981
982 ForceSendFields []string `json:"-"`
983
984
985
986
987 NullFields []string `json:"-"`
988 }
989
990 func (s *GetInstanceHealthResponse) MarshalJSON() ([]byte, error) {
991 type NoMethod GetInstanceHealthResponse
992 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
993 }
994
995
996 type GuestOsFeature struct {
997
998
999
1000
1001 Type string `json:"type,omitempty"`
1002
1003
1004
1005
1006
1007 ForceSendFields []string `json:"-"`
1008
1009
1010
1011
1012 NullFields []string `json:"-"`
1013 }
1014
1015 func (s *GuestOsFeature) MarshalJSON() ([]byte, error) {
1016 type NoMethod GuestOsFeature
1017 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1018 }
1019
1020
1021 type Instance struct {
1022
1023
1024
1025
1026 AcceleratorConfig *AcceleratorConfig `json:"acceleratorConfig,omitempty"`
1027
1028
1029
1030 BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty,string"`
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040 BootDiskType string `json:"bootDiskType,omitempty"`
1041
1042
1043 CanIpForward bool `json:"canIpForward,omitempty"`
1044
1045 ContainerImage *ContainerImage `json:"containerImage,omitempty"`
1046
1047 CreateTime string `json:"createTime,omitempty"`
1048
1049
1050 Creator string `json:"creator,omitempty"`
1051
1052
1053
1054 CustomGpuDriverPath string `json:"customGpuDriverPath,omitempty"`
1055
1056
1057
1058
1059 DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"`
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069 DataDiskType string `json:"dataDiskType,omitempty"`
1070
1071
1072
1073
1074
1075
1076
1077 DiskEncryption string `json:"diskEncryption,omitempty"`
1078
1079 Disks []*Disk `json:"disks,omitempty"`
1080
1081
1082
1083 InstallGpuDriver bool `json:"installGpuDriver,omitempty"`
1084
1085
1086 InstanceMigrationEligibility *InstanceMigrationEligibility `json:"instanceMigrationEligibility,omitempty"`
1087
1088
1089
1090
1091 InstanceOwners []string `json:"instanceOwners,omitempty"`
1092
1093
1094
1095
1096
1097 KmsKey string `json:"kmsKey,omitempty"`
1098
1099
1100 Labels map[string]string `json:"labels,omitempty"`
1101
1102
1103 MachineType string `json:"machineType,omitempty"`
1104
1105
1106
1107
1108 Metadata map[string]string `json:"metadata,omitempty"`
1109
1110
1111 Migrated bool `json:"migrated,omitempty"`
1112
1113
1114 Name string `json:"name,omitempty"`
1115
1116
1117 Network string `json:"network,omitempty"`
1118
1119
1120
1121
1122
1123
1124
1125 NicType string `json:"nicType,omitempty"`
1126
1127
1128 NoProxyAccess bool `json:"noProxyAccess,omitempty"`
1129
1130 NoPublicIp bool `json:"noPublicIp,omitempty"`
1131
1132
1133 NoRemoveDataDisk bool `json:"noRemoveDataDisk,omitempty"`
1134
1135
1136
1137 PostStartupScript string `json:"postStartupScript,omitempty"`
1138
1139
1140 ProxyUri string `json:"proxyUri,omitempty"`
1141
1142
1143
1144
1145 ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"`
1146
1147
1148
1149
1150
1151
1152 ServiceAccount string `json:"serviceAccount,omitempty"`
1153
1154
1155
1156
1157
1158
1159 ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
1160
1161
1162
1163 ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180 State string `json:"state,omitempty"`
1181
1182
1183 Subnet string `json:"subnet,omitempty"`
1184
1185
1186
1187 Tags []string `json:"tags,omitempty"`
1188
1189 UpdateTime string `json:"updateTime,omitempty"`
1190
1191 UpgradeHistory []*UpgradeHistoryEntry `json:"upgradeHistory,omitempty"`
1192
1193 VmImage *VmImage `json:"vmImage,omitempty"`
1194
1195
1196 googleapi.ServerResponse `json:"-"`
1197
1198
1199
1200
1201
1202 ForceSendFields []string `json:"-"`
1203
1204
1205
1206
1207 NullFields []string `json:"-"`
1208 }
1209
1210 func (s *Instance) MarshalJSON() ([]byte, error) {
1211 type NoMethod Instance
1212 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1213 }
1214
1215
1216 type InstanceConfig struct {
1217
1218 EnableHealthMonitoring bool `json:"enableHealthMonitoring,omitempty"`
1219
1220
1221
1222 NotebookUpgradeSchedule string `json:"notebookUpgradeSchedule,omitempty"`
1223
1224
1225
1226
1227
1228 ForceSendFields []string `json:"-"`
1229
1230
1231
1232
1233 NullFields []string `json:"-"`
1234 }
1235
1236 func (s *InstanceConfig) MarshalJSON() ([]byte, error) {
1237 type NoMethod InstanceConfig
1238 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1239 }
1240
1241
1242
1243 type InstanceMigrationEligibility struct {
1244
1245
1246
1247
1248
1249
1250 Errors []string `json:"errors,omitempty"`
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271 Warnings []string `json:"warnings,omitempty"`
1272
1273
1274
1275
1276
1277 ForceSendFields []string `json:"-"`
1278
1279
1280
1281
1282 NullFields []string `json:"-"`
1283 }
1284
1285 func (s *InstanceMigrationEligibility) MarshalJSON() ([]byte, error) {
1286 type NoMethod InstanceMigrationEligibility
1287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1288 }
1289
1290
1291
1292 type IsInstanceUpgradeableResponse struct {
1293
1294
1295
1296 UpgradeImage string `json:"upgradeImage,omitempty"`
1297
1298 UpgradeInfo string `json:"upgradeInfo,omitempty"`
1299
1300
1301
1302 UpgradeVersion string `json:"upgradeVersion,omitempty"`
1303
1304 Upgradeable bool `json:"upgradeable,omitempty"`
1305
1306
1307 googleapi.ServerResponse `json:"-"`
1308
1309
1310
1311
1312
1313 ForceSendFields []string `json:"-"`
1314
1315
1316
1317
1318 NullFields []string `json:"-"`
1319 }
1320
1321 func (s *IsInstanceUpgradeableResponse) MarshalJSON() ([]byte, error) {
1322 type NoMethod IsInstanceUpgradeableResponse
1323 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1324 }
1325
1326
1327 type ListEnvironmentsResponse struct {
1328
1329 Environments []*Environment `json:"environments,omitempty"`
1330
1331
1332 NextPageToken string `json:"nextPageToken,omitempty"`
1333
1334 Unreachable []string `json:"unreachable,omitempty"`
1335
1336
1337 googleapi.ServerResponse `json:"-"`
1338
1339
1340
1341
1342
1343 ForceSendFields []string `json:"-"`
1344
1345
1346
1347
1348 NullFields []string `json:"-"`
1349 }
1350
1351 func (s *ListEnvironmentsResponse) MarshalJSON() ([]byte, error) {
1352 type NoMethod ListEnvironmentsResponse
1353 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1354 }
1355
1356
1357 type ListExecutionsResponse struct {
1358
1359 Executions []*Execution `json:"executions,omitempty"`
1360
1361
1362 NextPageToken string `json:"nextPageToken,omitempty"`
1363
1364
1365
1366 Unreachable []string `json:"unreachable,omitempty"`
1367
1368
1369 googleapi.ServerResponse `json:"-"`
1370
1371
1372
1373
1374
1375 ForceSendFields []string `json:"-"`
1376
1377
1378
1379
1380 NullFields []string `json:"-"`
1381 }
1382
1383 func (s *ListExecutionsResponse) MarshalJSON() ([]byte, error) {
1384 type NoMethod ListExecutionsResponse
1385 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1386 }
1387
1388
1389 type ListInstancesResponse struct {
1390
1391 Instances []*Instance `json:"instances,omitempty"`
1392
1393
1394 NextPageToken string `json:"nextPageToken,omitempty"`
1395
1396
1397
1398 Unreachable []string `json:"unreachable,omitempty"`
1399
1400
1401 googleapi.ServerResponse `json:"-"`
1402
1403
1404
1405
1406
1407 ForceSendFields []string `json:"-"`
1408
1409
1410
1411
1412 NullFields []string `json:"-"`
1413 }
1414
1415 func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
1416 type NoMethod ListInstancesResponse
1417 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1418 }
1419
1420
1421 type ListLocationsResponse struct {
1422
1423
1424 Locations []*Location `json:"locations,omitempty"`
1425
1426 NextPageToken string `json:"nextPageToken,omitempty"`
1427
1428
1429 googleapi.ServerResponse `json:"-"`
1430
1431
1432
1433
1434
1435 ForceSendFields []string `json:"-"`
1436
1437
1438
1439
1440 NullFields []string `json:"-"`
1441 }
1442
1443 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
1444 type NoMethod ListLocationsResponse
1445 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1446 }
1447
1448
1449 type ListOperationsResponse struct {
1450
1451 NextPageToken string `json:"nextPageToken,omitempty"`
1452
1453
1454 Operations []*Operation `json:"operations,omitempty"`
1455
1456
1457 googleapi.ServerResponse `json:"-"`
1458
1459
1460
1461
1462
1463 ForceSendFields []string `json:"-"`
1464
1465
1466
1467
1468 NullFields []string `json:"-"`
1469 }
1470
1471 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1472 type NoMethod ListOperationsResponse
1473 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1474 }
1475
1476
1477 type ListRuntimesResponse struct {
1478
1479
1480 NextPageToken string `json:"nextPageToken,omitempty"`
1481
1482 Runtimes []*Runtime `json:"runtimes,omitempty"`
1483
1484
1485
1486 Unreachable []string `json:"unreachable,omitempty"`
1487
1488
1489 googleapi.ServerResponse `json:"-"`
1490
1491
1492
1493
1494
1495 ForceSendFields []string `json:"-"`
1496
1497
1498
1499
1500 NullFields []string `json:"-"`
1501 }
1502
1503 func (s *ListRuntimesResponse) MarshalJSON() ([]byte, error) {
1504 type NoMethod ListRuntimesResponse
1505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1506 }
1507
1508
1509 type ListSchedulesResponse struct {
1510
1511
1512 NextPageToken string `json:"nextPageToken,omitempty"`
1513
1514 Schedules []*Schedule `json:"schedules,omitempty"`
1515
1516
1517
1518 Unreachable []string `json:"unreachable,omitempty"`
1519
1520
1521 googleapi.ServerResponse `json:"-"`
1522
1523
1524
1525
1526
1527 ForceSendFields []string `json:"-"`
1528
1529
1530
1531
1532 NullFields []string `json:"-"`
1533 }
1534
1535 func (s *ListSchedulesResponse) MarshalJSON() ([]byte, error) {
1536 type NoMethod ListSchedulesResponse
1537 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1538 }
1539
1540
1541 type LocalDisk struct {
1542
1543
1544
1545 AutoDelete bool `json:"autoDelete,omitempty"`
1546
1547
1548 Boot bool `json:"boot,omitempty"`
1549
1550
1551
1552
1553
1554
1555
1556
1557 DeviceName string `json:"deviceName,omitempty"`
1558
1559
1560
1561 GuestOsFeatures []*RuntimeGuestOsFeature `json:"guestOsFeatures,omitempty"`
1562
1563
1564
1565 Index int64 `json:"index,omitempty"`
1566
1567
1568
1569
1570
1571 InitializeParams *LocalDiskInitializeParams `json:"initializeParams,omitempty"`
1572
1573
1574
1575
1576
1577
1578 Interface string `json:"interface,omitempty"`
1579
1580
1581 Kind string `json:"kind,omitempty"`
1582
1583 Licenses []string `json:"licenses,omitempty"`
1584
1585
1586
1587 Mode string `json:"mode,omitempty"`
1588
1589
1590 Source string `json:"source,omitempty"`
1591
1592
1593
1594 Type string `json:"type,omitempty"`
1595
1596
1597
1598
1599
1600 ForceSendFields []string `json:"-"`
1601
1602
1603
1604
1605 NullFields []string `json:"-"`
1606 }
1607
1608 func (s *LocalDisk) MarshalJSON() ([]byte, error) {
1609 type NoMethod LocalDisk
1610 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1611 }
1612
1613
1614
1615
1616
1617
1618 type LocalDiskInitializeParams struct {
1619
1620 Description string `json:"description,omitempty"`
1621
1622
1623
1624
1625 DiskName string `json:"diskName,omitempty"`
1626
1627
1628
1629 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639 DiskType string `json:"diskType,omitempty"`
1640
1641
1642
1643 Labels map[string]string `json:"labels,omitempty"`
1644
1645
1646
1647
1648
1649 ForceSendFields []string `json:"-"`
1650
1651
1652
1653
1654 NullFields []string `json:"-"`
1655 }
1656
1657 func (s *LocalDiskInitializeParams) MarshalJSON() ([]byte, error) {
1658 type NoMethod LocalDiskInitializeParams
1659 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1660 }
1661
1662
1663 type Location struct {
1664
1665
1666 DisplayName string `json:"displayName,omitempty"`
1667
1668
1669 Labels map[string]string `json:"labels,omitempty"`
1670
1671 LocationId string `json:"locationId,omitempty"`
1672
1673
1674 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1675
1676
1677
1678 Name string `json:"name,omitempty"`
1679
1680
1681 googleapi.ServerResponse `json:"-"`
1682
1683
1684
1685
1686
1687 ForceSendFields []string `json:"-"`
1688
1689
1690
1691
1692 NullFields []string `json:"-"`
1693 }
1694
1695 func (s *Location) MarshalJSON() ([]byte, error) {
1696 type NoMethod Location
1697 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1698 }
1699
1700
1701
1702 type MigrateInstanceRequest struct {
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713 PostStartupScriptOption string `json:"postStartupScriptOption,omitempty"`
1714
1715
1716
1717
1718
1719 ForceSendFields []string `json:"-"`
1720
1721
1722
1723
1724 NullFields []string `json:"-"`
1725 }
1726
1727 func (s *MigrateInstanceRequest) MarshalJSON() ([]byte, error) {
1728 type NoMethod MigrateInstanceRequest
1729 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1730 }
1731
1732
1733
1734 type MigrateRuntimeRequest struct {
1735
1736
1737
1738
1739 Network string `json:"network,omitempty"`
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750 PostStartupScriptOption string `json:"postStartupScriptOption,omitempty"`
1751
1752 RequestId string `json:"requestId,omitempty"`
1753
1754
1755
1756
1757
1758
1759
1760 ServiceAccount string `json:"serviceAccount,omitempty"`
1761
1762
1763
1764
1765
1766 Subnet string `json:"subnet,omitempty"`
1767
1768
1769
1770
1771
1772 ForceSendFields []string `json:"-"`
1773
1774
1775
1776
1777 NullFields []string `json:"-"`
1778 }
1779
1780 func (s *MigrateRuntimeRequest) MarshalJSON() ([]byte, error) {
1781 type NoMethod MigrateRuntimeRequest
1782 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1783 }
1784
1785
1786
1787 type Operation struct {
1788
1789
1790
1791 Done bool `json:"done,omitempty"`
1792
1793 Error *Status `json:"error,omitempty"`
1794
1795
1796
1797
1798 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1799
1800
1801
1802 Name string `json:"name,omitempty"`
1803
1804
1805
1806
1807
1808
1809
1810 Response googleapi.RawMessage `json:"response,omitempty"`
1811
1812
1813 googleapi.ServerResponse `json:"-"`
1814
1815
1816
1817
1818
1819 ForceSendFields []string `json:"-"`
1820
1821
1822
1823
1824 NullFields []string `json:"-"`
1825 }
1826
1827 func (s *Operation) MarshalJSON() ([]byte, error) {
1828 type NoMethod Operation
1829 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1830 }
1831
1832
1833 type OperationMetadata struct {
1834
1835 ApiVersion string `json:"apiVersion,omitempty"`
1836
1837 CreateTime string `json:"createTime,omitempty"`
1838
1839 EndTime string `json:"endTime,omitempty"`
1840
1841 Endpoint string `json:"endpoint,omitempty"`
1842
1843
1844
1845
1846 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1847
1848 StatusMessage string `json:"statusMessage,omitempty"`
1849
1850 Target string `json:"target,omitempty"`
1851
1852 Verb string `json:"verb,omitempty"`
1853
1854
1855
1856
1857
1858 ForceSendFields []string `json:"-"`
1859
1860
1861
1862
1863 NullFields []string `json:"-"`
1864 }
1865
1866 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1867 type NoMethod OperationMetadata
1868 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1869 }
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901 type Policy struct {
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911 Bindings []*Binding `json:"bindings,omitempty"`
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923 Etag string `json:"etag,omitempty"`
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939 Version int64 `json:"version,omitempty"`
1940
1941
1942 googleapi.ServerResponse `json:"-"`
1943
1944
1945
1946
1947
1948 ForceSendFields []string `json:"-"`
1949
1950
1951
1952
1953 NullFields []string `json:"-"`
1954 }
1955
1956 func (s *Policy) MarshalJSON() ([]byte, error) {
1957 type NoMethod Policy
1958 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1959 }
1960
1961
1962 type RefreshRuntimeTokenInternalRequest struct {
1963
1964
1965 VmId string `json:"vmId,omitempty"`
1966
1967
1968
1969
1970
1971 ForceSendFields []string `json:"-"`
1972
1973
1974
1975
1976 NullFields []string `json:"-"`
1977 }
1978
1979 func (s *RefreshRuntimeTokenInternalRequest) MarshalJSON() ([]byte, error) {
1980 type NoMethod RefreshRuntimeTokenInternalRequest
1981 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1982 }
1983
1984
1985 type RefreshRuntimeTokenInternalResponse struct {
1986
1987 AccessToken string `json:"accessToken,omitempty"`
1988
1989 ExpireTime string `json:"expireTime,omitempty"`
1990
1991
1992 googleapi.ServerResponse `json:"-"`
1993
1994
1995
1996
1997
1998 ForceSendFields []string `json:"-"`
1999
2000
2001
2002
2003 NullFields []string `json:"-"`
2004 }
2005
2006 func (s *RefreshRuntimeTokenInternalResponse) MarshalJSON() ([]byte, error) {
2007 type NoMethod RefreshRuntimeTokenInternalResponse
2008 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2009 }
2010
2011
2012 type RegisterInstanceRequest struct {
2013
2014
2015
2016
2017 InstanceId string `json:"instanceId,omitempty"`
2018
2019
2020
2021
2022
2023 ForceSendFields []string `json:"-"`
2024
2025
2026
2027
2028 NullFields []string `json:"-"`
2029 }
2030
2031 func (s *RegisterInstanceRequest) MarshalJSON() ([]byte, error) {
2032 type NoMethod RegisterInstanceRequest
2033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2034 }
2035
2036
2037 type ReportInstanceEventRequest struct {
2038
2039 Event *Event `json:"event,omitempty"`
2040
2041
2042 VmId string `json:"vmId,omitempty"`
2043
2044
2045
2046
2047
2048 ForceSendFields []string `json:"-"`
2049
2050
2051
2052
2053 NullFields []string `json:"-"`
2054 }
2055
2056 func (s *ReportInstanceEventRequest) MarshalJSON() ([]byte, error) {
2057 type NoMethod ReportInstanceEventRequest
2058 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2059 }
2060
2061
2062
2063 type ReportInstanceInfoRequest struct {
2064
2065
2066 Metadata map[string]string `json:"metadata,omitempty"`
2067
2068
2069 VmId string `json:"vmId,omitempty"`
2070
2071
2072
2073
2074
2075 ForceSendFields []string `json:"-"`
2076
2077
2078
2079
2080 NullFields []string `json:"-"`
2081 }
2082
2083 func (s *ReportInstanceInfoRequest) MarshalJSON() ([]byte, error) {
2084 type NoMethod ReportInstanceInfoRequest
2085 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2086 }
2087
2088
2089 type ReportRuntimeEventRequest struct {
2090
2091 Event *Event `json:"event,omitempty"`
2092
2093
2094 VmId string `json:"vmId,omitempty"`
2095
2096
2097
2098
2099
2100 ForceSendFields []string `json:"-"`
2101
2102
2103
2104
2105 NullFields []string `json:"-"`
2106 }
2107
2108 func (s *ReportRuntimeEventRequest) MarshalJSON() ([]byte, error) {
2109 type NoMethod ReportRuntimeEventRequest
2110 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2111 }
2112
2113
2114 type ReservationAffinity struct {
2115
2116
2117
2118
2119
2120
2121
2122
2123 ConsumeReservationType string `json:"consumeReservationType,omitempty"`
2124
2125 Key string `json:"key,omitempty"`
2126
2127 Values []string `json:"values,omitempty"`
2128
2129
2130
2131
2132
2133 ForceSendFields []string `json:"-"`
2134
2135
2136
2137
2138 NullFields []string `json:"-"`
2139 }
2140
2141 func (s *ReservationAffinity) MarshalJSON() ([]byte, error) {
2142 type NoMethod ReservationAffinity
2143 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2144 }
2145
2146
2147 type ResetInstanceRequest struct {
2148 }
2149
2150
2151 type ResetRuntimeRequest struct {
2152
2153 RequestId string `json:"requestId,omitempty"`
2154
2155
2156
2157
2158
2159 ForceSendFields []string `json:"-"`
2160
2161
2162
2163
2164 NullFields []string `json:"-"`
2165 }
2166
2167 func (s *ResetRuntimeRequest) MarshalJSON() ([]byte, error) {
2168 type NoMethod ResetRuntimeRequest
2169 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2170 }
2171
2172
2173 type RollbackInstanceRequest struct {
2174
2175
2176 TargetSnapshot string `json:"targetSnapshot,omitempty"`
2177
2178
2179
2180
2181
2182 ForceSendFields []string `json:"-"`
2183
2184
2185
2186
2187 NullFields []string `json:"-"`
2188 }
2189
2190 func (s *RollbackInstanceRequest) MarshalJSON() ([]byte, error) {
2191 type NoMethod RollbackInstanceRequest
2192 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2193 }
2194
2195
2196 type Runtime struct {
2197
2198 AccessConfig *RuntimeAccessConfig `json:"accessConfig,omitempty"`
2199
2200 CreateTime string `json:"createTime,omitempty"`
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213 HealthState string `json:"healthState,omitempty"`
2214
2215
2216
2217
2218
2219
2220 Labels map[string]string `json:"labels,omitempty"`
2221
2222
2223 Metrics *RuntimeMetrics `json:"metrics,omitempty"`
2224
2225
2226 Migrated bool `json:"migrated,omitempty"`
2227
2228
2229 Name string `json:"name,omitempty"`
2230
2231
2232 RuntimeMigrationEligibility *RuntimeMigrationEligibility `json:"runtimeMigrationEligibility,omitempty"`
2233
2234 SoftwareConfig *RuntimeSoftwareConfig `json:"softwareConfig,omitempty"`
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250 State string `json:"state,omitempty"`
2251
2252 UpdateTime string `json:"updateTime,omitempty"`
2253
2254
2255 VirtualMachine *VirtualMachine `json:"virtualMachine,omitempty"`
2256
2257
2258 googleapi.ServerResponse `json:"-"`
2259
2260
2261
2262
2263
2264 ForceSendFields []string `json:"-"`
2265
2266
2267
2268
2269 NullFields []string `json:"-"`
2270 }
2271
2272 func (s *Runtime) MarshalJSON() ([]byte, error) {
2273 type NoMethod Runtime
2274 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2275 }
2276
2277
2278
2279
2280
2281
2282 type RuntimeAcceleratorConfig struct {
2283
2284 CoreCount int64 `json:"coreCount,omitempty,string"`
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304 Type string `json:"type,omitempty"`
2305
2306
2307
2308
2309
2310 ForceSendFields []string `json:"-"`
2311
2312
2313
2314
2315 NullFields []string `json:"-"`
2316 }
2317
2318 func (s *RuntimeAcceleratorConfig) MarshalJSON() ([]byte, error) {
2319 type NoMethod RuntimeAcceleratorConfig
2320 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2321 }
2322
2323
2324 type RuntimeAccessConfig struct {
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334 AccessType string `json:"accessType,omitempty"`
2335
2336
2337 ProxyUri string `json:"proxyUri,omitempty"`
2338
2339
2340 RuntimeOwner string `json:"runtimeOwner,omitempty"`
2341
2342
2343
2344
2345
2346 ForceSendFields []string `json:"-"`
2347
2348
2349
2350
2351 NullFields []string `json:"-"`
2352 }
2353
2354 func (s *RuntimeAccessConfig) MarshalJSON() ([]byte, error) {
2355 type NoMethod RuntimeAccessConfig
2356 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2357 }
2358
2359
2360
2361
2362
2363
2364 type RuntimeGuestOsFeature struct {
2365
2366
2367
2368
2369
2370
2371 Type string `json:"type,omitempty"`
2372
2373
2374
2375
2376
2377 ForceSendFields []string `json:"-"`
2378
2379
2380
2381
2382 NullFields []string `json:"-"`
2383 }
2384
2385 func (s *RuntimeGuestOsFeature) MarshalJSON() ([]byte, error) {
2386 type NoMethod RuntimeGuestOsFeature
2387 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2388 }
2389
2390
2391
2392 type RuntimeMetrics struct {
2393
2394 SystemMetrics map[string]string `json:"systemMetrics,omitempty"`
2395
2396
2397
2398
2399
2400 ForceSendFields []string `json:"-"`
2401
2402
2403
2404
2405 NullFields []string `json:"-"`
2406 }
2407
2408 func (s *RuntimeMetrics) MarshalJSON() ([]byte, error) {
2409 type NoMethod RuntimeMetrics
2410 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2411 }
2412
2413
2414
2415 type RuntimeMigrationEligibility struct {
2416
2417
2418
2419
2420
2421
2422
2423 Errors []string `json:"errors,omitempty"`
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444 Warnings []string `json:"warnings,omitempty"`
2445
2446
2447
2448
2449
2450 ForceSendFields []string `json:"-"`
2451
2452
2453
2454
2455 NullFields []string `json:"-"`
2456 }
2457
2458 func (s *RuntimeMigrationEligibility) MarshalJSON() ([]byte, error) {
2459 type NoMethod RuntimeMigrationEligibility
2460 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2461 }
2462
2463
2464
2465
2466
2467 type RuntimeShieldedInstanceConfig struct {
2468
2469
2470
2471
2472
2473 EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"`
2474
2475
2476
2477
2478 EnableSecureBoot bool `json:"enableSecureBoot,omitempty"`
2479
2480
2481 EnableVtpm bool `json:"enableVtpm,omitempty"`
2482
2483
2484
2485
2486
2487 ForceSendFields []string `json:"-"`
2488
2489
2490
2491
2492 NullFields []string `json:"-"`
2493 }
2494
2495 func (s *RuntimeShieldedInstanceConfig) MarshalJSON() ([]byte, error) {
2496 type NoMethod RuntimeShieldedInstanceConfig
2497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2498 }
2499
2500
2501
2502
2503
2504 type RuntimeSoftwareConfig struct {
2505
2506
2507
2508 CustomGpuDriverPath string `json:"customGpuDriverPath,omitempty"`
2509
2510
2511 DisableTerminal bool `json:"disableTerminal,omitempty"`
2512
2513
2514 EnableHealthMonitoring bool `json:"enableHealthMonitoring,omitempty"`
2515
2516
2517 IdleShutdown bool `json:"idleShutdown,omitempty"`
2518
2519
2520 IdleShutdownTimeout int64 `json:"idleShutdownTimeout,omitempty"`
2521
2522 InstallGpuDriver bool `json:"installGpuDriver,omitempty"`
2523
2524
2525 Kernels []*ContainerImage `json:"kernels,omitempty"`
2526
2527
2528 MixerDisabled bool `json:"mixerDisabled,omitempty"`
2529
2530
2531
2532 NotebookUpgradeSchedule string `json:"notebookUpgradeSchedule,omitempty"`
2533
2534
2535
2536 PostStartupScript string `json:"postStartupScript,omitempty"`
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546 PostStartupScriptBehavior string `json:"postStartupScriptBehavior,omitempty"`
2547
2548
2549 Upgradeable bool `json:"upgradeable,omitempty"`
2550
2551
2552 Version string `json:"version,omitempty"`
2553
2554
2555
2556
2557
2558 ForceSendFields []string `json:"-"`
2559
2560
2561
2562
2563 NullFields []string `json:"-"`
2564 }
2565
2566 func (s *RuntimeSoftwareConfig) MarshalJSON() ([]byte, error) {
2567 type NoMethod RuntimeSoftwareConfig
2568 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2569 }
2570
2571
2572 type Schedule struct {
2573
2574 CreateTime string `json:"createTime,omitempty"`
2575
2576
2577
2578 CronSchedule string `json:"cronSchedule,omitempty"`
2579
2580 Description string `json:"description,omitempty"`
2581
2582
2583 DisplayName string `json:"displayName,omitempty"`
2584
2585
2586 ExecutionTemplate *ExecutionTemplate `json:"executionTemplate,omitempty"`
2587
2588
2589 Name string `json:"name,omitempty"`
2590
2591
2592 RecentExecutions []*Execution `json:"recentExecutions,omitempty"`
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605 State string `json:"state,omitempty"`
2606
2607
2608
2609
2610
2611
2612
2613 TimeZone string `json:"timeZone,omitempty"`
2614
2615 UpdateTime string `json:"updateTime,omitempty"`
2616
2617
2618 googleapi.ServerResponse `json:"-"`
2619
2620
2621
2622
2623
2624 ForceSendFields []string `json:"-"`
2625
2626
2627
2628
2629 NullFields []string `json:"-"`
2630 }
2631
2632 func (s *Schedule) MarshalJSON() ([]byte, error) {
2633 type NoMethod Schedule
2634 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2635 }
2636
2637
2638
2639
2640
2641 type SchedulerAcceleratorConfig struct {
2642
2643 CoreCount int64 `json:"coreCount,omitempty,string"`
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657 Type string `json:"type,omitempty"`
2658
2659
2660
2661
2662
2663 ForceSendFields []string `json:"-"`
2664
2665
2666
2667
2668 NullFields []string `json:"-"`
2669 }
2670
2671 func (s *SchedulerAcceleratorConfig) MarshalJSON() ([]byte, error) {
2672 type NoMethod SchedulerAcceleratorConfig
2673 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2674 }
2675
2676
2677 type SetIamPolicyRequest struct {
2678
2679
2680
2681
2682 Policy *Policy `json:"policy,omitempty"`
2683
2684
2685
2686
2687
2688 ForceSendFields []string `json:"-"`
2689
2690
2691
2692
2693 NullFields []string `json:"-"`
2694 }
2695
2696 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
2697 type NoMethod SetIamPolicyRequest
2698 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2699 }
2700
2701
2702 type SetInstanceAcceleratorRequest struct {
2703
2704
2705
2706
2707 CoreCount int64 `json:"coreCount,omitempty,string"`
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728 Type string `json:"type,omitempty"`
2729
2730
2731
2732
2733
2734 ForceSendFields []string `json:"-"`
2735
2736
2737
2738
2739 NullFields []string `json:"-"`
2740 }
2741
2742 func (s *SetInstanceAcceleratorRequest) MarshalJSON() ([]byte, error) {
2743 type NoMethod SetInstanceAcceleratorRequest
2744 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2745 }
2746
2747
2748 type SetInstanceLabelsRequest struct {
2749
2750
2751 Labels map[string]string `json:"labels,omitempty"`
2752
2753
2754
2755
2756
2757 ForceSendFields []string `json:"-"`
2758
2759
2760
2761
2762 NullFields []string `json:"-"`
2763 }
2764
2765 func (s *SetInstanceLabelsRequest) MarshalJSON() ([]byte, error) {
2766 type NoMethod SetInstanceLabelsRequest
2767 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2768 }
2769
2770
2771 type SetInstanceMachineTypeRequest struct {
2772
2773
2774 MachineType string `json:"machineType,omitempty"`
2775
2776
2777
2778
2779
2780 ForceSendFields []string `json:"-"`
2781
2782
2783
2784
2785 NullFields []string `json:"-"`
2786 }
2787
2788 func (s *SetInstanceMachineTypeRequest) MarshalJSON() ([]byte, error) {
2789 type NoMethod SetInstanceMachineTypeRequest
2790 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2791 }
2792
2793
2794
2795
2796
2797 type ShieldedInstanceConfig struct {
2798
2799
2800
2801
2802
2803 EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"`
2804
2805
2806
2807
2808 EnableSecureBoot bool `json:"enableSecureBoot,omitempty"`
2809
2810
2811 EnableVtpm bool `json:"enableVtpm,omitempty"`
2812
2813
2814
2815
2816
2817 ForceSendFields []string `json:"-"`
2818
2819
2820
2821
2822 NullFields []string `json:"-"`
2823 }
2824
2825 func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) {
2826 type NoMethod ShieldedInstanceConfig
2827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2828 }
2829
2830
2831 type StartInstanceRequest struct {
2832 }
2833
2834
2835 type StartRuntimeRequest struct {
2836
2837 RequestId string `json:"requestId,omitempty"`
2838
2839
2840
2841
2842
2843 ForceSendFields []string `json:"-"`
2844
2845
2846
2847
2848 NullFields []string `json:"-"`
2849 }
2850
2851 func (s *StartRuntimeRequest) MarshalJSON() ([]byte, error) {
2852 type NoMethod StartRuntimeRequest
2853 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2854 }
2855
2856
2857
2858
2859
2860
2861
2862 type Status struct {
2863
2864 Code int64 `json:"code,omitempty"`
2865
2866
2867 Details []googleapi.RawMessage `json:"details,omitempty"`
2868
2869
2870
2871 Message string `json:"message,omitempty"`
2872
2873
2874
2875
2876
2877 ForceSendFields []string `json:"-"`
2878
2879
2880
2881
2882 NullFields []string `json:"-"`
2883 }
2884
2885 func (s *Status) MarshalJSON() ([]byte, error) {
2886 type NoMethod Status
2887 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2888 }
2889
2890
2891 type StopInstanceRequest struct {
2892 }
2893
2894
2895 type StopRuntimeRequest struct {
2896
2897 RequestId string `json:"requestId,omitempty"`
2898
2899
2900
2901
2902
2903 ForceSendFields []string `json:"-"`
2904
2905
2906
2907
2908 NullFields []string `json:"-"`
2909 }
2910
2911 func (s *StopRuntimeRequest) MarshalJSON() ([]byte, error) {
2912 type NoMethod StopRuntimeRequest
2913 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2914 }
2915
2916
2917 type SwitchRuntimeRequest struct {
2918
2919 AcceleratorConfig *RuntimeAcceleratorConfig `json:"acceleratorConfig,omitempty"`
2920
2921 MachineType string `json:"machineType,omitempty"`
2922
2923 RequestId string `json:"requestId,omitempty"`
2924
2925
2926
2927
2928
2929 ForceSendFields []string `json:"-"`
2930
2931
2932
2933
2934 NullFields []string `json:"-"`
2935 }
2936
2937 func (s *SwitchRuntimeRequest) MarshalJSON() ([]byte, error) {
2938 type NoMethod SwitchRuntimeRequest
2939 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2940 }
2941
2942
2943 type TestIamPermissionsRequest struct {
2944
2945
2946
2947
2948 Permissions []string `json:"permissions,omitempty"`
2949
2950
2951
2952
2953
2954 ForceSendFields []string `json:"-"`
2955
2956
2957
2958
2959 NullFields []string `json:"-"`
2960 }
2961
2962 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2963 type NoMethod TestIamPermissionsRequest
2964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2965 }
2966
2967
2968
2969 type TestIamPermissionsResponse struct {
2970
2971
2972 Permissions []string `json:"permissions,omitempty"`
2973
2974
2975 googleapi.ServerResponse `json:"-"`
2976
2977
2978
2979
2980
2981 ForceSendFields []string `json:"-"`
2982
2983
2984
2985
2986 NullFields []string `json:"-"`
2987 }
2988
2989 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2990 type NoMethod TestIamPermissionsResponse
2991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2992 }
2993
2994
2995 type TriggerScheduleRequest struct {
2996 }
2997
2998
2999 type UpdateInstanceConfigRequest struct {
3000
3001 Config *InstanceConfig `json:"config,omitempty"`
3002
3003
3004
3005
3006
3007 ForceSendFields []string `json:"-"`
3008
3009
3010
3011
3012 NullFields []string `json:"-"`
3013 }
3014
3015 func (s *UpdateInstanceConfigRequest) MarshalJSON() ([]byte, error) {
3016 type NoMethod UpdateInstanceConfigRequest
3017 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3018 }
3019
3020
3021
3022 type UpdateInstanceMetadataItemsRequest struct {
3023
3024 Items map[string]string `json:"items,omitempty"`
3025
3026
3027
3028
3029
3030 ForceSendFields []string `json:"-"`
3031
3032
3033
3034
3035 NullFields []string `json:"-"`
3036 }
3037
3038 func (s *UpdateInstanceMetadataItemsRequest) MarshalJSON() ([]byte, error) {
3039 type NoMethod UpdateInstanceMetadataItemsRequest
3040 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3041 }
3042
3043
3044
3045 type UpdateInstanceMetadataItemsResponse struct {
3046
3047 Items map[string]string `json:"items,omitempty"`
3048
3049
3050 googleapi.ServerResponse `json:"-"`
3051
3052
3053
3054
3055
3056 ForceSendFields []string `json:"-"`
3057
3058
3059
3060
3061 NullFields []string `json:"-"`
3062 }
3063
3064 func (s *UpdateInstanceMetadataItemsResponse) MarshalJSON() ([]byte, error) {
3065 type NoMethod UpdateInstanceMetadataItemsResponse
3066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3067 }
3068
3069
3070
3071
3072 type UpdateShieldedInstanceConfigRequest struct {
3073
3074 ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
3075
3076
3077
3078
3079
3080 ForceSendFields []string `json:"-"`
3081
3082
3083
3084
3085 NullFields []string `json:"-"`
3086 }
3087
3088 func (s *UpdateShieldedInstanceConfigRequest) MarshalJSON() ([]byte, error) {
3089 type NoMethod UpdateShieldedInstanceConfigRequest
3090 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3091 }
3092
3093
3094 type UpgradeHistoryEntry struct {
3095
3096
3097
3098
3099
3100
3101 Action string `json:"action,omitempty"`
3102
3103 ContainerImage string `json:"containerImage,omitempty"`
3104
3105 CreateTime string `json:"createTime,omitempty"`
3106
3107 Framework string `json:"framework,omitempty"`
3108
3109
3110 Snapshot string `json:"snapshot,omitempty"`
3111
3112
3113
3114
3115
3116
3117
3118 State string `json:"state,omitempty"`
3119
3120
3121 TargetImage string `json:"targetImage,omitempty"`
3122
3123 TargetVersion string `json:"targetVersion,omitempty"`
3124
3125 Version string `json:"version,omitempty"`
3126
3127 VmImage string `json:"vmImage,omitempty"`
3128
3129
3130
3131
3132
3133 ForceSendFields []string `json:"-"`
3134
3135
3136
3137
3138 NullFields []string `json:"-"`
3139 }
3140
3141 func (s *UpgradeHistoryEntry) MarshalJSON() ([]byte, error) {
3142 type NoMethod UpgradeHistoryEntry
3143 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3144 }
3145
3146
3147
3148 type UpgradeInstanceInternalRequest struct {
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158 Type string `json:"type,omitempty"`
3159
3160
3161 VmId string `json:"vmId,omitempty"`
3162
3163
3164
3165
3166
3167 ForceSendFields []string `json:"-"`
3168
3169
3170
3171
3172 NullFields []string `json:"-"`
3173 }
3174
3175 func (s *UpgradeInstanceInternalRequest) MarshalJSON() ([]byte, error) {
3176 type NoMethod UpgradeInstanceInternalRequest
3177 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3178 }
3179
3180
3181 type UpgradeInstanceRequest struct {
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191 Type string `json:"type,omitempty"`
3192
3193
3194
3195
3196
3197 ForceSendFields []string `json:"-"`
3198
3199
3200
3201
3202 NullFields []string `json:"-"`
3203 }
3204
3205 func (s *UpgradeInstanceRequest) MarshalJSON() ([]byte, error) {
3206 type NoMethod UpgradeInstanceRequest
3207 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3208 }
3209
3210
3211
3212
3213 type UpgradeRuntimeRequest struct {
3214
3215 RequestId string `json:"requestId,omitempty"`
3216
3217
3218
3219
3220
3221 ForceSendFields []string `json:"-"`
3222
3223
3224
3225
3226 NullFields []string `json:"-"`
3227 }
3228
3229 func (s *UpgradeRuntimeRequest) MarshalJSON() ([]byte, error) {
3230 type NoMethod UpgradeRuntimeRequest
3231 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3232 }
3233
3234
3235 type VertexAIParameters struct {
3236
3237
3238 Env map[string]string `json:"env,omitempty"`
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248 Network string `json:"network,omitempty"`
3249
3250
3251
3252
3253
3254 ForceSendFields []string `json:"-"`
3255
3256
3257
3258
3259 NullFields []string `json:"-"`
3260 }
3261
3262 func (s *VertexAIParameters) MarshalJSON() ([]byte, error) {
3263 type NoMethod VertexAIParameters
3264 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3265 }
3266
3267
3268 type VirtualMachine struct {
3269
3270
3271 InstanceId string `json:"instanceId,omitempty"`
3272
3273
3274 InstanceName string `json:"instanceName,omitempty"`
3275
3276 VirtualMachineConfig *VirtualMachineConfig `json:"virtualMachineConfig,omitempty"`
3277
3278
3279
3280
3281
3282 ForceSendFields []string `json:"-"`
3283
3284
3285
3286
3287 NullFields []string `json:"-"`
3288 }
3289
3290 func (s *VirtualMachine) MarshalJSON() ([]byte, error) {
3291 type NoMethod VirtualMachine
3292 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3293 }
3294
3295
3296 type VirtualMachineConfig struct {
3297
3298
3299 AcceleratorConfig *RuntimeAcceleratorConfig `json:"acceleratorConfig,omitempty"`
3300
3301 BootImage *BootImage `json:"bootImage,omitempty"`
3302
3303
3304 ContainerImages []*ContainerImage `json:"containerImages,omitempty"`
3305
3306 DataDisk *LocalDisk `json:"dataDisk,omitempty"`
3307
3308
3309 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
3310
3311
3312
3313 GuestAttributes map[string]string `json:"guestAttributes,omitempty"`
3314
3315
3316
3317
3318
3319
3320 InternalIpOnly bool `json:"internalIpOnly,omitempty"`
3321
3322
3323
3324
3325
3326
3327 Labels map[string]string `json:"labels,omitempty"`
3328
3329
3330 MachineType string `json:"machineType,omitempty"`
3331
3332
3333
3334 Metadata map[string]string `json:"metadata,omitempty"`
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346 Network string `json:"network,omitempty"`
3347
3348
3349
3350
3351
3352
3353
3354 NicType string `json:"nicType,omitempty"`
3355
3356
3357
3358
3359
3360
3361
3362
3363 ReservedIpRange string `json:"reservedIpRange,omitempty"`
3364
3365
3366 ShieldedInstanceConfig *RuntimeShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
3367
3368
3369
3370
3371
3372
3373 Subnet string `json:"subnet,omitempty"`
3374
3375
3376
3377 Tags []string `json:"tags,omitempty"`
3378
3379
3380
3381
3382 Zone string `json:"zone,omitempty"`
3383
3384
3385
3386
3387
3388 ForceSendFields []string `json:"-"`
3389
3390
3391
3392
3393 NullFields []string `json:"-"`
3394 }
3395
3396 func (s *VirtualMachineConfig) MarshalJSON() ([]byte, error) {
3397 type NoMethod VirtualMachineConfig
3398 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3399 }
3400
3401
3402
3403
3404 type VmImage struct {
3405
3406
3407 ImageFamily string `json:"imageFamily,omitempty"`
3408
3409 ImageName string `json:"imageName,omitempty"`
3410
3411
3412 Project string `json:"project,omitempty"`
3413
3414
3415
3416
3417
3418 ForceSendFields []string `json:"-"`
3419
3420
3421
3422
3423 NullFields []string `json:"-"`
3424 }
3425
3426 func (s *VmImage) MarshalJSON() ([]byte, error) {
3427 type NoMethod VmImage
3428 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3429 }
3430
3431 type ProjectsLocationsGetCall struct {
3432 s *Service
3433 name string
3434 urlParams_ gensupport.URLParams
3435 ifNoneMatch_ string
3436 ctx_ context.Context
3437 header_ http.Header
3438 }
3439
3440
3441
3442
3443 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
3444 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3445 c.name = name
3446 return c
3447 }
3448
3449
3450
3451
3452 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
3453 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3454 return c
3455 }
3456
3457
3458
3459
3460 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
3461 c.ifNoneMatch_ = entityTag
3462 return c
3463 }
3464
3465
3466 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
3467 c.ctx_ = ctx
3468 return c
3469 }
3470
3471
3472
3473 func (c *ProjectsLocationsGetCall) Header() http.Header {
3474 if c.header_ == nil {
3475 c.header_ = make(http.Header)
3476 }
3477 return c.header_
3478 }
3479
3480 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
3481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3482 if c.ifNoneMatch_ != "" {
3483 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3484 }
3485 var body io.Reader = nil
3486 c.urlParams_.Set("alt", alt)
3487 c.urlParams_.Set("prettyPrint", "false")
3488 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3489 urls += "?" + c.urlParams_.Encode()
3490 req, err := http.NewRequest("GET", urls, body)
3491 if err != nil {
3492 return nil, err
3493 }
3494 req.Header = reqHeaders
3495 googleapi.Expand(req.URL, map[string]string{
3496 "name": c.name,
3497 })
3498 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3499 }
3500
3501
3502
3503
3504
3505
3506 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
3507 gensupport.SetOptions(c.urlParams_, opts...)
3508 res, err := c.doRequest("json")
3509 if res != nil && res.StatusCode == http.StatusNotModified {
3510 if res.Body != nil {
3511 res.Body.Close()
3512 }
3513 return nil, gensupport.WrapError(&googleapi.Error{
3514 Code: res.StatusCode,
3515 Header: res.Header,
3516 })
3517 }
3518 if err != nil {
3519 return nil, err
3520 }
3521 defer googleapi.CloseBody(res)
3522 if err := googleapi.CheckResponse(res); err != nil {
3523 return nil, gensupport.WrapError(err)
3524 }
3525 ret := &Location{
3526 ServerResponse: googleapi.ServerResponse{
3527 Header: res.Header,
3528 HTTPStatusCode: res.StatusCode,
3529 },
3530 }
3531 target := &ret
3532 if err := gensupport.DecodeResponse(target, res); err != nil {
3533 return nil, err
3534 }
3535 return ret, nil
3536 }
3537
3538 type ProjectsLocationsListCall struct {
3539 s *Service
3540 name string
3541 urlParams_ gensupport.URLParams
3542 ifNoneMatch_ string
3543 ctx_ context.Context
3544 header_ http.Header
3545 }
3546
3547
3548
3549
3550 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
3551 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3552 c.name = name
3553 return c
3554 }
3555
3556
3557
3558
3559
3560 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
3561 c.urlParams_.Set("filter", filter)
3562 return c
3563 }
3564
3565
3566
3567 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
3568 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3569 return c
3570 }
3571
3572
3573
3574
3575 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
3576 c.urlParams_.Set("pageToken", pageToken)
3577 return c
3578 }
3579
3580
3581
3582
3583 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
3584 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3585 return c
3586 }
3587
3588
3589
3590
3591 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
3592 c.ifNoneMatch_ = entityTag
3593 return c
3594 }
3595
3596
3597 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
3598 c.ctx_ = ctx
3599 return c
3600 }
3601
3602
3603
3604 func (c *ProjectsLocationsListCall) Header() http.Header {
3605 if c.header_ == nil {
3606 c.header_ = make(http.Header)
3607 }
3608 return c.header_
3609 }
3610
3611 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
3612 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3613 if c.ifNoneMatch_ != "" {
3614 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3615 }
3616 var body io.Reader = nil
3617 c.urlParams_.Set("alt", alt)
3618 c.urlParams_.Set("prettyPrint", "false")
3619 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
3620 urls += "?" + c.urlParams_.Encode()
3621 req, err := http.NewRequest("GET", urls, body)
3622 if err != nil {
3623 return nil, err
3624 }
3625 req.Header = reqHeaders
3626 googleapi.Expand(req.URL, map[string]string{
3627 "name": c.name,
3628 })
3629 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3630 }
3631
3632
3633
3634
3635
3636
3637
3638 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
3639 gensupport.SetOptions(c.urlParams_, opts...)
3640 res, err := c.doRequest("json")
3641 if res != nil && res.StatusCode == http.StatusNotModified {
3642 if res.Body != nil {
3643 res.Body.Close()
3644 }
3645 return nil, gensupport.WrapError(&googleapi.Error{
3646 Code: res.StatusCode,
3647 Header: res.Header,
3648 })
3649 }
3650 if err != nil {
3651 return nil, err
3652 }
3653 defer googleapi.CloseBody(res)
3654 if err := googleapi.CheckResponse(res); err != nil {
3655 return nil, gensupport.WrapError(err)
3656 }
3657 ret := &ListLocationsResponse{
3658 ServerResponse: googleapi.ServerResponse{
3659 Header: res.Header,
3660 HTTPStatusCode: res.StatusCode,
3661 },
3662 }
3663 target := &ret
3664 if err := gensupport.DecodeResponse(target, res); err != nil {
3665 return nil, err
3666 }
3667 return ret, nil
3668 }
3669
3670
3671
3672
3673 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
3674 c.ctx_ = ctx
3675 defer c.PageToken(c.urlParams_.Get("pageToken"))
3676 for {
3677 x, err := c.Do()
3678 if err != nil {
3679 return err
3680 }
3681 if err := f(x); err != nil {
3682 return err
3683 }
3684 if x.NextPageToken == "" {
3685 return nil
3686 }
3687 c.PageToken(x.NextPageToken)
3688 }
3689 }
3690
3691 type ProjectsLocationsEnvironmentsCreateCall struct {
3692 s *Service
3693 parent string
3694 environment *Environment
3695 urlParams_ gensupport.URLParams
3696 ctx_ context.Context
3697 header_ http.Header
3698 }
3699
3700
3701
3702
3703 func (r *ProjectsLocationsEnvironmentsService) Create(parent string, environment *Environment) *ProjectsLocationsEnvironmentsCreateCall {
3704 c := &ProjectsLocationsEnvironmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3705 c.parent = parent
3706 c.environment = environment
3707 return c
3708 }
3709
3710
3711
3712
3713
3714
3715 func (c *ProjectsLocationsEnvironmentsCreateCall) EnvironmentId(environmentId string) *ProjectsLocationsEnvironmentsCreateCall {
3716 c.urlParams_.Set("environmentId", environmentId)
3717 return c
3718 }
3719
3720
3721
3722
3723 func (c *ProjectsLocationsEnvironmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsCreateCall {
3724 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3725 return c
3726 }
3727
3728
3729 func (c *ProjectsLocationsEnvironmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsCreateCall {
3730 c.ctx_ = ctx
3731 return c
3732 }
3733
3734
3735
3736 func (c *ProjectsLocationsEnvironmentsCreateCall) Header() http.Header {
3737 if c.header_ == nil {
3738 c.header_ = make(http.Header)
3739 }
3740 return c.header_
3741 }
3742
3743 func (c *ProjectsLocationsEnvironmentsCreateCall) doRequest(alt string) (*http.Response, error) {
3744 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3745 var body io.Reader = nil
3746 body, err := googleapi.WithoutDataWrapper.JSONReader(c.environment)
3747 if err != nil {
3748 return nil, err
3749 }
3750 c.urlParams_.Set("alt", alt)
3751 c.urlParams_.Set("prettyPrint", "false")
3752 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments")
3753 urls += "?" + c.urlParams_.Encode()
3754 req, err := http.NewRequest("POST", urls, body)
3755 if err != nil {
3756 return nil, err
3757 }
3758 req.Header = reqHeaders
3759 googleapi.Expand(req.URL, map[string]string{
3760 "parent": c.parent,
3761 })
3762 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3763 }
3764
3765
3766
3767
3768
3769
3770 func (c *ProjectsLocationsEnvironmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3771 gensupport.SetOptions(c.urlParams_, opts...)
3772 res, err := c.doRequest("json")
3773 if res != nil && res.StatusCode == http.StatusNotModified {
3774 if res.Body != nil {
3775 res.Body.Close()
3776 }
3777 return nil, gensupport.WrapError(&googleapi.Error{
3778 Code: res.StatusCode,
3779 Header: res.Header,
3780 })
3781 }
3782 if err != nil {
3783 return nil, err
3784 }
3785 defer googleapi.CloseBody(res)
3786 if err := googleapi.CheckResponse(res); err != nil {
3787 return nil, gensupport.WrapError(err)
3788 }
3789 ret := &Operation{
3790 ServerResponse: googleapi.ServerResponse{
3791 Header: res.Header,
3792 HTTPStatusCode: res.StatusCode,
3793 },
3794 }
3795 target := &ret
3796 if err := gensupport.DecodeResponse(target, res); err != nil {
3797 return nil, err
3798 }
3799 return ret, nil
3800 }
3801
3802 type ProjectsLocationsEnvironmentsDeleteCall struct {
3803 s *Service
3804 name string
3805 urlParams_ gensupport.URLParams
3806 ctx_ context.Context
3807 header_ http.Header
3808 }
3809
3810
3811
3812
3813
3814 func (r *ProjectsLocationsEnvironmentsService) Delete(name string) *ProjectsLocationsEnvironmentsDeleteCall {
3815 c := &ProjectsLocationsEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3816 c.name = name
3817 return c
3818 }
3819
3820
3821
3822
3823 func (c *ProjectsLocationsEnvironmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsDeleteCall {
3824 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3825 return c
3826 }
3827
3828
3829 func (c *ProjectsLocationsEnvironmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsDeleteCall {
3830 c.ctx_ = ctx
3831 return c
3832 }
3833
3834
3835
3836 func (c *ProjectsLocationsEnvironmentsDeleteCall) Header() http.Header {
3837 if c.header_ == nil {
3838 c.header_ = make(http.Header)
3839 }
3840 return c.header_
3841 }
3842
3843 func (c *ProjectsLocationsEnvironmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
3844 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3845 var body io.Reader = nil
3846 c.urlParams_.Set("alt", alt)
3847 c.urlParams_.Set("prettyPrint", "false")
3848 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3849 urls += "?" + c.urlParams_.Encode()
3850 req, err := http.NewRequest("DELETE", urls, body)
3851 if err != nil {
3852 return nil, err
3853 }
3854 req.Header = reqHeaders
3855 googleapi.Expand(req.URL, map[string]string{
3856 "name": c.name,
3857 })
3858 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3859 }
3860
3861
3862
3863
3864
3865
3866 func (c *ProjectsLocationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3867 gensupport.SetOptions(c.urlParams_, opts...)
3868 res, err := c.doRequest("json")
3869 if res != nil && res.StatusCode == http.StatusNotModified {
3870 if res.Body != nil {
3871 res.Body.Close()
3872 }
3873 return nil, gensupport.WrapError(&googleapi.Error{
3874 Code: res.StatusCode,
3875 Header: res.Header,
3876 })
3877 }
3878 if err != nil {
3879 return nil, err
3880 }
3881 defer googleapi.CloseBody(res)
3882 if err := googleapi.CheckResponse(res); err != nil {
3883 return nil, gensupport.WrapError(err)
3884 }
3885 ret := &Operation{
3886 ServerResponse: googleapi.ServerResponse{
3887 Header: res.Header,
3888 HTTPStatusCode: res.StatusCode,
3889 },
3890 }
3891 target := &ret
3892 if err := gensupport.DecodeResponse(target, res); err != nil {
3893 return nil, err
3894 }
3895 return ret, nil
3896 }
3897
3898 type ProjectsLocationsEnvironmentsGetCall struct {
3899 s *Service
3900 name string
3901 urlParams_ gensupport.URLParams
3902 ifNoneMatch_ string
3903 ctx_ context.Context
3904 header_ http.Header
3905 }
3906
3907
3908
3909
3910
3911 func (r *ProjectsLocationsEnvironmentsService) Get(name string) *ProjectsLocationsEnvironmentsGetCall {
3912 c := &ProjectsLocationsEnvironmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3913 c.name = name
3914 return c
3915 }
3916
3917
3918
3919
3920 func (c *ProjectsLocationsEnvironmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsGetCall {
3921 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3922 return c
3923 }
3924
3925
3926
3927
3928 func (c *ProjectsLocationsEnvironmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnvironmentsGetCall {
3929 c.ifNoneMatch_ = entityTag
3930 return c
3931 }
3932
3933
3934 func (c *ProjectsLocationsEnvironmentsGetCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsGetCall {
3935 c.ctx_ = ctx
3936 return c
3937 }
3938
3939
3940
3941 func (c *ProjectsLocationsEnvironmentsGetCall) Header() http.Header {
3942 if c.header_ == nil {
3943 c.header_ = make(http.Header)
3944 }
3945 return c.header_
3946 }
3947
3948 func (c *ProjectsLocationsEnvironmentsGetCall) doRequest(alt string) (*http.Response, error) {
3949 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3950 if c.ifNoneMatch_ != "" {
3951 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3952 }
3953 var body io.Reader = nil
3954 c.urlParams_.Set("alt", alt)
3955 c.urlParams_.Set("prettyPrint", "false")
3956 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3957 urls += "?" + c.urlParams_.Encode()
3958 req, err := http.NewRequest("GET", urls, body)
3959 if err != nil {
3960 return nil, err
3961 }
3962 req.Header = reqHeaders
3963 googleapi.Expand(req.URL, map[string]string{
3964 "name": c.name,
3965 })
3966 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3967 }
3968
3969
3970
3971
3972
3973
3974 func (c *ProjectsLocationsEnvironmentsGetCall) Do(opts ...googleapi.CallOption) (*Environment, error) {
3975 gensupport.SetOptions(c.urlParams_, opts...)
3976 res, err := c.doRequest("json")
3977 if res != nil && res.StatusCode == http.StatusNotModified {
3978 if res.Body != nil {
3979 res.Body.Close()
3980 }
3981 return nil, gensupport.WrapError(&googleapi.Error{
3982 Code: res.StatusCode,
3983 Header: res.Header,
3984 })
3985 }
3986 if err != nil {
3987 return nil, err
3988 }
3989 defer googleapi.CloseBody(res)
3990 if err := googleapi.CheckResponse(res); err != nil {
3991 return nil, gensupport.WrapError(err)
3992 }
3993 ret := &Environment{
3994 ServerResponse: googleapi.ServerResponse{
3995 Header: res.Header,
3996 HTTPStatusCode: res.StatusCode,
3997 },
3998 }
3999 target := &ret
4000 if err := gensupport.DecodeResponse(target, res); err != nil {
4001 return nil, err
4002 }
4003 return ret, nil
4004 }
4005
4006 type ProjectsLocationsEnvironmentsListCall struct {
4007 s *Service
4008 parent string
4009 urlParams_ gensupport.URLParams
4010 ifNoneMatch_ string
4011 ctx_ context.Context
4012 header_ http.Header
4013 }
4014
4015
4016
4017
4018 func (r *ProjectsLocationsEnvironmentsService) List(parent string) *ProjectsLocationsEnvironmentsListCall {
4019 c := &ProjectsLocationsEnvironmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4020 c.parent = parent
4021 return c
4022 }
4023
4024
4025
4026 func (c *ProjectsLocationsEnvironmentsListCall) PageSize(pageSize int64) *ProjectsLocationsEnvironmentsListCall {
4027 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4028 return c
4029 }
4030
4031
4032
4033 func (c *ProjectsLocationsEnvironmentsListCall) PageToken(pageToken string) *ProjectsLocationsEnvironmentsListCall {
4034 c.urlParams_.Set("pageToken", pageToken)
4035 return c
4036 }
4037
4038
4039
4040
4041 func (c *ProjectsLocationsEnvironmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEnvironmentsListCall {
4042 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4043 return c
4044 }
4045
4046
4047
4048
4049 func (c *ProjectsLocationsEnvironmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEnvironmentsListCall {
4050 c.ifNoneMatch_ = entityTag
4051 return c
4052 }
4053
4054
4055 func (c *ProjectsLocationsEnvironmentsListCall) Context(ctx context.Context) *ProjectsLocationsEnvironmentsListCall {
4056 c.ctx_ = ctx
4057 return c
4058 }
4059
4060
4061
4062 func (c *ProjectsLocationsEnvironmentsListCall) Header() http.Header {
4063 if c.header_ == nil {
4064 c.header_ = make(http.Header)
4065 }
4066 return c.header_
4067 }
4068
4069 func (c *ProjectsLocationsEnvironmentsListCall) doRequest(alt string) (*http.Response, error) {
4070 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4071 if c.ifNoneMatch_ != "" {
4072 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4073 }
4074 var body io.Reader = nil
4075 c.urlParams_.Set("alt", alt)
4076 c.urlParams_.Set("prettyPrint", "false")
4077 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/environments")
4078 urls += "?" + c.urlParams_.Encode()
4079 req, err := http.NewRequest("GET", urls, body)
4080 if err != nil {
4081 return nil, err
4082 }
4083 req.Header = reqHeaders
4084 googleapi.Expand(req.URL, map[string]string{
4085 "parent": c.parent,
4086 })
4087 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4088 }
4089
4090
4091
4092
4093
4094
4095
4096 func (c *ProjectsLocationsEnvironmentsListCall) Do(opts ...googleapi.CallOption) (*ListEnvironmentsResponse, error) {
4097 gensupport.SetOptions(c.urlParams_, opts...)
4098 res, err := c.doRequest("json")
4099 if res != nil && res.StatusCode == http.StatusNotModified {
4100 if res.Body != nil {
4101 res.Body.Close()
4102 }
4103 return nil, gensupport.WrapError(&googleapi.Error{
4104 Code: res.StatusCode,
4105 Header: res.Header,
4106 })
4107 }
4108 if err != nil {
4109 return nil, err
4110 }
4111 defer googleapi.CloseBody(res)
4112 if err := googleapi.CheckResponse(res); err != nil {
4113 return nil, gensupport.WrapError(err)
4114 }
4115 ret := &ListEnvironmentsResponse{
4116 ServerResponse: googleapi.ServerResponse{
4117 Header: res.Header,
4118 HTTPStatusCode: res.StatusCode,
4119 },
4120 }
4121 target := &ret
4122 if err := gensupport.DecodeResponse(target, res); err != nil {
4123 return nil, err
4124 }
4125 return ret, nil
4126 }
4127
4128
4129
4130
4131 func (c *ProjectsLocationsEnvironmentsListCall) Pages(ctx context.Context, f func(*ListEnvironmentsResponse) error) error {
4132 c.ctx_ = ctx
4133 defer c.PageToken(c.urlParams_.Get("pageToken"))
4134 for {
4135 x, err := c.Do()
4136 if err != nil {
4137 return err
4138 }
4139 if err := f(x); err != nil {
4140 return err
4141 }
4142 if x.NextPageToken == "" {
4143 return nil
4144 }
4145 c.PageToken(x.NextPageToken)
4146 }
4147 }
4148
4149 type ProjectsLocationsExecutionsCreateCall struct {
4150 s *Service
4151 parent string
4152 execution *Execution
4153 urlParams_ gensupport.URLParams
4154 ctx_ context.Context
4155 header_ http.Header
4156 }
4157
4158
4159
4160
4161 func (r *ProjectsLocationsExecutionsService) Create(parent string, execution *Execution) *ProjectsLocationsExecutionsCreateCall {
4162 c := &ProjectsLocationsExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4163 c.parent = parent
4164 c.execution = execution
4165 return c
4166 }
4167
4168
4169
4170 func (c *ProjectsLocationsExecutionsCreateCall) ExecutionId(executionId string) *ProjectsLocationsExecutionsCreateCall {
4171 c.urlParams_.Set("executionId", executionId)
4172 return c
4173 }
4174
4175
4176
4177
4178 func (c *ProjectsLocationsExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsExecutionsCreateCall {
4179 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4180 return c
4181 }
4182
4183
4184 func (c *ProjectsLocationsExecutionsCreateCall) Context(ctx context.Context) *ProjectsLocationsExecutionsCreateCall {
4185 c.ctx_ = ctx
4186 return c
4187 }
4188
4189
4190
4191 func (c *ProjectsLocationsExecutionsCreateCall) Header() http.Header {
4192 if c.header_ == nil {
4193 c.header_ = make(http.Header)
4194 }
4195 return c.header_
4196 }
4197
4198 func (c *ProjectsLocationsExecutionsCreateCall) doRequest(alt string) (*http.Response, error) {
4199 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4200 var body io.Reader = nil
4201 body, err := googleapi.WithoutDataWrapper.JSONReader(c.execution)
4202 if err != nil {
4203 return nil, err
4204 }
4205 c.urlParams_.Set("alt", alt)
4206 c.urlParams_.Set("prettyPrint", "false")
4207 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions")
4208 urls += "?" + c.urlParams_.Encode()
4209 req, err := http.NewRequest("POST", urls, body)
4210 if err != nil {
4211 return nil, err
4212 }
4213 req.Header = reqHeaders
4214 googleapi.Expand(req.URL, map[string]string{
4215 "parent": c.parent,
4216 })
4217 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4218 }
4219
4220
4221
4222
4223
4224
4225 func (c *ProjectsLocationsExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4226 gensupport.SetOptions(c.urlParams_, opts...)
4227 res, err := c.doRequest("json")
4228 if res != nil && res.StatusCode == http.StatusNotModified {
4229 if res.Body != nil {
4230 res.Body.Close()
4231 }
4232 return nil, gensupport.WrapError(&googleapi.Error{
4233 Code: res.StatusCode,
4234 Header: res.Header,
4235 })
4236 }
4237 if err != nil {
4238 return nil, err
4239 }
4240 defer googleapi.CloseBody(res)
4241 if err := googleapi.CheckResponse(res); err != nil {
4242 return nil, gensupport.WrapError(err)
4243 }
4244 ret := &Operation{
4245 ServerResponse: googleapi.ServerResponse{
4246 Header: res.Header,
4247 HTTPStatusCode: res.StatusCode,
4248 },
4249 }
4250 target := &ret
4251 if err := gensupport.DecodeResponse(target, res); err != nil {
4252 return nil, err
4253 }
4254 return ret, nil
4255 }
4256
4257 type ProjectsLocationsExecutionsDeleteCall struct {
4258 s *Service
4259 name string
4260 urlParams_ gensupport.URLParams
4261 ctx_ context.Context
4262 header_ http.Header
4263 }
4264
4265
4266
4267
4268
4269 func (r *ProjectsLocationsExecutionsService) Delete(name string) *ProjectsLocationsExecutionsDeleteCall {
4270 c := &ProjectsLocationsExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4271 c.name = name
4272 return c
4273 }
4274
4275
4276
4277
4278 func (c *ProjectsLocationsExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsExecutionsDeleteCall {
4279 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4280 return c
4281 }
4282
4283
4284 func (c *ProjectsLocationsExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsExecutionsDeleteCall {
4285 c.ctx_ = ctx
4286 return c
4287 }
4288
4289
4290
4291 func (c *ProjectsLocationsExecutionsDeleteCall) Header() http.Header {
4292 if c.header_ == nil {
4293 c.header_ = make(http.Header)
4294 }
4295 return c.header_
4296 }
4297
4298 func (c *ProjectsLocationsExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) {
4299 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4300 var body io.Reader = nil
4301 c.urlParams_.Set("alt", alt)
4302 c.urlParams_.Set("prettyPrint", "false")
4303 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4304 urls += "?" + c.urlParams_.Encode()
4305 req, err := http.NewRequest("DELETE", urls, body)
4306 if err != nil {
4307 return nil, err
4308 }
4309 req.Header = reqHeaders
4310 googleapi.Expand(req.URL, map[string]string{
4311 "name": c.name,
4312 })
4313 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4314 }
4315
4316
4317
4318
4319
4320
4321 func (c *ProjectsLocationsExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4322 gensupport.SetOptions(c.urlParams_, opts...)
4323 res, err := c.doRequest("json")
4324 if res != nil && res.StatusCode == http.StatusNotModified {
4325 if res.Body != nil {
4326 res.Body.Close()
4327 }
4328 return nil, gensupport.WrapError(&googleapi.Error{
4329 Code: res.StatusCode,
4330 Header: res.Header,
4331 })
4332 }
4333 if err != nil {
4334 return nil, err
4335 }
4336 defer googleapi.CloseBody(res)
4337 if err := googleapi.CheckResponse(res); err != nil {
4338 return nil, gensupport.WrapError(err)
4339 }
4340 ret := &Operation{
4341 ServerResponse: googleapi.ServerResponse{
4342 Header: res.Header,
4343 HTTPStatusCode: res.StatusCode,
4344 },
4345 }
4346 target := &ret
4347 if err := gensupport.DecodeResponse(target, res); err != nil {
4348 return nil, err
4349 }
4350 return ret, nil
4351 }
4352
4353 type ProjectsLocationsExecutionsGetCall struct {
4354 s *Service
4355 name string
4356 urlParams_ gensupport.URLParams
4357 ifNoneMatch_ string
4358 ctx_ context.Context
4359 header_ http.Header
4360 }
4361
4362
4363
4364
4365
4366 func (r *ProjectsLocationsExecutionsService) Get(name string) *ProjectsLocationsExecutionsGetCall {
4367 c := &ProjectsLocationsExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4368 c.name = name
4369 return c
4370 }
4371
4372
4373
4374
4375 func (c *ProjectsLocationsExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsExecutionsGetCall {
4376 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4377 return c
4378 }
4379
4380
4381
4382
4383 func (c *ProjectsLocationsExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsExecutionsGetCall {
4384 c.ifNoneMatch_ = entityTag
4385 return c
4386 }
4387
4388
4389 func (c *ProjectsLocationsExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsExecutionsGetCall {
4390 c.ctx_ = ctx
4391 return c
4392 }
4393
4394
4395
4396 func (c *ProjectsLocationsExecutionsGetCall) Header() http.Header {
4397 if c.header_ == nil {
4398 c.header_ = make(http.Header)
4399 }
4400 return c.header_
4401 }
4402
4403 func (c *ProjectsLocationsExecutionsGetCall) doRequest(alt string) (*http.Response, error) {
4404 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4405 if c.ifNoneMatch_ != "" {
4406 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4407 }
4408 var body io.Reader = nil
4409 c.urlParams_.Set("alt", alt)
4410 c.urlParams_.Set("prettyPrint", "false")
4411 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4412 urls += "?" + c.urlParams_.Encode()
4413 req, err := http.NewRequest("GET", urls, body)
4414 if err != nil {
4415 return nil, err
4416 }
4417 req.Header = reqHeaders
4418 googleapi.Expand(req.URL, map[string]string{
4419 "name": c.name,
4420 })
4421 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4422 }
4423
4424
4425
4426
4427
4428
4429 func (c *ProjectsLocationsExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
4430 gensupport.SetOptions(c.urlParams_, opts...)
4431 res, err := c.doRequest("json")
4432 if res != nil && res.StatusCode == http.StatusNotModified {
4433 if res.Body != nil {
4434 res.Body.Close()
4435 }
4436 return nil, gensupport.WrapError(&googleapi.Error{
4437 Code: res.StatusCode,
4438 Header: res.Header,
4439 })
4440 }
4441 if err != nil {
4442 return nil, err
4443 }
4444 defer googleapi.CloseBody(res)
4445 if err := googleapi.CheckResponse(res); err != nil {
4446 return nil, gensupport.WrapError(err)
4447 }
4448 ret := &Execution{
4449 ServerResponse: googleapi.ServerResponse{
4450 Header: res.Header,
4451 HTTPStatusCode: res.StatusCode,
4452 },
4453 }
4454 target := &ret
4455 if err := gensupport.DecodeResponse(target, res); err != nil {
4456 return nil, err
4457 }
4458 return ret, nil
4459 }
4460
4461 type ProjectsLocationsExecutionsListCall struct {
4462 s *Service
4463 parent string
4464 urlParams_ gensupport.URLParams
4465 ifNoneMatch_ string
4466 ctx_ context.Context
4467 header_ http.Header
4468 }
4469
4470
4471
4472
4473 func (r *ProjectsLocationsExecutionsService) List(parent string) *ProjectsLocationsExecutionsListCall {
4474 c := &ProjectsLocationsExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4475 c.parent = parent
4476 return c
4477 }
4478
4479
4480
4481
4482 func (c *ProjectsLocationsExecutionsListCall) Filter(filter string) *ProjectsLocationsExecutionsListCall {
4483 c.urlParams_.Set("filter", filter)
4484 return c
4485 }
4486
4487
4488 func (c *ProjectsLocationsExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsExecutionsListCall {
4489 c.urlParams_.Set("orderBy", orderBy)
4490 return c
4491 }
4492
4493
4494
4495 func (c *ProjectsLocationsExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsExecutionsListCall {
4496 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4497 return c
4498 }
4499
4500
4501
4502 func (c *ProjectsLocationsExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsExecutionsListCall {
4503 c.urlParams_.Set("pageToken", pageToken)
4504 return c
4505 }
4506
4507
4508
4509
4510 func (c *ProjectsLocationsExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsExecutionsListCall {
4511 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4512 return c
4513 }
4514
4515
4516
4517
4518 func (c *ProjectsLocationsExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsExecutionsListCall {
4519 c.ifNoneMatch_ = entityTag
4520 return c
4521 }
4522
4523
4524 func (c *ProjectsLocationsExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsExecutionsListCall {
4525 c.ctx_ = ctx
4526 return c
4527 }
4528
4529
4530
4531 func (c *ProjectsLocationsExecutionsListCall) Header() http.Header {
4532 if c.header_ == nil {
4533 c.header_ = make(http.Header)
4534 }
4535 return c.header_
4536 }
4537
4538 func (c *ProjectsLocationsExecutionsListCall) doRequest(alt string) (*http.Response, error) {
4539 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4540 if c.ifNoneMatch_ != "" {
4541 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4542 }
4543 var body io.Reader = nil
4544 c.urlParams_.Set("alt", alt)
4545 c.urlParams_.Set("prettyPrint", "false")
4546 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions")
4547 urls += "?" + c.urlParams_.Encode()
4548 req, err := http.NewRequest("GET", urls, body)
4549 if err != nil {
4550 return nil, err
4551 }
4552 req.Header = reqHeaders
4553 googleapi.Expand(req.URL, map[string]string{
4554 "parent": c.parent,
4555 })
4556 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4557 }
4558
4559
4560
4561
4562
4563
4564
4565 func (c *ProjectsLocationsExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionsResponse, error) {
4566 gensupport.SetOptions(c.urlParams_, opts...)
4567 res, err := c.doRequest("json")
4568 if res != nil && res.StatusCode == http.StatusNotModified {
4569 if res.Body != nil {
4570 res.Body.Close()
4571 }
4572 return nil, gensupport.WrapError(&googleapi.Error{
4573 Code: res.StatusCode,
4574 Header: res.Header,
4575 })
4576 }
4577 if err != nil {
4578 return nil, err
4579 }
4580 defer googleapi.CloseBody(res)
4581 if err := googleapi.CheckResponse(res); err != nil {
4582 return nil, gensupport.WrapError(err)
4583 }
4584 ret := &ListExecutionsResponse{
4585 ServerResponse: googleapi.ServerResponse{
4586 Header: res.Header,
4587 HTTPStatusCode: res.StatusCode,
4588 },
4589 }
4590 target := &ret
4591 if err := gensupport.DecodeResponse(target, res); err != nil {
4592 return nil, err
4593 }
4594 return ret, nil
4595 }
4596
4597
4598
4599
4600 func (c *ProjectsLocationsExecutionsListCall) Pages(ctx context.Context, f func(*ListExecutionsResponse) error) error {
4601 c.ctx_ = ctx
4602 defer c.PageToken(c.urlParams_.Get("pageToken"))
4603 for {
4604 x, err := c.Do()
4605 if err != nil {
4606 return err
4607 }
4608 if err := f(x); err != nil {
4609 return err
4610 }
4611 if x.NextPageToken == "" {
4612 return nil
4613 }
4614 c.PageToken(x.NextPageToken)
4615 }
4616 }
4617
4618 type ProjectsLocationsInstancesCreateCall struct {
4619 s *Service
4620 parent string
4621 instance *Instance
4622 urlParams_ gensupport.URLParams
4623 ctx_ context.Context
4624 header_ http.Header
4625 }
4626
4627
4628
4629
4630 func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall {
4631 c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4632 c.parent = parent
4633 c.instance = instance
4634 return c
4635 }
4636
4637
4638
4639 func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall {
4640 c.urlParams_.Set("instanceId", instanceId)
4641 return c
4642 }
4643
4644
4645
4646
4647 func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall {
4648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4649 return c
4650 }
4651
4652
4653 func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall {
4654 c.ctx_ = ctx
4655 return c
4656 }
4657
4658
4659
4660 func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header {
4661 if c.header_ == nil {
4662 c.header_ = make(http.Header)
4663 }
4664 return c.header_
4665 }
4666
4667 func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
4668 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4669 var body io.Reader = nil
4670 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
4671 if err != nil {
4672 return nil, err
4673 }
4674 c.urlParams_.Set("alt", alt)
4675 c.urlParams_.Set("prettyPrint", "false")
4676 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
4677 urls += "?" + c.urlParams_.Encode()
4678 req, err := http.NewRequest("POST", urls, body)
4679 if err != nil {
4680 return nil, err
4681 }
4682 req.Header = reqHeaders
4683 googleapi.Expand(req.URL, map[string]string{
4684 "parent": c.parent,
4685 })
4686 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4687 }
4688
4689
4690
4691
4692
4693
4694 func (c *ProjectsLocationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4695 gensupport.SetOptions(c.urlParams_, opts...)
4696 res, err := c.doRequest("json")
4697 if res != nil && res.StatusCode == http.StatusNotModified {
4698 if res.Body != nil {
4699 res.Body.Close()
4700 }
4701 return nil, gensupport.WrapError(&googleapi.Error{
4702 Code: res.StatusCode,
4703 Header: res.Header,
4704 })
4705 }
4706 if err != nil {
4707 return nil, err
4708 }
4709 defer googleapi.CloseBody(res)
4710 if err := googleapi.CheckResponse(res); err != nil {
4711 return nil, gensupport.WrapError(err)
4712 }
4713 ret := &Operation{
4714 ServerResponse: googleapi.ServerResponse{
4715 Header: res.Header,
4716 HTTPStatusCode: res.StatusCode,
4717 },
4718 }
4719 target := &ret
4720 if err := gensupport.DecodeResponse(target, res); err != nil {
4721 return nil, err
4722 }
4723 return ret, nil
4724 }
4725
4726 type ProjectsLocationsInstancesDeleteCall struct {
4727 s *Service
4728 name string
4729 urlParams_ gensupport.URLParams
4730 ctx_ context.Context
4731 header_ http.Header
4732 }
4733
4734
4735
4736
4737
4738 func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall {
4739 c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4740 c.name = name
4741 return c
4742 }
4743
4744
4745
4746
4747 func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall {
4748 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4749 return c
4750 }
4751
4752
4753 func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall {
4754 c.ctx_ = ctx
4755 return c
4756 }
4757
4758
4759
4760 func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header {
4761 if c.header_ == nil {
4762 c.header_ = make(http.Header)
4763 }
4764 return c.header_
4765 }
4766
4767 func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
4768 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4769 var body io.Reader = nil
4770 c.urlParams_.Set("alt", alt)
4771 c.urlParams_.Set("prettyPrint", "false")
4772 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4773 urls += "?" + c.urlParams_.Encode()
4774 req, err := http.NewRequest("DELETE", urls, body)
4775 if err != nil {
4776 return nil, err
4777 }
4778 req.Header = reqHeaders
4779 googleapi.Expand(req.URL, map[string]string{
4780 "name": c.name,
4781 })
4782 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4783 }
4784
4785
4786
4787
4788
4789
4790 func (c *ProjectsLocationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4791 gensupport.SetOptions(c.urlParams_, opts...)
4792 res, err := c.doRequest("json")
4793 if res != nil && res.StatusCode == http.StatusNotModified {
4794 if res.Body != nil {
4795 res.Body.Close()
4796 }
4797 return nil, gensupport.WrapError(&googleapi.Error{
4798 Code: res.StatusCode,
4799 Header: res.Header,
4800 })
4801 }
4802 if err != nil {
4803 return nil, err
4804 }
4805 defer googleapi.CloseBody(res)
4806 if err := googleapi.CheckResponse(res); err != nil {
4807 return nil, gensupport.WrapError(err)
4808 }
4809 ret := &Operation{
4810 ServerResponse: googleapi.ServerResponse{
4811 Header: res.Header,
4812 HTTPStatusCode: res.StatusCode,
4813 },
4814 }
4815 target := &ret
4816 if err := gensupport.DecodeResponse(target, res); err != nil {
4817 return nil, err
4818 }
4819 return ret, nil
4820 }
4821
4822 type ProjectsLocationsInstancesDiagnoseCall struct {
4823 s *Service
4824 name string
4825 diagnoseinstancerequest *DiagnoseInstanceRequest
4826 urlParams_ gensupport.URLParams
4827 ctx_ context.Context
4828 header_ http.Header
4829 }
4830
4831
4832
4833
4834
4835
4836 func (r *ProjectsLocationsInstancesService) Diagnose(name string, diagnoseinstancerequest *DiagnoseInstanceRequest) *ProjectsLocationsInstancesDiagnoseCall {
4837 c := &ProjectsLocationsInstancesDiagnoseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4838 c.name = name
4839 c.diagnoseinstancerequest = diagnoseinstancerequest
4840 return c
4841 }
4842
4843
4844
4845
4846 func (c *ProjectsLocationsInstancesDiagnoseCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDiagnoseCall {
4847 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4848 return c
4849 }
4850
4851
4852 func (c *ProjectsLocationsInstancesDiagnoseCall) Context(ctx context.Context) *ProjectsLocationsInstancesDiagnoseCall {
4853 c.ctx_ = ctx
4854 return c
4855 }
4856
4857
4858
4859 func (c *ProjectsLocationsInstancesDiagnoseCall) Header() http.Header {
4860 if c.header_ == nil {
4861 c.header_ = make(http.Header)
4862 }
4863 return c.header_
4864 }
4865
4866 func (c *ProjectsLocationsInstancesDiagnoseCall) doRequest(alt string) (*http.Response, error) {
4867 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4868 var body io.Reader = nil
4869 body, err := googleapi.WithoutDataWrapper.JSONReader(c.diagnoseinstancerequest)
4870 if err != nil {
4871 return nil, err
4872 }
4873 c.urlParams_.Set("alt", alt)
4874 c.urlParams_.Set("prettyPrint", "false")
4875 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:diagnose")
4876 urls += "?" + c.urlParams_.Encode()
4877 req, err := http.NewRequest("POST", urls, body)
4878 if err != nil {
4879 return nil, err
4880 }
4881 req.Header = reqHeaders
4882 googleapi.Expand(req.URL, map[string]string{
4883 "name": c.name,
4884 })
4885 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4886 }
4887
4888
4889
4890
4891
4892
4893 func (c *ProjectsLocationsInstancesDiagnoseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4894 gensupport.SetOptions(c.urlParams_, opts...)
4895 res, err := c.doRequest("json")
4896 if res != nil && res.StatusCode == http.StatusNotModified {
4897 if res.Body != nil {
4898 res.Body.Close()
4899 }
4900 return nil, gensupport.WrapError(&googleapi.Error{
4901 Code: res.StatusCode,
4902 Header: res.Header,
4903 })
4904 }
4905 if err != nil {
4906 return nil, err
4907 }
4908 defer googleapi.CloseBody(res)
4909 if err := googleapi.CheckResponse(res); err != nil {
4910 return nil, gensupport.WrapError(err)
4911 }
4912 ret := &Operation{
4913 ServerResponse: googleapi.ServerResponse{
4914 Header: res.Header,
4915 HTTPStatusCode: res.StatusCode,
4916 },
4917 }
4918 target := &ret
4919 if err := gensupport.DecodeResponse(target, res); err != nil {
4920 return nil, err
4921 }
4922 return ret, nil
4923 }
4924
4925 type ProjectsLocationsInstancesGetCall struct {
4926 s *Service
4927 name string
4928 urlParams_ gensupport.URLParams
4929 ifNoneMatch_ string
4930 ctx_ context.Context
4931 header_ http.Header
4932 }
4933
4934
4935
4936
4937
4938 func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall {
4939 c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4940 c.name = name
4941 return c
4942 }
4943
4944
4945
4946
4947 func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall {
4948 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4949 return c
4950 }
4951
4952
4953
4954
4955 func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall {
4956 c.ifNoneMatch_ = entityTag
4957 return c
4958 }
4959
4960
4961 func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall {
4962 c.ctx_ = ctx
4963 return c
4964 }
4965
4966
4967
4968 func (c *ProjectsLocationsInstancesGetCall) Header() http.Header {
4969 if c.header_ == nil {
4970 c.header_ = make(http.Header)
4971 }
4972 return c.header_
4973 }
4974
4975 func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
4976 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4977 if c.ifNoneMatch_ != "" {
4978 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4979 }
4980 var body io.Reader = nil
4981 c.urlParams_.Set("alt", alt)
4982 c.urlParams_.Set("prettyPrint", "false")
4983 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4984 urls += "?" + c.urlParams_.Encode()
4985 req, err := http.NewRequest("GET", urls, body)
4986 if err != nil {
4987 return nil, err
4988 }
4989 req.Header = reqHeaders
4990 googleapi.Expand(req.URL, map[string]string{
4991 "name": c.name,
4992 })
4993 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4994 }
4995
4996
4997
4998
4999
5000
5001 func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
5002 gensupport.SetOptions(c.urlParams_, opts...)
5003 res, err := c.doRequest("json")
5004 if res != nil && res.StatusCode == http.StatusNotModified {
5005 if res.Body != nil {
5006 res.Body.Close()
5007 }
5008 return nil, gensupport.WrapError(&googleapi.Error{
5009 Code: res.StatusCode,
5010 Header: res.Header,
5011 })
5012 }
5013 if err != nil {
5014 return nil, err
5015 }
5016 defer googleapi.CloseBody(res)
5017 if err := googleapi.CheckResponse(res); err != nil {
5018 return nil, gensupport.WrapError(err)
5019 }
5020 ret := &Instance{
5021 ServerResponse: googleapi.ServerResponse{
5022 Header: res.Header,
5023 HTTPStatusCode: res.StatusCode,
5024 },
5025 }
5026 target := &ret
5027 if err := gensupport.DecodeResponse(target, res); err != nil {
5028 return nil, err
5029 }
5030 return ret, nil
5031 }
5032
5033 type ProjectsLocationsInstancesGetIamPolicyCall struct {
5034 s *Service
5035 resource string
5036 urlParams_ gensupport.URLParams
5037 ifNoneMatch_ string
5038 ctx_ context.Context
5039 header_ http.Header
5040 }
5041
5042
5043
5044
5045
5046
5047
5048 func (r *ProjectsLocationsInstancesService) GetIamPolicy(resource string) *ProjectsLocationsInstancesGetIamPolicyCall {
5049 c := &ProjectsLocationsInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5050 c.resource = resource
5051 return c
5052 }
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066 func (c *ProjectsLocationsInstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsInstancesGetIamPolicyCall {
5067 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
5068 return c
5069 }
5070
5071
5072
5073
5074 func (c *ProjectsLocationsInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetIamPolicyCall {
5075 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5076 return c
5077 }
5078
5079
5080
5081
5082 func (c *ProjectsLocationsInstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetIamPolicyCall {
5083 c.ifNoneMatch_ = entityTag
5084 return c
5085 }
5086
5087
5088 func (c *ProjectsLocationsInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetIamPolicyCall {
5089 c.ctx_ = ctx
5090 return c
5091 }
5092
5093
5094
5095 func (c *ProjectsLocationsInstancesGetIamPolicyCall) Header() http.Header {
5096 if c.header_ == nil {
5097 c.header_ = make(http.Header)
5098 }
5099 return c.header_
5100 }
5101
5102 func (c *ProjectsLocationsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5103 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5104 if c.ifNoneMatch_ != "" {
5105 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5106 }
5107 var body io.Reader = nil
5108 c.urlParams_.Set("alt", alt)
5109 c.urlParams_.Set("prettyPrint", "false")
5110 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
5111 urls += "?" + c.urlParams_.Encode()
5112 req, err := http.NewRequest("GET", urls, body)
5113 if err != nil {
5114 return nil, err
5115 }
5116 req.Header = reqHeaders
5117 googleapi.Expand(req.URL, map[string]string{
5118 "resource": c.resource,
5119 })
5120 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5121 }
5122
5123
5124
5125
5126
5127
5128 func (c *ProjectsLocationsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5129 gensupport.SetOptions(c.urlParams_, opts...)
5130 res, err := c.doRequest("json")
5131 if res != nil && res.StatusCode == http.StatusNotModified {
5132 if res.Body != nil {
5133 res.Body.Close()
5134 }
5135 return nil, gensupport.WrapError(&googleapi.Error{
5136 Code: res.StatusCode,
5137 Header: res.Header,
5138 })
5139 }
5140 if err != nil {
5141 return nil, err
5142 }
5143 defer googleapi.CloseBody(res)
5144 if err := googleapi.CheckResponse(res); err != nil {
5145 return nil, gensupport.WrapError(err)
5146 }
5147 ret := &Policy{
5148 ServerResponse: googleapi.ServerResponse{
5149 Header: res.Header,
5150 HTTPStatusCode: res.StatusCode,
5151 },
5152 }
5153 target := &ret
5154 if err := gensupport.DecodeResponse(target, res); err != nil {
5155 return nil, err
5156 }
5157 return ret, nil
5158 }
5159
5160 type ProjectsLocationsInstancesGetInstanceHealthCall struct {
5161 s *Service
5162 name string
5163 urlParams_ gensupport.URLParams
5164 ifNoneMatch_ string
5165 ctx_ context.Context
5166 header_ http.Header
5167 }
5168
5169
5170
5171
5172
5173 func (r *ProjectsLocationsInstancesService) GetInstanceHealth(name string) *ProjectsLocationsInstancesGetInstanceHealthCall {
5174 c := &ProjectsLocationsInstancesGetInstanceHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5175 c.name = name
5176 return c
5177 }
5178
5179
5180
5181
5182 func (c *ProjectsLocationsInstancesGetInstanceHealthCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetInstanceHealthCall {
5183 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5184 return c
5185 }
5186
5187
5188
5189
5190 func (c *ProjectsLocationsInstancesGetInstanceHealthCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetInstanceHealthCall {
5191 c.ifNoneMatch_ = entityTag
5192 return c
5193 }
5194
5195
5196 func (c *ProjectsLocationsInstancesGetInstanceHealthCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetInstanceHealthCall {
5197 c.ctx_ = ctx
5198 return c
5199 }
5200
5201
5202
5203 func (c *ProjectsLocationsInstancesGetInstanceHealthCall) Header() http.Header {
5204 if c.header_ == nil {
5205 c.header_ = make(http.Header)
5206 }
5207 return c.header_
5208 }
5209
5210 func (c *ProjectsLocationsInstancesGetInstanceHealthCall) doRequest(alt string) (*http.Response, error) {
5211 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5212 if c.ifNoneMatch_ != "" {
5213 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5214 }
5215 var body io.Reader = nil
5216 c.urlParams_.Set("alt", alt)
5217 c.urlParams_.Set("prettyPrint", "false")
5218 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:getInstanceHealth")
5219 urls += "?" + c.urlParams_.Encode()
5220 req, err := http.NewRequest("GET", urls, body)
5221 if err != nil {
5222 return nil, err
5223 }
5224 req.Header = reqHeaders
5225 googleapi.Expand(req.URL, map[string]string{
5226 "name": c.name,
5227 })
5228 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5229 }
5230
5231
5232
5233
5234
5235
5236
5237 func (c *ProjectsLocationsInstancesGetInstanceHealthCall) Do(opts ...googleapi.CallOption) (*GetInstanceHealthResponse, error) {
5238 gensupport.SetOptions(c.urlParams_, opts...)
5239 res, err := c.doRequest("json")
5240 if res != nil && res.StatusCode == http.StatusNotModified {
5241 if res.Body != nil {
5242 res.Body.Close()
5243 }
5244 return nil, gensupport.WrapError(&googleapi.Error{
5245 Code: res.StatusCode,
5246 Header: res.Header,
5247 })
5248 }
5249 if err != nil {
5250 return nil, err
5251 }
5252 defer googleapi.CloseBody(res)
5253 if err := googleapi.CheckResponse(res); err != nil {
5254 return nil, gensupport.WrapError(err)
5255 }
5256 ret := &GetInstanceHealthResponse{
5257 ServerResponse: googleapi.ServerResponse{
5258 Header: res.Header,
5259 HTTPStatusCode: res.StatusCode,
5260 },
5261 }
5262 target := &ret
5263 if err := gensupport.DecodeResponse(target, res); err != nil {
5264 return nil, err
5265 }
5266 return ret, nil
5267 }
5268
5269 type ProjectsLocationsInstancesIsUpgradeableCall struct {
5270 s *Service
5271 notebookInstance string
5272 urlParams_ gensupport.URLParams
5273 ifNoneMatch_ string
5274 ctx_ context.Context
5275 header_ http.Header
5276 }
5277
5278
5279
5280
5281
5282 func (r *ProjectsLocationsInstancesService) IsUpgradeable(notebookInstance string) *ProjectsLocationsInstancesIsUpgradeableCall {
5283 c := &ProjectsLocationsInstancesIsUpgradeableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5284 c.notebookInstance = notebookInstance
5285 return c
5286 }
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299 func (c *ProjectsLocationsInstancesIsUpgradeableCall) Type(type_ string) *ProjectsLocationsInstancesIsUpgradeableCall {
5300 c.urlParams_.Set("type", type_)
5301 return c
5302 }
5303
5304
5305
5306
5307 func (c *ProjectsLocationsInstancesIsUpgradeableCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesIsUpgradeableCall {
5308 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5309 return c
5310 }
5311
5312
5313
5314
5315 func (c *ProjectsLocationsInstancesIsUpgradeableCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesIsUpgradeableCall {
5316 c.ifNoneMatch_ = entityTag
5317 return c
5318 }
5319
5320
5321 func (c *ProjectsLocationsInstancesIsUpgradeableCall) Context(ctx context.Context) *ProjectsLocationsInstancesIsUpgradeableCall {
5322 c.ctx_ = ctx
5323 return c
5324 }
5325
5326
5327
5328 func (c *ProjectsLocationsInstancesIsUpgradeableCall) Header() http.Header {
5329 if c.header_ == nil {
5330 c.header_ = make(http.Header)
5331 }
5332 return c.header_
5333 }
5334
5335 func (c *ProjectsLocationsInstancesIsUpgradeableCall) doRequest(alt string) (*http.Response, error) {
5336 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5337 if c.ifNoneMatch_ != "" {
5338 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5339 }
5340 var body io.Reader = nil
5341 c.urlParams_.Set("alt", alt)
5342 c.urlParams_.Set("prettyPrint", "false")
5343 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+notebookInstance}:isUpgradeable")
5344 urls += "?" + c.urlParams_.Encode()
5345 req, err := http.NewRequest("GET", urls, body)
5346 if err != nil {
5347 return nil, err
5348 }
5349 req.Header = reqHeaders
5350 googleapi.Expand(req.URL, map[string]string{
5351 "notebookInstance": c.notebookInstance,
5352 })
5353 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5354 }
5355
5356
5357
5358
5359
5360
5361
5362 func (c *ProjectsLocationsInstancesIsUpgradeableCall) Do(opts ...googleapi.CallOption) (*IsInstanceUpgradeableResponse, error) {
5363 gensupport.SetOptions(c.urlParams_, opts...)
5364 res, err := c.doRequest("json")
5365 if res != nil && res.StatusCode == http.StatusNotModified {
5366 if res.Body != nil {
5367 res.Body.Close()
5368 }
5369 return nil, gensupport.WrapError(&googleapi.Error{
5370 Code: res.StatusCode,
5371 Header: res.Header,
5372 })
5373 }
5374 if err != nil {
5375 return nil, err
5376 }
5377 defer googleapi.CloseBody(res)
5378 if err := googleapi.CheckResponse(res); err != nil {
5379 return nil, gensupport.WrapError(err)
5380 }
5381 ret := &IsInstanceUpgradeableResponse{
5382 ServerResponse: googleapi.ServerResponse{
5383 Header: res.Header,
5384 HTTPStatusCode: res.StatusCode,
5385 },
5386 }
5387 target := &ret
5388 if err := gensupport.DecodeResponse(target, res); err != nil {
5389 return nil, err
5390 }
5391 return ret, nil
5392 }
5393
5394 type ProjectsLocationsInstancesListCall struct {
5395 s *Service
5396 parent string
5397 urlParams_ gensupport.URLParams
5398 ifNoneMatch_ string
5399 ctx_ context.Context
5400 header_ http.Header
5401 }
5402
5403
5404
5405
5406 func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall {
5407 c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5408 c.parent = parent
5409 return c
5410 }
5411
5412
5413 func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall {
5414 c.urlParams_.Set("filter", filter)
5415 return c
5416 }
5417
5418
5419
5420 func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall {
5421 c.urlParams_.Set("orderBy", orderBy)
5422 return c
5423 }
5424
5425
5426
5427 func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall {
5428 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5429 return c
5430 }
5431
5432
5433
5434 func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall {
5435 c.urlParams_.Set("pageToken", pageToken)
5436 return c
5437 }
5438
5439
5440
5441
5442 func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall {
5443 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5444 return c
5445 }
5446
5447
5448
5449
5450 func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall {
5451 c.ifNoneMatch_ = entityTag
5452 return c
5453 }
5454
5455
5456 func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall {
5457 c.ctx_ = ctx
5458 return c
5459 }
5460
5461
5462
5463 func (c *ProjectsLocationsInstancesListCall) Header() http.Header {
5464 if c.header_ == nil {
5465 c.header_ = make(http.Header)
5466 }
5467 return c.header_
5468 }
5469
5470 func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) {
5471 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5472 if c.ifNoneMatch_ != "" {
5473 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5474 }
5475 var body io.Reader = nil
5476 c.urlParams_.Set("alt", alt)
5477 c.urlParams_.Set("prettyPrint", "false")
5478 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
5479 urls += "?" + c.urlParams_.Encode()
5480 req, err := http.NewRequest("GET", urls, body)
5481 if err != nil {
5482 return nil, err
5483 }
5484 req.Header = reqHeaders
5485 googleapi.Expand(req.URL, map[string]string{
5486 "parent": c.parent,
5487 })
5488 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5489 }
5490
5491
5492
5493
5494
5495
5496
5497 func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
5498 gensupport.SetOptions(c.urlParams_, opts...)
5499 res, err := c.doRequest("json")
5500 if res != nil && res.StatusCode == http.StatusNotModified {
5501 if res.Body != nil {
5502 res.Body.Close()
5503 }
5504 return nil, gensupport.WrapError(&googleapi.Error{
5505 Code: res.StatusCode,
5506 Header: res.Header,
5507 })
5508 }
5509 if err != nil {
5510 return nil, err
5511 }
5512 defer googleapi.CloseBody(res)
5513 if err := googleapi.CheckResponse(res); err != nil {
5514 return nil, gensupport.WrapError(err)
5515 }
5516 ret := &ListInstancesResponse{
5517 ServerResponse: googleapi.ServerResponse{
5518 Header: res.Header,
5519 HTTPStatusCode: res.StatusCode,
5520 },
5521 }
5522 target := &ret
5523 if err := gensupport.DecodeResponse(target, res); err != nil {
5524 return nil, err
5525 }
5526 return ret, nil
5527 }
5528
5529
5530
5531
5532 func (c *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
5533 c.ctx_ = ctx
5534 defer c.PageToken(c.urlParams_.Get("pageToken"))
5535 for {
5536 x, err := c.Do()
5537 if err != nil {
5538 return err
5539 }
5540 if err := f(x); err != nil {
5541 return err
5542 }
5543 if x.NextPageToken == "" {
5544 return nil
5545 }
5546 c.PageToken(x.NextPageToken)
5547 }
5548 }
5549
5550 type ProjectsLocationsInstancesMigrateCall struct {
5551 s *Service
5552 name string
5553 migrateinstancerequest *MigrateInstanceRequest
5554 urlParams_ gensupport.URLParams
5555 ctx_ context.Context
5556 header_ http.Header
5557 }
5558
5559
5560
5561
5562
5563 func (r *ProjectsLocationsInstancesService) Migrate(name string, migrateinstancerequest *MigrateInstanceRequest) *ProjectsLocationsInstancesMigrateCall {
5564 c := &ProjectsLocationsInstancesMigrateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5565 c.name = name
5566 c.migrateinstancerequest = migrateinstancerequest
5567 return c
5568 }
5569
5570
5571
5572
5573 func (c *ProjectsLocationsInstancesMigrateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesMigrateCall {
5574 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5575 return c
5576 }
5577
5578
5579 func (c *ProjectsLocationsInstancesMigrateCall) Context(ctx context.Context) *ProjectsLocationsInstancesMigrateCall {
5580 c.ctx_ = ctx
5581 return c
5582 }
5583
5584
5585
5586 func (c *ProjectsLocationsInstancesMigrateCall) Header() http.Header {
5587 if c.header_ == nil {
5588 c.header_ = make(http.Header)
5589 }
5590 return c.header_
5591 }
5592
5593 func (c *ProjectsLocationsInstancesMigrateCall) doRequest(alt string) (*http.Response, error) {
5594 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5595 var body io.Reader = nil
5596 body, err := googleapi.WithoutDataWrapper.JSONReader(c.migrateinstancerequest)
5597 if err != nil {
5598 return nil, err
5599 }
5600 c.urlParams_.Set("alt", alt)
5601 c.urlParams_.Set("prettyPrint", "false")
5602 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:migrate")
5603 urls += "?" + c.urlParams_.Encode()
5604 req, err := http.NewRequest("POST", urls, body)
5605 if err != nil {
5606 return nil, err
5607 }
5608 req.Header = reqHeaders
5609 googleapi.Expand(req.URL, map[string]string{
5610 "name": c.name,
5611 })
5612 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5613 }
5614
5615
5616
5617
5618
5619
5620 func (c *ProjectsLocationsInstancesMigrateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5621 gensupport.SetOptions(c.urlParams_, opts...)
5622 res, err := c.doRequest("json")
5623 if res != nil && res.StatusCode == http.StatusNotModified {
5624 if res.Body != nil {
5625 res.Body.Close()
5626 }
5627 return nil, gensupport.WrapError(&googleapi.Error{
5628 Code: res.StatusCode,
5629 Header: res.Header,
5630 })
5631 }
5632 if err != nil {
5633 return nil, err
5634 }
5635 defer googleapi.CloseBody(res)
5636 if err := googleapi.CheckResponse(res); err != nil {
5637 return nil, gensupport.WrapError(err)
5638 }
5639 ret := &Operation{
5640 ServerResponse: googleapi.ServerResponse{
5641 Header: res.Header,
5642 HTTPStatusCode: res.StatusCode,
5643 },
5644 }
5645 target := &ret
5646 if err := gensupport.DecodeResponse(target, res); err != nil {
5647 return nil, err
5648 }
5649 return ret, nil
5650 }
5651
5652 type ProjectsLocationsInstancesRegisterCall struct {
5653 s *Service
5654 parent string
5655 registerinstancerequest *RegisterInstanceRequest
5656 urlParams_ gensupport.URLParams
5657 ctx_ context.Context
5658 header_ http.Header
5659 }
5660
5661
5662
5663
5664
5665
5666
5667 func (r *ProjectsLocationsInstancesService) Register(parent string, registerinstancerequest *RegisterInstanceRequest) *ProjectsLocationsInstancesRegisterCall {
5668 c := &ProjectsLocationsInstancesRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5669 c.parent = parent
5670 c.registerinstancerequest = registerinstancerequest
5671 return c
5672 }
5673
5674
5675
5676
5677 func (c *ProjectsLocationsInstancesRegisterCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRegisterCall {
5678 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5679 return c
5680 }
5681
5682
5683 func (c *ProjectsLocationsInstancesRegisterCall) Context(ctx context.Context) *ProjectsLocationsInstancesRegisterCall {
5684 c.ctx_ = ctx
5685 return c
5686 }
5687
5688
5689
5690 func (c *ProjectsLocationsInstancesRegisterCall) Header() http.Header {
5691 if c.header_ == nil {
5692 c.header_ = make(http.Header)
5693 }
5694 return c.header_
5695 }
5696
5697 func (c *ProjectsLocationsInstancesRegisterCall) doRequest(alt string) (*http.Response, error) {
5698 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5699 var body io.Reader = nil
5700 body, err := googleapi.WithoutDataWrapper.JSONReader(c.registerinstancerequest)
5701 if err != nil {
5702 return nil, err
5703 }
5704 c.urlParams_.Set("alt", alt)
5705 c.urlParams_.Set("prettyPrint", "false")
5706 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances:register")
5707 urls += "?" + c.urlParams_.Encode()
5708 req, err := http.NewRequest("POST", urls, body)
5709 if err != nil {
5710 return nil, err
5711 }
5712 req.Header = reqHeaders
5713 googleapi.Expand(req.URL, map[string]string{
5714 "parent": c.parent,
5715 })
5716 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5717 }
5718
5719
5720
5721
5722
5723
5724 func (c *ProjectsLocationsInstancesRegisterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5725 gensupport.SetOptions(c.urlParams_, opts...)
5726 res, err := c.doRequest("json")
5727 if res != nil && res.StatusCode == http.StatusNotModified {
5728 if res.Body != nil {
5729 res.Body.Close()
5730 }
5731 return nil, gensupport.WrapError(&googleapi.Error{
5732 Code: res.StatusCode,
5733 Header: res.Header,
5734 })
5735 }
5736 if err != nil {
5737 return nil, err
5738 }
5739 defer googleapi.CloseBody(res)
5740 if err := googleapi.CheckResponse(res); err != nil {
5741 return nil, gensupport.WrapError(err)
5742 }
5743 ret := &Operation{
5744 ServerResponse: googleapi.ServerResponse{
5745 Header: res.Header,
5746 HTTPStatusCode: res.StatusCode,
5747 },
5748 }
5749 target := &ret
5750 if err := gensupport.DecodeResponse(target, res); err != nil {
5751 return nil, err
5752 }
5753 return ret, nil
5754 }
5755
5756 type ProjectsLocationsInstancesReportCall struct {
5757 s *Service
5758 name string
5759 reportinstanceinforequest *ReportInstanceInfoRequest
5760 urlParams_ gensupport.URLParams
5761 ctx_ context.Context
5762 header_ http.Header
5763 }
5764
5765
5766
5767
5768
5769
5770
5771 func (r *ProjectsLocationsInstancesService) Report(name string, reportinstanceinforequest *ReportInstanceInfoRequest) *ProjectsLocationsInstancesReportCall {
5772 c := &ProjectsLocationsInstancesReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5773 c.name = name
5774 c.reportinstanceinforequest = reportinstanceinforequest
5775 return c
5776 }
5777
5778
5779
5780
5781 func (c *ProjectsLocationsInstancesReportCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesReportCall {
5782 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5783 return c
5784 }
5785
5786
5787 func (c *ProjectsLocationsInstancesReportCall) Context(ctx context.Context) *ProjectsLocationsInstancesReportCall {
5788 c.ctx_ = ctx
5789 return c
5790 }
5791
5792
5793
5794 func (c *ProjectsLocationsInstancesReportCall) Header() http.Header {
5795 if c.header_ == nil {
5796 c.header_ = make(http.Header)
5797 }
5798 return c.header_
5799 }
5800
5801 func (c *ProjectsLocationsInstancesReportCall) doRequest(alt string) (*http.Response, error) {
5802 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5803 var body io.Reader = nil
5804 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportinstanceinforequest)
5805 if err != nil {
5806 return nil, err
5807 }
5808 c.urlParams_.Set("alt", alt)
5809 c.urlParams_.Set("prettyPrint", "false")
5810 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:report")
5811 urls += "?" + c.urlParams_.Encode()
5812 req, err := http.NewRequest("POST", urls, body)
5813 if err != nil {
5814 return nil, err
5815 }
5816 req.Header = reqHeaders
5817 googleapi.Expand(req.URL, map[string]string{
5818 "name": c.name,
5819 })
5820 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5821 }
5822
5823
5824
5825
5826
5827
5828 func (c *ProjectsLocationsInstancesReportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5829 gensupport.SetOptions(c.urlParams_, opts...)
5830 res, err := c.doRequest("json")
5831 if res != nil && res.StatusCode == http.StatusNotModified {
5832 if res.Body != nil {
5833 res.Body.Close()
5834 }
5835 return nil, gensupport.WrapError(&googleapi.Error{
5836 Code: res.StatusCode,
5837 Header: res.Header,
5838 })
5839 }
5840 if err != nil {
5841 return nil, err
5842 }
5843 defer googleapi.CloseBody(res)
5844 if err := googleapi.CheckResponse(res); err != nil {
5845 return nil, gensupport.WrapError(err)
5846 }
5847 ret := &Operation{
5848 ServerResponse: googleapi.ServerResponse{
5849 Header: res.Header,
5850 HTTPStatusCode: res.StatusCode,
5851 },
5852 }
5853 target := &ret
5854 if err := gensupport.DecodeResponse(target, res); err != nil {
5855 return nil, err
5856 }
5857 return ret, nil
5858 }
5859
5860 type ProjectsLocationsInstancesReportEventCall struct {
5861 s *Service
5862 name string
5863 reportinstanceeventrequest *ReportInstanceEventRequest
5864 urlParams_ gensupport.URLParams
5865 ctx_ context.Context
5866 header_ http.Header
5867 }
5868
5869
5870
5871
5872
5873 func (r *ProjectsLocationsInstancesService) ReportEvent(name string, reportinstanceeventrequest *ReportInstanceEventRequest) *ProjectsLocationsInstancesReportEventCall {
5874 c := &ProjectsLocationsInstancesReportEventCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5875 c.name = name
5876 c.reportinstanceeventrequest = reportinstanceeventrequest
5877 return c
5878 }
5879
5880
5881
5882
5883 func (c *ProjectsLocationsInstancesReportEventCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesReportEventCall {
5884 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5885 return c
5886 }
5887
5888
5889 func (c *ProjectsLocationsInstancesReportEventCall) Context(ctx context.Context) *ProjectsLocationsInstancesReportEventCall {
5890 c.ctx_ = ctx
5891 return c
5892 }
5893
5894
5895
5896 func (c *ProjectsLocationsInstancesReportEventCall) Header() http.Header {
5897 if c.header_ == nil {
5898 c.header_ = make(http.Header)
5899 }
5900 return c.header_
5901 }
5902
5903 func (c *ProjectsLocationsInstancesReportEventCall) doRequest(alt string) (*http.Response, error) {
5904 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5905 var body io.Reader = nil
5906 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportinstanceeventrequest)
5907 if err != nil {
5908 return nil, err
5909 }
5910 c.urlParams_.Set("alt", alt)
5911 c.urlParams_.Set("prettyPrint", "false")
5912 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reportEvent")
5913 urls += "?" + c.urlParams_.Encode()
5914 req, err := http.NewRequest("POST", urls, body)
5915 if err != nil {
5916 return nil, err
5917 }
5918 req.Header = reqHeaders
5919 googleapi.Expand(req.URL, map[string]string{
5920 "name": c.name,
5921 })
5922 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5923 }
5924
5925
5926
5927
5928
5929
5930 func (c *ProjectsLocationsInstancesReportEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5931 gensupport.SetOptions(c.urlParams_, opts...)
5932 res, err := c.doRequest("json")
5933 if res != nil && res.StatusCode == http.StatusNotModified {
5934 if res.Body != nil {
5935 res.Body.Close()
5936 }
5937 return nil, gensupport.WrapError(&googleapi.Error{
5938 Code: res.StatusCode,
5939 Header: res.Header,
5940 })
5941 }
5942 if err != nil {
5943 return nil, err
5944 }
5945 defer googleapi.CloseBody(res)
5946 if err := googleapi.CheckResponse(res); err != nil {
5947 return nil, gensupport.WrapError(err)
5948 }
5949 ret := &Operation{
5950 ServerResponse: googleapi.ServerResponse{
5951 Header: res.Header,
5952 HTTPStatusCode: res.StatusCode,
5953 },
5954 }
5955 target := &ret
5956 if err := gensupport.DecodeResponse(target, res); err != nil {
5957 return nil, err
5958 }
5959 return ret, nil
5960 }
5961
5962 type ProjectsLocationsInstancesResetCall struct {
5963 s *Service
5964 name string
5965 resetinstancerequest *ResetInstanceRequest
5966 urlParams_ gensupport.URLParams
5967 ctx_ context.Context
5968 header_ http.Header
5969 }
5970
5971
5972
5973
5974
5975 func (r *ProjectsLocationsInstancesService) Reset(name string, resetinstancerequest *ResetInstanceRequest) *ProjectsLocationsInstancesResetCall {
5976 c := &ProjectsLocationsInstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5977 c.name = name
5978 c.resetinstancerequest = resetinstancerequest
5979 return c
5980 }
5981
5982
5983
5984
5985 func (c *ProjectsLocationsInstancesResetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesResetCall {
5986 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5987 return c
5988 }
5989
5990
5991 func (c *ProjectsLocationsInstancesResetCall) Context(ctx context.Context) *ProjectsLocationsInstancesResetCall {
5992 c.ctx_ = ctx
5993 return c
5994 }
5995
5996
5997
5998 func (c *ProjectsLocationsInstancesResetCall) Header() http.Header {
5999 if c.header_ == nil {
6000 c.header_ = make(http.Header)
6001 }
6002 return c.header_
6003 }
6004
6005 func (c *ProjectsLocationsInstancesResetCall) doRequest(alt string) (*http.Response, error) {
6006 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6007 var body io.Reader = nil
6008 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetinstancerequest)
6009 if err != nil {
6010 return nil, err
6011 }
6012 c.urlParams_.Set("alt", alt)
6013 c.urlParams_.Set("prettyPrint", "false")
6014 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reset")
6015 urls += "?" + c.urlParams_.Encode()
6016 req, err := http.NewRequest("POST", urls, body)
6017 if err != nil {
6018 return nil, err
6019 }
6020 req.Header = reqHeaders
6021 googleapi.Expand(req.URL, map[string]string{
6022 "name": c.name,
6023 })
6024 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6025 }
6026
6027
6028
6029
6030
6031
6032 func (c *ProjectsLocationsInstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6033 gensupport.SetOptions(c.urlParams_, opts...)
6034 res, err := c.doRequest("json")
6035 if res != nil && res.StatusCode == http.StatusNotModified {
6036 if res.Body != nil {
6037 res.Body.Close()
6038 }
6039 return nil, gensupport.WrapError(&googleapi.Error{
6040 Code: res.StatusCode,
6041 Header: res.Header,
6042 })
6043 }
6044 if err != nil {
6045 return nil, err
6046 }
6047 defer googleapi.CloseBody(res)
6048 if err := googleapi.CheckResponse(res); err != nil {
6049 return nil, gensupport.WrapError(err)
6050 }
6051 ret := &Operation{
6052 ServerResponse: googleapi.ServerResponse{
6053 Header: res.Header,
6054 HTTPStatusCode: res.StatusCode,
6055 },
6056 }
6057 target := &ret
6058 if err := gensupport.DecodeResponse(target, res); err != nil {
6059 return nil, err
6060 }
6061 return ret, nil
6062 }
6063
6064 type ProjectsLocationsInstancesRollbackCall struct {
6065 s *Service
6066 name string
6067 rollbackinstancerequest *RollbackInstanceRequest
6068 urlParams_ gensupport.URLParams
6069 ctx_ context.Context
6070 header_ http.Header
6071 }
6072
6073
6074
6075
6076
6077 func (r *ProjectsLocationsInstancesService) Rollback(name string, rollbackinstancerequest *RollbackInstanceRequest) *ProjectsLocationsInstancesRollbackCall {
6078 c := &ProjectsLocationsInstancesRollbackCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6079 c.name = name
6080 c.rollbackinstancerequest = rollbackinstancerequest
6081 return c
6082 }
6083
6084
6085
6086
6087 func (c *ProjectsLocationsInstancesRollbackCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRollbackCall {
6088 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6089 return c
6090 }
6091
6092
6093 func (c *ProjectsLocationsInstancesRollbackCall) Context(ctx context.Context) *ProjectsLocationsInstancesRollbackCall {
6094 c.ctx_ = ctx
6095 return c
6096 }
6097
6098
6099
6100 func (c *ProjectsLocationsInstancesRollbackCall) Header() http.Header {
6101 if c.header_ == nil {
6102 c.header_ = make(http.Header)
6103 }
6104 return c.header_
6105 }
6106
6107 func (c *ProjectsLocationsInstancesRollbackCall) doRequest(alt string) (*http.Response, error) {
6108 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6109 var body io.Reader = nil
6110 body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackinstancerequest)
6111 if err != nil {
6112 return nil, err
6113 }
6114 c.urlParams_.Set("alt", alt)
6115 c.urlParams_.Set("prettyPrint", "false")
6116 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rollback")
6117 urls += "?" + c.urlParams_.Encode()
6118 req, err := http.NewRequest("POST", urls, body)
6119 if err != nil {
6120 return nil, err
6121 }
6122 req.Header = reqHeaders
6123 googleapi.Expand(req.URL, map[string]string{
6124 "name": c.name,
6125 })
6126 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6127 }
6128
6129
6130
6131
6132
6133
6134 func (c *ProjectsLocationsInstancesRollbackCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6135 gensupport.SetOptions(c.urlParams_, opts...)
6136 res, err := c.doRequest("json")
6137 if res != nil && res.StatusCode == http.StatusNotModified {
6138 if res.Body != nil {
6139 res.Body.Close()
6140 }
6141 return nil, gensupport.WrapError(&googleapi.Error{
6142 Code: res.StatusCode,
6143 Header: res.Header,
6144 })
6145 }
6146 if err != nil {
6147 return nil, err
6148 }
6149 defer googleapi.CloseBody(res)
6150 if err := googleapi.CheckResponse(res); err != nil {
6151 return nil, gensupport.WrapError(err)
6152 }
6153 ret := &Operation{
6154 ServerResponse: googleapi.ServerResponse{
6155 Header: res.Header,
6156 HTTPStatusCode: res.StatusCode,
6157 },
6158 }
6159 target := &ret
6160 if err := gensupport.DecodeResponse(target, res); err != nil {
6161 return nil, err
6162 }
6163 return ret, nil
6164 }
6165
6166 type ProjectsLocationsInstancesSetAcceleratorCall struct {
6167 s *Service
6168 name string
6169 setinstanceacceleratorrequest *SetInstanceAcceleratorRequest
6170 urlParams_ gensupport.URLParams
6171 ctx_ context.Context
6172 header_ http.Header
6173 }
6174
6175
6176
6177
6178
6179 func (r *ProjectsLocationsInstancesService) SetAccelerator(name string, setinstanceacceleratorrequest *SetInstanceAcceleratorRequest) *ProjectsLocationsInstancesSetAcceleratorCall {
6180 c := &ProjectsLocationsInstancesSetAcceleratorCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6181 c.name = name
6182 c.setinstanceacceleratorrequest = setinstanceacceleratorrequest
6183 return c
6184 }
6185
6186
6187
6188
6189 func (c *ProjectsLocationsInstancesSetAcceleratorCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSetAcceleratorCall {
6190 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6191 return c
6192 }
6193
6194
6195 func (c *ProjectsLocationsInstancesSetAcceleratorCall) Context(ctx context.Context) *ProjectsLocationsInstancesSetAcceleratorCall {
6196 c.ctx_ = ctx
6197 return c
6198 }
6199
6200
6201
6202 func (c *ProjectsLocationsInstancesSetAcceleratorCall) Header() http.Header {
6203 if c.header_ == nil {
6204 c.header_ = make(http.Header)
6205 }
6206 return c.header_
6207 }
6208
6209 func (c *ProjectsLocationsInstancesSetAcceleratorCall) doRequest(alt string) (*http.Response, error) {
6210 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6211 var body io.Reader = nil
6212 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setinstanceacceleratorrequest)
6213 if err != nil {
6214 return nil, err
6215 }
6216 c.urlParams_.Set("alt", alt)
6217 c.urlParams_.Set("prettyPrint", "false")
6218 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setAccelerator")
6219 urls += "?" + c.urlParams_.Encode()
6220 req, err := http.NewRequest("PATCH", urls, body)
6221 if err != nil {
6222 return nil, err
6223 }
6224 req.Header = reqHeaders
6225 googleapi.Expand(req.URL, map[string]string{
6226 "name": c.name,
6227 })
6228 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6229 }
6230
6231
6232
6233
6234
6235
6236 func (c *ProjectsLocationsInstancesSetAcceleratorCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6237 gensupport.SetOptions(c.urlParams_, opts...)
6238 res, err := c.doRequest("json")
6239 if res != nil && res.StatusCode == http.StatusNotModified {
6240 if res.Body != nil {
6241 res.Body.Close()
6242 }
6243 return nil, gensupport.WrapError(&googleapi.Error{
6244 Code: res.StatusCode,
6245 Header: res.Header,
6246 })
6247 }
6248 if err != nil {
6249 return nil, err
6250 }
6251 defer googleapi.CloseBody(res)
6252 if err := googleapi.CheckResponse(res); err != nil {
6253 return nil, gensupport.WrapError(err)
6254 }
6255 ret := &Operation{
6256 ServerResponse: googleapi.ServerResponse{
6257 Header: res.Header,
6258 HTTPStatusCode: res.StatusCode,
6259 },
6260 }
6261 target := &ret
6262 if err := gensupport.DecodeResponse(target, res); err != nil {
6263 return nil, err
6264 }
6265 return ret, nil
6266 }
6267
6268 type ProjectsLocationsInstancesSetIamPolicyCall struct {
6269 s *Service
6270 resource string
6271 setiampolicyrequest *SetIamPolicyRequest
6272 urlParams_ gensupport.URLParams
6273 ctx_ context.Context
6274 header_ http.Header
6275 }
6276
6277
6278
6279
6280
6281
6282
6283
6284 func (r *ProjectsLocationsInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsInstancesSetIamPolicyCall {
6285 c := &ProjectsLocationsInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6286 c.resource = resource
6287 c.setiampolicyrequest = setiampolicyrequest
6288 return c
6289 }
6290
6291
6292
6293
6294 func (c *ProjectsLocationsInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSetIamPolicyCall {
6295 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6296 return c
6297 }
6298
6299
6300 func (c *ProjectsLocationsInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsInstancesSetIamPolicyCall {
6301 c.ctx_ = ctx
6302 return c
6303 }
6304
6305
6306
6307 func (c *ProjectsLocationsInstancesSetIamPolicyCall) Header() http.Header {
6308 if c.header_ == nil {
6309 c.header_ = make(http.Header)
6310 }
6311 return c.header_
6312 }
6313
6314 func (c *ProjectsLocationsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6315 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6316 var body io.Reader = nil
6317 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
6318 if err != nil {
6319 return nil, err
6320 }
6321 c.urlParams_.Set("alt", alt)
6322 c.urlParams_.Set("prettyPrint", "false")
6323 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
6324 urls += "?" + c.urlParams_.Encode()
6325 req, err := http.NewRequest("POST", urls, body)
6326 if err != nil {
6327 return nil, err
6328 }
6329 req.Header = reqHeaders
6330 googleapi.Expand(req.URL, map[string]string{
6331 "resource": c.resource,
6332 })
6333 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6334 }
6335
6336
6337
6338
6339
6340
6341 func (c *ProjectsLocationsInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6342 gensupport.SetOptions(c.urlParams_, opts...)
6343 res, err := c.doRequest("json")
6344 if res != nil && res.StatusCode == http.StatusNotModified {
6345 if res.Body != nil {
6346 res.Body.Close()
6347 }
6348 return nil, gensupport.WrapError(&googleapi.Error{
6349 Code: res.StatusCode,
6350 Header: res.Header,
6351 })
6352 }
6353 if err != nil {
6354 return nil, err
6355 }
6356 defer googleapi.CloseBody(res)
6357 if err := googleapi.CheckResponse(res); err != nil {
6358 return nil, gensupport.WrapError(err)
6359 }
6360 ret := &Policy{
6361 ServerResponse: googleapi.ServerResponse{
6362 Header: res.Header,
6363 HTTPStatusCode: res.StatusCode,
6364 },
6365 }
6366 target := &ret
6367 if err := gensupport.DecodeResponse(target, res); err != nil {
6368 return nil, err
6369 }
6370 return ret, nil
6371 }
6372
6373 type ProjectsLocationsInstancesSetLabelsCall struct {
6374 s *Service
6375 name string
6376 setinstancelabelsrequest *SetInstanceLabelsRequest
6377 urlParams_ gensupport.URLParams
6378 ctx_ context.Context
6379 header_ http.Header
6380 }
6381
6382
6383
6384
6385
6386 func (r *ProjectsLocationsInstancesService) SetLabels(name string, setinstancelabelsrequest *SetInstanceLabelsRequest) *ProjectsLocationsInstancesSetLabelsCall {
6387 c := &ProjectsLocationsInstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6388 c.name = name
6389 c.setinstancelabelsrequest = setinstancelabelsrequest
6390 return c
6391 }
6392
6393
6394
6395
6396 func (c *ProjectsLocationsInstancesSetLabelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSetLabelsCall {
6397 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6398 return c
6399 }
6400
6401
6402 func (c *ProjectsLocationsInstancesSetLabelsCall) Context(ctx context.Context) *ProjectsLocationsInstancesSetLabelsCall {
6403 c.ctx_ = ctx
6404 return c
6405 }
6406
6407
6408
6409 func (c *ProjectsLocationsInstancesSetLabelsCall) Header() http.Header {
6410 if c.header_ == nil {
6411 c.header_ = make(http.Header)
6412 }
6413 return c.header_
6414 }
6415
6416 func (c *ProjectsLocationsInstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
6417 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6418 var body io.Reader = nil
6419 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setinstancelabelsrequest)
6420 if err != nil {
6421 return nil, err
6422 }
6423 c.urlParams_.Set("alt", alt)
6424 c.urlParams_.Set("prettyPrint", "false")
6425 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setLabels")
6426 urls += "?" + c.urlParams_.Encode()
6427 req, err := http.NewRequest("PATCH", urls, body)
6428 if err != nil {
6429 return nil, err
6430 }
6431 req.Header = reqHeaders
6432 googleapi.Expand(req.URL, map[string]string{
6433 "name": c.name,
6434 })
6435 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6436 }
6437
6438
6439
6440
6441
6442
6443 func (c *ProjectsLocationsInstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6444 gensupport.SetOptions(c.urlParams_, opts...)
6445 res, err := c.doRequest("json")
6446 if res != nil && res.StatusCode == http.StatusNotModified {
6447 if res.Body != nil {
6448 res.Body.Close()
6449 }
6450 return nil, gensupport.WrapError(&googleapi.Error{
6451 Code: res.StatusCode,
6452 Header: res.Header,
6453 })
6454 }
6455 if err != nil {
6456 return nil, err
6457 }
6458 defer googleapi.CloseBody(res)
6459 if err := googleapi.CheckResponse(res); err != nil {
6460 return nil, gensupport.WrapError(err)
6461 }
6462 ret := &Operation{
6463 ServerResponse: googleapi.ServerResponse{
6464 Header: res.Header,
6465 HTTPStatusCode: res.StatusCode,
6466 },
6467 }
6468 target := &ret
6469 if err := gensupport.DecodeResponse(target, res); err != nil {
6470 return nil, err
6471 }
6472 return ret, nil
6473 }
6474
6475 type ProjectsLocationsInstancesSetMachineTypeCall struct {
6476 s *Service
6477 name string
6478 setinstancemachinetyperequest *SetInstanceMachineTypeRequest
6479 urlParams_ gensupport.URLParams
6480 ctx_ context.Context
6481 header_ http.Header
6482 }
6483
6484
6485
6486
6487
6488 func (r *ProjectsLocationsInstancesService) SetMachineType(name string, setinstancemachinetyperequest *SetInstanceMachineTypeRequest) *ProjectsLocationsInstancesSetMachineTypeCall {
6489 c := &ProjectsLocationsInstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6490 c.name = name
6491 c.setinstancemachinetyperequest = setinstancemachinetyperequest
6492 return c
6493 }
6494
6495
6496
6497
6498 func (c *ProjectsLocationsInstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesSetMachineTypeCall {
6499 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6500 return c
6501 }
6502
6503
6504 func (c *ProjectsLocationsInstancesSetMachineTypeCall) Context(ctx context.Context) *ProjectsLocationsInstancesSetMachineTypeCall {
6505 c.ctx_ = ctx
6506 return c
6507 }
6508
6509
6510
6511 func (c *ProjectsLocationsInstancesSetMachineTypeCall) Header() http.Header {
6512 if c.header_ == nil {
6513 c.header_ = make(http.Header)
6514 }
6515 return c.header_
6516 }
6517
6518 func (c *ProjectsLocationsInstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) {
6519 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6520 var body io.Reader = nil
6521 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setinstancemachinetyperequest)
6522 if err != nil {
6523 return nil, err
6524 }
6525 c.urlParams_.Set("alt", alt)
6526 c.urlParams_.Set("prettyPrint", "false")
6527 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:setMachineType")
6528 urls += "?" + c.urlParams_.Encode()
6529 req, err := http.NewRequest("PATCH", urls, body)
6530 if err != nil {
6531 return nil, err
6532 }
6533 req.Header = reqHeaders
6534 googleapi.Expand(req.URL, map[string]string{
6535 "name": c.name,
6536 })
6537 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6538 }
6539
6540
6541
6542
6543
6544
6545 func (c *ProjectsLocationsInstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6546 gensupport.SetOptions(c.urlParams_, opts...)
6547 res, err := c.doRequest("json")
6548 if res != nil && res.StatusCode == http.StatusNotModified {
6549 if res.Body != nil {
6550 res.Body.Close()
6551 }
6552 return nil, gensupport.WrapError(&googleapi.Error{
6553 Code: res.StatusCode,
6554 Header: res.Header,
6555 })
6556 }
6557 if err != nil {
6558 return nil, err
6559 }
6560 defer googleapi.CloseBody(res)
6561 if err := googleapi.CheckResponse(res); err != nil {
6562 return nil, gensupport.WrapError(err)
6563 }
6564 ret := &Operation{
6565 ServerResponse: googleapi.ServerResponse{
6566 Header: res.Header,
6567 HTTPStatusCode: res.StatusCode,
6568 },
6569 }
6570 target := &ret
6571 if err := gensupport.DecodeResponse(target, res); err != nil {
6572 return nil, err
6573 }
6574 return ret, nil
6575 }
6576
6577 type ProjectsLocationsInstancesStartCall struct {
6578 s *Service
6579 name string
6580 startinstancerequest *StartInstanceRequest
6581 urlParams_ gensupport.URLParams
6582 ctx_ context.Context
6583 header_ http.Header
6584 }
6585
6586
6587
6588
6589
6590 func (r *ProjectsLocationsInstancesService) Start(name string, startinstancerequest *StartInstanceRequest) *ProjectsLocationsInstancesStartCall {
6591 c := &ProjectsLocationsInstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6592 c.name = name
6593 c.startinstancerequest = startinstancerequest
6594 return c
6595 }
6596
6597
6598
6599
6600 func (c *ProjectsLocationsInstancesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStartCall {
6601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6602 return c
6603 }
6604
6605
6606 func (c *ProjectsLocationsInstancesStartCall) Context(ctx context.Context) *ProjectsLocationsInstancesStartCall {
6607 c.ctx_ = ctx
6608 return c
6609 }
6610
6611
6612
6613 func (c *ProjectsLocationsInstancesStartCall) Header() http.Header {
6614 if c.header_ == nil {
6615 c.header_ = make(http.Header)
6616 }
6617 return c.header_
6618 }
6619
6620 func (c *ProjectsLocationsInstancesStartCall) doRequest(alt string) (*http.Response, error) {
6621 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6622 var body io.Reader = nil
6623 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startinstancerequest)
6624 if err != nil {
6625 return nil, err
6626 }
6627 c.urlParams_.Set("alt", alt)
6628 c.urlParams_.Set("prettyPrint", "false")
6629 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start")
6630 urls += "?" + c.urlParams_.Encode()
6631 req, err := http.NewRequest("POST", urls, body)
6632 if err != nil {
6633 return nil, err
6634 }
6635 req.Header = reqHeaders
6636 googleapi.Expand(req.URL, map[string]string{
6637 "name": c.name,
6638 })
6639 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6640 }
6641
6642
6643
6644
6645
6646
6647 func (c *ProjectsLocationsInstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6648 gensupport.SetOptions(c.urlParams_, opts...)
6649 res, err := c.doRequest("json")
6650 if res != nil && res.StatusCode == http.StatusNotModified {
6651 if res.Body != nil {
6652 res.Body.Close()
6653 }
6654 return nil, gensupport.WrapError(&googleapi.Error{
6655 Code: res.StatusCode,
6656 Header: res.Header,
6657 })
6658 }
6659 if err != nil {
6660 return nil, err
6661 }
6662 defer googleapi.CloseBody(res)
6663 if err := googleapi.CheckResponse(res); err != nil {
6664 return nil, gensupport.WrapError(err)
6665 }
6666 ret := &Operation{
6667 ServerResponse: googleapi.ServerResponse{
6668 Header: res.Header,
6669 HTTPStatusCode: res.StatusCode,
6670 },
6671 }
6672 target := &ret
6673 if err := gensupport.DecodeResponse(target, res); err != nil {
6674 return nil, err
6675 }
6676 return ret, nil
6677 }
6678
6679 type ProjectsLocationsInstancesStopCall struct {
6680 s *Service
6681 name string
6682 stopinstancerequest *StopInstanceRequest
6683 urlParams_ gensupport.URLParams
6684 ctx_ context.Context
6685 header_ http.Header
6686 }
6687
6688
6689
6690
6691
6692 func (r *ProjectsLocationsInstancesService) Stop(name string, stopinstancerequest *StopInstanceRequest) *ProjectsLocationsInstancesStopCall {
6693 c := &ProjectsLocationsInstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6694 c.name = name
6695 c.stopinstancerequest = stopinstancerequest
6696 return c
6697 }
6698
6699
6700
6701
6702 func (c *ProjectsLocationsInstancesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesStopCall {
6703 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6704 return c
6705 }
6706
6707
6708 func (c *ProjectsLocationsInstancesStopCall) Context(ctx context.Context) *ProjectsLocationsInstancesStopCall {
6709 c.ctx_ = ctx
6710 return c
6711 }
6712
6713
6714
6715 func (c *ProjectsLocationsInstancesStopCall) Header() http.Header {
6716 if c.header_ == nil {
6717 c.header_ = make(http.Header)
6718 }
6719 return c.header_
6720 }
6721
6722 func (c *ProjectsLocationsInstancesStopCall) doRequest(alt string) (*http.Response, error) {
6723 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6724 var body io.Reader = nil
6725 body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopinstancerequest)
6726 if err != nil {
6727 return nil, err
6728 }
6729 c.urlParams_.Set("alt", alt)
6730 c.urlParams_.Set("prettyPrint", "false")
6731 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop")
6732 urls += "?" + c.urlParams_.Encode()
6733 req, err := http.NewRequest("POST", urls, body)
6734 if err != nil {
6735 return nil, err
6736 }
6737 req.Header = reqHeaders
6738 googleapi.Expand(req.URL, map[string]string{
6739 "name": c.name,
6740 })
6741 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6742 }
6743
6744
6745
6746
6747
6748
6749 func (c *ProjectsLocationsInstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6750 gensupport.SetOptions(c.urlParams_, opts...)
6751 res, err := c.doRequest("json")
6752 if res != nil && res.StatusCode == http.StatusNotModified {
6753 if res.Body != nil {
6754 res.Body.Close()
6755 }
6756 return nil, gensupport.WrapError(&googleapi.Error{
6757 Code: res.StatusCode,
6758 Header: res.Header,
6759 })
6760 }
6761 if err != nil {
6762 return nil, err
6763 }
6764 defer googleapi.CloseBody(res)
6765 if err := googleapi.CheckResponse(res); err != nil {
6766 return nil, gensupport.WrapError(err)
6767 }
6768 ret := &Operation{
6769 ServerResponse: googleapi.ServerResponse{
6770 Header: res.Header,
6771 HTTPStatusCode: res.StatusCode,
6772 },
6773 }
6774 target := &ret
6775 if err := gensupport.DecodeResponse(target, res); err != nil {
6776 return nil, err
6777 }
6778 return ret, nil
6779 }
6780
6781 type ProjectsLocationsInstancesTestIamPermissionsCall struct {
6782 s *Service
6783 resource string
6784 testiampermissionsrequest *TestIamPermissionsRequest
6785 urlParams_ gensupport.URLParams
6786 ctx_ context.Context
6787 header_ http.Header
6788 }
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800 func (r *ProjectsLocationsInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsInstancesTestIamPermissionsCall {
6801 c := &ProjectsLocationsInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6802 c.resource = resource
6803 c.testiampermissionsrequest = testiampermissionsrequest
6804 return c
6805 }
6806
6807
6808
6809
6810 func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesTestIamPermissionsCall {
6811 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6812 return c
6813 }
6814
6815
6816 func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsInstancesTestIamPermissionsCall {
6817 c.ctx_ = ctx
6818 return c
6819 }
6820
6821
6822
6823 func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Header() http.Header {
6824 if c.header_ == nil {
6825 c.header_ = make(http.Header)
6826 }
6827 return c.header_
6828 }
6829
6830 func (c *ProjectsLocationsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
6831 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6832 var body io.Reader = nil
6833 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
6834 if err != nil {
6835 return nil, err
6836 }
6837 c.urlParams_.Set("alt", alt)
6838 c.urlParams_.Set("prettyPrint", "false")
6839 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
6840 urls += "?" + c.urlParams_.Encode()
6841 req, err := http.NewRequest("POST", urls, body)
6842 if err != nil {
6843 return nil, err
6844 }
6845 req.Header = reqHeaders
6846 googleapi.Expand(req.URL, map[string]string{
6847 "resource": c.resource,
6848 })
6849 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6850 }
6851
6852
6853
6854
6855
6856
6857
6858 func (c *ProjectsLocationsInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
6859 gensupport.SetOptions(c.urlParams_, opts...)
6860 res, err := c.doRequest("json")
6861 if res != nil && res.StatusCode == http.StatusNotModified {
6862 if res.Body != nil {
6863 res.Body.Close()
6864 }
6865 return nil, gensupport.WrapError(&googleapi.Error{
6866 Code: res.StatusCode,
6867 Header: res.Header,
6868 })
6869 }
6870 if err != nil {
6871 return nil, err
6872 }
6873 defer googleapi.CloseBody(res)
6874 if err := googleapi.CheckResponse(res); err != nil {
6875 return nil, gensupport.WrapError(err)
6876 }
6877 ret := &TestIamPermissionsResponse{
6878 ServerResponse: googleapi.ServerResponse{
6879 Header: res.Header,
6880 HTTPStatusCode: res.StatusCode,
6881 },
6882 }
6883 target := &ret
6884 if err := gensupport.DecodeResponse(target, res); err != nil {
6885 return nil, err
6886 }
6887 return ret, nil
6888 }
6889
6890 type ProjectsLocationsInstancesUpdateConfigCall struct {
6891 s *Service
6892 name string
6893 updateinstanceconfigrequest *UpdateInstanceConfigRequest
6894 urlParams_ gensupport.URLParams
6895 ctx_ context.Context
6896 header_ http.Header
6897 }
6898
6899
6900
6901
6902
6903 func (r *ProjectsLocationsInstancesService) UpdateConfig(name string, updateinstanceconfigrequest *UpdateInstanceConfigRequest) *ProjectsLocationsInstancesUpdateConfigCall {
6904 c := &ProjectsLocationsInstancesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6905 c.name = name
6906 c.updateinstanceconfigrequest = updateinstanceconfigrequest
6907 return c
6908 }
6909
6910
6911
6912
6913 func (c *ProjectsLocationsInstancesUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesUpdateConfigCall {
6914 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6915 return c
6916 }
6917
6918
6919 func (c *ProjectsLocationsInstancesUpdateConfigCall) Context(ctx context.Context) *ProjectsLocationsInstancesUpdateConfigCall {
6920 c.ctx_ = ctx
6921 return c
6922 }
6923
6924
6925
6926 func (c *ProjectsLocationsInstancesUpdateConfigCall) Header() http.Header {
6927 if c.header_ == nil {
6928 c.header_ = make(http.Header)
6929 }
6930 return c.header_
6931 }
6932
6933 func (c *ProjectsLocationsInstancesUpdateConfigCall) doRequest(alt string) (*http.Response, error) {
6934 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6935 var body io.Reader = nil
6936 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateinstanceconfigrequest)
6937 if err != nil {
6938 return nil, err
6939 }
6940 c.urlParams_.Set("alt", alt)
6941 c.urlParams_.Set("prettyPrint", "false")
6942 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updateConfig")
6943 urls += "?" + c.urlParams_.Encode()
6944 req, err := http.NewRequest("PATCH", urls, body)
6945 if err != nil {
6946 return nil, err
6947 }
6948 req.Header = reqHeaders
6949 googleapi.Expand(req.URL, map[string]string{
6950 "name": c.name,
6951 })
6952 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6953 }
6954
6955
6956
6957
6958
6959
6960 func (c *ProjectsLocationsInstancesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6961 gensupport.SetOptions(c.urlParams_, opts...)
6962 res, err := c.doRequest("json")
6963 if res != nil && res.StatusCode == http.StatusNotModified {
6964 if res.Body != nil {
6965 res.Body.Close()
6966 }
6967 return nil, gensupport.WrapError(&googleapi.Error{
6968 Code: res.StatusCode,
6969 Header: res.Header,
6970 })
6971 }
6972 if err != nil {
6973 return nil, err
6974 }
6975 defer googleapi.CloseBody(res)
6976 if err := googleapi.CheckResponse(res); err != nil {
6977 return nil, gensupport.WrapError(err)
6978 }
6979 ret := &Operation{
6980 ServerResponse: googleapi.ServerResponse{
6981 Header: res.Header,
6982 HTTPStatusCode: res.StatusCode,
6983 },
6984 }
6985 target := &ret
6986 if err := gensupport.DecodeResponse(target, res); err != nil {
6987 return nil, err
6988 }
6989 return ret, nil
6990 }
6991
6992 type ProjectsLocationsInstancesUpdateMetadataItemsCall struct {
6993 s *Service
6994 name string
6995 updateinstancemetadataitemsrequest *UpdateInstanceMetadataItemsRequest
6996 urlParams_ gensupport.URLParams
6997 ctx_ context.Context
6998 header_ http.Header
6999 }
7000
7001
7002
7003
7004
7005 func (r *ProjectsLocationsInstancesService) UpdateMetadataItems(name string, updateinstancemetadataitemsrequest *UpdateInstanceMetadataItemsRequest) *ProjectsLocationsInstancesUpdateMetadataItemsCall {
7006 c := &ProjectsLocationsInstancesUpdateMetadataItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7007 c.name = name
7008 c.updateinstancemetadataitemsrequest = updateinstancemetadataitemsrequest
7009 return c
7010 }
7011
7012
7013
7014
7015 func (c *ProjectsLocationsInstancesUpdateMetadataItemsCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesUpdateMetadataItemsCall {
7016 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7017 return c
7018 }
7019
7020
7021 func (c *ProjectsLocationsInstancesUpdateMetadataItemsCall) Context(ctx context.Context) *ProjectsLocationsInstancesUpdateMetadataItemsCall {
7022 c.ctx_ = ctx
7023 return c
7024 }
7025
7026
7027
7028 func (c *ProjectsLocationsInstancesUpdateMetadataItemsCall) Header() http.Header {
7029 if c.header_ == nil {
7030 c.header_ = make(http.Header)
7031 }
7032 return c.header_
7033 }
7034
7035 func (c *ProjectsLocationsInstancesUpdateMetadataItemsCall) doRequest(alt string) (*http.Response, error) {
7036 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7037 var body io.Reader = nil
7038 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateinstancemetadataitemsrequest)
7039 if err != nil {
7040 return nil, err
7041 }
7042 c.urlParams_.Set("alt", alt)
7043 c.urlParams_.Set("prettyPrint", "false")
7044 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updateMetadataItems")
7045 urls += "?" + c.urlParams_.Encode()
7046 req, err := http.NewRequest("PATCH", urls, body)
7047 if err != nil {
7048 return nil, err
7049 }
7050 req.Header = reqHeaders
7051 googleapi.Expand(req.URL, map[string]string{
7052 "name": c.name,
7053 })
7054 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7055 }
7056
7057
7058
7059
7060
7061
7062
7063 func (c *ProjectsLocationsInstancesUpdateMetadataItemsCall) Do(opts ...googleapi.CallOption) (*UpdateInstanceMetadataItemsResponse, error) {
7064 gensupport.SetOptions(c.urlParams_, opts...)
7065 res, err := c.doRequest("json")
7066 if res != nil && res.StatusCode == http.StatusNotModified {
7067 if res.Body != nil {
7068 res.Body.Close()
7069 }
7070 return nil, gensupport.WrapError(&googleapi.Error{
7071 Code: res.StatusCode,
7072 Header: res.Header,
7073 })
7074 }
7075 if err != nil {
7076 return nil, err
7077 }
7078 defer googleapi.CloseBody(res)
7079 if err := googleapi.CheckResponse(res); err != nil {
7080 return nil, gensupport.WrapError(err)
7081 }
7082 ret := &UpdateInstanceMetadataItemsResponse{
7083 ServerResponse: googleapi.ServerResponse{
7084 Header: res.Header,
7085 HTTPStatusCode: res.StatusCode,
7086 },
7087 }
7088 target := &ret
7089 if err := gensupport.DecodeResponse(target, res); err != nil {
7090 return nil, err
7091 }
7092 return ret, nil
7093 }
7094
7095 type ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall struct {
7096 s *Service
7097 name string
7098 updateshieldedinstanceconfigrequest *UpdateShieldedInstanceConfigRequest
7099 urlParams_ gensupport.URLParams
7100 ctx_ context.Context
7101 header_ http.Header
7102 }
7103
7104
7105
7106
7107
7108
7109 func (r *ProjectsLocationsInstancesService) UpdateShieldedInstanceConfig(name string, updateshieldedinstanceconfigrequest *UpdateShieldedInstanceConfigRequest) *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall {
7110 c := &ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7111 c.name = name
7112 c.updateshieldedinstanceconfigrequest = updateshieldedinstanceconfigrequest
7113 return c
7114 }
7115
7116
7117
7118
7119 func (c *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall {
7120 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7121 return c
7122 }
7123
7124
7125 func (c *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall {
7126 c.ctx_ = ctx
7127 return c
7128 }
7129
7130
7131
7132 func (c *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall) Header() http.Header {
7133 if c.header_ == nil {
7134 c.header_ = make(http.Header)
7135 }
7136 return c.header_
7137 }
7138
7139 func (c *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) {
7140 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7141 var body io.Reader = nil
7142 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateshieldedinstanceconfigrequest)
7143 if err != nil {
7144 return nil, err
7145 }
7146 c.urlParams_.Set("alt", alt)
7147 c.urlParams_.Set("prettyPrint", "false")
7148 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:updateShieldedInstanceConfig")
7149 urls += "?" + c.urlParams_.Encode()
7150 req, err := http.NewRequest("PATCH", urls, body)
7151 if err != nil {
7152 return nil, err
7153 }
7154 req.Header = reqHeaders
7155 googleapi.Expand(req.URL, map[string]string{
7156 "name": c.name,
7157 })
7158 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7159 }
7160
7161
7162
7163
7164
7165
7166 func (c *ProjectsLocationsInstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7167 gensupport.SetOptions(c.urlParams_, opts...)
7168 res, err := c.doRequest("json")
7169 if res != nil && res.StatusCode == http.StatusNotModified {
7170 if res.Body != nil {
7171 res.Body.Close()
7172 }
7173 return nil, gensupport.WrapError(&googleapi.Error{
7174 Code: res.StatusCode,
7175 Header: res.Header,
7176 })
7177 }
7178 if err != nil {
7179 return nil, err
7180 }
7181 defer googleapi.CloseBody(res)
7182 if err := googleapi.CheckResponse(res); err != nil {
7183 return nil, gensupport.WrapError(err)
7184 }
7185 ret := &Operation{
7186 ServerResponse: googleapi.ServerResponse{
7187 Header: res.Header,
7188 HTTPStatusCode: res.StatusCode,
7189 },
7190 }
7191 target := &ret
7192 if err := gensupport.DecodeResponse(target, res); err != nil {
7193 return nil, err
7194 }
7195 return ret, nil
7196 }
7197
7198 type ProjectsLocationsInstancesUpgradeCall struct {
7199 s *Service
7200 name string
7201 upgradeinstancerequest *UpgradeInstanceRequest
7202 urlParams_ gensupport.URLParams
7203 ctx_ context.Context
7204 header_ http.Header
7205 }
7206
7207
7208
7209
7210
7211 func (r *ProjectsLocationsInstancesService) Upgrade(name string, upgradeinstancerequest *UpgradeInstanceRequest) *ProjectsLocationsInstancesUpgradeCall {
7212 c := &ProjectsLocationsInstancesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7213 c.name = name
7214 c.upgradeinstancerequest = upgradeinstancerequest
7215 return c
7216 }
7217
7218
7219
7220
7221 func (c *ProjectsLocationsInstancesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesUpgradeCall {
7222 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7223 return c
7224 }
7225
7226
7227 func (c *ProjectsLocationsInstancesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsInstancesUpgradeCall {
7228 c.ctx_ = ctx
7229 return c
7230 }
7231
7232
7233
7234 func (c *ProjectsLocationsInstancesUpgradeCall) Header() http.Header {
7235 if c.header_ == nil {
7236 c.header_ = make(http.Header)
7237 }
7238 return c.header_
7239 }
7240
7241 func (c *ProjectsLocationsInstancesUpgradeCall) doRequest(alt string) (*http.Response, error) {
7242 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7243 var body io.Reader = nil
7244 body, err := googleapi.WithoutDataWrapper.JSONReader(c.upgradeinstancerequest)
7245 if err != nil {
7246 return nil, err
7247 }
7248 c.urlParams_.Set("alt", alt)
7249 c.urlParams_.Set("prettyPrint", "false")
7250 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:upgrade")
7251 urls += "?" + c.urlParams_.Encode()
7252 req, err := http.NewRequest("POST", urls, body)
7253 if err != nil {
7254 return nil, err
7255 }
7256 req.Header = reqHeaders
7257 googleapi.Expand(req.URL, map[string]string{
7258 "name": c.name,
7259 })
7260 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7261 }
7262
7263
7264
7265
7266
7267
7268 func (c *ProjectsLocationsInstancesUpgradeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7269 gensupport.SetOptions(c.urlParams_, opts...)
7270 res, err := c.doRequest("json")
7271 if res != nil && res.StatusCode == http.StatusNotModified {
7272 if res.Body != nil {
7273 res.Body.Close()
7274 }
7275 return nil, gensupport.WrapError(&googleapi.Error{
7276 Code: res.StatusCode,
7277 Header: res.Header,
7278 })
7279 }
7280 if err != nil {
7281 return nil, err
7282 }
7283 defer googleapi.CloseBody(res)
7284 if err := googleapi.CheckResponse(res); err != nil {
7285 return nil, gensupport.WrapError(err)
7286 }
7287 ret := &Operation{
7288 ServerResponse: googleapi.ServerResponse{
7289 Header: res.Header,
7290 HTTPStatusCode: res.StatusCode,
7291 },
7292 }
7293 target := &ret
7294 if err := gensupport.DecodeResponse(target, res); err != nil {
7295 return nil, err
7296 }
7297 return ret, nil
7298 }
7299
7300 type ProjectsLocationsInstancesUpgradeInternalCall struct {
7301 s *Service
7302 name string
7303 upgradeinstanceinternalrequest *UpgradeInstanceInternalRequest
7304 urlParams_ gensupport.URLParams
7305 ctx_ context.Context
7306 header_ http.Header
7307 }
7308
7309
7310
7311
7312
7313
7314 func (r *ProjectsLocationsInstancesService) UpgradeInternal(name string, upgradeinstanceinternalrequest *UpgradeInstanceInternalRequest) *ProjectsLocationsInstancesUpgradeInternalCall {
7315 c := &ProjectsLocationsInstancesUpgradeInternalCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7316 c.name = name
7317 c.upgradeinstanceinternalrequest = upgradeinstanceinternalrequest
7318 return c
7319 }
7320
7321
7322
7323
7324 func (c *ProjectsLocationsInstancesUpgradeInternalCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesUpgradeInternalCall {
7325 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7326 return c
7327 }
7328
7329
7330 func (c *ProjectsLocationsInstancesUpgradeInternalCall) Context(ctx context.Context) *ProjectsLocationsInstancesUpgradeInternalCall {
7331 c.ctx_ = ctx
7332 return c
7333 }
7334
7335
7336
7337 func (c *ProjectsLocationsInstancesUpgradeInternalCall) Header() http.Header {
7338 if c.header_ == nil {
7339 c.header_ = make(http.Header)
7340 }
7341 return c.header_
7342 }
7343
7344 func (c *ProjectsLocationsInstancesUpgradeInternalCall) doRequest(alt string) (*http.Response, error) {
7345 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7346 var body io.Reader = nil
7347 body, err := googleapi.WithoutDataWrapper.JSONReader(c.upgradeinstanceinternalrequest)
7348 if err != nil {
7349 return nil, err
7350 }
7351 c.urlParams_.Set("alt", alt)
7352 c.urlParams_.Set("prettyPrint", "false")
7353 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:upgradeInternal")
7354 urls += "?" + c.urlParams_.Encode()
7355 req, err := http.NewRequest("POST", urls, body)
7356 if err != nil {
7357 return nil, err
7358 }
7359 req.Header = reqHeaders
7360 googleapi.Expand(req.URL, map[string]string{
7361 "name": c.name,
7362 })
7363 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7364 }
7365
7366
7367
7368
7369
7370
7371 func (c *ProjectsLocationsInstancesUpgradeInternalCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7372 gensupport.SetOptions(c.urlParams_, opts...)
7373 res, err := c.doRequest("json")
7374 if res != nil && res.StatusCode == http.StatusNotModified {
7375 if res.Body != nil {
7376 res.Body.Close()
7377 }
7378 return nil, gensupport.WrapError(&googleapi.Error{
7379 Code: res.StatusCode,
7380 Header: res.Header,
7381 })
7382 }
7383 if err != nil {
7384 return nil, err
7385 }
7386 defer googleapi.CloseBody(res)
7387 if err := googleapi.CheckResponse(res); err != nil {
7388 return nil, gensupport.WrapError(err)
7389 }
7390 ret := &Operation{
7391 ServerResponse: googleapi.ServerResponse{
7392 Header: res.Header,
7393 HTTPStatusCode: res.StatusCode,
7394 },
7395 }
7396 target := &ret
7397 if err := gensupport.DecodeResponse(target, res); err != nil {
7398 return nil, err
7399 }
7400 return ret, nil
7401 }
7402
7403 type ProjectsLocationsOperationsCancelCall struct {
7404 s *Service
7405 name string
7406 canceloperationrequest *CancelOperationRequest
7407 urlParams_ gensupport.URLParams
7408 ctx_ context.Context
7409 header_ http.Header
7410 }
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
7424 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7425 c.name = name
7426 c.canceloperationrequest = canceloperationrequest
7427 return c
7428 }
7429
7430
7431
7432
7433 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
7434 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7435 return c
7436 }
7437
7438
7439 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
7440 c.ctx_ = ctx
7441 return c
7442 }
7443
7444
7445
7446 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
7447 if c.header_ == nil {
7448 c.header_ = make(http.Header)
7449 }
7450 return c.header_
7451 }
7452
7453 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
7454 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7455 var body io.Reader = nil
7456 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
7457 if err != nil {
7458 return nil, err
7459 }
7460 c.urlParams_.Set("alt", alt)
7461 c.urlParams_.Set("prettyPrint", "false")
7462 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
7463 urls += "?" + c.urlParams_.Encode()
7464 req, err := http.NewRequest("POST", urls, body)
7465 if err != nil {
7466 return nil, err
7467 }
7468 req.Header = reqHeaders
7469 googleapi.Expand(req.URL, map[string]string{
7470 "name": c.name,
7471 })
7472 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7473 }
7474
7475
7476
7477
7478
7479
7480 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7481 gensupport.SetOptions(c.urlParams_, opts...)
7482 res, err := c.doRequest("json")
7483 if res != nil && res.StatusCode == http.StatusNotModified {
7484 if res.Body != nil {
7485 res.Body.Close()
7486 }
7487 return nil, gensupport.WrapError(&googleapi.Error{
7488 Code: res.StatusCode,
7489 Header: res.Header,
7490 })
7491 }
7492 if err != nil {
7493 return nil, err
7494 }
7495 defer googleapi.CloseBody(res)
7496 if err := googleapi.CheckResponse(res); err != nil {
7497 return nil, gensupport.WrapError(err)
7498 }
7499 ret := &Empty{
7500 ServerResponse: googleapi.ServerResponse{
7501 Header: res.Header,
7502 HTTPStatusCode: res.StatusCode,
7503 },
7504 }
7505 target := &ret
7506 if err := gensupport.DecodeResponse(target, res); err != nil {
7507 return nil, err
7508 }
7509 return ret, nil
7510 }
7511
7512 type ProjectsLocationsOperationsDeleteCall struct {
7513 s *Service
7514 name string
7515 urlParams_ gensupport.URLParams
7516 ctx_ context.Context
7517 header_ http.Header
7518 }
7519
7520
7521
7522
7523
7524
7525
7526 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
7527 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7528 c.name = name
7529 return c
7530 }
7531
7532
7533
7534
7535 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
7536 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7537 return c
7538 }
7539
7540
7541 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
7542 c.ctx_ = ctx
7543 return c
7544 }
7545
7546
7547
7548 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
7549 if c.header_ == nil {
7550 c.header_ = make(http.Header)
7551 }
7552 return c.header_
7553 }
7554
7555 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
7556 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7557 var body io.Reader = nil
7558 c.urlParams_.Set("alt", alt)
7559 c.urlParams_.Set("prettyPrint", "false")
7560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7561 urls += "?" + c.urlParams_.Encode()
7562 req, err := http.NewRequest("DELETE", urls, body)
7563 if err != nil {
7564 return nil, err
7565 }
7566 req.Header = reqHeaders
7567 googleapi.Expand(req.URL, map[string]string{
7568 "name": c.name,
7569 })
7570 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7571 }
7572
7573
7574
7575
7576
7577
7578 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7579 gensupport.SetOptions(c.urlParams_, opts...)
7580 res, err := c.doRequest("json")
7581 if res != nil && res.StatusCode == http.StatusNotModified {
7582 if res.Body != nil {
7583 res.Body.Close()
7584 }
7585 return nil, gensupport.WrapError(&googleapi.Error{
7586 Code: res.StatusCode,
7587 Header: res.Header,
7588 })
7589 }
7590 if err != nil {
7591 return nil, err
7592 }
7593 defer googleapi.CloseBody(res)
7594 if err := googleapi.CheckResponse(res); err != nil {
7595 return nil, gensupport.WrapError(err)
7596 }
7597 ret := &Empty{
7598 ServerResponse: googleapi.ServerResponse{
7599 Header: res.Header,
7600 HTTPStatusCode: res.StatusCode,
7601 },
7602 }
7603 target := &ret
7604 if err := gensupport.DecodeResponse(target, res); err != nil {
7605 return nil, err
7606 }
7607 return ret, nil
7608 }
7609
7610 type ProjectsLocationsOperationsGetCall struct {
7611 s *Service
7612 name string
7613 urlParams_ gensupport.URLParams
7614 ifNoneMatch_ string
7615 ctx_ context.Context
7616 header_ http.Header
7617 }
7618
7619
7620
7621
7622
7623
7624 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
7625 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7626 c.name = name
7627 return c
7628 }
7629
7630
7631
7632
7633 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
7634 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7635 return c
7636 }
7637
7638
7639
7640
7641 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
7642 c.ifNoneMatch_ = entityTag
7643 return c
7644 }
7645
7646
7647 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
7648 c.ctx_ = ctx
7649 return c
7650 }
7651
7652
7653
7654 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
7655 if c.header_ == nil {
7656 c.header_ = make(http.Header)
7657 }
7658 return c.header_
7659 }
7660
7661 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
7662 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7663 if c.ifNoneMatch_ != "" {
7664 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7665 }
7666 var body io.Reader = nil
7667 c.urlParams_.Set("alt", alt)
7668 c.urlParams_.Set("prettyPrint", "false")
7669 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7670 urls += "?" + c.urlParams_.Encode()
7671 req, err := http.NewRequest("GET", urls, body)
7672 if err != nil {
7673 return nil, err
7674 }
7675 req.Header = reqHeaders
7676 googleapi.Expand(req.URL, map[string]string{
7677 "name": c.name,
7678 })
7679 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7680 }
7681
7682
7683
7684
7685
7686
7687 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7688 gensupport.SetOptions(c.urlParams_, opts...)
7689 res, err := c.doRequest("json")
7690 if res != nil && res.StatusCode == http.StatusNotModified {
7691 if res.Body != nil {
7692 res.Body.Close()
7693 }
7694 return nil, gensupport.WrapError(&googleapi.Error{
7695 Code: res.StatusCode,
7696 Header: res.Header,
7697 })
7698 }
7699 if err != nil {
7700 return nil, err
7701 }
7702 defer googleapi.CloseBody(res)
7703 if err := googleapi.CheckResponse(res); err != nil {
7704 return nil, gensupport.WrapError(err)
7705 }
7706 ret := &Operation{
7707 ServerResponse: googleapi.ServerResponse{
7708 Header: res.Header,
7709 HTTPStatusCode: res.StatusCode,
7710 },
7711 }
7712 target := &ret
7713 if err := gensupport.DecodeResponse(target, res); err != nil {
7714 return nil, err
7715 }
7716 return ret, nil
7717 }
7718
7719 type ProjectsLocationsOperationsListCall struct {
7720 s *Service
7721 name string
7722 urlParams_ gensupport.URLParams
7723 ifNoneMatch_ string
7724 ctx_ context.Context
7725 header_ http.Header
7726 }
7727
7728
7729
7730
7731
7732 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
7733 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7734 c.name = name
7735 return c
7736 }
7737
7738
7739 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
7740 c.urlParams_.Set("filter", filter)
7741 return c
7742 }
7743
7744
7745
7746 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
7747 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7748 return c
7749 }
7750
7751
7752
7753 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
7754 c.urlParams_.Set("pageToken", pageToken)
7755 return c
7756 }
7757
7758
7759
7760
7761 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
7762 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7763 return c
7764 }
7765
7766
7767
7768
7769 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
7770 c.ifNoneMatch_ = entityTag
7771 return c
7772 }
7773
7774
7775 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
7776 c.ctx_ = ctx
7777 return c
7778 }
7779
7780
7781
7782 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
7783 if c.header_ == nil {
7784 c.header_ = make(http.Header)
7785 }
7786 return c.header_
7787 }
7788
7789 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
7790 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7791 if c.ifNoneMatch_ != "" {
7792 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7793 }
7794 var body io.Reader = nil
7795 c.urlParams_.Set("alt", alt)
7796 c.urlParams_.Set("prettyPrint", "false")
7797 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
7798 urls += "?" + c.urlParams_.Encode()
7799 req, err := http.NewRequest("GET", urls, body)
7800 if err != nil {
7801 return nil, err
7802 }
7803 req.Header = reqHeaders
7804 googleapi.Expand(req.URL, map[string]string{
7805 "name": c.name,
7806 })
7807 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7808 }
7809
7810
7811
7812
7813
7814
7815
7816 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
7817 gensupport.SetOptions(c.urlParams_, opts...)
7818 res, err := c.doRequest("json")
7819 if res != nil && res.StatusCode == http.StatusNotModified {
7820 if res.Body != nil {
7821 res.Body.Close()
7822 }
7823 return nil, gensupport.WrapError(&googleapi.Error{
7824 Code: res.StatusCode,
7825 Header: res.Header,
7826 })
7827 }
7828 if err != nil {
7829 return nil, err
7830 }
7831 defer googleapi.CloseBody(res)
7832 if err := googleapi.CheckResponse(res); err != nil {
7833 return nil, gensupport.WrapError(err)
7834 }
7835 ret := &ListOperationsResponse{
7836 ServerResponse: googleapi.ServerResponse{
7837 Header: res.Header,
7838 HTTPStatusCode: res.StatusCode,
7839 },
7840 }
7841 target := &ret
7842 if err := gensupport.DecodeResponse(target, res); err != nil {
7843 return nil, err
7844 }
7845 return ret, nil
7846 }
7847
7848
7849
7850
7851 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
7852 c.ctx_ = ctx
7853 defer c.PageToken(c.urlParams_.Get("pageToken"))
7854 for {
7855 x, err := c.Do()
7856 if err != nil {
7857 return err
7858 }
7859 if err := f(x); err != nil {
7860 return err
7861 }
7862 if x.NextPageToken == "" {
7863 return nil
7864 }
7865 c.PageToken(x.NextPageToken)
7866 }
7867 }
7868
7869 type ProjectsLocationsRuntimesCreateCall struct {
7870 s *Service
7871 parent string
7872 runtime *Runtime
7873 urlParams_ gensupport.URLParams
7874 ctx_ context.Context
7875 header_ http.Header
7876 }
7877
7878
7879
7880
7881 func (r *ProjectsLocationsRuntimesService) Create(parent string, runtime *Runtime) *ProjectsLocationsRuntimesCreateCall {
7882 c := &ProjectsLocationsRuntimesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7883 c.parent = parent
7884 c.runtime = runtime
7885 return c
7886 }
7887
7888
7889 func (c *ProjectsLocationsRuntimesCreateCall) RequestId(requestId string) *ProjectsLocationsRuntimesCreateCall {
7890 c.urlParams_.Set("requestId", requestId)
7891 return c
7892 }
7893
7894
7895
7896 func (c *ProjectsLocationsRuntimesCreateCall) RuntimeId(runtimeId string) *ProjectsLocationsRuntimesCreateCall {
7897 c.urlParams_.Set("runtimeId", runtimeId)
7898 return c
7899 }
7900
7901
7902
7903
7904 func (c *ProjectsLocationsRuntimesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesCreateCall {
7905 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7906 return c
7907 }
7908
7909
7910 func (c *ProjectsLocationsRuntimesCreateCall) Context(ctx context.Context) *ProjectsLocationsRuntimesCreateCall {
7911 c.ctx_ = ctx
7912 return c
7913 }
7914
7915
7916
7917 func (c *ProjectsLocationsRuntimesCreateCall) Header() http.Header {
7918 if c.header_ == nil {
7919 c.header_ = make(http.Header)
7920 }
7921 return c.header_
7922 }
7923
7924 func (c *ProjectsLocationsRuntimesCreateCall) doRequest(alt string) (*http.Response, error) {
7925 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7926 var body io.Reader = nil
7927 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runtime)
7928 if err != nil {
7929 return nil, err
7930 }
7931 c.urlParams_.Set("alt", alt)
7932 c.urlParams_.Set("prettyPrint", "false")
7933 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/runtimes")
7934 urls += "?" + c.urlParams_.Encode()
7935 req, err := http.NewRequest("POST", urls, body)
7936 if err != nil {
7937 return nil, err
7938 }
7939 req.Header = reqHeaders
7940 googleapi.Expand(req.URL, map[string]string{
7941 "parent": c.parent,
7942 })
7943 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7944 }
7945
7946
7947
7948
7949
7950
7951 func (c *ProjectsLocationsRuntimesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7952 gensupport.SetOptions(c.urlParams_, opts...)
7953 res, err := c.doRequest("json")
7954 if res != nil && res.StatusCode == http.StatusNotModified {
7955 if res.Body != nil {
7956 res.Body.Close()
7957 }
7958 return nil, gensupport.WrapError(&googleapi.Error{
7959 Code: res.StatusCode,
7960 Header: res.Header,
7961 })
7962 }
7963 if err != nil {
7964 return nil, err
7965 }
7966 defer googleapi.CloseBody(res)
7967 if err := googleapi.CheckResponse(res); err != nil {
7968 return nil, gensupport.WrapError(err)
7969 }
7970 ret := &Operation{
7971 ServerResponse: googleapi.ServerResponse{
7972 Header: res.Header,
7973 HTTPStatusCode: res.StatusCode,
7974 },
7975 }
7976 target := &ret
7977 if err := gensupport.DecodeResponse(target, res); err != nil {
7978 return nil, err
7979 }
7980 return ret, nil
7981 }
7982
7983 type ProjectsLocationsRuntimesDeleteCall struct {
7984 s *Service
7985 name string
7986 urlParams_ gensupport.URLParams
7987 ctx_ context.Context
7988 header_ http.Header
7989 }
7990
7991
7992
7993
7994
7995 func (r *ProjectsLocationsRuntimesService) Delete(name string) *ProjectsLocationsRuntimesDeleteCall {
7996 c := &ProjectsLocationsRuntimesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7997 c.name = name
7998 return c
7999 }
8000
8001
8002 func (c *ProjectsLocationsRuntimesDeleteCall) RequestId(requestId string) *ProjectsLocationsRuntimesDeleteCall {
8003 c.urlParams_.Set("requestId", requestId)
8004 return c
8005 }
8006
8007
8008
8009
8010 func (c *ProjectsLocationsRuntimesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesDeleteCall {
8011 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8012 return c
8013 }
8014
8015
8016 func (c *ProjectsLocationsRuntimesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRuntimesDeleteCall {
8017 c.ctx_ = ctx
8018 return c
8019 }
8020
8021
8022
8023 func (c *ProjectsLocationsRuntimesDeleteCall) Header() http.Header {
8024 if c.header_ == nil {
8025 c.header_ = make(http.Header)
8026 }
8027 return c.header_
8028 }
8029
8030 func (c *ProjectsLocationsRuntimesDeleteCall) doRequest(alt string) (*http.Response, error) {
8031 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8032 var body io.Reader = nil
8033 c.urlParams_.Set("alt", alt)
8034 c.urlParams_.Set("prettyPrint", "false")
8035 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8036 urls += "?" + c.urlParams_.Encode()
8037 req, err := http.NewRequest("DELETE", urls, body)
8038 if err != nil {
8039 return nil, err
8040 }
8041 req.Header = reqHeaders
8042 googleapi.Expand(req.URL, map[string]string{
8043 "name": c.name,
8044 })
8045 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8046 }
8047
8048
8049
8050
8051
8052
8053 func (c *ProjectsLocationsRuntimesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8054 gensupport.SetOptions(c.urlParams_, opts...)
8055 res, err := c.doRequest("json")
8056 if res != nil && res.StatusCode == http.StatusNotModified {
8057 if res.Body != nil {
8058 res.Body.Close()
8059 }
8060 return nil, gensupport.WrapError(&googleapi.Error{
8061 Code: res.StatusCode,
8062 Header: res.Header,
8063 })
8064 }
8065 if err != nil {
8066 return nil, err
8067 }
8068 defer googleapi.CloseBody(res)
8069 if err := googleapi.CheckResponse(res); err != nil {
8070 return nil, gensupport.WrapError(err)
8071 }
8072 ret := &Operation{
8073 ServerResponse: googleapi.ServerResponse{
8074 Header: res.Header,
8075 HTTPStatusCode: res.StatusCode,
8076 },
8077 }
8078 target := &ret
8079 if err := gensupport.DecodeResponse(target, res); err != nil {
8080 return nil, err
8081 }
8082 return ret, nil
8083 }
8084
8085 type ProjectsLocationsRuntimesDiagnoseCall struct {
8086 s *Service
8087 name string
8088 diagnoseruntimerequest *DiagnoseRuntimeRequest
8089 urlParams_ gensupport.URLParams
8090 ctx_ context.Context
8091 header_ http.Header
8092 }
8093
8094
8095
8096
8097
8098
8099 func (r *ProjectsLocationsRuntimesService) Diagnose(name string, diagnoseruntimerequest *DiagnoseRuntimeRequest) *ProjectsLocationsRuntimesDiagnoseCall {
8100 c := &ProjectsLocationsRuntimesDiagnoseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8101 c.name = name
8102 c.diagnoseruntimerequest = diagnoseruntimerequest
8103 return c
8104 }
8105
8106
8107
8108
8109 func (c *ProjectsLocationsRuntimesDiagnoseCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesDiagnoseCall {
8110 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8111 return c
8112 }
8113
8114
8115 func (c *ProjectsLocationsRuntimesDiagnoseCall) Context(ctx context.Context) *ProjectsLocationsRuntimesDiagnoseCall {
8116 c.ctx_ = ctx
8117 return c
8118 }
8119
8120
8121
8122 func (c *ProjectsLocationsRuntimesDiagnoseCall) Header() http.Header {
8123 if c.header_ == nil {
8124 c.header_ = make(http.Header)
8125 }
8126 return c.header_
8127 }
8128
8129 func (c *ProjectsLocationsRuntimesDiagnoseCall) doRequest(alt string) (*http.Response, error) {
8130 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8131 var body io.Reader = nil
8132 body, err := googleapi.WithoutDataWrapper.JSONReader(c.diagnoseruntimerequest)
8133 if err != nil {
8134 return nil, err
8135 }
8136 c.urlParams_.Set("alt", alt)
8137 c.urlParams_.Set("prettyPrint", "false")
8138 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:diagnose")
8139 urls += "?" + c.urlParams_.Encode()
8140 req, err := http.NewRequest("POST", urls, body)
8141 if err != nil {
8142 return nil, err
8143 }
8144 req.Header = reqHeaders
8145 googleapi.Expand(req.URL, map[string]string{
8146 "name": c.name,
8147 })
8148 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8149 }
8150
8151
8152
8153
8154
8155
8156 func (c *ProjectsLocationsRuntimesDiagnoseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8157 gensupport.SetOptions(c.urlParams_, opts...)
8158 res, err := c.doRequest("json")
8159 if res != nil && res.StatusCode == http.StatusNotModified {
8160 if res.Body != nil {
8161 res.Body.Close()
8162 }
8163 return nil, gensupport.WrapError(&googleapi.Error{
8164 Code: res.StatusCode,
8165 Header: res.Header,
8166 })
8167 }
8168 if err != nil {
8169 return nil, err
8170 }
8171 defer googleapi.CloseBody(res)
8172 if err := googleapi.CheckResponse(res); err != nil {
8173 return nil, gensupport.WrapError(err)
8174 }
8175 ret := &Operation{
8176 ServerResponse: googleapi.ServerResponse{
8177 Header: res.Header,
8178 HTTPStatusCode: res.StatusCode,
8179 },
8180 }
8181 target := &ret
8182 if err := gensupport.DecodeResponse(target, res); err != nil {
8183 return nil, err
8184 }
8185 return ret, nil
8186 }
8187
8188 type ProjectsLocationsRuntimesGetCall struct {
8189 s *Service
8190 name string
8191 urlParams_ gensupport.URLParams
8192 ifNoneMatch_ string
8193 ctx_ context.Context
8194 header_ http.Header
8195 }
8196
8197
8198
8199
8200
8201
8202 func (r *ProjectsLocationsRuntimesService) Get(name string) *ProjectsLocationsRuntimesGetCall {
8203 c := &ProjectsLocationsRuntimesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8204 c.name = name
8205 return c
8206 }
8207
8208
8209
8210
8211 func (c *ProjectsLocationsRuntimesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesGetCall {
8212 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8213 return c
8214 }
8215
8216
8217
8218
8219 func (c *ProjectsLocationsRuntimesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimesGetCall {
8220 c.ifNoneMatch_ = entityTag
8221 return c
8222 }
8223
8224
8225 func (c *ProjectsLocationsRuntimesGetCall) Context(ctx context.Context) *ProjectsLocationsRuntimesGetCall {
8226 c.ctx_ = ctx
8227 return c
8228 }
8229
8230
8231
8232 func (c *ProjectsLocationsRuntimesGetCall) Header() http.Header {
8233 if c.header_ == nil {
8234 c.header_ = make(http.Header)
8235 }
8236 return c.header_
8237 }
8238
8239 func (c *ProjectsLocationsRuntimesGetCall) doRequest(alt string) (*http.Response, error) {
8240 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8241 if c.ifNoneMatch_ != "" {
8242 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8243 }
8244 var body io.Reader = nil
8245 c.urlParams_.Set("alt", alt)
8246 c.urlParams_.Set("prettyPrint", "false")
8247 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8248 urls += "?" + c.urlParams_.Encode()
8249 req, err := http.NewRequest("GET", urls, body)
8250 if err != nil {
8251 return nil, err
8252 }
8253 req.Header = reqHeaders
8254 googleapi.Expand(req.URL, map[string]string{
8255 "name": c.name,
8256 })
8257 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8258 }
8259
8260
8261
8262
8263
8264
8265 func (c *ProjectsLocationsRuntimesGetCall) Do(opts ...googleapi.CallOption) (*Runtime, error) {
8266 gensupport.SetOptions(c.urlParams_, opts...)
8267 res, err := c.doRequest("json")
8268 if res != nil && res.StatusCode == http.StatusNotModified {
8269 if res.Body != nil {
8270 res.Body.Close()
8271 }
8272 return nil, gensupport.WrapError(&googleapi.Error{
8273 Code: res.StatusCode,
8274 Header: res.Header,
8275 })
8276 }
8277 if err != nil {
8278 return nil, err
8279 }
8280 defer googleapi.CloseBody(res)
8281 if err := googleapi.CheckResponse(res); err != nil {
8282 return nil, gensupport.WrapError(err)
8283 }
8284 ret := &Runtime{
8285 ServerResponse: googleapi.ServerResponse{
8286 Header: res.Header,
8287 HTTPStatusCode: res.StatusCode,
8288 },
8289 }
8290 target := &ret
8291 if err := gensupport.DecodeResponse(target, res); err != nil {
8292 return nil, err
8293 }
8294 return ret, nil
8295 }
8296
8297 type ProjectsLocationsRuntimesGetIamPolicyCall struct {
8298 s *Service
8299 resource string
8300 urlParams_ gensupport.URLParams
8301 ifNoneMatch_ string
8302 ctx_ context.Context
8303 header_ http.Header
8304 }
8305
8306
8307
8308
8309
8310
8311
8312 func (r *ProjectsLocationsRuntimesService) GetIamPolicy(resource string) *ProjectsLocationsRuntimesGetIamPolicyCall {
8313 c := &ProjectsLocationsRuntimesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8314 c.resource = resource
8315 return c
8316 }
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330 func (c *ProjectsLocationsRuntimesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRuntimesGetIamPolicyCall {
8331 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8332 return c
8333 }
8334
8335
8336
8337
8338 func (c *ProjectsLocationsRuntimesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesGetIamPolicyCall {
8339 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8340 return c
8341 }
8342
8343
8344
8345
8346 func (c *ProjectsLocationsRuntimesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimesGetIamPolicyCall {
8347 c.ifNoneMatch_ = entityTag
8348 return c
8349 }
8350
8351
8352 func (c *ProjectsLocationsRuntimesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRuntimesGetIamPolicyCall {
8353 c.ctx_ = ctx
8354 return c
8355 }
8356
8357
8358
8359 func (c *ProjectsLocationsRuntimesGetIamPolicyCall) Header() http.Header {
8360 if c.header_ == nil {
8361 c.header_ = make(http.Header)
8362 }
8363 return c.header_
8364 }
8365
8366 func (c *ProjectsLocationsRuntimesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8367 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8368 if c.ifNoneMatch_ != "" {
8369 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8370 }
8371 var body io.Reader = nil
8372 c.urlParams_.Set("alt", alt)
8373 c.urlParams_.Set("prettyPrint", "false")
8374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
8375 urls += "?" + c.urlParams_.Encode()
8376 req, err := http.NewRequest("GET", urls, body)
8377 if err != nil {
8378 return nil, err
8379 }
8380 req.Header = reqHeaders
8381 googleapi.Expand(req.URL, map[string]string{
8382 "resource": c.resource,
8383 })
8384 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8385 }
8386
8387
8388
8389
8390
8391
8392 func (c *ProjectsLocationsRuntimesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8393 gensupport.SetOptions(c.urlParams_, opts...)
8394 res, err := c.doRequest("json")
8395 if res != nil && res.StatusCode == http.StatusNotModified {
8396 if res.Body != nil {
8397 res.Body.Close()
8398 }
8399 return nil, gensupport.WrapError(&googleapi.Error{
8400 Code: res.StatusCode,
8401 Header: res.Header,
8402 })
8403 }
8404 if err != nil {
8405 return nil, err
8406 }
8407 defer googleapi.CloseBody(res)
8408 if err := googleapi.CheckResponse(res); err != nil {
8409 return nil, gensupport.WrapError(err)
8410 }
8411 ret := &Policy{
8412 ServerResponse: googleapi.ServerResponse{
8413 Header: res.Header,
8414 HTTPStatusCode: res.StatusCode,
8415 },
8416 }
8417 target := &ret
8418 if err := gensupport.DecodeResponse(target, res); err != nil {
8419 return nil, err
8420 }
8421 return ret, nil
8422 }
8423
8424 type ProjectsLocationsRuntimesListCall struct {
8425 s *Service
8426 parent string
8427 urlParams_ gensupport.URLParams
8428 ifNoneMatch_ string
8429 ctx_ context.Context
8430 header_ http.Header
8431 }
8432
8433
8434
8435
8436 func (r *ProjectsLocationsRuntimesService) List(parent string) *ProjectsLocationsRuntimesListCall {
8437 c := &ProjectsLocationsRuntimesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8438 c.parent = parent
8439 return c
8440 }
8441
8442
8443 func (c *ProjectsLocationsRuntimesListCall) Filter(filter string) *ProjectsLocationsRuntimesListCall {
8444 c.urlParams_.Set("filter", filter)
8445 return c
8446 }
8447
8448
8449
8450 func (c *ProjectsLocationsRuntimesListCall) OrderBy(orderBy string) *ProjectsLocationsRuntimesListCall {
8451 c.urlParams_.Set("orderBy", orderBy)
8452 return c
8453 }
8454
8455
8456
8457 func (c *ProjectsLocationsRuntimesListCall) PageSize(pageSize int64) *ProjectsLocationsRuntimesListCall {
8458 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8459 return c
8460 }
8461
8462
8463
8464 func (c *ProjectsLocationsRuntimesListCall) PageToken(pageToken string) *ProjectsLocationsRuntimesListCall {
8465 c.urlParams_.Set("pageToken", pageToken)
8466 return c
8467 }
8468
8469
8470
8471
8472 func (c *ProjectsLocationsRuntimesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesListCall {
8473 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8474 return c
8475 }
8476
8477
8478
8479
8480 func (c *ProjectsLocationsRuntimesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimesListCall {
8481 c.ifNoneMatch_ = entityTag
8482 return c
8483 }
8484
8485
8486 func (c *ProjectsLocationsRuntimesListCall) Context(ctx context.Context) *ProjectsLocationsRuntimesListCall {
8487 c.ctx_ = ctx
8488 return c
8489 }
8490
8491
8492
8493 func (c *ProjectsLocationsRuntimesListCall) Header() http.Header {
8494 if c.header_ == nil {
8495 c.header_ = make(http.Header)
8496 }
8497 return c.header_
8498 }
8499
8500 func (c *ProjectsLocationsRuntimesListCall) doRequest(alt string) (*http.Response, error) {
8501 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8502 if c.ifNoneMatch_ != "" {
8503 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8504 }
8505 var body io.Reader = nil
8506 c.urlParams_.Set("alt", alt)
8507 c.urlParams_.Set("prettyPrint", "false")
8508 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/runtimes")
8509 urls += "?" + c.urlParams_.Encode()
8510 req, err := http.NewRequest("GET", urls, body)
8511 if err != nil {
8512 return nil, err
8513 }
8514 req.Header = reqHeaders
8515 googleapi.Expand(req.URL, map[string]string{
8516 "parent": c.parent,
8517 })
8518 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8519 }
8520
8521
8522
8523
8524
8525
8526
8527 func (c *ProjectsLocationsRuntimesListCall) Do(opts ...googleapi.CallOption) (*ListRuntimesResponse, error) {
8528 gensupport.SetOptions(c.urlParams_, opts...)
8529 res, err := c.doRequest("json")
8530 if res != nil && res.StatusCode == http.StatusNotModified {
8531 if res.Body != nil {
8532 res.Body.Close()
8533 }
8534 return nil, gensupport.WrapError(&googleapi.Error{
8535 Code: res.StatusCode,
8536 Header: res.Header,
8537 })
8538 }
8539 if err != nil {
8540 return nil, err
8541 }
8542 defer googleapi.CloseBody(res)
8543 if err := googleapi.CheckResponse(res); err != nil {
8544 return nil, gensupport.WrapError(err)
8545 }
8546 ret := &ListRuntimesResponse{
8547 ServerResponse: googleapi.ServerResponse{
8548 Header: res.Header,
8549 HTTPStatusCode: res.StatusCode,
8550 },
8551 }
8552 target := &ret
8553 if err := gensupport.DecodeResponse(target, res); err != nil {
8554 return nil, err
8555 }
8556 return ret, nil
8557 }
8558
8559
8560
8561
8562 func (c *ProjectsLocationsRuntimesListCall) Pages(ctx context.Context, f func(*ListRuntimesResponse) error) error {
8563 c.ctx_ = ctx
8564 defer c.PageToken(c.urlParams_.Get("pageToken"))
8565 for {
8566 x, err := c.Do()
8567 if err != nil {
8568 return err
8569 }
8570 if err := f(x); err != nil {
8571 return err
8572 }
8573 if x.NextPageToken == "" {
8574 return nil
8575 }
8576 c.PageToken(x.NextPageToken)
8577 }
8578 }
8579
8580 type ProjectsLocationsRuntimesMigrateCall struct {
8581 s *Service
8582 name string
8583 migrateruntimerequest *MigrateRuntimeRequest
8584 urlParams_ gensupport.URLParams
8585 ctx_ context.Context
8586 header_ http.Header
8587 }
8588
8589
8590
8591
8592
8593 func (r *ProjectsLocationsRuntimesService) Migrate(name string, migrateruntimerequest *MigrateRuntimeRequest) *ProjectsLocationsRuntimesMigrateCall {
8594 c := &ProjectsLocationsRuntimesMigrateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8595 c.name = name
8596 c.migrateruntimerequest = migrateruntimerequest
8597 return c
8598 }
8599
8600
8601
8602
8603 func (c *ProjectsLocationsRuntimesMigrateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesMigrateCall {
8604 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8605 return c
8606 }
8607
8608
8609 func (c *ProjectsLocationsRuntimesMigrateCall) Context(ctx context.Context) *ProjectsLocationsRuntimesMigrateCall {
8610 c.ctx_ = ctx
8611 return c
8612 }
8613
8614
8615
8616 func (c *ProjectsLocationsRuntimesMigrateCall) Header() http.Header {
8617 if c.header_ == nil {
8618 c.header_ = make(http.Header)
8619 }
8620 return c.header_
8621 }
8622
8623 func (c *ProjectsLocationsRuntimesMigrateCall) doRequest(alt string) (*http.Response, error) {
8624 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8625 var body io.Reader = nil
8626 body, err := googleapi.WithoutDataWrapper.JSONReader(c.migrateruntimerequest)
8627 if err != nil {
8628 return nil, err
8629 }
8630 c.urlParams_.Set("alt", alt)
8631 c.urlParams_.Set("prettyPrint", "false")
8632 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:migrate")
8633 urls += "?" + c.urlParams_.Encode()
8634 req, err := http.NewRequest("POST", urls, body)
8635 if err != nil {
8636 return nil, err
8637 }
8638 req.Header = reqHeaders
8639 googleapi.Expand(req.URL, map[string]string{
8640 "name": c.name,
8641 })
8642 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8643 }
8644
8645
8646
8647
8648
8649
8650 func (c *ProjectsLocationsRuntimesMigrateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8651 gensupport.SetOptions(c.urlParams_, opts...)
8652 res, err := c.doRequest("json")
8653 if res != nil && res.StatusCode == http.StatusNotModified {
8654 if res.Body != nil {
8655 res.Body.Close()
8656 }
8657 return nil, gensupport.WrapError(&googleapi.Error{
8658 Code: res.StatusCode,
8659 Header: res.Header,
8660 })
8661 }
8662 if err != nil {
8663 return nil, err
8664 }
8665 defer googleapi.CloseBody(res)
8666 if err := googleapi.CheckResponse(res); err != nil {
8667 return nil, gensupport.WrapError(err)
8668 }
8669 ret := &Operation{
8670 ServerResponse: googleapi.ServerResponse{
8671 Header: res.Header,
8672 HTTPStatusCode: res.StatusCode,
8673 },
8674 }
8675 target := &ret
8676 if err := gensupport.DecodeResponse(target, res); err != nil {
8677 return nil, err
8678 }
8679 return ret, nil
8680 }
8681
8682 type ProjectsLocationsRuntimesPatchCall struct {
8683 s *Service
8684 name string
8685 runtime *Runtime
8686 urlParams_ gensupport.URLParams
8687 ctx_ context.Context
8688 header_ http.Header
8689 }
8690
8691
8692
8693
8694
8695 func (r *ProjectsLocationsRuntimesService) Patch(name string, runtime *Runtime) *ProjectsLocationsRuntimesPatchCall {
8696 c := &ProjectsLocationsRuntimesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8697 c.name = name
8698 c.runtime = runtime
8699 return c
8700 }
8701
8702
8703 func (c *ProjectsLocationsRuntimesPatchCall) RequestId(requestId string) *ProjectsLocationsRuntimesPatchCall {
8704 c.urlParams_.Set("requestId", requestId)
8705 return c
8706 }
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719 func (c *ProjectsLocationsRuntimesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRuntimesPatchCall {
8720 c.urlParams_.Set("updateMask", updateMask)
8721 return c
8722 }
8723
8724
8725
8726
8727 func (c *ProjectsLocationsRuntimesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesPatchCall {
8728 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8729 return c
8730 }
8731
8732
8733 func (c *ProjectsLocationsRuntimesPatchCall) Context(ctx context.Context) *ProjectsLocationsRuntimesPatchCall {
8734 c.ctx_ = ctx
8735 return c
8736 }
8737
8738
8739
8740 func (c *ProjectsLocationsRuntimesPatchCall) Header() http.Header {
8741 if c.header_ == nil {
8742 c.header_ = make(http.Header)
8743 }
8744 return c.header_
8745 }
8746
8747 func (c *ProjectsLocationsRuntimesPatchCall) doRequest(alt string) (*http.Response, error) {
8748 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8749 var body io.Reader = nil
8750 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runtime)
8751 if err != nil {
8752 return nil, err
8753 }
8754 c.urlParams_.Set("alt", alt)
8755 c.urlParams_.Set("prettyPrint", "false")
8756 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8757 urls += "?" + c.urlParams_.Encode()
8758 req, err := http.NewRequest("PATCH", urls, body)
8759 if err != nil {
8760 return nil, err
8761 }
8762 req.Header = reqHeaders
8763 googleapi.Expand(req.URL, map[string]string{
8764 "name": c.name,
8765 })
8766 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8767 }
8768
8769
8770
8771
8772
8773
8774 func (c *ProjectsLocationsRuntimesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8775 gensupport.SetOptions(c.urlParams_, opts...)
8776 res, err := c.doRequest("json")
8777 if res != nil && res.StatusCode == http.StatusNotModified {
8778 if res.Body != nil {
8779 res.Body.Close()
8780 }
8781 return nil, gensupport.WrapError(&googleapi.Error{
8782 Code: res.StatusCode,
8783 Header: res.Header,
8784 })
8785 }
8786 if err != nil {
8787 return nil, err
8788 }
8789 defer googleapi.CloseBody(res)
8790 if err := googleapi.CheckResponse(res); err != nil {
8791 return nil, gensupport.WrapError(err)
8792 }
8793 ret := &Operation{
8794 ServerResponse: googleapi.ServerResponse{
8795 Header: res.Header,
8796 HTTPStatusCode: res.StatusCode,
8797 },
8798 }
8799 target := &ret
8800 if err := gensupport.DecodeResponse(target, res); err != nil {
8801 return nil, err
8802 }
8803 return ret, nil
8804 }
8805
8806 type ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall struct {
8807 s *Service
8808 name string
8809 refreshruntimetokeninternalrequest *RefreshRuntimeTokenInternalRequest
8810 urlParams_ gensupport.URLParams
8811 ctx_ context.Context
8812 header_ http.Header
8813 }
8814
8815
8816
8817
8818
8819
8820
8821 func (r *ProjectsLocationsRuntimesService) RefreshRuntimeTokenInternal(name string, refreshruntimetokeninternalrequest *RefreshRuntimeTokenInternalRequest) *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall {
8822 c := &ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8823 c.name = name
8824 c.refreshruntimetokeninternalrequest = refreshruntimetokeninternalrequest
8825 return c
8826 }
8827
8828
8829
8830
8831 func (c *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall {
8832 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8833 return c
8834 }
8835
8836
8837 func (c *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) Context(ctx context.Context) *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall {
8838 c.ctx_ = ctx
8839 return c
8840 }
8841
8842
8843
8844 func (c *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) Header() http.Header {
8845 if c.header_ == nil {
8846 c.header_ = make(http.Header)
8847 }
8848 return c.header_
8849 }
8850
8851 func (c *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) doRequest(alt string) (*http.Response, error) {
8852 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8853 var body io.Reader = nil
8854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.refreshruntimetokeninternalrequest)
8855 if err != nil {
8856 return nil, err
8857 }
8858 c.urlParams_.Set("alt", alt)
8859 c.urlParams_.Set("prettyPrint", "false")
8860 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:refreshRuntimeTokenInternal")
8861 urls += "?" + c.urlParams_.Encode()
8862 req, err := http.NewRequest("POST", urls, body)
8863 if err != nil {
8864 return nil, err
8865 }
8866 req.Header = reqHeaders
8867 googleapi.Expand(req.URL, map[string]string{
8868 "name": c.name,
8869 })
8870 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8871 }
8872
8873
8874
8875
8876
8877
8878
8879 func (c *ProjectsLocationsRuntimesRefreshRuntimeTokenInternalCall) Do(opts ...googleapi.CallOption) (*RefreshRuntimeTokenInternalResponse, error) {
8880 gensupport.SetOptions(c.urlParams_, opts...)
8881 res, err := c.doRequest("json")
8882 if res != nil && res.StatusCode == http.StatusNotModified {
8883 if res.Body != nil {
8884 res.Body.Close()
8885 }
8886 return nil, gensupport.WrapError(&googleapi.Error{
8887 Code: res.StatusCode,
8888 Header: res.Header,
8889 })
8890 }
8891 if err != nil {
8892 return nil, err
8893 }
8894 defer googleapi.CloseBody(res)
8895 if err := googleapi.CheckResponse(res); err != nil {
8896 return nil, gensupport.WrapError(err)
8897 }
8898 ret := &RefreshRuntimeTokenInternalResponse{
8899 ServerResponse: googleapi.ServerResponse{
8900 Header: res.Header,
8901 HTTPStatusCode: res.StatusCode,
8902 },
8903 }
8904 target := &ret
8905 if err := gensupport.DecodeResponse(target, res); err != nil {
8906 return nil, err
8907 }
8908 return ret, nil
8909 }
8910
8911 type ProjectsLocationsRuntimesReportEventCall struct {
8912 s *Service
8913 name string
8914 reportruntimeeventrequest *ReportRuntimeEventRequest
8915 urlParams_ gensupport.URLParams
8916 ctx_ context.Context
8917 header_ http.Header
8918 }
8919
8920
8921
8922
8923
8924 func (r *ProjectsLocationsRuntimesService) ReportEvent(name string, reportruntimeeventrequest *ReportRuntimeEventRequest) *ProjectsLocationsRuntimesReportEventCall {
8925 c := &ProjectsLocationsRuntimesReportEventCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8926 c.name = name
8927 c.reportruntimeeventrequest = reportruntimeeventrequest
8928 return c
8929 }
8930
8931
8932
8933
8934 func (c *ProjectsLocationsRuntimesReportEventCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesReportEventCall {
8935 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8936 return c
8937 }
8938
8939
8940 func (c *ProjectsLocationsRuntimesReportEventCall) Context(ctx context.Context) *ProjectsLocationsRuntimesReportEventCall {
8941 c.ctx_ = ctx
8942 return c
8943 }
8944
8945
8946
8947 func (c *ProjectsLocationsRuntimesReportEventCall) Header() http.Header {
8948 if c.header_ == nil {
8949 c.header_ = make(http.Header)
8950 }
8951 return c.header_
8952 }
8953
8954 func (c *ProjectsLocationsRuntimesReportEventCall) doRequest(alt string) (*http.Response, error) {
8955 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8956 var body io.Reader = nil
8957 body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportruntimeeventrequest)
8958 if err != nil {
8959 return nil, err
8960 }
8961 c.urlParams_.Set("alt", alt)
8962 c.urlParams_.Set("prettyPrint", "false")
8963 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reportEvent")
8964 urls += "?" + c.urlParams_.Encode()
8965 req, err := http.NewRequest("POST", urls, body)
8966 if err != nil {
8967 return nil, err
8968 }
8969 req.Header = reqHeaders
8970 googleapi.Expand(req.URL, map[string]string{
8971 "name": c.name,
8972 })
8973 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8974 }
8975
8976
8977
8978
8979
8980
8981 func (c *ProjectsLocationsRuntimesReportEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8982 gensupport.SetOptions(c.urlParams_, opts...)
8983 res, err := c.doRequest("json")
8984 if res != nil && res.StatusCode == http.StatusNotModified {
8985 if res.Body != nil {
8986 res.Body.Close()
8987 }
8988 return nil, gensupport.WrapError(&googleapi.Error{
8989 Code: res.StatusCode,
8990 Header: res.Header,
8991 })
8992 }
8993 if err != nil {
8994 return nil, err
8995 }
8996 defer googleapi.CloseBody(res)
8997 if err := googleapi.CheckResponse(res); err != nil {
8998 return nil, gensupport.WrapError(err)
8999 }
9000 ret := &Operation{
9001 ServerResponse: googleapi.ServerResponse{
9002 Header: res.Header,
9003 HTTPStatusCode: res.StatusCode,
9004 },
9005 }
9006 target := &ret
9007 if err := gensupport.DecodeResponse(target, res); err != nil {
9008 return nil, err
9009 }
9010 return ret, nil
9011 }
9012
9013 type ProjectsLocationsRuntimesResetCall struct {
9014 s *Service
9015 name string
9016 resetruntimerequest *ResetRuntimeRequest
9017 urlParams_ gensupport.URLParams
9018 ctx_ context.Context
9019 header_ http.Header
9020 }
9021
9022
9023
9024
9025
9026 func (r *ProjectsLocationsRuntimesService) Reset(name string, resetruntimerequest *ResetRuntimeRequest) *ProjectsLocationsRuntimesResetCall {
9027 c := &ProjectsLocationsRuntimesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9028 c.name = name
9029 c.resetruntimerequest = resetruntimerequest
9030 return c
9031 }
9032
9033
9034
9035
9036 func (c *ProjectsLocationsRuntimesResetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesResetCall {
9037 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9038 return c
9039 }
9040
9041
9042 func (c *ProjectsLocationsRuntimesResetCall) Context(ctx context.Context) *ProjectsLocationsRuntimesResetCall {
9043 c.ctx_ = ctx
9044 return c
9045 }
9046
9047
9048
9049 func (c *ProjectsLocationsRuntimesResetCall) Header() http.Header {
9050 if c.header_ == nil {
9051 c.header_ = make(http.Header)
9052 }
9053 return c.header_
9054 }
9055
9056 func (c *ProjectsLocationsRuntimesResetCall) doRequest(alt string) (*http.Response, error) {
9057 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9058 var body io.Reader = nil
9059 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resetruntimerequest)
9060 if err != nil {
9061 return nil, err
9062 }
9063 c.urlParams_.Set("alt", alt)
9064 c.urlParams_.Set("prettyPrint", "false")
9065 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reset")
9066 urls += "?" + c.urlParams_.Encode()
9067 req, err := http.NewRequest("POST", urls, body)
9068 if err != nil {
9069 return nil, err
9070 }
9071 req.Header = reqHeaders
9072 googleapi.Expand(req.URL, map[string]string{
9073 "name": c.name,
9074 })
9075 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9076 }
9077
9078
9079
9080
9081
9082
9083 func (c *ProjectsLocationsRuntimesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9084 gensupport.SetOptions(c.urlParams_, opts...)
9085 res, err := c.doRequest("json")
9086 if res != nil && res.StatusCode == http.StatusNotModified {
9087 if res.Body != nil {
9088 res.Body.Close()
9089 }
9090 return nil, gensupport.WrapError(&googleapi.Error{
9091 Code: res.StatusCode,
9092 Header: res.Header,
9093 })
9094 }
9095 if err != nil {
9096 return nil, err
9097 }
9098 defer googleapi.CloseBody(res)
9099 if err := googleapi.CheckResponse(res); err != nil {
9100 return nil, gensupport.WrapError(err)
9101 }
9102 ret := &Operation{
9103 ServerResponse: googleapi.ServerResponse{
9104 Header: res.Header,
9105 HTTPStatusCode: res.StatusCode,
9106 },
9107 }
9108 target := &ret
9109 if err := gensupport.DecodeResponse(target, res); err != nil {
9110 return nil, err
9111 }
9112 return ret, nil
9113 }
9114
9115 type ProjectsLocationsRuntimesSetIamPolicyCall struct {
9116 s *Service
9117 resource string
9118 setiampolicyrequest *SetIamPolicyRequest
9119 urlParams_ gensupport.URLParams
9120 ctx_ context.Context
9121 header_ http.Header
9122 }
9123
9124
9125
9126
9127
9128
9129
9130
9131 func (r *ProjectsLocationsRuntimesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRuntimesSetIamPolicyCall {
9132 c := &ProjectsLocationsRuntimesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9133 c.resource = resource
9134 c.setiampolicyrequest = setiampolicyrequest
9135 return c
9136 }
9137
9138
9139
9140
9141 func (c *ProjectsLocationsRuntimesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesSetIamPolicyCall {
9142 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9143 return c
9144 }
9145
9146
9147 func (c *ProjectsLocationsRuntimesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRuntimesSetIamPolicyCall {
9148 c.ctx_ = ctx
9149 return c
9150 }
9151
9152
9153
9154 func (c *ProjectsLocationsRuntimesSetIamPolicyCall) Header() http.Header {
9155 if c.header_ == nil {
9156 c.header_ = make(http.Header)
9157 }
9158 return c.header_
9159 }
9160
9161 func (c *ProjectsLocationsRuntimesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9162 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9163 var body io.Reader = nil
9164 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
9165 if err != nil {
9166 return nil, err
9167 }
9168 c.urlParams_.Set("alt", alt)
9169 c.urlParams_.Set("prettyPrint", "false")
9170 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
9171 urls += "?" + c.urlParams_.Encode()
9172 req, err := http.NewRequest("POST", urls, body)
9173 if err != nil {
9174 return nil, err
9175 }
9176 req.Header = reqHeaders
9177 googleapi.Expand(req.URL, map[string]string{
9178 "resource": c.resource,
9179 })
9180 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9181 }
9182
9183
9184
9185
9186
9187
9188 func (c *ProjectsLocationsRuntimesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9189 gensupport.SetOptions(c.urlParams_, opts...)
9190 res, err := c.doRequest("json")
9191 if res != nil && res.StatusCode == http.StatusNotModified {
9192 if res.Body != nil {
9193 res.Body.Close()
9194 }
9195 return nil, gensupport.WrapError(&googleapi.Error{
9196 Code: res.StatusCode,
9197 Header: res.Header,
9198 })
9199 }
9200 if err != nil {
9201 return nil, err
9202 }
9203 defer googleapi.CloseBody(res)
9204 if err := googleapi.CheckResponse(res); err != nil {
9205 return nil, gensupport.WrapError(err)
9206 }
9207 ret := &Policy{
9208 ServerResponse: googleapi.ServerResponse{
9209 Header: res.Header,
9210 HTTPStatusCode: res.StatusCode,
9211 },
9212 }
9213 target := &ret
9214 if err := gensupport.DecodeResponse(target, res); err != nil {
9215 return nil, err
9216 }
9217 return ret, nil
9218 }
9219
9220 type ProjectsLocationsRuntimesStartCall struct {
9221 s *Service
9222 name string
9223 startruntimerequest *StartRuntimeRequest
9224 urlParams_ gensupport.URLParams
9225 ctx_ context.Context
9226 header_ http.Header
9227 }
9228
9229
9230
9231
9232
9233
9234
9235
9236 func (r *ProjectsLocationsRuntimesService) Start(name string, startruntimerequest *StartRuntimeRequest) *ProjectsLocationsRuntimesStartCall {
9237 c := &ProjectsLocationsRuntimesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9238 c.name = name
9239 c.startruntimerequest = startruntimerequest
9240 return c
9241 }
9242
9243
9244
9245
9246 func (c *ProjectsLocationsRuntimesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesStartCall {
9247 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9248 return c
9249 }
9250
9251
9252 func (c *ProjectsLocationsRuntimesStartCall) Context(ctx context.Context) *ProjectsLocationsRuntimesStartCall {
9253 c.ctx_ = ctx
9254 return c
9255 }
9256
9257
9258
9259 func (c *ProjectsLocationsRuntimesStartCall) Header() http.Header {
9260 if c.header_ == nil {
9261 c.header_ = make(http.Header)
9262 }
9263 return c.header_
9264 }
9265
9266 func (c *ProjectsLocationsRuntimesStartCall) doRequest(alt string) (*http.Response, error) {
9267 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9268 var body io.Reader = nil
9269 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startruntimerequest)
9270 if err != nil {
9271 return nil, err
9272 }
9273 c.urlParams_.Set("alt", alt)
9274 c.urlParams_.Set("prettyPrint", "false")
9275 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start")
9276 urls += "?" + c.urlParams_.Encode()
9277 req, err := http.NewRequest("POST", urls, body)
9278 if err != nil {
9279 return nil, err
9280 }
9281 req.Header = reqHeaders
9282 googleapi.Expand(req.URL, map[string]string{
9283 "name": c.name,
9284 })
9285 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9286 }
9287
9288
9289
9290
9291
9292
9293 func (c *ProjectsLocationsRuntimesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9294 gensupport.SetOptions(c.urlParams_, opts...)
9295 res, err := c.doRequest("json")
9296 if res != nil && res.StatusCode == http.StatusNotModified {
9297 if res.Body != nil {
9298 res.Body.Close()
9299 }
9300 return nil, gensupport.WrapError(&googleapi.Error{
9301 Code: res.StatusCode,
9302 Header: res.Header,
9303 })
9304 }
9305 if err != nil {
9306 return nil, err
9307 }
9308 defer googleapi.CloseBody(res)
9309 if err := googleapi.CheckResponse(res); err != nil {
9310 return nil, gensupport.WrapError(err)
9311 }
9312 ret := &Operation{
9313 ServerResponse: googleapi.ServerResponse{
9314 Header: res.Header,
9315 HTTPStatusCode: res.StatusCode,
9316 },
9317 }
9318 target := &ret
9319 if err := gensupport.DecodeResponse(target, res); err != nil {
9320 return nil, err
9321 }
9322 return ret, nil
9323 }
9324
9325 type ProjectsLocationsRuntimesStopCall struct {
9326 s *Service
9327 name string
9328 stopruntimerequest *StopRuntimeRequest
9329 urlParams_ gensupport.URLParams
9330 ctx_ context.Context
9331 header_ http.Header
9332 }
9333
9334
9335
9336
9337
9338
9339
9340
9341 func (r *ProjectsLocationsRuntimesService) Stop(name string, stopruntimerequest *StopRuntimeRequest) *ProjectsLocationsRuntimesStopCall {
9342 c := &ProjectsLocationsRuntimesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9343 c.name = name
9344 c.stopruntimerequest = stopruntimerequest
9345 return c
9346 }
9347
9348
9349
9350
9351 func (c *ProjectsLocationsRuntimesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesStopCall {
9352 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9353 return c
9354 }
9355
9356
9357 func (c *ProjectsLocationsRuntimesStopCall) Context(ctx context.Context) *ProjectsLocationsRuntimesStopCall {
9358 c.ctx_ = ctx
9359 return c
9360 }
9361
9362
9363
9364 func (c *ProjectsLocationsRuntimesStopCall) Header() http.Header {
9365 if c.header_ == nil {
9366 c.header_ = make(http.Header)
9367 }
9368 return c.header_
9369 }
9370
9371 func (c *ProjectsLocationsRuntimesStopCall) doRequest(alt string) (*http.Response, error) {
9372 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9373 var body io.Reader = nil
9374 body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopruntimerequest)
9375 if err != nil {
9376 return nil, err
9377 }
9378 c.urlParams_.Set("alt", alt)
9379 c.urlParams_.Set("prettyPrint", "false")
9380 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop")
9381 urls += "?" + c.urlParams_.Encode()
9382 req, err := http.NewRequest("POST", urls, body)
9383 if err != nil {
9384 return nil, err
9385 }
9386 req.Header = reqHeaders
9387 googleapi.Expand(req.URL, map[string]string{
9388 "name": c.name,
9389 })
9390 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9391 }
9392
9393
9394
9395
9396
9397
9398 func (c *ProjectsLocationsRuntimesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9399 gensupport.SetOptions(c.urlParams_, opts...)
9400 res, err := c.doRequest("json")
9401 if res != nil && res.StatusCode == http.StatusNotModified {
9402 if res.Body != nil {
9403 res.Body.Close()
9404 }
9405 return nil, gensupport.WrapError(&googleapi.Error{
9406 Code: res.StatusCode,
9407 Header: res.Header,
9408 })
9409 }
9410 if err != nil {
9411 return nil, err
9412 }
9413 defer googleapi.CloseBody(res)
9414 if err := googleapi.CheckResponse(res); err != nil {
9415 return nil, gensupport.WrapError(err)
9416 }
9417 ret := &Operation{
9418 ServerResponse: googleapi.ServerResponse{
9419 Header: res.Header,
9420 HTTPStatusCode: res.StatusCode,
9421 },
9422 }
9423 target := &ret
9424 if err := gensupport.DecodeResponse(target, res); err != nil {
9425 return nil, err
9426 }
9427 return ret, nil
9428 }
9429
9430 type ProjectsLocationsRuntimesSwitchCall struct {
9431 s *Service
9432 name string
9433 switchruntimerequest *SwitchRuntimeRequest
9434 urlParams_ gensupport.URLParams
9435 ctx_ context.Context
9436 header_ http.Header
9437 }
9438
9439
9440
9441
9442
9443 func (r *ProjectsLocationsRuntimesService) Switch(name string, switchruntimerequest *SwitchRuntimeRequest) *ProjectsLocationsRuntimesSwitchCall {
9444 c := &ProjectsLocationsRuntimesSwitchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9445 c.name = name
9446 c.switchruntimerequest = switchruntimerequest
9447 return c
9448 }
9449
9450
9451
9452
9453 func (c *ProjectsLocationsRuntimesSwitchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesSwitchCall {
9454 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9455 return c
9456 }
9457
9458
9459 func (c *ProjectsLocationsRuntimesSwitchCall) Context(ctx context.Context) *ProjectsLocationsRuntimesSwitchCall {
9460 c.ctx_ = ctx
9461 return c
9462 }
9463
9464
9465
9466 func (c *ProjectsLocationsRuntimesSwitchCall) Header() http.Header {
9467 if c.header_ == nil {
9468 c.header_ = make(http.Header)
9469 }
9470 return c.header_
9471 }
9472
9473 func (c *ProjectsLocationsRuntimesSwitchCall) doRequest(alt string) (*http.Response, error) {
9474 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9475 var body io.Reader = nil
9476 body, err := googleapi.WithoutDataWrapper.JSONReader(c.switchruntimerequest)
9477 if err != nil {
9478 return nil, err
9479 }
9480 c.urlParams_.Set("alt", alt)
9481 c.urlParams_.Set("prettyPrint", "false")
9482 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:switch")
9483 urls += "?" + c.urlParams_.Encode()
9484 req, err := http.NewRequest("POST", urls, body)
9485 if err != nil {
9486 return nil, err
9487 }
9488 req.Header = reqHeaders
9489 googleapi.Expand(req.URL, map[string]string{
9490 "name": c.name,
9491 })
9492 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9493 }
9494
9495
9496
9497
9498
9499
9500 func (c *ProjectsLocationsRuntimesSwitchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9501 gensupport.SetOptions(c.urlParams_, opts...)
9502 res, err := c.doRequest("json")
9503 if res != nil && res.StatusCode == http.StatusNotModified {
9504 if res.Body != nil {
9505 res.Body.Close()
9506 }
9507 return nil, gensupport.WrapError(&googleapi.Error{
9508 Code: res.StatusCode,
9509 Header: res.Header,
9510 })
9511 }
9512 if err != nil {
9513 return nil, err
9514 }
9515 defer googleapi.CloseBody(res)
9516 if err := googleapi.CheckResponse(res); err != nil {
9517 return nil, gensupport.WrapError(err)
9518 }
9519 ret := &Operation{
9520 ServerResponse: googleapi.ServerResponse{
9521 Header: res.Header,
9522 HTTPStatusCode: res.StatusCode,
9523 },
9524 }
9525 target := &ret
9526 if err := gensupport.DecodeResponse(target, res); err != nil {
9527 return nil, err
9528 }
9529 return ret, nil
9530 }
9531
9532 type ProjectsLocationsRuntimesTestIamPermissionsCall struct {
9533 s *Service
9534 resource string
9535 testiampermissionsrequest *TestIamPermissionsRequest
9536 urlParams_ gensupport.URLParams
9537 ctx_ context.Context
9538 header_ http.Header
9539 }
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551 func (r *ProjectsLocationsRuntimesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRuntimesTestIamPermissionsCall {
9552 c := &ProjectsLocationsRuntimesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9553 c.resource = resource
9554 c.testiampermissionsrequest = testiampermissionsrequest
9555 return c
9556 }
9557
9558
9559
9560
9561 func (c *ProjectsLocationsRuntimesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesTestIamPermissionsCall {
9562 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9563 return c
9564 }
9565
9566
9567 func (c *ProjectsLocationsRuntimesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRuntimesTestIamPermissionsCall {
9568 c.ctx_ = ctx
9569 return c
9570 }
9571
9572
9573
9574 func (c *ProjectsLocationsRuntimesTestIamPermissionsCall) Header() http.Header {
9575 if c.header_ == nil {
9576 c.header_ = make(http.Header)
9577 }
9578 return c.header_
9579 }
9580
9581 func (c *ProjectsLocationsRuntimesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9582 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9583 var body io.Reader = nil
9584 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
9585 if err != nil {
9586 return nil, err
9587 }
9588 c.urlParams_.Set("alt", alt)
9589 c.urlParams_.Set("prettyPrint", "false")
9590 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
9591 urls += "?" + c.urlParams_.Encode()
9592 req, err := http.NewRequest("POST", urls, body)
9593 if err != nil {
9594 return nil, err
9595 }
9596 req.Header = reqHeaders
9597 googleapi.Expand(req.URL, map[string]string{
9598 "resource": c.resource,
9599 })
9600 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9601 }
9602
9603
9604
9605
9606
9607
9608
9609 func (c *ProjectsLocationsRuntimesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
9610 gensupport.SetOptions(c.urlParams_, opts...)
9611 res, err := c.doRequest("json")
9612 if res != nil && res.StatusCode == http.StatusNotModified {
9613 if res.Body != nil {
9614 res.Body.Close()
9615 }
9616 return nil, gensupport.WrapError(&googleapi.Error{
9617 Code: res.StatusCode,
9618 Header: res.Header,
9619 })
9620 }
9621 if err != nil {
9622 return nil, err
9623 }
9624 defer googleapi.CloseBody(res)
9625 if err := googleapi.CheckResponse(res); err != nil {
9626 return nil, gensupport.WrapError(err)
9627 }
9628 ret := &TestIamPermissionsResponse{
9629 ServerResponse: googleapi.ServerResponse{
9630 Header: res.Header,
9631 HTTPStatusCode: res.StatusCode,
9632 },
9633 }
9634 target := &ret
9635 if err := gensupport.DecodeResponse(target, res); err != nil {
9636 return nil, err
9637 }
9638 return ret, nil
9639 }
9640
9641 type ProjectsLocationsRuntimesUpgradeCall struct {
9642 s *Service
9643 name string
9644 upgraderuntimerequest *UpgradeRuntimeRequest
9645 urlParams_ gensupport.URLParams
9646 ctx_ context.Context
9647 header_ http.Header
9648 }
9649
9650
9651
9652
9653
9654 func (r *ProjectsLocationsRuntimesService) Upgrade(name string, upgraderuntimerequest *UpgradeRuntimeRequest) *ProjectsLocationsRuntimesUpgradeCall {
9655 c := &ProjectsLocationsRuntimesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9656 c.name = name
9657 c.upgraderuntimerequest = upgraderuntimerequest
9658 return c
9659 }
9660
9661
9662
9663
9664 func (c *ProjectsLocationsRuntimesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesUpgradeCall {
9665 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9666 return c
9667 }
9668
9669
9670 func (c *ProjectsLocationsRuntimesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsRuntimesUpgradeCall {
9671 c.ctx_ = ctx
9672 return c
9673 }
9674
9675
9676
9677 func (c *ProjectsLocationsRuntimesUpgradeCall) Header() http.Header {
9678 if c.header_ == nil {
9679 c.header_ = make(http.Header)
9680 }
9681 return c.header_
9682 }
9683
9684 func (c *ProjectsLocationsRuntimesUpgradeCall) doRequest(alt string) (*http.Response, error) {
9685 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9686 var body io.Reader = nil
9687 body, err := googleapi.WithoutDataWrapper.JSONReader(c.upgraderuntimerequest)
9688 if err != nil {
9689 return nil, err
9690 }
9691 c.urlParams_.Set("alt", alt)
9692 c.urlParams_.Set("prettyPrint", "false")
9693 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:upgrade")
9694 urls += "?" + c.urlParams_.Encode()
9695 req, err := http.NewRequest("POST", urls, body)
9696 if err != nil {
9697 return nil, err
9698 }
9699 req.Header = reqHeaders
9700 googleapi.Expand(req.URL, map[string]string{
9701 "name": c.name,
9702 })
9703 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9704 }
9705
9706
9707
9708
9709
9710
9711 func (c *ProjectsLocationsRuntimesUpgradeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9712 gensupport.SetOptions(c.urlParams_, opts...)
9713 res, err := c.doRequest("json")
9714 if res != nil && res.StatusCode == http.StatusNotModified {
9715 if res.Body != nil {
9716 res.Body.Close()
9717 }
9718 return nil, gensupport.WrapError(&googleapi.Error{
9719 Code: res.StatusCode,
9720 Header: res.Header,
9721 })
9722 }
9723 if err != nil {
9724 return nil, err
9725 }
9726 defer googleapi.CloseBody(res)
9727 if err := googleapi.CheckResponse(res); err != nil {
9728 return nil, gensupport.WrapError(err)
9729 }
9730 ret := &Operation{
9731 ServerResponse: googleapi.ServerResponse{
9732 Header: res.Header,
9733 HTTPStatusCode: res.StatusCode,
9734 },
9735 }
9736 target := &ret
9737 if err := gensupport.DecodeResponse(target, res); err != nil {
9738 return nil, err
9739 }
9740 return ret, nil
9741 }
9742
9743 type ProjectsLocationsSchedulesCreateCall struct {
9744 s *Service
9745 parent string
9746 schedule *Schedule
9747 urlParams_ gensupport.URLParams
9748 ctx_ context.Context
9749 header_ http.Header
9750 }
9751
9752
9753
9754
9755 func (r *ProjectsLocationsSchedulesService) Create(parent string, schedule *Schedule) *ProjectsLocationsSchedulesCreateCall {
9756 c := &ProjectsLocationsSchedulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9757 c.parent = parent
9758 c.schedule = schedule
9759 return c
9760 }
9761
9762
9763
9764 func (c *ProjectsLocationsSchedulesCreateCall) ScheduleId(scheduleId string) *ProjectsLocationsSchedulesCreateCall {
9765 c.urlParams_.Set("scheduleId", scheduleId)
9766 return c
9767 }
9768
9769
9770
9771
9772 func (c *ProjectsLocationsSchedulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSchedulesCreateCall {
9773 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9774 return c
9775 }
9776
9777
9778 func (c *ProjectsLocationsSchedulesCreateCall) Context(ctx context.Context) *ProjectsLocationsSchedulesCreateCall {
9779 c.ctx_ = ctx
9780 return c
9781 }
9782
9783
9784
9785 func (c *ProjectsLocationsSchedulesCreateCall) Header() http.Header {
9786 if c.header_ == nil {
9787 c.header_ = make(http.Header)
9788 }
9789 return c.header_
9790 }
9791
9792 func (c *ProjectsLocationsSchedulesCreateCall) doRequest(alt string) (*http.Response, error) {
9793 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9794 var body io.Reader = nil
9795 body, err := googleapi.WithoutDataWrapper.JSONReader(c.schedule)
9796 if err != nil {
9797 return nil, err
9798 }
9799 c.urlParams_.Set("alt", alt)
9800 c.urlParams_.Set("prettyPrint", "false")
9801 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/schedules")
9802 urls += "?" + c.urlParams_.Encode()
9803 req, err := http.NewRequest("POST", urls, body)
9804 if err != nil {
9805 return nil, err
9806 }
9807 req.Header = reqHeaders
9808 googleapi.Expand(req.URL, map[string]string{
9809 "parent": c.parent,
9810 })
9811 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9812 }
9813
9814
9815
9816
9817
9818
9819 func (c *ProjectsLocationsSchedulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9820 gensupport.SetOptions(c.urlParams_, opts...)
9821 res, err := c.doRequest("json")
9822 if res != nil && res.StatusCode == http.StatusNotModified {
9823 if res.Body != nil {
9824 res.Body.Close()
9825 }
9826 return nil, gensupport.WrapError(&googleapi.Error{
9827 Code: res.StatusCode,
9828 Header: res.Header,
9829 })
9830 }
9831 if err != nil {
9832 return nil, err
9833 }
9834 defer googleapi.CloseBody(res)
9835 if err := googleapi.CheckResponse(res); err != nil {
9836 return nil, gensupport.WrapError(err)
9837 }
9838 ret := &Operation{
9839 ServerResponse: googleapi.ServerResponse{
9840 Header: res.Header,
9841 HTTPStatusCode: res.StatusCode,
9842 },
9843 }
9844 target := &ret
9845 if err := gensupport.DecodeResponse(target, res); err != nil {
9846 return nil, err
9847 }
9848 return ret, nil
9849 }
9850
9851 type ProjectsLocationsSchedulesDeleteCall struct {
9852 s *Service
9853 name string
9854 urlParams_ gensupport.URLParams
9855 ctx_ context.Context
9856 header_ http.Header
9857 }
9858
9859
9860
9861
9862
9863 func (r *ProjectsLocationsSchedulesService) Delete(name string) *ProjectsLocationsSchedulesDeleteCall {
9864 c := &ProjectsLocationsSchedulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9865 c.name = name
9866 return c
9867 }
9868
9869
9870
9871
9872 func (c *ProjectsLocationsSchedulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSchedulesDeleteCall {
9873 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9874 return c
9875 }
9876
9877
9878 func (c *ProjectsLocationsSchedulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSchedulesDeleteCall {
9879 c.ctx_ = ctx
9880 return c
9881 }
9882
9883
9884
9885 func (c *ProjectsLocationsSchedulesDeleteCall) Header() http.Header {
9886 if c.header_ == nil {
9887 c.header_ = make(http.Header)
9888 }
9889 return c.header_
9890 }
9891
9892 func (c *ProjectsLocationsSchedulesDeleteCall) doRequest(alt string) (*http.Response, error) {
9893 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9894 var body io.Reader = nil
9895 c.urlParams_.Set("alt", alt)
9896 c.urlParams_.Set("prettyPrint", "false")
9897 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9898 urls += "?" + c.urlParams_.Encode()
9899 req, err := http.NewRequest("DELETE", urls, body)
9900 if err != nil {
9901 return nil, err
9902 }
9903 req.Header = reqHeaders
9904 googleapi.Expand(req.URL, map[string]string{
9905 "name": c.name,
9906 })
9907 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9908 }
9909
9910
9911
9912
9913
9914
9915 func (c *ProjectsLocationsSchedulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9916 gensupport.SetOptions(c.urlParams_, opts...)
9917 res, err := c.doRequest("json")
9918 if res != nil && res.StatusCode == http.StatusNotModified {
9919 if res.Body != nil {
9920 res.Body.Close()
9921 }
9922 return nil, gensupport.WrapError(&googleapi.Error{
9923 Code: res.StatusCode,
9924 Header: res.Header,
9925 })
9926 }
9927 if err != nil {
9928 return nil, err
9929 }
9930 defer googleapi.CloseBody(res)
9931 if err := googleapi.CheckResponse(res); err != nil {
9932 return nil, gensupport.WrapError(err)
9933 }
9934 ret := &Operation{
9935 ServerResponse: googleapi.ServerResponse{
9936 Header: res.Header,
9937 HTTPStatusCode: res.StatusCode,
9938 },
9939 }
9940 target := &ret
9941 if err := gensupport.DecodeResponse(target, res); err != nil {
9942 return nil, err
9943 }
9944 return ret, nil
9945 }
9946
9947 type ProjectsLocationsSchedulesGetCall struct {
9948 s *Service
9949 name string
9950 urlParams_ gensupport.URLParams
9951 ifNoneMatch_ string
9952 ctx_ context.Context
9953 header_ http.Header
9954 }
9955
9956
9957
9958
9959
9960 func (r *ProjectsLocationsSchedulesService) Get(name string) *ProjectsLocationsSchedulesGetCall {
9961 c := &ProjectsLocationsSchedulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9962 c.name = name
9963 return c
9964 }
9965
9966
9967
9968
9969 func (c *ProjectsLocationsSchedulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSchedulesGetCall {
9970 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9971 return c
9972 }
9973
9974
9975
9976
9977 func (c *ProjectsLocationsSchedulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSchedulesGetCall {
9978 c.ifNoneMatch_ = entityTag
9979 return c
9980 }
9981
9982
9983 func (c *ProjectsLocationsSchedulesGetCall) Context(ctx context.Context) *ProjectsLocationsSchedulesGetCall {
9984 c.ctx_ = ctx
9985 return c
9986 }
9987
9988
9989
9990 func (c *ProjectsLocationsSchedulesGetCall) Header() http.Header {
9991 if c.header_ == nil {
9992 c.header_ = make(http.Header)
9993 }
9994 return c.header_
9995 }
9996
9997 func (c *ProjectsLocationsSchedulesGetCall) doRequest(alt string) (*http.Response, error) {
9998 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9999 if c.ifNoneMatch_ != "" {
10000 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10001 }
10002 var body io.Reader = nil
10003 c.urlParams_.Set("alt", alt)
10004 c.urlParams_.Set("prettyPrint", "false")
10005 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10006 urls += "?" + c.urlParams_.Encode()
10007 req, err := http.NewRequest("GET", urls, body)
10008 if err != nil {
10009 return nil, err
10010 }
10011 req.Header = reqHeaders
10012 googleapi.Expand(req.URL, map[string]string{
10013 "name": c.name,
10014 })
10015 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10016 }
10017
10018
10019
10020
10021
10022
10023 func (c *ProjectsLocationsSchedulesGetCall) Do(opts ...googleapi.CallOption) (*Schedule, error) {
10024 gensupport.SetOptions(c.urlParams_, opts...)
10025 res, err := c.doRequest("json")
10026 if res != nil && res.StatusCode == http.StatusNotModified {
10027 if res.Body != nil {
10028 res.Body.Close()
10029 }
10030 return nil, gensupport.WrapError(&googleapi.Error{
10031 Code: res.StatusCode,
10032 Header: res.Header,
10033 })
10034 }
10035 if err != nil {
10036 return nil, err
10037 }
10038 defer googleapi.CloseBody(res)
10039 if err := googleapi.CheckResponse(res); err != nil {
10040 return nil, gensupport.WrapError(err)
10041 }
10042 ret := &Schedule{
10043 ServerResponse: googleapi.ServerResponse{
10044 Header: res.Header,
10045 HTTPStatusCode: res.StatusCode,
10046 },
10047 }
10048 target := &ret
10049 if err := gensupport.DecodeResponse(target, res); err != nil {
10050 return nil, err
10051 }
10052 return ret, nil
10053 }
10054
10055 type ProjectsLocationsSchedulesListCall struct {
10056 s *Service
10057 parent string
10058 urlParams_ gensupport.URLParams
10059 ifNoneMatch_ string
10060 ctx_ context.Context
10061 header_ http.Header
10062 }
10063
10064
10065
10066
10067 func (r *ProjectsLocationsSchedulesService) List(parent string) *ProjectsLocationsSchedulesListCall {
10068 c := &ProjectsLocationsSchedulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10069 c.parent = parent
10070 return c
10071 }
10072
10073
10074
10075 func (c *ProjectsLocationsSchedulesListCall) Filter(filter string) *ProjectsLocationsSchedulesListCall {
10076 c.urlParams_.Set("filter", filter)
10077 return c
10078 }
10079
10080
10081 func (c *ProjectsLocationsSchedulesListCall) OrderBy(orderBy string) *ProjectsLocationsSchedulesListCall {
10082 c.urlParams_.Set("orderBy", orderBy)
10083 return c
10084 }
10085
10086
10087
10088 func (c *ProjectsLocationsSchedulesListCall) PageSize(pageSize int64) *ProjectsLocationsSchedulesListCall {
10089 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10090 return c
10091 }
10092
10093
10094
10095 func (c *ProjectsLocationsSchedulesListCall) PageToken(pageToken string) *ProjectsLocationsSchedulesListCall {
10096 c.urlParams_.Set("pageToken", pageToken)
10097 return c
10098 }
10099
10100
10101
10102
10103 func (c *ProjectsLocationsSchedulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSchedulesListCall {
10104 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10105 return c
10106 }
10107
10108
10109
10110
10111 func (c *ProjectsLocationsSchedulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSchedulesListCall {
10112 c.ifNoneMatch_ = entityTag
10113 return c
10114 }
10115
10116
10117 func (c *ProjectsLocationsSchedulesListCall) Context(ctx context.Context) *ProjectsLocationsSchedulesListCall {
10118 c.ctx_ = ctx
10119 return c
10120 }
10121
10122
10123
10124 func (c *ProjectsLocationsSchedulesListCall) Header() http.Header {
10125 if c.header_ == nil {
10126 c.header_ = make(http.Header)
10127 }
10128 return c.header_
10129 }
10130
10131 func (c *ProjectsLocationsSchedulesListCall) doRequest(alt string) (*http.Response, error) {
10132 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10133 if c.ifNoneMatch_ != "" {
10134 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10135 }
10136 var body io.Reader = nil
10137 c.urlParams_.Set("alt", alt)
10138 c.urlParams_.Set("prettyPrint", "false")
10139 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/schedules")
10140 urls += "?" + c.urlParams_.Encode()
10141 req, err := http.NewRequest("GET", urls, body)
10142 if err != nil {
10143 return nil, err
10144 }
10145 req.Header = reqHeaders
10146 googleapi.Expand(req.URL, map[string]string{
10147 "parent": c.parent,
10148 })
10149 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10150 }
10151
10152
10153
10154
10155
10156
10157
10158 func (c *ProjectsLocationsSchedulesListCall) Do(opts ...googleapi.CallOption) (*ListSchedulesResponse, error) {
10159 gensupport.SetOptions(c.urlParams_, opts...)
10160 res, err := c.doRequest("json")
10161 if res != nil && res.StatusCode == http.StatusNotModified {
10162 if res.Body != nil {
10163 res.Body.Close()
10164 }
10165 return nil, gensupport.WrapError(&googleapi.Error{
10166 Code: res.StatusCode,
10167 Header: res.Header,
10168 })
10169 }
10170 if err != nil {
10171 return nil, err
10172 }
10173 defer googleapi.CloseBody(res)
10174 if err := googleapi.CheckResponse(res); err != nil {
10175 return nil, gensupport.WrapError(err)
10176 }
10177 ret := &ListSchedulesResponse{
10178 ServerResponse: googleapi.ServerResponse{
10179 Header: res.Header,
10180 HTTPStatusCode: res.StatusCode,
10181 },
10182 }
10183 target := &ret
10184 if err := gensupport.DecodeResponse(target, res); err != nil {
10185 return nil, err
10186 }
10187 return ret, nil
10188 }
10189
10190
10191
10192
10193 func (c *ProjectsLocationsSchedulesListCall) Pages(ctx context.Context, f func(*ListSchedulesResponse) error) error {
10194 c.ctx_ = ctx
10195 defer c.PageToken(c.urlParams_.Get("pageToken"))
10196 for {
10197 x, err := c.Do()
10198 if err != nil {
10199 return err
10200 }
10201 if err := f(x); err != nil {
10202 return err
10203 }
10204 if x.NextPageToken == "" {
10205 return nil
10206 }
10207 c.PageToken(x.NextPageToken)
10208 }
10209 }
10210
10211 type ProjectsLocationsSchedulesTriggerCall struct {
10212 s *Service
10213 name string
10214 triggerschedulerequest *TriggerScheduleRequest
10215 urlParams_ gensupport.URLParams
10216 ctx_ context.Context
10217 header_ http.Header
10218 }
10219
10220
10221
10222
10223
10224 func (r *ProjectsLocationsSchedulesService) Trigger(name string, triggerschedulerequest *TriggerScheduleRequest) *ProjectsLocationsSchedulesTriggerCall {
10225 c := &ProjectsLocationsSchedulesTriggerCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10226 c.name = name
10227 c.triggerschedulerequest = triggerschedulerequest
10228 return c
10229 }
10230
10231
10232
10233
10234 func (c *ProjectsLocationsSchedulesTriggerCall) Fields(s ...googleapi.Field) *ProjectsLocationsSchedulesTriggerCall {
10235 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10236 return c
10237 }
10238
10239
10240 func (c *ProjectsLocationsSchedulesTriggerCall) Context(ctx context.Context) *ProjectsLocationsSchedulesTriggerCall {
10241 c.ctx_ = ctx
10242 return c
10243 }
10244
10245
10246
10247 func (c *ProjectsLocationsSchedulesTriggerCall) Header() http.Header {
10248 if c.header_ == nil {
10249 c.header_ = make(http.Header)
10250 }
10251 return c.header_
10252 }
10253
10254 func (c *ProjectsLocationsSchedulesTriggerCall) doRequest(alt string) (*http.Response, error) {
10255 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10256 var body io.Reader = nil
10257 body, err := googleapi.WithoutDataWrapper.JSONReader(c.triggerschedulerequest)
10258 if err != nil {
10259 return nil, err
10260 }
10261 c.urlParams_.Set("alt", alt)
10262 c.urlParams_.Set("prettyPrint", "false")
10263 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:trigger")
10264 urls += "?" + c.urlParams_.Encode()
10265 req, err := http.NewRequest("POST", urls, body)
10266 if err != nil {
10267 return nil, err
10268 }
10269 req.Header = reqHeaders
10270 googleapi.Expand(req.URL, map[string]string{
10271 "name": c.name,
10272 })
10273 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10274 }
10275
10276
10277
10278
10279
10280
10281 func (c *ProjectsLocationsSchedulesTriggerCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10282 gensupport.SetOptions(c.urlParams_, opts...)
10283 res, err := c.doRequest("json")
10284 if res != nil && res.StatusCode == http.StatusNotModified {
10285 if res.Body != nil {
10286 res.Body.Close()
10287 }
10288 return nil, gensupport.WrapError(&googleapi.Error{
10289 Code: res.StatusCode,
10290 Header: res.Header,
10291 })
10292 }
10293 if err != nil {
10294 return nil, err
10295 }
10296 defer googleapi.CloseBody(res)
10297 if err := googleapi.CheckResponse(res); err != nil {
10298 return nil, gensupport.WrapError(err)
10299 }
10300 ret := &Operation{
10301 ServerResponse: googleapi.ServerResponse{
10302 Header: res.Header,
10303 HTTPStatusCode: res.StatusCode,
10304 },
10305 }
10306 target := &ret
10307 if err := gensupport.DecodeResponse(target, res); err != nil {
10308 return nil, err
10309 }
10310 return ret, nil
10311 }
10312
View as plain text