-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_identity_update_machine_request_model.go
267 lines (223 loc) · 8.9 KB
/
model_identity_update_machine_request_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
/*
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 IdentityUpdateMachineRequestModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IdentityUpdateMachineRequestModel{}
// IdentityUpdateMachineRequestModel Update a machine identity.
type IdentityUpdateMachineRequestModel struct {
// Enable or disable the machine account.
Enabled NullableBool `json:"Enabled,omitempty"`
// Old account password, used when changing the account password.
OldPassword NullableString `json:"OldPassword,omitempty"`
// New account password, used when changing the account password.
NewPassword NullableString `json:"NewPassword,omitempty"`
AccountPasswordFormat *IdentityPasswordFormat `json:"AccountPasswordFormat,omitempty"`
}
// NewIdentityUpdateMachineRequestModel instantiates a new IdentityUpdateMachineRequestModel 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 NewIdentityUpdateMachineRequestModel() *IdentityUpdateMachineRequestModel {
this := IdentityUpdateMachineRequestModel{}
return &this
}
// NewIdentityUpdateMachineRequestModelWithDefaults instantiates a new IdentityUpdateMachineRequestModel 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 NewIdentityUpdateMachineRequestModelWithDefaults() *IdentityUpdateMachineRequestModel {
this := IdentityUpdateMachineRequestModel{}
return &this
}
// GetEnabled returns the Enabled field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *IdentityUpdateMachineRequestModel) GetEnabled() bool {
if o == nil || IsNil(o.Enabled.Get()) {
var ret bool
return ret
}
return *o.Enabled.Get()
}
// GetEnabledOk returns a tuple with the Enabled 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 *IdentityUpdateMachineRequestModel) GetEnabledOk() (*bool, bool) {
if o == nil {
return nil, false
}
return o.Enabled.Get(), o.Enabled.IsSet()
}
// HasEnabled returns a boolean if a field has been set.
func (o *IdentityUpdateMachineRequestModel) HasEnabled() bool {
if o != nil && o.Enabled.IsSet() {
return true
}
return false
}
// SetEnabled gets a reference to the given NullableBool and assigns it to the Enabled field.
func (o *IdentityUpdateMachineRequestModel) SetEnabled(v bool) {
o.Enabled.Set(&v)
}
// SetEnabledNil sets the value for Enabled to be an explicit nil
func (o *IdentityUpdateMachineRequestModel) SetEnabledNil() {
o.Enabled.Set(nil)
}
// UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil
func (o *IdentityUpdateMachineRequestModel) UnsetEnabled() {
o.Enabled.Unset()
}
// GetOldPassword returns the OldPassword field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *IdentityUpdateMachineRequestModel) GetOldPassword() string {
if o == nil || IsNil(o.OldPassword.Get()) {
var ret string
return ret
}
return *o.OldPassword.Get()
}
// GetOldPasswordOk returns a tuple with the OldPassword 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 *IdentityUpdateMachineRequestModel) GetOldPasswordOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.OldPassword.Get(), o.OldPassword.IsSet()
}
// HasOldPassword returns a boolean if a field has been set.
func (o *IdentityUpdateMachineRequestModel) HasOldPassword() bool {
if o != nil && o.OldPassword.IsSet() {
return true
}
return false
}
// SetOldPassword gets a reference to the given NullableString and assigns it to the OldPassword field.
func (o *IdentityUpdateMachineRequestModel) SetOldPassword(v string) {
o.OldPassword.Set(&v)
}
// SetOldPasswordNil sets the value for OldPassword to be an explicit nil
func (o *IdentityUpdateMachineRequestModel) SetOldPasswordNil() {
o.OldPassword.Set(nil)
}
// UnsetOldPassword ensures that no value is present for OldPassword, not even an explicit nil
func (o *IdentityUpdateMachineRequestModel) UnsetOldPassword() {
o.OldPassword.Unset()
}
// GetNewPassword returns the NewPassword field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *IdentityUpdateMachineRequestModel) GetNewPassword() string {
if o == nil || IsNil(o.NewPassword.Get()) {
var ret string
return ret
}
return *o.NewPassword.Get()
}
// GetNewPasswordOk returns a tuple with the NewPassword 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 *IdentityUpdateMachineRequestModel) GetNewPasswordOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.NewPassword.Get(), o.NewPassword.IsSet()
}
// HasNewPassword returns a boolean if a field has been set.
func (o *IdentityUpdateMachineRequestModel) HasNewPassword() bool {
if o != nil && o.NewPassword.IsSet() {
return true
}
return false
}
// SetNewPassword gets a reference to the given NullableString and assigns it to the NewPassword field.
func (o *IdentityUpdateMachineRequestModel) SetNewPassword(v string) {
o.NewPassword.Set(&v)
}
// SetNewPasswordNil sets the value for NewPassword to be an explicit nil
func (o *IdentityUpdateMachineRequestModel) SetNewPasswordNil() {
o.NewPassword.Set(nil)
}
// UnsetNewPassword ensures that no value is present for NewPassword, not even an explicit nil
func (o *IdentityUpdateMachineRequestModel) UnsetNewPassword() {
o.NewPassword.Unset()
}
// GetAccountPasswordFormat returns the AccountPasswordFormat field value if set, zero value otherwise.
func (o *IdentityUpdateMachineRequestModel) GetAccountPasswordFormat() IdentityPasswordFormat {
if o == nil || IsNil(o.AccountPasswordFormat) {
var ret IdentityPasswordFormat
return ret
}
return *o.AccountPasswordFormat
}
// GetAccountPasswordFormatOk returns a tuple with the AccountPasswordFormat field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *IdentityUpdateMachineRequestModel) GetAccountPasswordFormatOk() (*IdentityPasswordFormat, bool) {
if o == nil || IsNil(o.AccountPasswordFormat) {
return nil, false
}
return o.AccountPasswordFormat, true
}
// HasAccountPasswordFormat returns a boolean if a field has been set.
func (o *IdentityUpdateMachineRequestModel) HasAccountPasswordFormat() bool {
if o != nil && !IsNil(o.AccountPasswordFormat) {
return true
}
return false
}
// SetAccountPasswordFormat gets a reference to the given IdentityPasswordFormat and assigns it to the AccountPasswordFormat field.
func (o *IdentityUpdateMachineRequestModel) SetAccountPasswordFormat(v IdentityPasswordFormat) {
o.AccountPasswordFormat = &v
}
func (o IdentityUpdateMachineRequestModel) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o IdentityUpdateMachineRequestModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Enabled.IsSet() {
toSerialize["Enabled"] = o.Enabled.Get()
}
if o.OldPassword.IsSet() {
toSerialize["OldPassword"] = o.OldPassword.Get()
}
if o.NewPassword.IsSet() {
toSerialize["NewPassword"] = o.NewPassword.Get()
}
if !IsNil(o.AccountPasswordFormat) {
toSerialize["AccountPasswordFormat"] = o.AccountPasswordFormat
}
return toSerialize, nil
}
type NullableIdentityUpdateMachineRequestModel struct {
value *IdentityUpdateMachineRequestModel
isSet bool
}
func (v NullableIdentityUpdateMachineRequestModel) Get() *IdentityUpdateMachineRequestModel {
return v.value
}
func (v *NullableIdentityUpdateMachineRequestModel) Set(val *IdentityUpdateMachineRequestModel) {
v.value = val
v.isSet = true
}
func (v NullableIdentityUpdateMachineRequestModel) IsSet() bool {
return v.isSet
}
func (v *NullableIdentityUpdateMachineRequestModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableIdentityUpdateMachineRequestModel(val *IdentityUpdateMachineRequestModel) *NullableIdentityUpdateMachineRequestModel {
return &NullableIdentityUpdateMachineRequestModel{value: val, isSet: true}
}
func (v NullableIdentityUpdateMachineRequestModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableIdentityUpdateMachineRequestModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}