This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
/
model_resource.go
319 lines (268 loc) · 8.43 KB
/
model_resource.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
/*
CAPIF_Discover_Service_API
API for discovering service APIs. © 2022, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
API version: 1.3.0-alpha.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi_CAPIF_Discover_Service_API
import (
"encoding/json"
)
// checks if the Resource type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Resource{}
// Resource Represents the API resource data.
type Resource struct {
// Resource name
ResourceName string `json:"resourceName"`
CommType CommunicationType `json:"commType"`
// Relative URI of the API resource, it is set as {apiSpecificSuffixes} part of the URI structure as defined in clause 5.2.4 of 3GPP TS 29.122.
Uri string `json:"uri"`
// it is set as {custOpName} part of the URI structure for a custom operation associated with a resource as defined in clause 5.2.4 of 3GPP TS 29.122.
CustOpName *string `json:"custOpName,omitempty"`
// Custom operations associated with this resource.
CustOperations []CustomOperation `json:"custOperations,omitempty"`
// Supported HTTP methods for the API resource. Only applicable when the protocol in AefProfile indicates HTTP.
Operations []Operation `json:"operations,omitempty"`
// Text description of the API resource
Description *string `json:"description,omitempty"`
}
// NewResource instantiates a new Resource 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 NewResource(resourceName string, commType CommunicationType, uri string) *Resource {
this := Resource{}
this.ResourceName = resourceName
this.CommType = commType
this.Uri = uri
return &this
}
// NewResourceWithDefaults instantiates a new Resource 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 NewResourceWithDefaults() *Resource {
this := Resource{}
return &this
}
// GetResourceName returns the ResourceName field value
func (o *Resource) GetResourceName() string {
if o == nil {
var ret string
return ret
}
return o.ResourceName
}
// GetResourceNameOk returns a tuple with the ResourceName field value
// and a boolean to check if the value has been set.
func (o *Resource) GetResourceNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ResourceName, true
}
// SetResourceName sets field value
func (o *Resource) SetResourceName(v string) {
o.ResourceName = v
}
// GetCommType returns the CommType field value
func (o *Resource) GetCommType() CommunicationType {
if o == nil {
var ret CommunicationType
return ret
}
return o.CommType
}
// GetCommTypeOk returns a tuple with the CommType field value
// and a boolean to check if the value has been set.
func (o *Resource) GetCommTypeOk() (*CommunicationType, bool) {
if o == nil {
return nil, false
}
return &o.CommType, true
}
// SetCommType sets field value
func (o *Resource) SetCommType(v CommunicationType) {
o.CommType = v
}
// GetUri returns the Uri field value
func (o *Resource) GetUri() string {
if o == nil {
var ret string
return ret
}
return o.Uri
}
// GetUriOk returns a tuple with the Uri field value
// and a boolean to check if the value has been set.
func (o *Resource) GetUriOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Uri, true
}
// SetUri sets field value
func (o *Resource) SetUri(v string) {
o.Uri = v
}
// GetCustOpName returns the CustOpName field value if set, zero value otherwise.
func (o *Resource) GetCustOpName() string {
if o == nil || IsNil(o.CustOpName) {
var ret string
return ret
}
return *o.CustOpName
}
// GetCustOpNameOk returns a tuple with the CustOpName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Resource) GetCustOpNameOk() (*string, bool) {
if o == nil || IsNil(o.CustOpName) {
return nil, false
}
return o.CustOpName, true
}
// HasCustOpName returns a boolean if a field has been set.
func (o *Resource) HasCustOpName() bool {
if o != nil && !IsNil(o.CustOpName) {
return true
}
return false
}
// SetCustOpName gets a reference to the given string and assigns it to the CustOpName field.
func (o *Resource) SetCustOpName(v string) {
o.CustOpName = &v
}
// GetCustOperations returns the CustOperations field value if set, zero value otherwise.
func (o *Resource) GetCustOperations() []CustomOperation {
if o == nil || IsNil(o.CustOperations) {
var ret []CustomOperation
return ret
}
return o.CustOperations
}
// GetCustOperationsOk returns a tuple with the CustOperations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Resource) GetCustOperationsOk() ([]CustomOperation, bool) {
if o == nil || IsNil(o.CustOperations) {
return nil, false
}
return o.CustOperations, true
}
// HasCustOperations returns a boolean if a field has been set.
func (o *Resource) HasCustOperations() bool {
if o != nil && !IsNil(o.CustOperations) {
return true
}
return false
}
// SetCustOperations gets a reference to the given []CustomOperation and assigns it to the CustOperations field.
func (o *Resource) SetCustOperations(v []CustomOperation) {
o.CustOperations = v
}
// GetOperations returns the Operations field value if set, zero value otherwise.
func (o *Resource) GetOperations() []Operation {
if o == nil || IsNil(o.Operations) {
var ret []Operation
return ret
}
return o.Operations
}
// GetOperationsOk returns a tuple with the Operations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Resource) GetOperationsOk() ([]Operation, bool) {
if o == nil || IsNil(o.Operations) {
return nil, false
}
return o.Operations, true
}
// HasOperations returns a boolean if a field has been set.
func (o *Resource) HasOperations() bool {
if o != nil && !IsNil(o.Operations) {
return true
}
return false
}
// SetOperations gets a reference to the given []Operation and assigns it to the Operations field.
func (o *Resource) SetOperations(v []Operation) {
o.Operations = v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Resource) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Resource) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *Resource) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Resource) SetDescription(v string) {
o.Description = &v
}
func (o Resource) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Resource) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["resourceName"] = o.ResourceName
toSerialize["commType"] = o.CommType
toSerialize["uri"] = o.Uri
if !IsNil(o.CustOpName) {
toSerialize["custOpName"] = o.CustOpName
}
if !IsNil(o.CustOperations) {
toSerialize["custOperations"] = o.CustOperations
}
if !IsNil(o.Operations) {
toSerialize["operations"] = o.Operations
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
return toSerialize, nil
}
type NullableResource struct {
value *Resource
isSet bool
}
func (v NullableResource) Get() *Resource {
return v.value
}
func (v *NullableResource) Set(val *Resource) {
v.value = val
v.isSet = true
}
func (v NullableResource) IsSet() bool {
return v.isSet
}
func (v *NullableResource) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResource(val *Resource) *NullableResource {
return &NullableResource{value: val, isSet: true}
}
func (v NullableResource) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResource) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}