-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_machine_catalog_validation_failure_model.go
269 lines (225 loc) · 8.86 KB
/
model_machine_catalog_validation_failure_model.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
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
/*
Citrix Virtual Apps and Desktops Rest API for Developer Portal
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: devportal-onprem-ga
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package citrixorchestration
import (
"encoding/json"
)
// checks if the MachineCatalogValidationFailureModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MachineCatalogValidationFailureModel{}
// MachineCatalogValidationFailureModel struct for MachineCatalogValidationFailureModel
type MachineCatalogValidationFailureModel struct {
// Gets or sets the lookup key (ErrorId) for this string.
ErrorId NullableString `json:"ErrorId,omitempty"`
// Gets or sets the category or label for the message.
Category NullableString `json:"Category,omitempty"`
// Gets or sets the human-readable message for the message.
ErrorMessage NullableString `json:"ErrorMessage,omitempty"`
// Gets or sets the parameters impacted by the validation failure.
Parameters []string `json:"Parameters,omitempty"`
}
// NewMachineCatalogValidationFailureModel instantiates a new MachineCatalogValidationFailureModel 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 NewMachineCatalogValidationFailureModel() *MachineCatalogValidationFailureModel {
this := MachineCatalogValidationFailureModel{}
return &this
}
// NewMachineCatalogValidationFailureModelWithDefaults instantiates a new MachineCatalogValidationFailureModel 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 NewMachineCatalogValidationFailureModelWithDefaults() *MachineCatalogValidationFailureModel {
this := MachineCatalogValidationFailureModel{}
return &this
}
// GetErrorId returns the ErrorId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MachineCatalogValidationFailureModel) GetErrorId() string {
if o == nil || IsNil(o.ErrorId.Get()) {
var ret string
return ret
}
return *o.ErrorId.Get()
}
// GetErrorIdOk returns a tuple with the ErrorId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *MachineCatalogValidationFailureModel) GetErrorIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ErrorId.Get(), o.ErrorId.IsSet()
}
// HasErrorId returns a boolean if a field has been set.
func (o *MachineCatalogValidationFailureModel) HasErrorId() bool {
if o != nil && o.ErrorId.IsSet() {
return true
}
return false
}
// SetErrorId gets a reference to the given NullableString and assigns it to the ErrorId field.
func (o *MachineCatalogValidationFailureModel) SetErrorId(v string) {
o.ErrorId.Set(&v)
}
// SetErrorIdNil sets the value for ErrorId to be an explicit nil
func (o *MachineCatalogValidationFailureModel) SetErrorIdNil() {
o.ErrorId.Set(nil)
}
// UnsetErrorId ensures that no value is present for ErrorId, not even an explicit nil
func (o *MachineCatalogValidationFailureModel) UnsetErrorId() {
o.ErrorId.Unset()
}
// GetCategory returns the Category field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MachineCatalogValidationFailureModel) GetCategory() string {
if o == nil || IsNil(o.Category.Get()) {
var ret string
return ret
}
return *o.Category.Get()
}
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *MachineCatalogValidationFailureModel) GetCategoryOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Category.Get(), o.Category.IsSet()
}
// HasCategory returns a boolean if a field has been set.
func (o *MachineCatalogValidationFailureModel) HasCategory() bool {
if o != nil && o.Category.IsSet() {
return true
}
return false
}
// SetCategory gets a reference to the given NullableString and assigns it to the Category field.
func (o *MachineCatalogValidationFailureModel) SetCategory(v string) {
o.Category.Set(&v)
}
// SetCategoryNil sets the value for Category to be an explicit nil
func (o *MachineCatalogValidationFailureModel) SetCategoryNil() {
o.Category.Set(nil)
}
// UnsetCategory ensures that no value is present for Category, not even an explicit nil
func (o *MachineCatalogValidationFailureModel) UnsetCategory() {
o.Category.Unset()
}
// GetErrorMessage returns the ErrorMessage field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MachineCatalogValidationFailureModel) GetErrorMessage() string {
if o == nil || IsNil(o.ErrorMessage.Get()) {
var ret string
return ret
}
return *o.ErrorMessage.Get()
}
// GetErrorMessageOk returns a tuple with the ErrorMessage field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *MachineCatalogValidationFailureModel) GetErrorMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ErrorMessage.Get(), o.ErrorMessage.IsSet()
}
// HasErrorMessage returns a boolean if a field has been set.
func (o *MachineCatalogValidationFailureModel) HasErrorMessage() bool {
if o != nil && o.ErrorMessage.IsSet() {
return true
}
return false
}
// SetErrorMessage gets a reference to the given NullableString and assigns it to the ErrorMessage field.
func (o *MachineCatalogValidationFailureModel) SetErrorMessage(v string) {
o.ErrorMessage.Set(&v)
}
// SetErrorMessageNil sets the value for ErrorMessage to be an explicit nil
func (o *MachineCatalogValidationFailureModel) SetErrorMessageNil() {
o.ErrorMessage.Set(nil)
}
// UnsetErrorMessage ensures that no value is present for ErrorMessage, not even an explicit nil
func (o *MachineCatalogValidationFailureModel) UnsetErrorMessage() {
o.ErrorMessage.Unset()
}
// GetParameters returns the Parameters field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *MachineCatalogValidationFailureModel) GetParameters() []string {
if o == nil {
var ret []string
return ret
}
return o.Parameters
}
// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *MachineCatalogValidationFailureModel) GetParametersOk() ([]string, bool) {
if o == nil || IsNil(o.Parameters) {
return nil, false
}
return o.Parameters, true
}
// HasParameters returns a boolean if a field has been set.
func (o *MachineCatalogValidationFailureModel) HasParameters() bool {
if o != nil && IsNil(o.Parameters) {
return true
}
return false
}
// SetParameters gets a reference to the given []string and assigns it to the Parameters field.
func (o *MachineCatalogValidationFailureModel) SetParameters(v []string) {
o.Parameters = v
}
func (o MachineCatalogValidationFailureModel) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MachineCatalogValidationFailureModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.ErrorId.IsSet() {
toSerialize["ErrorId"] = o.ErrorId.Get()
}
if o.Category.IsSet() {
toSerialize["Category"] = o.Category.Get()
}
if o.ErrorMessage.IsSet() {
toSerialize["ErrorMessage"] = o.ErrorMessage.Get()
}
if o.Parameters != nil {
toSerialize["Parameters"] = o.Parameters
}
return toSerialize, nil
}
type NullableMachineCatalogValidationFailureModel struct {
value *MachineCatalogValidationFailureModel
isSet bool
}
func (v NullableMachineCatalogValidationFailureModel) Get() *MachineCatalogValidationFailureModel {
return v.value
}
func (v *NullableMachineCatalogValidationFailureModel) Set(val *MachineCatalogValidationFailureModel) {
v.value = val
v.isSet = true
}
func (v NullableMachineCatalogValidationFailureModel) IsSet() bool {
return v.isSet
}
func (v *NullableMachineCatalogValidationFailureModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMachineCatalogValidationFailureModel(val *MachineCatalogValidationFailureModel) *NullableMachineCatalogValidationFailureModel {
return &NullableMachineCatalogValidationFailureModel{value: val, isSet: true}
}
func (v NullableMachineCatalogValidationFailureModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMachineCatalogValidationFailureModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}