-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodel_association.go
387 lines (326 loc) · 9.91 KB
/
model_association.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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
/*
NCI EVS Rest API
Endpoints to support searching, metadata, and content retrieval for EVS terminologies. To learn more about how to interact with this api, see the <a href=\"https://github.com/NCIEVS/evsrestapi-client-SDK\">Github evsrestapi-client-SDK project.</a>
API version: 1.7.2.RELEASE
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package evs
import (
"encoding/json"
)
// checks if the Association type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Association{}
// Association Represents a non-defining (in a logical sense) relationship between two concepts
type Association struct {
// URI for this element in an rdf-based source file
Uri *string `json:"uri,omitempty"`
// Used to indicate the total amount of data in cases where a limit is being applied
Ct *int32 `json:"ct,omitempty"`
// Relationship type
Type *string `json:"type,omitempty"`
// Related code (the code on the other side of the relationship)
RelatedCode *string `json:"relatedCode,omitempty"`
// Preferred name of the related code
RelatedName *string `json:"relatedName,omitempty"`
// Relationship source
Source *string `json:"source,omitempty"`
// Used by search calls to provide information for highlighting a view of results
Highlight *string `json:"highlight,omitempty"`
// Type/value qualifiers on the relationship
Qualifiers []Qualifier `json:"qualifiers,omitempty"`
}
// NewAssociation instantiates a new Association 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 NewAssociation() *Association {
this := Association{}
return &this
}
// NewAssociationWithDefaults instantiates a new Association 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 NewAssociationWithDefaults() *Association {
this := Association{}
return &this
}
// GetUri returns the Uri field value if set, zero value otherwise.
func (o *Association) GetUri() string {
if o == nil || IsNil(o.Uri) {
var ret string
return ret
}
return *o.Uri
}
// GetUriOk returns a tuple with the Uri field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Association) GetUriOk() (*string, bool) {
if o == nil || IsNil(o.Uri) {
return nil, false
}
return o.Uri, true
}
// HasUri returns a boolean if a field has been set.
func (o *Association) HasUri() bool {
if o != nil && !IsNil(o.Uri) {
return true
}
return false
}
// SetUri gets a reference to the given string and assigns it to the Uri field.
func (o *Association) SetUri(v string) {
o.Uri = &v
}
// GetCt returns the Ct field value if set, zero value otherwise.
func (o *Association) GetCt() int32 {
if o == nil || IsNil(o.Ct) {
var ret int32
return ret
}
return *o.Ct
}
// GetCtOk returns a tuple with the Ct field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Association) GetCtOk() (*int32, bool) {
if o == nil || IsNil(o.Ct) {
return nil, false
}
return o.Ct, true
}
// HasCt returns a boolean if a field has been set.
func (o *Association) HasCt() bool {
if o != nil && !IsNil(o.Ct) {
return true
}
return false
}
// SetCt gets a reference to the given int32 and assigns it to the Ct field.
func (o *Association) SetCt(v int32) {
o.Ct = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *Association) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Association) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *Association) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *Association) SetType(v string) {
o.Type = &v
}
// GetRelatedCode returns the RelatedCode field value if set, zero value otherwise.
func (o *Association) GetRelatedCode() string {
if o == nil || IsNil(o.RelatedCode) {
var ret string
return ret
}
return *o.RelatedCode
}
// GetRelatedCodeOk returns a tuple with the RelatedCode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Association) GetRelatedCodeOk() (*string, bool) {
if o == nil || IsNil(o.RelatedCode) {
return nil, false
}
return o.RelatedCode, true
}
// HasRelatedCode returns a boolean if a field has been set.
func (o *Association) HasRelatedCode() bool {
if o != nil && !IsNil(o.RelatedCode) {
return true
}
return false
}
// SetRelatedCode gets a reference to the given string and assigns it to the RelatedCode field.
func (o *Association) SetRelatedCode(v string) {
o.RelatedCode = &v
}
// GetRelatedName returns the RelatedName field value if set, zero value otherwise.
func (o *Association) GetRelatedName() string {
if o == nil || IsNil(o.RelatedName) {
var ret string
return ret
}
return *o.RelatedName
}
// GetRelatedNameOk returns a tuple with the RelatedName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Association) GetRelatedNameOk() (*string, bool) {
if o == nil || IsNil(o.RelatedName) {
return nil, false
}
return o.RelatedName, true
}
// HasRelatedName returns a boolean if a field has been set.
func (o *Association) HasRelatedName() bool {
if o != nil && !IsNil(o.RelatedName) {
return true
}
return false
}
// SetRelatedName gets a reference to the given string and assigns it to the RelatedName field.
func (o *Association) SetRelatedName(v string) {
o.RelatedName = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *Association) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Association) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *Association) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *Association) SetSource(v string) {
o.Source = &v
}
// GetHighlight returns the Highlight field value if set, zero value otherwise.
func (o *Association) GetHighlight() string {
if o == nil || IsNil(o.Highlight) {
var ret string
return ret
}
return *o.Highlight
}
// GetHighlightOk returns a tuple with the Highlight field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Association) GetHighlightOk() (*string, bool) {
if o == nil || IsNil(o.Highlight) {
return nil, false
}
return o.Highlight, true
}
// HasHighlight returns a boolean if a field has been set.
func (o *Association) HasHighlight() bool {
if o != nil && !IsNil(o.Highlight) {
return true
}
return false
}
// SetHighlight gets a reference to the given string and assigns it to the Highlight field.
func (o *Association) SetHighlight(v string) {
o.Highlight = &v
}
// GetQualifiers returns the Qualifiers field value if set, zero value otherwise.
func (o *Association) GetQualifiers() []Qualifier {
if o == nil || IsNil(o.Qualifiers) {
var ret []Qualifier
return ret
}
return o.Qualifiers
}
// GetQualifiersOk returns a tuple with the Qualifiers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Association) GetQualifiersOk() ([]Qualifier, bool) {
if o == nil || IsNil(o.Qualifiers) {
return nil, false
}
return o.Qualifiers, true
}
// HasQualifiers returns a boolean if a field has been set.
func (o *Association) HasQualifiers() bool {
if o != nil && !IsNil(o.Qualifiers) {
return true
}
return false
}
// SetQualifiers gets a reference to the given []Qualifier and assigns it to the Qualifiers field.
func (o *Association) SetQualifiers(v []Qualifier) {
o.Qualifiers = v
}
func (o Association) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Association) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Uri) {
toSerialize["uri"] = o.Uri
}
if !IsNil(o.Ct) {
toSerialize["ct"] = o.Ct
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.RelatedCode) {
toSerialize["relatedCode"] = o.RelatedCode
}
if !IsNil(o.RelatedName) {
toSerialize["relatedName"] = o.RelatedName
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Highlight) {
toSerialize["highlight"] = o.Highlight
}
if !IsNil(o.Qualifiers) {
toSerialize["qualifiers"] = o.Qualifiers
}
return toSerialize, nil
}
type NullableAssociation struct {
value *Association
isSet bool
}
func (v NullableAssociation) Get() *Association {
return v.value
}
func (v *NullableAssociation) Set(val *Association) {
v.value = val
v.isSet = true
}
func (v NullableAssociation) IsSet() bool {
return v.isSet
}
func (v *NullableAssociation) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAssociation(val *Association) *NullableAssociation {
return &NullableAssociation{value: val, isSet: true}
}
func (v NullableAssociation) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAssociation) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}