forked from okta/okta-sdk-golang
/
model_email_preview__links.go
306 lines (253 loc) · 8.36 KB
/
model_email_preview__links.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
/*
Okta Admin Management
Allows customers to easily access the Okta Management APIs
Copyright 2018 - Present Okta, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
API version: 5.1.0
Contact: devex-public@okta.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package okta
import (
"encoding/json"
)
// EmailPreviewLinks struct for EmailPreviewLinks
type EmailPreviewLinks struct {
Self *HrefObjectSelfLink `json:"self,omitempty"`
ContentSource *HrefObject `json:"contentSource,omitempty"`
Template *HrefObject `json:"template,omitempty"`
Test *HrefObject `json:"test,omitempty"`
DefaultContent *HrefObject `json:"defaultContent,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EmailPreviewLinks EmailPreviewLinks
// NewEmailPreviewLinks instantiates a new EmailPreviewLinks 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 NewEmailPreviewLinks() *EmailPreviewLinks {
this := EmailPreviewLinks{}
return &this
}
// NewEmailPreviewLinksWithDefaults instantiates a new EmailPreviewLinks 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 NewEmailPreviewLinksWithDefaults() *EmailPreviewLinks {
this := EmailPreviewLinks{}
return &this
}
// GetSelf returns the Self field value if set, zero value otherwise.
func (o *EmailPreviewLinks) GetSelf() HrefObjectSelfLink {
if o == nil || o.Self == nil {
var ret HrefObjectSelfLink
return ret
}
return *o.Self
}
// GetSelfOk returns a tuple with the Self field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailPreviewLinks) GetSelfOk() (*HrefObjectSelfLink, bool) {
if o == nil || o.Self == nil {
return nil, false
}
return o.Self, true
}
// HasSelf returns a boolean if a field has been set.
func (o *EmailPreviewLinks) HasSelf() bool {
if o != nil && o.Self != nil {
return true
}
return false
}
// SetSelf gets a reference to the given HrefObjectSelfLink and assigns it to the Self field.
func (o *EmailPreviewLinks) SetSelf(v HrefObjectSelfLink) {
o.Self = &v
}
// GetContentSource returns the ContentSource field value if set, zero value otherwise.
func (o *EmailPreviewLinks) GetContentSource() HrefObject {
if o == nil || o.ContentSource == nil {
var ret HrefObject
return ret
}
return *o.ContentSource
}
// GetContentSourceOk returns a tuple with the ContentSource field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailPreviewLinks) GetContentSourceOk() (*HrefObject, bool) {
if o == nil || o.ContentSource == nil {
return nil, false
}
return o.ContentSource, true
}
// HasContentSource returns a boolean if a field has been set.
func (o *EmailPreviewLinks) HasContentSource() bool {
if o != nil && o.ContentSource != nil {
return true
}
return false
}
// SetContentSource gets a reference to the given HrefObject and assigns it to the ContentSource field.
func (o *EmailPreviewLinks) SetContentSource(v HrefObject) {
o.ContentSource = &v
}
// GetTemplate returns the Template field value if set, zero value otherwise.
func (o *EmailPreviewLinks) GetTemplate() HrefObject {
if o == nil || o.Template == nil {
var ret HrefObject
return ret
}
return *o.Template
}
// GetTemplateOk returns a tuple with the Template field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailPreviewLinks) GetTemplateOk() (*HrefObject, bool) {
if o == nil || o.Template == nil {
return nil, false
}
return o.Template, true
}
// HasTemplate returns a boolean if a field has been set.
func (o *EmailPreviewLinks) HasTemplate() bool {
if o != nil && o.Template != nil {
return true
}
return false
}
// SetTemplate gets a reference to the given HrefObject and assigns it to the Template field.
func (o *EmailPreviewLinks) SetTemplate(v HrefObject) {
o.Template = &v
}
// GetTest returns the Test field value if set, zero value otherwise.
func (o *EmailPreviewLinks) GetTest() HrefObject {
if o == nil || o.Test == nil {
var ret HrefObject
return ret
}
return *o.Test
}
// GetTestOk returns a tuple with the Test field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailPreviewLinks) GetTestOk() (*HrefObject, bool) {
if o == nil || o.Test == nil {
return nil, false
}
return o.Test, true
}
// HasTest returns a boolean if a field has been set.
func (o *EmailPreviewLinks) HasTest() bool {
if o != nil && o.Test != nil {
return true
}
return false
}
// SetTest gets a reference to the given HrefObject and assigns it to the Test field.
func (o *EmailPreviewLinks) SetTest(v HrefObject) {
o.Test = &v
}
// GetDefaultContent returns the DefaultContent field value if set, zero value otherwise.
func (o *EmailPreviewLinks) GetDefaultContent() HrefObject {
if o == nil || o.DefaultContent == nil {
var ret HrefObject
return ret
}
return *o.DefaultContent
}
// GetDefaultContentOk returns a tuple with the DefaultContent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EmailPreviewLinks) GetDefaultContentOk() (*HrefObject, bool) {
if o == nil || o.DefaultContent == nil {
return nil, false
}
return o.DefaultContent, true
}
// HasDefaultContent returns a boolean if a field has been set.
func (o *EmailPreviewLinks) HasDefaultContent() bool {
if o != nil && o.DefaultContent != nil {
return true
}
return false
}
// SetDefaultContent gets a reference to the given HrefObject and assigns it to the DefaultContent field.
func (o *EmailPreviewLinks) SetDefaultContent(v HrefObject) {
o.DefaultContent = &v
}
func (o EmailPreviewLinks) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Self != nil {
toSerialize["self"] = o.Self
}
if o.ContentSource != nil {
toSerialize["contentSource"] = o.ContentSource
}
if o.Template != nil {
toSerialize["template"] = o.Template
}
if o.Test != nil {
toSerialize["test"] = o.Test
}
if o.DefaultContent != nil {
toSerialize["defaultContent"] = o.DefaultContent
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return json.Marshal(toSerialize)
}
func (o *EmailPreviewLinks) UnmarshalJSON(bytes []byte) (err error) {
varEmailPreviewLinks := _EmailPreviewLinks{}
err = json.Unmarshal(bytes, &varEmailPreviewLinks)
if err == nil {
*o = EmailPreviewLinks(varEmailPreviewLinks)
} else {
return err
}
additionalProperties := make(map[string]interface{})
err = json.Unmarshal(bytes, &additionalProperties)
if err == nil {
delete(additionalProperties, "self")
delete(additionalProperties, "contentSource")
delete(additionalProperties, "template")
delete(additionalProperties, "test")
delete(additionalProperties, "defaultContent")
o.AdditionalProperties = additionalProperties
} else {
return err
}
return err
}
type NullableEmailPreviewLinks struct {
value *EmailPreviewLinks
isSet bool
}
func (v NullableEmailPreviewLinks) Get() *EmailPreviewLinks {
return v.value
}
func (v *NullableEmailPreviewLinks) Set(val *EmailPreviewLinks) {
v.value = val
v.isSet = true
}
func (v NullableEmailPreviewLinks) IsSet() bool {
return v.isSet
}
func (v *NullableEmailPreviewLinks) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEmailPreviewLinks(val *EmailPreviewLinks) *NullableEmailPreviewLinks {
return &NullableEmailPreviewLinks{value: val, isSet: true}
}
func (v NullableEmailPreviewLinks) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEmailPreviewLinks) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}