-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_create_contact_vm.go
265 lines (221 loc) · 7.26 KB
/
model_create_contact_vm.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
/*
FastReport Cloud
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package gofrcloud
import (
"encoding/json"
)
// checks if the CreateContactVM type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateContactVM{}
// CreateContactVM struct for CreateContactVM
type CreateContactVM struct {
Name NullableString `json:"name,omitempty"`
Email NullableString `json:"email,omitempty"`
Groups []string `json:"groups,omitempty"`
SubscriptionId NullableString `json:"subscriptionId,omitempty"`
}
// NewCreateContactVM instantiates a new CreateContactVM 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 NewCreateContactVM() *CreateContactVM {
this := CreateContactVM{}
return &this
}
// NewCreateContactVMWithDefaults instantiates a new CreateContactVM 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 NewCreateContactVMWithDefaults() *CreateContactVM {
this := CreateContactVM{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateContactVM) GetName() string {
if o == nil || IsNil(o.Name.Get()) {
var ret string
return ret
}
return *o.Name.Get()
}
// GetNameOk returns a tuple with the Name 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 *CreateContactVM) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Name.Get(), o.Name.IsSet()
}
// HasName returns a boolean if a field has been set.
func (o *CreateContactVM) HasName() bool {
if o != nil && o.Name.IsSet() {
return true
}
return false
}
// SetName gets a reference to the given NullableString and assigns it to the Name field.
func (o *CreateContactVM) SetName(v string) {
o.Name.Set(&v)
}
// SetNameNil sets the value for Name to be an explicit nil
func (o *CreateContactVM) SetNameNil() {
o.Name.Set(nil)
}
// UnsetName ensures that no value is present for Name, not even an explicit nil
func (o *CreateContactVM) UnsetName() {
o.Name.Unset()
}
// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateContactVM) GetEmail() string {
if o == nil || IsNil(o.Email.Get()) {
var ret string
return ret
}
return *o.Email.Get()
}
// GetEmailOk returns a tuple with the Email 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 *CreateContactVM) GetEmailOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Email.Get(), o.Email.IsSet()
}
// HasEmail returns a boolean if a field has been set.
func (o *CreateContactVM) HasEmail() bool {
if o != nil && o.Email.IsSet() {
return true
}
return false
}
// SetEmail gets a reference to the given NullableString and assigns it to the Email field.
func (o *CreateContactVM) SetEmail(v string) {
o.Email.Set(&v)
}
// SetEmailNil sets the value for Email to be an explicit nil
func (o *CreateContactVM) SetEmailNil() {
o.Email.Set(nil)
}
// UnsetEmail ensures that no value is present for Email, not even an explicit nil
func (o *CreateContactVM) UnsetEmail() {
o.Email.Unset()
}
// GetGroups returns the Groups field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateContactVM) GetGroups() []string {
if o == nil {
var ret []string
return ret
}
return o.Groups
}
// GetGroupsOk returns a tuple with the Groups 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 *CreateContactVM) GetGroupsOk() ([]string, bool) {
if o == nil || IsNil(o.Groups) {
return nil, false
}
return o.Groups, true
}
// HasGroups returns a boolean if a field has been set.
func (o *CreateContactVM) HasGroups() bool {
if o != nil && IsNil(o.Groups) {
return true
}
return false
}
// SetGroups gets a reference to the given []string and assigns it to the Groups field.
func (o *CreateContactVM) SetGroups(v []string) {
o.Groups = v
}
// GetSubscriptionId returns the SubscriptionId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateContactVM) GetSubscriptionId() string {
if o == nil || IsNil(o.SubscriptionId.Get()) {
var ret string
return ret
}
return *o.SubscriptionId.Get()
}
// GetSubscriptionIdOk returns a tuple with the SubscriptionId 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 *CreateContactVM) GetSubscriptionIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.SubscriptionId.Get(), o.SubscriptionId.IsSet()
}
// HasSubscriptionId returns a boolean if a field has been set.
func (o *CreateContactVM) HasSubscriptionId() bool {
if o != nil && o.SubscriptionId.IsSet() {
return true
}
return false
}
// SetSubscriptionId gets a reference to the given NullableString and assigns it to the SubscriptionId field.
func (o *CreateContactVM) SetSubscriptionId(v string) {
o.SubscriptionId.Set(&v)
}
// SetSubscriptionIdNil sets the value for SubscriptionId to be an explicit nil
func (o *CreateContactVM) SetSubscriptionIdNil() {
o.SubscriptionId.Set(nil)
}
// UnsetSubscriptionId ensures that no value is present for SubscriptionId, not even an explicit nil
func (o *CreateContactVM) UnsetSubscriptionId() {
o.SubscriptionId.Unset()
}
func (o CreateContactVM) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateContactVM) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.Name.IsSet() {
toSerialize["name"] = o.Name.Get()
}
if o.Email.IsSet() {
toSerialize["email"] = o.Email.Get()
}
if o.Groups != nil {
toSerialize["groups"] = o.Groups
}
if o.SubscriptionId.IsSet() {
toSerialize["subscriptionId"] = o.SubscriptionId.Get()
}
return toSerialize, nil
}
type NullableCreateContactVM struct {
value *CreateContactVM
isSet bool
}
func (v NullableCreateContactVM) Get() *CreateContactVM {
return v.value
}
func (v *NullableCreateContactVM) Set(val *CreateContactVM) {
v.value = val
v.isSet = true
}
func (v NullableCreateContactVM) IsSet() bool {
return v.isSet
}
func (v *NullableCreateContactVM) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateContactVM(val *CreateContactVM) *NullableCreateContactVM {
return &NullableCreateContactVM{value: val, isSet: true}
}
func (v NullableCreateContactVM) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateContactVM) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}