-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_common_reportcellstyle.go
359 lines (295 loc) · 11.8 KB
/
model_common_reportcellstyle.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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
/*
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications.
API version: 1.2.0
Contact: support-api@ezmax.ca
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package eZmaxApi
import (
"encoding/json"
"bytes"
"fmt"
)
// checks if the CommonReportcellstyle type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CommonReportcellstyle{}
// CommonReportcellstyle Styles applied to a Reportcell
type CommonReportcellstyle struct {
// Whether there is a border at the top of the Reportcell
BReportcellstyleBordertop bool `json:"bReportcellstyleBordertop"`
// Whether there is a border at the bottom of the Reportcell
BReportcellstyleBorderbottom bool `json:"bReportcellstyleBorderbottom"`
// Whether there is a border at the left of the Reportcell
BReportcellstyleBorderleft bool `json:"bReportcellstyleBorderleft"`
// Whether there is a border at the right of the Reportcell
BReportcellstyleBorderright bool `json:"bReportcellstyleBorderright"`
EReportcellHorizontalalignment EnumHorizontalalignment `json:"eReportcellHorizontalalignment"`
EReportcellVerticalalignment EnumVerticalalignment `json:"eReportcellVerticalalignment"`
EReportcellFontweight EnumFontweight `json:"eReportcellFontweight"`
EReportcellFontunderline EnumFontunderline `json:"eReportcellFontunderline"`
}
type _CommonReportcellstyle CommonReportcellstyle
// NewCommonReportcellstyle instantiates a new CommonReportcellstyle 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 NewCommonReportcellstyle(bReportcellstyleBordertop bool, bReportcellstyleBorderbottom bool, bReportcellstyleBorderleft bool, bReportcellstyleBorderright bool, eReportcellHorizontalalignment EnumHorizontalalignment, eReportcellVerticalalignment EnumVerticalalignment, eReportcellFontweight EnumFontweight, eReportcellFontunderline EnumFontunderline) *CommonReportcellstyle {
this := CommonReportcellstyle{}
this.BReportcellstyleBordertop = bReportcellstyleBordertop
this.BReportcellstyleBorderbottom = bReportcellstyleBorderbottom
this.BReportcellstyleBorderleft = bReportcellstyleBorderleft
this.BReportcellstyleBorderright = bReportcellstyleBorderright
this.EReportcellHorizontalalignment = eReportcellHorizontalalignment
this.EReportcellVerticalalignment = eReportcellVerticalalignment
this.EReportcellFontweight = eReportcellFontweight
this.EReportcellFontunderline = eReportcellFontunderline
return &this
}
// NewCommonReportcellstyleWithDefaults instantiates a new CommonReportcellstyle 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 NewCommonReportcellstyleWithDefaults() *CommonReportcellstyle {
this := CommonReportcellstyle{}
return &this
}
// GetBReportcellstyleBordertop returns the BReportcellstyleBordertop field value
func (o *CommonReportcellstyle) GetBReportcellstyleBordertop() bool {
if o == nil {
var ret bool
return ret
}
return o.BReportcellstyleBordertop
}
// GetBReportcellstyleBordertopOk returns a tuple with the BReportcellstyleBordertop field value
// and a boolean to check if the value has been set.
func (o *CommonReportcellstyle) GetBReportcellstyleBordertopOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.BReportcellstyleBordertop, true
}
// SetBReportcellstyleBordertop sets field value
func (o *CommonReportcellstyle) SetBReportcellstyleBordertop(v bool) {
o.BReportcellstyleBordertop = v
}
// GetBReportcellstyleBorderbottom returns the BReportcellstyleBorderbottom field value
func (o *CommonReportcellstyle) GetBReportcellstyleBorderbottom() bool {
if o == nil {
var ret bool
return ret
}
return o.BReportcellstyleBorderbottom
}
// GetBReportcellstyleBorderbottomOk returns a tuple with the BReportcellstyleBorderbottom field value
// and a boolean to check if the value has been set.
func (o *CommonReportcellstyle) GetBReportcellstyleBorderbottomOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.BReportcellstyleBorderbottom, true
}
// SetBReportcellstyleBorderbottom sets field value
func (o *CommonReportcellstyle) SetBReportcellstyleBorderbottom(v bool) {
o.BReportcellstyleBorderbottom = v
}
// GetBReportcellstyleBorderleft returns the BReportcellstyleBorderleft field value
func (o *CommonReportcellstyle) GetBReportcellstyleBorderleft() bool {
if o == nil {
var ret bool
return ret
}
return o.BReportcellstyleBorderleft
}
// GetBReportcellstyleBorderleftOk returns a tuple with the BReportcellstyleBorderleft field value
// and a boolean to check if the value has been set.
func (o *CommonReportcellstyle) GetBReportcellstyleBorderleftOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.BReportcellstyleBorderleft, true
}
// SetBReportcellstyleBorderleft sets field value
func (o *CommonReportcellstyle) SetBReportcellstyleBorderleft(v bool) {
o.BReportcellstyleBorderleft = v
}
// GetBReportcellstyleBorderright returns the BReportcellstyleBorderright field value
func (o *CommonReportcellstyle) GetBReportcellstyleBorderright() bool {
if o == nil {
var ret bool
return ret
}
return o.BReportcellstyleBorderright
}
// GetBReportcellstyleBorderrightOk returns a tuple with the BReportcellstyleBorderright field value
// and a boolean to check if the value has been set.
func (o *CommonReportcellstyle) GetBReportcellstyleBorderrightOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.BReportcellstyleBorderright, true
}
// SetBReportcellstyleBorderright sets field value
func (o *CommonReportcellstyle) SetBReportcellstyleBorderright(v bool) {
o.BReportcellstyleBorderright = v
}
// GetEReportcellHorizontalalignment returns the EReportcellHorizontalalignment field value
func (o *CommonReportcellstyle) GetEReportcellHorizontalalignment() EnumHorizontalalignment {
if o == nil {
var ret EnumHorizontalalignment
return ret
}
return o.EReportcellHorizontalalignment
}
// GetEReportcellHorizontalalignmentOk returns a tuple with the EReportcellHorizontalalignment field value
// and a boolean to check if the value has been set.
func (o *CommonReportcellstyle) GetEReportcellHorizontalalignmentOk() (*EnumHorizontalalignment, bool) {
if o == nil {
return nil, false
}
return &o.EReportcellHorizontalalignment, true
}
// SetEReportcellHorizontalalignment sets field value
func (o *CommonReportcellstyle) SetEReportcellHorizontalalignment(v EnumHorizontalalignment) {
o.EReportcellHorizontalalignment = v
}
// GetEReportcellVerticalalignment returns the EReportcellVerticalalignment field value
func (o *CommonReportcellstyle) GetEReportcellVerticalalignment() EnumVerticalalignment {
if o == nil {
var ret EnumVerticalalignment
return ret
}
return o.EReportcellVerticalalignment
}
// GetEReportcellVerticalalignmentOk returns a tuple with the EReportcellVerticalalignment field value
// and a boolean to check if the value has been set.
func (o *CommonReportcellstyle) GetEReportcellVerticalalignmentOk() (*EnumVerticalalignment, bool) {
if o == nil {
return nil, false
}
return &o.EReportcellVerticalalignment, true
}
// SetEReportcellVerticalalignment sets field value
func (o *CommonReportcellstyle) SetEReportcellVerticalalignment(v EnumVerticalalignment) {
o.EReportcellVerticalalignment = v
}
// GetEReportcellFontweight returns the EReportcellFontweight field value
func (o *CommonReportcellstyle) GetEReportcellFontweight() EnumFontweight {
if o == nil {
var ret EnumFontweight
return ret
}
return o.EReportcellFontweight
}
// GetEReportcellFontweightOk returns a tuple with the EReportcellFontweight field value
// and a boolean to check if the value has been set.
func (o *CommonReportcellstyle) GetEReportcellFontweightOk() (*EnumFontweight, bool) {
if o == nil {
return nil, false
}
return &o.EReportcellFontweight, true
}
// SetEReportcellFontweight sets field value
func (o *CommonReportcellstyle) SetEReportcellFontweight(v EnumFontweight) {
o.EReportcellFontweight = v
}
// GetEReportcellFontunderline returns the EReportcellFontunderline field value
func (o *CommonReportcellstyle) GetEReportcellFontunderline() EnumFontunderline {
if o == nil {
var ret EnumFontunderline
return ret
}
return o.EReportcellFontunderline
}
// GetEReportcellFontunderlineOk returns a tuple with the EReportcellFontunderline field value
// and a boolean to check if the value has been set.
func (o *CommonReportcellstyle) GetEReportcellFontunderlineOk() (*EnumFontunderline, bool) {
if o == nil {
return nil, false
}
return &o.EReportcellFontunderline, true
}
// SetEReportcellFontunderline sets field value
func (o *CommonReportcellstyle) SetEReportcellFontunderline(v EnumFontunderline) {
o.EReportcellFontunderline = v
}
func (o CommonReportcellstyle) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CommonReportcellstyle) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["bReportcellstyleBordertop"] = o.BReportcellstyleBordertop
toSerialize["bReportcellstyleBorderbottom"] = o.BReportcellstyleBorderbottom
toSerialize["bReportcellstyleBorderleft"] = o.BReportcellstyleBorderleft
toSerialize["bReportcellstyleBorderright"] = o.BReportcellstyleBorderright
toSerialize["eReportcellHorizontalalignment"] = o.EReportcellHorizontalalignment
toSerialize["eReportcellVerticalalignment"] = o.EReportcellVerticalalignment
toSerialize["eReportcellFontweight"] = o.EReportcellFontweight
toSerialize["eReportcellFontunderline"] = o.EReportcellFontunderline
return toSerialize, nil
}
func (o *CommonReportcellstyle) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"bReportcellstyleBordertop",
"bReportcellstyleBorderbottom",
"bReportcellstyleBorderleft",
"bReportcellstyleBorderright",
"eReportcellHorizontalalignment",
"eReportcellVerticalalignment",
"eReportcellFontweight",
"eReportcellFontunderline",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varCommonReportcellstyle := _CommonReportcellstyle{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varCommonReportcellstyle)
if err != nil {
return err
}
*o = CommonReportcellstyle(varCommonReportcellstyle)
return err
}
type NullableCommonReportcellstyle struct {
value *CommonReportcellstyle
isSet bool
}
func (v NullableCommonReportcellstyle) Get() *CommonReportcellstyle {
return v.value
}
func (v *NullableCommonReportcellstyle) Set(val *CommonReportcellstyle) {
v.value = val
v.isSet = true
}
func (v NullableCommonReportcellstyle) IsSet() bool {
return v.isSet
}
func (v *NullableCommonReportcellstyle) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCommonReportcellstyle(val *CommonReportcellstyle) *NullableCommonReportcellstyle {
return &NullableCommonReportcellstyle{value: val, isSet: true}
}
func (v NullableCommonReportcellstyle) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCommonReportcellstyle) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}