-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathmodel_create_server_payload.go
More file actions
1229 lines (1011 loc) · 45.5 KB
/
model_create_server_payload.go
File metadata and controls
1229 lines (1011 loc) · 45.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
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
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
STACKIT IaaS API
This API allows you to create and modify IaaS resources.
API version: 2
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package iaas
import (
"encoding/json"
"time"
)
// checks if the CreateServerPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateServerPayload{}
/*
types and functions for affinityGroup
*/
// isNotNullableString
type CreateServerPayloadGetAffinityGroupAttributeType = *string
func getCreateServerPayloadGetAffinityGroupAttributeTypeOk(arg CreateServerPayloadGetAffinityGroupAttributeType) (ret CreateServerPayloadGetAffinityGroupRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetAffinityGroupAttributeType(arg *CreateServerPayloadGetAffinityGroupAttributeType, val CreateServerPayloadGetAffinityGroupRetType) {
*arg = &val
}
type CreateServerPayloadGetAffinityGroupArgType = string
type CreateServerPayloadGetAffinityGroupRetType = string
/*
types and functions for agent
*/
// isModel
type CreateServerPayloadGetAgentAttributeType = *ServerAgent
type CreateServerPayloadGetAgentArgType = ServerAgent
type CreateServerPayloadGetAgentRetType = ServerAgent
func getCreateServerPayloadGetAgentAttributeTypeOk(arg CreateServerPayloadGetAgentAttributeType) (ret CreateServerPayloadGetAgentRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetAgentAttributeType(arg *CreateServerPayloadGetAgentAttributeType, val CreateServerPayloadGetAgentRetType) {
*arg = &val
}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type CreateServerPayloadGetAvailabilityZoneAttributeType = *string
func getCreateServerPayloadGetAvailabilityZoneAttributeTypeOk(arg CreateServerPayloadGetAvailabilityZoneAttributeType) (ret CreateServerPayloadGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetAvailabilityZoneAttributeType(arg *CreateServerPayloadGetAvailabilityZoneAttributeType, val CreateServerPayloadGetAvailabilityZoneRetType) {
*arg = &val
}
type CreateServerPayloadGetAvailabilityZoneArgType = string
type CreateServerPayloadGetAvailabilityZoneRetType = string
/*
types and functions for bootVolume
*/
// isModel
type CreateServerPayloadGetBootVolumeAttributeType = *ServerBootVolume
type CreateServerPayloadGetBootVolumeArgType = ServerBootVolume
type CreateServerPayloadGetBootVolumeRetType = ServerBootVolume
func getCreateServerPayloadGetBootVolumeAttributeTypeOk(arg CreateServerPayloadGetBootVolumeAttributeType) (ret CreateServerPayloadGetBootVolumeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetBootVolumeAttributeType(arg *CreateServerPayloadGetBootVolumeAttributeType, val CreateServerPayloadGetBootVolumeRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type CreateServerPayloadGetCreatedAtAttributeType = *time.Time
type CreateServerPayloadGetCreatedAtArgType = time.Time
type CreateServerPayloadGetCreatedAtRetType = time.Time
func getCreateServerPayloadGetCreatedAtAttributeTypeOk(arg CreateServerPayloadGetCreatedAtAttributeType) (ret CreateServerPayloadGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetCreatedAtAttributeType(arg *CreateServerPayloadGetCreatedAtAttributeType, val CreateServerPayloadGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for errorMessage
*/
// isNotNullableString
type CreateServerPayloadGetErrorMessageAttributeType = *string
func getCreateServerPayloadGetErrorMessageAttributeTypeOk(arg CreateServerPayloadGetErrorMessageAttributeType) (ret CreateServerPayloadGetErrorMessageRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetErrorMessageAttributeType(arg *CreateServerPayloadGetErrorMessageAttributeType, val CreateServerPayloadGetErrorMessageRetType) {
*arg = &val
}
type CreateServerPayloadGetErrorMessageArgType = string
type CreateServerPayloadGetErrorMessageRetType = string
/*
types and functions for id
*/
// isNotNullableString
type CreateServerPayloadGetIdAttributeType = *string
func getCreateServerPayloadGetIdAttributeTypeOk(arg CreateServerPayloadGetIdAttributeType) (ret CreateServerPayloadGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetIdAttributeType(arg *CreateServerPayloadGetIdAttributeType, val CreateServerPayloadGetIdRetType) {
*arg = &val
}
type CreateServerPayloadGetIdArgType = string
type CreateServerPayloadGetIdRetType = string
/*
types and functions for imageId
*/
// isNotNullableString
type CreateServerPayloadGetImageIdAttributeType = *string
func getCreateServerPayloadGetImageIdAttributeTypeOk(arg CreateServerPayloadGetImageIdAttributeType) (ret CreateServerPayloadGetImageIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetImageIdAttributeType(arg *CreateServerPayloadGetImageIdAttributeType, val CreateServerPayloadGetImageIdRetType) {
*arg = &val
}
type CreateServerPayloadGetImageIdArgType = string
type CreateServerPayloadGetImageIdRetType = string
/*
types and functions for keypairName
*/
// isNotNullableString
type CreateServerPayloadGetKeypairNameAttributeType = *string
func getCreateServerPayloadGetKeypairNameAttributeTypeOk(arg CreateServerPayloadGetKeypairNameAttributeType) (ret CreateServerPayloadGetKeypairNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetKeypairNameAttributeType(arg *CreateServerPayloadGetKeypairNameAttributeType, val CreateServerPayloadGetKeypairNameRetType) {
*arg = &val
}
type CreateServerPayloadGetKeypairNameArgType = string
type CreateServerPayloadGetKeypairNameRetType = string
/*
types and functions for labels
*/
// isFreeform
type CreateServerPayloadGetLabelsAttributeType = *map[string]interface{}
type CreateServerPayloadGetLabelsArgType = map[string]interface{}
type CreateServerPayloadGetLabelsRetType = map[string]interface{}
func getCreateServerPayloadGetLabelsAttributeTypeOk(arg CreateServerPayloadGetLabelsAttributeType) (ret CreateServerPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetLabelsAttributeType(arg *CreateServerPayloadGetLabelsAttributeType, val CreateServerPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for launchedAt
*/
// isDateTime
type CreateServerPayloadGetLaunchedAtAttributeType = *time.Time
type CreateServerPayloadGetLaunchedAtArgType = time.Time
type CreateServerPayloadGetLaunchedAtRetType = time.Time
func getCreateServerPayloadGetLaunchedAtAttributeTypeOk(arg CreateServerPayloadGetLaunchedAtAttributeType) (ret CreateServerPayloadGetLaunchedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetLaunchedAtAttributeType(arg *CreateServerPayloadGetLaunchedAtAttributeType, val CreateServerPayloadGetLaunchedAtRetType) {
*arg = &val
}
/*
types and functions for machineType
*/
// isNotNullableString
type CreateServerPayloadGetMachineTypeAttributeType = *string
func getCreateServerPayloadGetMachineTypeAttributeTypeOk(arg CreateServerPayloadGetMachineTypeAttributeType) (ret CreateServerPayloadGetMachineTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetMachineTypeAttributeType(arg *CreateServerPayloadGetMachineTypeAttributeType, val CreateServerPayloadGetMachineTypeRetType) {
*arg = &val
}
type CreateServerPayloadGetMachineTypeArgType = string
type CreateServerPayloadGetMachineTypeRetType = string
/*
types and functions for maintenanceWindow
*/
// isModel
type CreateServerPayloadGetMaintenanceWindowAttributeType = *ServerMaintenance
type CreateServerPayloadGetMaintenanceWindowArgType = ServerMaintenance
type CreateServerPayloadGetMaintenanceWindowRetType = ServerMaintenance
func getCreateServerPayloadGetMaintenanceWindowAttributeTypeOk(arg CreateServerPayloadGetMaintenanceWindowAttributeType) (ret CreateServerPayloadGetMaintenanceWindowRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetMaintenanceWindowAttributeType(arg *CreateServerPayloadGetMaintenanceWindowAttributeType, val CreateServerPayloadGetMaintenanceWindowRetType) {
*arg = &val
}
/*
types and functions for metadata
*/
// isFreeform
type CreateServerPayloadGetMetadataAttributeType = *map[string]interface{}
type CreateServerPayloadGetMetadataArgType = map[string]interface{}
type CreateServerPayloadGetMetadataRetType = map[string]interface{}
func getCreateServerPayloadGetMetadataAttributeTypeOk(arg CreateServerPayloadGetMetadataAttributeType) (ret CreateServerPayloadGetMetadataRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetMetadataAttributeType(arg *CreateServerPayloadGetMetadataAttributeType, val CreateServerPayloadGetMetadataRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type CreateServerPayloadGetNameAttributeType = *string
func getCreateServerPayloadGetNameAttributeTypeOk(arg CreateServerPayloadGetNameAttributeType) (ret CreateServerPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetNameAttributeType(arg *CreateServerPayloadGetNameAttributeType, val CreateServerPayloadGetNameRetType) {
*arg = &val
}
type CreateServerPayloadGetNameArgType = string
type CreateServerPayloadGetNameRetType = string
/*
types and functions for networking
*/
// isModel
type CreateServerPayloadGetNetworkingAttributeType = *CreateServerPayloadAllOfNetworking
type CreateServerPayloadGetNetworkingArgType = CreateServerPayloadAllOfNetworking
type CreateServerPayloadGetNetworkingRetType = CreateServerPayloadAllOfNetworking
func getCreateServerPayloadGetNetworkingAttributeTypeOk(arg CreateServerPayloadGetNetworkingAttributeType) (ret CreateServerPayloadGetNetworkingRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetNetworkingAttributeType(arg *CreateServerPayloadGetNetworkingAttributeType, val CreateServerPayloadGetNetworkingRetType) {
*arg = &val
}
/*
types and functions for nics
*/
// isArray
type CreateServerPayloadGetNicsAttributeType = *[]ServerNetwork
type CreateServerPayloadGetNicsArgType = []ServerNetwork
type CreateServerPayloadGetNicsRetType = []ServerNetwork
func getCreateServerPayloadGetNicsAttributeTypeOk(arg CreateServerPayloadGetNicsAttributeType) (ret CreateServerPayloadGetNicsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetNicsAttributeType(arg *CreateServerPayloadGetNicsAttributeType, val CreateServerPayloadGetNicsRetType) {
*arg = &val
}
/*
types and functions for powerStatus
*/
// isNotNullableString
type CreateServerPayloadGetPowerStatusAttributeType = *string
func getCreateServerPayloadGetPowerStatusAttributeTypeOk(arg CreateServerPayloadGetPowerStatusAttributeType) (ret CreateServerPayloadGetPowerStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetPowerStatusAttributeType(arg *CreateServerPayloadGetPowerStatusAttributeType, val CreateServerPayloadGetPowerStatusRetType) {
*arg = &val
}
type CreateServerPayloadGetPowerStatusArgType = string
type CreateServerPayloadGetPowerStatusRetType = string
/*
types and functions for securityGroups
*/
// isArray
type CreateServerPayloadGetSecurityGroupsAttributeType = *[]string
type CreateServerPayloadGetSecurityGroupsArgType = []string
type CreateServerPayloadGetSecurityGroupsRetType = []string
func getCreateServerPayloadGetSecurityGroupsAttributeTypeOk(arg CreateServerPayloadGetSecurityGroupsAttributeType) (ret CreateServerPayloadGetSecurityGroupsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetSecurityGroupsAttributeType(arg *CreateServerPayloadGetSecurityGroupsAttributeType, val CreateServerPayloadGetSecurityGroupsRetType) {
*arg = &val
}
/*
types and functions for serviceAccountMails
*/
// isArray
type CreateServerPayloadGetServiceAccountMailsAttributeType = *[]string
type CreateServerPayloadGetServiceAccountMailsArgType = []string
type CreateServerPayloadGetServiceAccountMailsRetType = []string
func getCreateServerPayloadGetServiceAccountMailsAttributeTypeOk(arg CreateServerPayloadGetServiceAccountMailsAttributeType) (ret CreateServerPayloadGetServiceAccountMailsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetServiceAccountMailsAttributeType(arg *CreateServerPayloadGetServiceAccountMailsAttributeType, val CreateServerPayloadGetServiceAccountMailsRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type CreateServerPayloadGetStatusAttributeType = *string
func getCreateServerPayloadGetStatusAttributeTypeOk(arg CreateServerPayloadGetStatusAttributeType) (ret CreateServerPayloadGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetStatusAttributeType(arg *CreateServerPayloadGetStatusAttributeType, val CreateServerPayloadGetStatusRetType) {
*arg = &val
}
type CreateServerPayloadGetStatusArgType = string
type CreateServerPayloadGetStatusRetType = string
/*
types and functions for updatedAt
*/
// isDateTime
type CreateServerPayloadGetUpdatedAtAttributeType = *time.Time
type CreateServerPayloadGetUpdatedAtArgType = time.Time
type CreateServerPayloadGetUpdatedAtRetType = time.Time
func getCreateServerPayloadGetUpdatedAtAttributeTypeOk(arg CreateServerPayloadGetUpdatedAtAttributeType) (ret CreateServerPayloadGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetUpdatedAtAttributeType(arg *CreateServerPayloadGetUpdatedAtAttributeType, val CreateServerPayloadGetUpdatedAtRetType) {
*arg = &val
}
/*
types and functions for userData
*/
// isByteArray
type CreateServerPayloadGetUserDataAttributeType = *[]byte
type CreateServerPayloadGetUserDataArgType = []byte
type CreateServerPayloadGetUserDataRetType = []byte
func getCreateServerPayloadGetUserDataAttributeTypeOk(arg CreateServerPayloadGetUserDataAttributeType) (ret CreateServerPayloadGetUserDataRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetUserDataAttributeType(arg *CreateServerPayloadGetUserDataAttributeType, val CreateServerPayloadGetUserDataRetType) {
*arg = &val
}
/*
types and functions for volumes
*/
// isArray
type CreateServerPayloadGetVolumesAttributeType = *[]string
type CreateServerPayloadGetVolumesArgType = []string
type CreateServerPayloadGetVolumesRetType = []string
func getCreateServerPayloadGetVolumesAttributeTypeOk(arg CreateServerPayloadGetVolumesAttributeType) (ret CreateServerPayloadGetVolumesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateServerPayloadGetVolumesAttributeType(arg *CreateServerPayloadGetVolumesAttributeType, val CreateServerPayloadGetVolumesRetType) {
*arg = &val
}
// CreateServerPayload Object that represents the request body for a server create.
type CreateServerPayload struct {
// Universally Unique Identifier (UUID).
AffinityGroup CreateServerPayloadGetAffinityGroupAttributeType `json:"affinityGroup,omitempty"`
Agent CreateServerPayloadGetAgentAttributeType `json:"agent,omitempty"`
// Object that represents an availability zone.
AvailabilityZone CreateServerPayloadGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"`
BootVolume CreateServerPayloadGetBootVolumeAttributeType `json:"bootVolume,omitempty"`
// Date-time when resource was created.
CreatedAt CreateServerPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// An error message.
ErrorMessage CreateServerPayloadGetErrorMessageAttributeType `json:"errorMessage,omitempty"`
// Universally Unique Identifier (UUID).
Id CreateServerPayloadGetIdAttributeType `json:"id,omitempty"`
// Universally Unique Identifier (UUID).
ImageId CreateServerPayloadGetImageIdAttributeType `json:"imageId,omitempty"`
// The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-].
KeypairName CreateServerPayloadGetKeypairNameAttributeType `json:"keypairName,omitempty"`
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key. The `stackit-` prefix is reserved and cannot be used for Keys.
Labels CreateServerPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Date-time when resource was launched.
LaunchedAt CreateServerPayloadGetLaunchedAtAttributeType `json:"launchedAt,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
// REQUIRED
MachineType CreateServerPayloadGetMachineTypeAttributeType `json:"machineType" required:"true"`
MaintenanceWindow CreateServerPayloadGetMaintenanceWindowAttributeType `json:"maintenanceWindow,omitempty"`
// Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key.
Metadata CreateServerPayloadGetMetadataAttributeType `json:"metadata,omitempty"`
// The name for a Server.
// REQUIRED
Name CreateServerPayloadGetNameAttributeType `json:"name" required:"true"`
// REQUIRED
Networking CreateServerPayloadGetNetworkingAttributeType `json:"networking" required:"true"`
// A list of networks attached to a server.
Nics CreateServerPayloadGetNicsAttributeType `json:"nics,omitempty"`
// The power status of a server. Possible values: `CRASHED`, `ERROR`, `RUNNING`, `STOPPED`.
PowerStatus CreateServerPayloadGetPowerStatusAttributeType `json:"powerStatus,omitempty"`
// A list of General Objects.
SecurityGroups CreateServerPayloadGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"`
// A list of service account mails.
ServiceAccountMails CreateServerPayloadGetServiceAccountMailsAttributeType `json:"serviceAccountMails,omitempty"`
// The status of a server object. Possible values: `ACTIVE`, `BACKING-UP`, `CREATING`, `DEALLOCATED`, `DEALLOCATING`, `DELETED`, `DELETING`, `ERROR`, `INACTIVE`, `MIGRATING`, `PAUSED`, `REBOOT`, `REBOOTING`, `REBUILD`, `REBUILDING`, `RESCUE`, `RESCUING`, `RESIZING`, `RESTORING`, `SNAPSHOTTING`, `STARTING`, `STOPPING`, `UNRESCUING`, `UPDATING`.
Status CreateServerPayloadGetStatusAttributeType `json:"status,omitempty"`
// Date-time when resource was last updated.
UpdatedAt CreateServerPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
// User Data that is provided to the server. Must be base64 encoded and is passed via cloud-init to the server.
UserData CreateServerPayloadGetUserDataAttributeType `json:"userData,omitempty"`
// A list of UUIDs.
Volumes CreateServerPayloadGetVolumesAttributeType `json:"volumes,omitempty"`
}
type _CreateServerPayload CreateServerPayload
// NewCreateServerPayload instantiates a new CreateServerPayload object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewCreateServerPayload(machineType CreateServerPayloadGetMachineTypeArgType, name CreateServerPayloadGetNameArgType, networking CreateServerPayloadGetNetworkingArgType) *CreateServerPayload {
this := CreateServerPayload{}
setCreateServerPayloadGetMachineTypeAttributeType(&this.MachineType, machineType)
setCreateServerPayloadGetNameAttributeType(&this.Name, name)
setCreateServerPayloadGetNetworkingAttributeType(&this.Networking, networking)
return &this
}
// NewCreateServerPayloadWithDefaults instantiates a new CreateServerPayload object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewCreateServerPayloadWithDefaults() *CreateServerPayload {
this := CreateServerPayload{}
return &this
}
// GetAffinityGroup returns the AffinityGroup field value if set, zero value otherwise.
func (o *CreateServerPayload) GetAffinityGroup() (res CreateServerPayloadGetAffinityGroupRetType) {
res, _ = o.GetAffinityGroupOk()
return
}
// GetAffinityGroupOk returns a tuple with the AffinityGroup field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetAffinityGroupOk() (ret CreateServerPayloadGetAffinityGroupRetType, ok bool) {
return getCreateServerPayloadGetAffinityGroupAttributeTypeOk(o.AffinityGroup)
}
// HasAffinityGroup returns a boolean if a field has been set.
func (o *CreateServerPayload) HasAffinityGroup() bool {
_, ok := o.GetAffinityGroupOk()
return ok
}
// SetAffinityGroup gets a reference to the given string and assigns it to the AffinityGroup field.
func (o *CreateServerPayload) SetAffinityGroup(v CreateServerPayloadGetAffinityGroupRetType) {
setCreateServerPayloadGetAffinityGroupAttributeType(&o.AffinityGroup, v)
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *CreateServerPayload) GetAgent() (res CreateServerPayloadGetAgentRetType) {
res, _ = o.GetAgentOk()
return
}
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetAgentOk() (ret CreateServerPayloadGetAgentRetType, ok bool) {
return getCreateServerPayloadGetAgentAttributeTypeOk(o.Agent)
}
// HasAgent returns a boolean if a field has been set.
func (o *CreateServerPayload) HasAgent() bool {
_, ok := o.GetAgentOk()
return ok
}
// SetAgent gets a reference to the given ServerAgent and assigns it to the Agent field.
func (o *CreateServerPayload) SetAgent(v CreateServerPayloadGetAgentRetType) {
setCreateServerPayloadGetAgentAttributeType(&o.Agent, v)
}
// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise.
func (o *CreateServerPayload) GetAvailabilityZone() (res CreateServerPayloadGetAvailabilityZoneRetType) {
res, _ = o.GetAvailabilityZoneOk()
return
}
// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetAvailabilityZoneOk() (ret CreateServerPayloadGetAvailabilityZoneRetType, ok bool) {
return getCreateServerPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// HasAvailabilityZone returns a boolean if a field has been set.
func (o *CreateServerPayload) HasAvailabilityZone() bool {
_, ok := o.GetAvailabilityZoneOk()
return ok
}
// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field.
func (o *CreateServerPayload) SetAvailabilityZone(v CreateServerPayloadGetAvailabilityZoneRetType) {
setCreateServerPayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetBootVolume returns the BootVolume field value if set, zero value otherwise.
func (o *CreateServerPayload) GetBootVolume() (res CreateServerPayloadGetBootVolumeRetType) {
res, _ = o.GetBootVolumeOk()
return
}
// GetBootVolumeOk returns a tuple with the BootVolume field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetBootVolumeOk() (ret CreateServerPayloadGetBootVolumeRetType, ok bool) {
return getCreateServerPayloadGetBootVolumeAttributeTypeOk(o.BootVolume)
}
// HasBootVolume returns a boolean if a field has been set.
func (o *CreateServerPayload) HasBootVolume() bool {
_, ok := o.GetBootVolumeOk()
return ok
}
// SetBootVolume gets a reference to the given ServerBootVolume and assigns it to the BootVolume field.
func (o *CreateServerPayload) SetBootVolume(v CreateServerPayloadGetBootVolumeRetType) {
setCreateServerPayloadGetBootVolumeAttributeType(&o.BootVolume, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateServerPayload) GetCreatedAt() (res CreateServerPayloadGetCreatedAtRetType) {
res, _ = o.GetCreatedAtOk()
return
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetCreatedAtOk() (ret CreateServerPayloadGetCreatedAtRetType, ok bool) {
return getCreateServerPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateServerPayload) HasCreatedAt() bool {
_, ok := o.GetCreatedAtOk()
return ok
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *CreateServerPayload) SetCreatedAt(v CreateServerPayloadGetCreatedAtRetType) {
setCreateServerPayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise.
func (o *CreateServerPayload) GetErrorMessage() (res CreateServerPayloadGetErrorMessageRetType) {
res, _ = o.GetErrorMessageOk()
return
}
// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetErrorMessageOk() (ret CreateServerPayloadGetErrorMessageRetType, ok bool) {
return getCreateServerPayloadGetErrorMessageAttributeTypeOk(o.ErrorMessage)
}
// HasErrorMessage returns a boolean if a field has been set.
func (o *CreateServerPayload) HasErrorMessage() bool {
_, ok := o.GetErrorMessageOk()
return ok
}
// SetErrorMessage gets a reference to the given string and assigns it to the ErrorMessage field.
func (o *CreateServerPayload) SetErrorMessage(v CreateServerPayloadGetErrorMessageRetType) {
setCreateServerPayloadGetErrorMessageAttributeType(&o.ErrorMessage, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateServerPayload) GetId() (res CreateServerPayloadGetIdRetType) {
res, _ = o.GetIdOk()
return
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetIdOk() (ret CreateServerPayloadGetIdRetType, ok bool) {
return getCreateServerPayloadGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateServerPayload) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateServerPayload) SetId(v CreateServerPayloadGetIdRetType) {
setCreateServerPayloadGetIdAttributeType(&o.Id, v)
}
// GetImageId returns the ImageId field value if set, zero value otherwise.
func (o *CreateServerPayload) GetImageId() (res CreateServerPayloadGetImageIdRetType) {
res, _ = o.GetImageIdOk()
return
}
// GetImageIdOk returns a tuple with the ImageId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetImageIdOk() (ret CreateServerPayloadGetImageIdRetType, ok bool) {
return getCreateServerPayloadGetImageIdAttributeTypeOk(o.ImageId)
}
// HasImageId returns a boolean if a field has been set.
func (o *CreateServerPayload) HasImageId() bool {
_, ok := o.GetImageIdOk()
return ok
}
// SetImageId gets a reference to the given string and assigns it to the ImageId field.
func (o *CreateServerPayload) SetImageId(v CreateServerPayloadGetImageIdRetType) {
setCreateServerPayloadGetImageIdAttributeType(&o.ImageId, v)
}
// GetKeypairName returns the KeypairName field value if set, zero value otherwise.
func (o *CreateServerPayload) GetKeypairName() (res CreateServerPayloadGetKeypairNameRetType) {
res, _ = o.GetKeypairNameOk()
return
}
// GetKeypairNameOk returns a tuple with the KeypairName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetKeypairNameOk() (ret CreateServerPayloadGetKeypairNameRetType, ok bool) {
return getCreateServerPayloadGetKeypairNameAttributeTypeOk(o.KeypairName)
}
// HasKeypairName returns a boolean if a field has been set.
func (o *CreateServerPayload) HasKeypairName() bool {
_, ok := o.GetKeypairNameOk()
return ok
}
// SetKeypairName gets a reference to the given string and assigns it to the KeypairName field.
func (o *CreateServerPayload) SetKeypairName(v CreateServerPayloadGetKeypairNameRetType) {
setCreateServerPayloadGetKeypairNameAttributeType(&o.KeypairName, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateServerPayload) GetLabels() (res CreateServerPayloadGetLabelsRetType) {
res, _ = o.GetLabelsOk()
return
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetLabelsOk() (ret CreateServerPayloadGetLabelsRetType, ok bool) {
return getCreateServerPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateServerPayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
func (o *CreateServerPayload) SetLabels(v CreateServerPayloadGetLabelsRetType) {
setCreateServerPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetLaunchedAt returns the LaunchedAt field value if set, zero value otherwise.
func (o *CreateServerPayload) GetLaunchedAt() (res CreateServerPayloadGetLaunchedAtRetType) {
res, _ = o.GetLaunchedAtOk()
return
}
// GetLaunchedAtOk returns a tuple with the LaunchedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetLaunchedAtOk() (ret CreateServerPayloadGetLaunchedAtRetType, ok bool) {
return getCreateServerPayloadGetLaunchedAtAttributeTypeOk(o.LaunchedAt)
}
// HasLaunchedAt returns a boolean if a field has been set.
func (o *CreateServerPayload) HasLaunchedAt() bool {
_, ok := o.GetLaunchedAtOk()
return ok
}
// SetLaunchedAt gets a reference to the given time.Time and assigns it to the LaunchedAt field.
func (o *CreateServerPayload) SetLaunchedAt(v CreateServerPayloadGetLaunchedAtRetType) {
setCreateServerPayloadGetLaunchedAtAttributeType(&o.LaunchedAt, v)
}
// GetMachineType returns the MachineType field value
func (o *CreateServerPayload) GetMachineType() (ret CreateServerPayloadGetMachineTypeRetType) {
ret, _ = o.GetMachineTypeOk()
return ret
}
// GetMachineTypeOk returns a tuple with the MachineType field value
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetMachineTypeOk() (ret CreateServerPayloadGetMachineTypeRetType, ok bool) {
return getCreateServerPayloadGetMachineTypeAttributeTypeOk(o.MachineType)
}
// SetMachineType sets field value
func (o *CreateServerPayload) SetMachineType(v CreateServerPayloadGetMachineTypeRetType) {
setCreateServerPayloadGetMachineTypeAttributeType(&o.MachineType, v)
}
// GetMaintenanceWindow returns the MaintenanceWindow field value if set, zero value otherwise.
func (o *CreateServerPayload) GetMaintenanceWindow() (res CreateServerPayloadGetMaintenanceWindowRetType) {
res, _ = o.GetMaintenanceWindowOk()
return
}
// GetMaintenanceWindowOk returns a tuple with the MaintenanceWindow field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetMaintenanceWindowOk() (ret CreateServerPayloadGetMaintenanceWindowRetType, ok bool) {
return getCreateServerPayloadGetMaintenanceWindowAttributeTypeOk(o.MaintenanceWindow)
}
// HasMaintenanceWindow returns a boolean if a field has been set.
func (o *CreateServerPayload) HasMaintenanceWindow() bool {
_, ok := o.GetMaintenanceWindowOk()
return ok
}
// SetMaintenanceWindow gets a reference to the given ServerMaintenance and assigns it to the MaintenanceWindow field.
func (o *CreateServerPayload) SetMaintenanceWindow(v CreateServerPayloadGetMaintenanceWindowRetType) {
setCreateServerPayloadGetMaintenanceWindowAttributeType(&o.MaintenanceWindow, v)
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *CreateServerPayload) GetMetadata() (res CreateServerPayloadGetMetadataRetType) {
res, _ = o.GetMetadataOk()
return
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetMetadataOk() (ret CreateServerPayloadGetMetadataRetType, ok bool) {
return getCreateServerPayloadGetMetadataAttributeTypeOk(o.Metadata)
}
// HasMetadata returns a boolean if a field has been set.
func (o *CreateServerPayload) HasMetadata() bool {
_, ok := o.GetMetadataOk()
return ok
}
// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field.
func (o *CreateServerPayload) SetMetadata(v CreateServerPayloadGetMetadataRetType) {
setCreateServerPayloadGetMetadataAttributeType(&o.Metadata, v)
}
// GetName returns the Name field value
func (o *CreateServerPayload) GetName() (ret CreateServerPayloadGetNameRetType) {
ret, _ = o.GetNameOk()
return ret
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetNameOk() (ret CreateServerPayloadGetNameRetType, ok bool) {
return getCreateServerPayloadGetNameAttributeTypeOk(o.Name)
}
// SetName sets field value
func (o *CreateServerPayload) SetName(v CreateServerPayloadGetNameRetType) {
setCreateServerPayloadGetNameAttributeType(&o.Name, v)
}
// GetNetworking returns the Networking field value
func (o *CreateServerPayload) GetNetworking() (ret CreateServerPayloadGetNetworkingRetType) {
ret, _ = o.GetNetworkingOk()
return ret
}
// GetNetworkingOk returns a tuple with the Networking field value
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetNetworkingOk() (ret CreateServerPayloadGetNetworkingRetType, ok bool) {
return getCreateServerPayloadGetNetworkingAttributeTypeOk(o.Networking)
}
// SetNetworking sets field value
func (o *CreateServerPayload) SetNetworking(v CreateServerPayloadGetNetworkingRetType) {
setCreateServerPayloadGetNetworkingAttributeType(&o.Networking, v)
}
// GetNics returns the Nics field value if set, zero value otherwise.
func (o *CreateServerPayload) GetNics() (res CreateServerPayloadGetNicsRetType) {
res, _ = o.GetNicsOk()
return
}
// GetNicsOk returns a tuple with the Nics field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetNicsOk() (ret CreateServerPayloadGetNicsRetType, ok bool) {
return getCreateServerPayloadGetNicsAttributeTypeOk(o.Nics)
}
// HasNics returns a boolean if a field has been set.
func (o *CreateServerPayload) HasNics() bool {
_, ok := o.GetNicsOk()
return ok
}
// SetNics gets a reference to the given []ServerNetwork and assigns it to the Nics field.
func (o *CreateServerPayload) SetNics(v CreateServerPayloadGetNicsRetType) {
setCreateServerPayloadGetNicsAttributeType(&o.Nics, v)
}
// GetPowerStatus returns the PowerStatus field value if set, zero value otherwise.
func (o *CreateServerPayload) GetPowerStatus() (res CreateServerPayloadGetPowerStatusRetType) {
res, _ = o.GetPowerStatusOk()
return
}
// GetPowerStatusOk returns a tuple with the PowerStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetPowerStatusOk() (ret CreateServerPayloadGetPowerStatusRetType, ok bool) {
return getCreateServerPayloadGetPowerStatusAttributeTypeOk(o.PowerStatus)
}
// HasPowerStatus returns a boolean if a field has been set.
func (o *CreateServerPayload) HasPowerStatus() bool {
_, ok := o.GetPowerStatusOk()
return ok
}
// SetPowerStatus gets a reference to the given string and assigns it to the PowerStatus field.
func (o *CreateServerPayload) SetPowerStatus(v CreateServerPayloadGetPowerStatusRetType) {
setCreateServerPayloadGetPowerStatusAttributeType(&o.PowerStatus, v)
}
// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise.
func (o *CreateServerPayload) GetSecurityGroups() (res CreateServerPayloadGetSecurityGroupsRetType) {
res, _ = o.GetSecurityGroupsOk()
return
}
// GetSecurityGroupsOk returns a tuple with the SecurityGroups field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateServerPayload) GetSecurityGroupsOk() (ret CreateServerPayloadGetSecurityGroupsRetType, ok bool) {
return getCreateServerPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups)
}
// HasSecurityGroups returns a boolean if a field has been set.
func (o *CreateServerPayload) HasSecurityGroups() bool {
_, ok := o.GetSecurityGroupsOk()
return ok
}
// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field.
func (o *CreateServerPayload) SetSecurityGroups(v CreateServerPayloadGetSecurityGroupsRetType) {
setCreateServerPayloadGetSecurityGroupsAttributeType(&o.SecurityGroups, v)