-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_azure_instances.go
154 lines (132 loc) · 4.17 KB
/
model_azure_instances.go
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
/*
Couchbase Public API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 2.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package couchbasecapella
import (
"encoding/json"
"fmt"
)
// AzureInstances the model 'AzureInstances'
type AzureInstances string
// List of azureInstances
const (
AZUREINSTANCES_F4S_V2 AzureInstances = "Standard_F4s_v2"
AZUREINSTANCES_F8S_V2 AzureInstances = "Standard_F8s_v2"
AZUREINSTANCES_F16S_V2 AzureInstances = "Standard_F16s_v2"
AZUREINSTANCES_F32S_V2 AzureInstances = "Standard_F32s_v2"
AZUREINSTANCES_F48S_V2 AzureInstances = "Standard_F48s_v2"
AZUREINSTANCES_F64S_V2 AzureInstances = "Standard_F64s_v2"
AZUREINSTANCES_F72S_V2 AzureInstances = "Standard_F72s_v2"
AZUREINSTANCES_D4S_V3 AzureInstances = "Standard_D4s_v3"
AZUREINSTANCES_D8S_V3 AzureInstances = "Standard_D8s_v3"
AZUREINSTANCES_D16S_V3 AzureInstances = "Standard_D16s_v3"
AZUREINSTANCES_D32S_V3 AzureInstances = "Standard_D32s_v3"
AZUREINSTANCES_D48S_V3 AzureInstances = "Standard_D48s_v3"
AZUREINSTANCES_D64S_V3 AzureInstances = "Standard_D64s_v3"
AZUREINSTANCES_E4S_V3 AzureInstances = "Standard_E4s_v3"
AZUREINSTANCES_E8S_V3 AzureInstances = "Standard_E8s_v3"
AZUREINSTANCES_E16S_V3 AzureInstances = "Standard_E16s_v3"
AZUREINSTANCES_E20S_V3 AzureInstances = "Standard_E20s_v3"
AZUREINSTANCES_E32S_V3 AzureInstances = "Standard_E32s_v3"
AZUREINSTANCES_E48S_V3 AzureInstances = "Standard_E48s_v3"
AZUREINSTANCES_E64S_V3 AzureInstances = "Standard_E64s_v3"
AZUREINSTANCES_GS2 AzureInstances = "Standard_GS2"
AZUREINSTANCES_GS3 AzureInstances = "Standard_GS3"
AZUREINSTANCES_GS4 AzureInstances = "Standard_GS4"
AZUREINSTANCES_GS5 AzureInstances = "Standard_GS5"
)
var allowedAzureInstancesEnumValues = []AzureInstances{
"Standard_F4s_v2",
"Standard_F8s_v2",
"Standard_F16s_v2",
"Standard_F32s_v2",
"Standard_F48s_v2",
"Standard_F64s_v2",
"Standard_F72s_v2",
"Standard_D4s_v3",
"Standard_D8s_v3",
"Standard_D16s_v3",
"Standard_D32s_v3",
"Standard_D48s_v3",
"Standard_D64s_v3",
"Standard_E4s_v3",
"Standard_E8s_v3",
"Standard_E16s_v3",
"Standard_E20s_v3",
"Standard_E32s_v3",
"Standard_E48s_v3",
"Standard_E64s_v3",
"Standard_GS2",
"Standard_GS3",
"Standard_GS4",
"Standard_GS5",
}
func (v *AzureInstances) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := AzureInstances(value)
for _, existing := range allowedAzureInstancesEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
return fmt.Errorf("%+v is not a valid AzureInstances", value)
}
// NewAzureInstancesFromValue returns a pointer to a valid AzureInstances
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewAzureInstancesFromValue(v string) (*AzureInstances, error) {
ev := AzureInstances(v)
if ev.IsValid() {
return &ev, nil
} else {
return nil, fmt.Errorf("invalid value '%v' for AzureInstances: valid values are %v", v, allowedAzureInstancesEnumValues)
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v AzureInstances) IsValid() bool {
for _, existing := range allowedAzureInstancesEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to azureInstances value
func (v AzureInstances) Ptr() *AzureInstances {
return &v
}
type NullableAzureInstances struct {
value *AzureInstances
isSet bool
}
func (v NullableAzureInstances) Get() *AzureInstances {
return v.value
}
func (v *NullableAzureInstances) Set(val *AzureInstances) {
v.value = val
v.isSet = true
}
func (v NullableAzureInstances) IsSet() bool {
return v.isSet
}
func (v *NullableAzureInstances) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAzureInstances(val *AzureInstances) *NullableAzureInstances {
return &NullableAzureInstances{value: val, isSet: true}
}
func (v NullableAzureInstances) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAzureInstances) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}