-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_admin_permission.go
306 lines (255 loc) · 7.84 KB
/
model_admin_permission.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
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
/*
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 AdminPermission type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminPermission{}
// AdminPermission struct for AdminPermission
type AdminPermission struct {
Create *AdminCreate `json:"create,omitempty"`
Delete *AdminDelete `json:"delete,omitempty"`
Execute *AdminExecute `json:"execute,omitempty"`
Get *AdminGet `json:"get,omitempty"`
Update *AdminUpdate `json:"update,omitempty"`
Administrate *AdminAdministrate `json:"administrate,omitempty"`
}
// NewAdminPermission instantiates a new AdminPermission 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 NewAdminPermission() *AdminPermission {
this := AdminPermission{}
return &this
}
// NewAdminPermissionWithDefaults instantiates a new AdminPermission 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 NewAdminPermissionWithDefaults() *AdminPermission {
this := AdminPermission{}
return &this
}
// GetCreate returns the Create field value if set, zero value otherwise.
func (o *AdminPermission) GetCreate() AdminCreate {
if o == nil || IsNil(o.Create) {
var ret AdminCreate
return ret
}
return *o.Create
}
// GetCreateOk returns a tuple with the Create field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminPermission) GetCreateOk() (*AdminCreate, bool) {
if o == nil || IsNil(o.Create) {
return nil, false
}
return o.Create, true
}
// HasCreate returns a boolean if a field has been set.
func (o *AdminPermission) HasCreate() bool {
if o != nil && !IsNil(o.Create) {
return true
}
return false
}
// SetCreate gets a reference to the given AdminCreate and assigns it to the Create field.
func (o *AdminPermission) SetCreate(v AdminCreate) {
o.Create = &v
}
// GetDelete returns the Delete field value if set, zero value otherwise.
func (o *AdminPermission) GetDelete() AdminDelete {
if o == nil || IsNil(o.Delete) {
var ret AdminDelete
return ret
}
return *o.Delete
}
// GetDeleteOk returns a tuple with the Delete field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminPermission) GetDeleteOk() (*AdminDelete, bool) {
if o == nil || IsNil(o.Delete) {
return nil, false
}
return o.Delete, true
}
// HasDelete returns a boolean if a field has been set.
func (o *AdminPermission) HasDelete() bool {
if o != nil && !IsNil(o.Delete) {
return true
}
return false
}
// SetDelete gets a reference to the given AdminDelete and assigns it to the Delete field.
func (o *AdminPermission) SetDelete(v AdminDelete) {
o.Delete = &v
}
// GetExecute returns the Execute field value if set, zero value otherwise.
func (o *AdminPermission) GetExecute() AdminExecute {
if o == nil || IsNil(o.Execute) {
var ret AdminExecute
return ret
}
return *o.Execute
}
// GetExecuteOk returns a tuple with the Execute field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminPermission) GetExecuteOk() (*AdminExecute, bool) {
if o == nil || IsNil(o.Execute) {
return nil, false
}
return o.Execute, true
}
// HasExecute returns a boolean if a field has been set.
func (o *AdminPermission) HasExecute() bool {
if o != nil && !IsNil(o.Execute) {
return true
}
return false
}
// SetExecute gets a reference to the given AdminExecute and assigns it to the Execute field.
func (o *AdminPermission) SetExecute(v AdminExecute) {
o.Execute = &v
}
// GetGet returns the Get field value if set, zero value otherwise.
func (o *AdminPermission) GetGet() AdminGet {
if o == nil || IsNil(o.Get) {
var ret AdminGet
return ret
}
return *o.Get
}
// GetGetOk returns a tuple with the Get field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminPermission) GetGetOk() (*AdminGet, bool) {
if o == nil || IsNil(o.Get) {
return nil, false
}
return o.Get, true
}
// HasGet returns a boolean if a field has been set.
func (o *AdminPermission) HasGet() bool {
if o != nil && !IsNil(o.Get) {
return true
}
return false
}
// SetGet gets a reference to the given AdminGet and assigns it to the Get field.
func (o *AdminPermission) SetGet(v AdminGet) {
o.Get = &v
}
// GetUpdate returns the Update field value if set, zero value otherwise.
func (o *AdminPermission) GetUpdate() AdminUpdate {
if o == nil || IsNil(o.Update) {
var ret AdminUpdate
return ret
}
return *o.Update
}
// GetUpdateOk returns a tuple with the Update field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminPermission) GetUpdateOk() (*AdminUpdate, bool) {
if o == nil || IsNil(o.Update) {
return nil, false
}
return o.Update, true
}
// HasUpdate returns a boolean if a field has been set.
func (o *AdminPermission) HasUpdate() bool {
if o != nil && !IsNil(o.Update) {
return true
}
return false
}
// SetUpdate gets a reference to the given AdminUpdate and assigns it to the Update field.
func (o *AdminPermission) SetUpdate(v AdminUpdate) {
o.Update = &v
}
// GetAdministrate returns the Administrate field value if set, zero value otherwise.
func (o *AdminPermission) GetAdministrate() AdminAdministrate {
if o == nil || IsNil(o.Administrate) {
var ret AdminAdministrate
return ret
}
return *o.Administrate
}
// GetAdministrateOk returns a tuple with the Administrate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminPermission) GetAdministrateOk() (*AdminAdministrate, bool) {
if o == nil || IsNil(o.Administrate) {
return nil, false
}
return o.Administrate, true
}
// HasAdministrate returns a boolean if a field has been set.
func (o *AdminPermission) HasAdministrate() bool {
if o != nil && !IsNil(o.Administrate) {
return true
}
return false
}
// SetAdministrate gets a reference to the given AdminAdministrate and assigns it to the Administrate field.
func (o *AdminPermission) SetAdministrate(v AdminAdministrate) {
o.Administrate = &v
}
func (o AdminPermission) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminPermission) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Create) {
toSerialize["create"] = o.Create
}
if !IsNil(o.Delete) {
toSerialize["delete"] = o.Delete
}
if !IsNil(o.Execute) {
toSerialize["execute"] = o.Execute
}
if !IsNil(o.Get) {
toSerialize["get"] = o.Get
}
if !IsNil(o.Update) {
toSerialize["update"] = o.Update
}
if !IsNil(o.Administrate) {
toSerialize["administrate"] = o.Administrate
}
return toSerialize, nil
}
type NullableAdminPermission struct {
value *AdminPermission
isSet bool
}
func (v NullableAdminPermission) Get() *AdminPermission {
return v.value
}
func (v *NullableAdminPermission) Set(val *AdminPermission) {
v.value = val
v.isSet = true
}
func (v NullableAdminPermission) IsSet() bool {
return v.isSet
}
func (v *NullableAdminPermission) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminPermission(val *AdminPermission) *NullableAdminPermission {
return &NullableAdminPermission{value: val, isSet: true}
}
func (v NullableAdminPermission) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminPermission) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}