NONRTRIC-946: Add support for Kong routes
[nonrtric/plt/sme.git] / servicemanager / internal / common29122 / common29122.gen.go
1 // Package common29122 provides primitives to interact with the openapi HTTP API.
2 //
3 // Code generated by github.com/deepmap/oapi-codegen version v1.10.1 DO NOT EDIT.
4 package common29122
5
6 import (
7         "bytes"
8         "compress/gzip"
9         "encoding/base64"
10         "fmt"
11         "net/url"
12         "path"
13         "strings"
14         "time"
15
16         "github.com/getkin/kin-openapi/openapi3"
17         externalRef0 "oransc.org/nonrtric/servicemanager/internal/common"
18         externalRef1 "oransc.org/nonrtric/servicemanager/internal/common29571"
19 )
20
21 // Defines values for Event.
22 const (
23         EventFAILEDRESOURCESALLOCATION Event = "FAILED_RESOURCES_ALLOCATION"
24
25         EventLOSSOFBEARER Event = "LOSS_OF_BEARER"
26
27         EventRECOVERYOFBEARER Event = "RECOVERY_OF_BEARER"
28
29         EventRELEASEOFBEARER Event = "RELEASE_OF_BEARER"
30
31         EventSESSIONTERMINATION Event = "SESSION_TERMINATION"
32
33         EventSUCCESSFULRESOURCESALLOCATION Event = "SUCCESSFUL_RESOURCES_ALLOCATION"
34
35         EventUSAGEREPORT Event = "USAGE_REPORT"
36 )
37
38 // Defines values for ResultReason.
39 const (
40         ResultReasonOTHERREASON ResultReason = "OTHER_REASON"
41
42         ResultReasonROAMINGNOTALLOWED ResultReason = "ROAMING_NOT_ALLOWED"
43 )
44
45 // Represents an accumulated usage.
46 type AccumulatedUsage struct {
47         // Unsigned integer identifying a volume in units of bytes.
48         DownlinkVolume *Volume `json:"downlinkVolume,omitempty"`
49
50         // Unsigned integer identifying a period of time in units of seconds.
51         Duration *DurationSec `json:"duration,omitempty"`
52
53         // Unsigned integer identifying a volume in units of bytes.
54         TotalVolume *Volume `json:"totalVolume,omitempty"`
55
56         // Unsigned integer identifying a volume in units of bytes.
57         UplinkVolume *Volume `json:"uplinkVolume,omitempty"`
58 }
59
60 // Represents a successful acknowledgement of a notification.
61 type Acknowledgement struct {
62         // A human-readable explanation specific to this successful acknowledgement
63         Details string `json:"details"`
64 }
65
66 // integer indicating a bandwidth in bits per second.
67 type Bandwidth int
68
69 // string identifying a BDT Reference ID as defined in clause 5.3.3 of 3GPP TS 29.154.
70 type BdtReferenceId string
71
72 // This data type is defined in the same way as the BdtReferenceId data type, but with the nullable property set to true.
73 type BdtReferenceIdRm string
74
75 // string with format "binary" as defined in OpenAPI Specification.
76 type Binary string
77
78 // String with format "byte" as defined in OpenAPI Specification, i.e, base64-encoded characters.
79 type Bytes string
80
81 // Represents one configuration processing result for a group's members.
82 type ConfigResult interface{}
83
84 // string with format "date-time" as defined in OpenAPI.
85 type DateTime time.Time
86
87 // string with format "date-time" as defined in OpenAPI with "nullable=true" property.
88 type DateTimeRm time.Time
89
90 // string with format "date-time" as defined in OpenAPI with "readOnly=true" property.
91 type DateTimeRo time.Time
92
93 // integer between and including 1 and 7 denoting a weekday. 1 shall indicate Monday, and the subsequent weekdays shall be indicated with the next higher numbers. 7 shall indicate Sunday.
94 type DayOfWeek int
95
96 // Unsigned integer identifying a period of time in units of minutes.
97 type DurationMin int32
98
99 // Unsigned integer identifying a period of time in units of seconds.
100 type DurationSec int
101
102 // Unsigned integer identifying a period of time in units of seconds with "nullable=true" property.
103 type DurationSecRm int
104
105 // Unsigned integer identifying a period of time in units of seconds with "readOnly=true" property.
106 type DurationSecRo int
107
108 // Represents Ethernet flow information.
109 type EthFlowInfo struct {
110         // Indicates the packet filters of the Ethernet flow. It shall contain UL and/or DL Ethernet flow description.
111         EthFlowDescriptions *[]externalRef0.EthFlowDescription `json:"ethFlowDescriptions,omitempty"`
112
113         // Indicates the Ethernet flow identifier.
114         FlowId int `json:"flowId"`
115 }
116
117 // Possible values are - SESSION_TERMINATION: Indicates that Rx session is terminated. - LOSS_OF_BEARER : Indicates a loss of a bearer. - RECOVERY_OF_BEARER: Indicates a recovery of a bearer. - RELEASE_OF_BEARER: Indicates a release of a bearer. - USAGE_REPORT: Indicates the usage report event.  - FAILED_RESOURCES_ALLOCATION: Indicates the resource allocation is failed. - SUCCESSFUL_RESOURCES_ALLOCATION: Indicates the resource allocation is successful.
118 type Event string
119
120 // Represents an event report.
121 type EventReport struct {
122         // Represents an accumulated usage.
123         AccumulatedUsage *AccumulatedUsage `json:"accumulatedUsage,omitempty"`
124
125         // Possible values are - SESSION_TERMINATION: Indicates that Rx session is terminated. - LOSS_OF_BEARER : Indicates a loss of a bearer. - RECOVERY_OF_BEARER: Indicates a recovery of a bearer. - RELEASE_OF_BEARER: Indicates a release of a bearer. - USAGE_REPORT: Indicates the usage report event.  - FAILED_RESOURCES_ALLOCATION: Indicates the resource allocation is failed. - SUCCESSFUL_RESOURCES_ALLOCATION: Indicates the resource allocation is successful.
126         Event Event `json:"event"`
127
128         // Identifies the IP flows that were sent during event subscription
129         FlowIds *[]int `json:"flowIds,omitempty"`
130 }
131
132 // string containing a local identifier followed by "@" and a domain identifier. Both the local identifier and the domain identifier shall be encoded as strings that do not contain any "@" characters. See Clauses 4.6.2 and 4.6.3 of 3GPP TS 23.682 for more information.
133 type ExternalGroupId string
134
135 // string containing a local identifier followed by "@" and a domain identifier. Both the local identifier and the domain identifier shall be encoded as strings that do not contain any "@" characters. See Clause 4.6.2 of 3GPP TS 23.682 for more information.
136 type ExternalId string
137
138 // Represents IP flow information.
139 type FlowInfo struct {
140         // Indicates the packet filters of the IP flow. Refer to clause 5.3.8 of 3GPP TS 29.214 for encoding. It shall contain UL and/or DL IP flow description.
141         FlowDescriptions *[]string `json:"flowDescriptions,omitempty"`
142
143         // Indicates the IP flow identifier.
144         FlowId int `json:"flowId"`
145 }
146
147 // Represents the description of invalid parameters, for a request rejected due to invalid parameters.
148 type InvalidParam struct {
149         // Attribute's name encoded as a JSON Pointer, or header's name.
150         Param string `json:"param"`
151
152         // A human-readable reason, e.g. "must be a positive integer".
153         Reason *string `json:"reason,omitempty"`
154 }
155
156 // string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166.
157 type Ipv4Addr string
158
159 // string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166, with "readOnly=true" property.
160 type Ipv4AddrRo string
161
162 // string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used.
163 type Ipv6Addr string
164
165 // string identifying a Ipv6 address formatted according to clause 4 in IETF RFC 5952, with "readOnly=true" property. The mixed Ipv4 Ipv6 notation according to clause 5 of IETF RFC 5952 shall not be used.
166 type Ipv6AddrRo string
167
168 // string formatted according to IETF RFC 3986 identifying a referenced resource.
169 type Link string
170
171 // String formatted according to IETF RFC 3986 identifying a referenced resource, but with the nullable property set to true.
172 type LinkRm string
173
174 // Represents a user location area.
175 type LocationArea struct {
176         // Indicates a list of Cell Global Identities of the user which identifies the cell the UE is registered.
177         CellIds *[]string `json:"cellIds,omitempty"`
178
179         // Identifies a list of civic addresses of the user where the UE is located.
180         CivicAddresses *[]externalRef0.CivicAddress `json:"civicAddresses,omitempty"`
181
182         // Indicates a list of eNodeB identities in which the UE is currently located.
183         EnodeBIds *[]string `json:"enodeBIds,omitempty"`
184
185         // Identifies a list of geographic area of the user where the UE is located.
186         GeographicAreas *[]externalRef0.GeographicArea `json:"geographicAreas,omitempty"`
187
188         // Identifies a list of Routing Area Identities of the user where the UE is located.
189         RoutingAreaIds *[]string `json:"routingAreaIds,omitempty"`
190
191         // Identifies a list of Tracking Area Identities of the user where the UE is located.
192         TrackingAreaIds *[]string `json:"trackingAreaIds,omitempty"`
193 }
194
195 // Represents a user location area when the UE is attached to 5G.
196 type LocationArea5G struct {
197         // Identifies a list of civic addresses of the user where the UE is located.
198         CivicAddresses *[]externalRef0.CivicAddress `json:"civicAddresses,omitempty"`
199
200         // Identifies a list of geographic area of the user where the UE is located.
201         GeographicAreas *[]externalRef0.GeographicArea `json:"geographicAreas,omitempty"`
202
203         // Describes a network area information in which the NF service consumer requests the number of UEs.
204         NwAreaInfo *externalRef0.NetworkAreaInfo `json:"nwAreaInfo,omitempty"`
205 }
206
207 // String encoding a Mobile Country Code part of the PLMN, comprising 3 digits, as defined in 3GPP TS 38.413.
208 type Mcc string
209
210 // String encoding a Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in 3GPP TS 38.413.
211 type Mnc string
212
213 // string formatted according to clause 3.3 of 3GPP TS 23.003 that describes an MSISDN.
214 type Msisdn string
215
216 // Represents the information to be conveyed in a bearer level event(s) notification.
217 type NotificationData struct {
218         // Contains the reported event and applicable information
219         EventReports []EventReport `json:"eventReports"`
220
221         // string formatted according to IETF RFC 3986 identifying a referenced resource.
222         Transaction Link `json:"transaction"`
223 }
224
225 // Represents the identifier of a PLMN.
226 type PlmnId struct {
227         // String encoding a Mobile Country Code part of the PLMN, comprising 3 digits, as defined in 3GPP TS 38.413.
228         Mcc Mcc `json:"mcc"`
229
230         // String encoding a Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in 3GPP TS 38.413.
231         Mnc Mnc `json:"mnc"`
232 }
233
234 // Unsigned integer with valid values between 0 and 65535.
235 type Port int
236
237 // Unsigned integer with valid values between 0 and 65535, with "readOnly=true" property.
238 type PortRo int
239
240 // Represents additional information and details on an error response.
241 type ProblemDetails struct {
242         // A machine-readable application error cause specific to this occurrence of the problem. This IE should be present and provide application-related error information, if available.
243         Cause *string `json:"cause,omitempty"`
244
245         // A human-readable explanation specific to this occurrence of the problem.
246         Detail *string `json:"detail,omitempty"`
247
248         // string providing an URI formatted according to IETF RFC 3986.
249         Instance *Uri `json:"instance,omitempty"`
250
251         // Description of invalid parameters, for a request rejected due to invalid parameters.
252         InvalidParams *[]InvalidParam `json:"invalidParams,omitempty"`
253
254         // The HTTP status code for this occurrence of the problem.
255         Status *int `json:"status,omitempty"`
256
257         // A string used to indicate the features supported by an API that is used as defined in clause  6.6 in 3GPP TS 29.500. The string shall contain a bitmask indicating supported features in  hexadecimal representation Each character in the string shall take a value of "0" to "9",  "a" to "f" or "A" to "F" and shall represent the support of 4 features as described in  table 5.2.2-3. The most significant character representing the highest-numbered features shall  appear first in the string, and the character representing features 1 to 4 shall appear last  in the string. The list of features and their numbering (starting with 1) are defined  separately for each API. If the string contains a lower number of characters than there are  defined features for an API, all features that would be represented by characters that are not  present in the string are not supported.
258         SupportedFeatures *externalRef1.SupportedFeatures `json:"supportedFeatures,omitempty"`
259
260         // A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem.
261         Title *string `json:"title,omitempty"`
262
263         // string providing an URI formatted according to IETF RFC 3986.
264         Type *Uri `json:"type,omitempty"`
265 }
266
267 // string chosen by the SCEF to serve as identifier in a resource URI.
268 type ResourceId string
269
270 // Possible values are - ROAMING_NOT_ALLOWED: Identifies the configuration parameters are not allowed by roaming agreement. - OTHER_REASON: Identifies the configuration parameters are not configured due to other reason.
271 type ResultReason string
272
273 // string that identifies an SCS/AS.
274 type ScsAsId string
275
276 // Represents a sponsor information.
277 type SponsorInformation struct {
278         // It indicates Application Service Provider ID.
279         AspId string `json:"aspId"`
280
281         // It indicates Sponsor ID.
282         SponsorId string `json:"sponsorId"`
283 }
284
285 // Represents a notification that can be sent to test whether a chosen notification mechanism works.
286 type TestNotification struct {
287         // string formatted according to IETF RFC 3986 identifying a referenced resource.
288         Subscription Link `json:"subscription"`
289 }
290
291 // String with format partial-time or full-time as defined in clause 5.6 of IETF RFC 3339. Examples, 20:15:00, 20:15:00-08:00 (for 8 hours behind UTC).
292 type TimeOfDay string
293
294 // Represents a time window identified by a start time and a stop time.
295 type TimeWindow struct {
296         // string with format "date-time" as defined in OpenAPI.
297         StartTime DateTime `json:"startTime"`
298
299         // string with format "date-time" as defined in OpenAPI.
300         StopTime DateTime `json:"stopTime"`
301 }
302
303 // string providing an URI formatted according to IETF RFC 3986.
304 type Uri string
305
306 // Represents a usage threshold.
307 type UsageThreshold struct {
308         // Unsigned integer identifying a volume in units of bytes.
309         DownlinkVolume *Volume `json:"downlinkVolume,omitempty"`
310
311         // Unsigned integer identifying a period of time in units of seconds.
312         Duration *DurationSec `json:"duration,omitempty"`
313
314         // Unsigned integer identifying a volume in units of bytes.
315         TotalVolume *Volume `json:"totalVolume,omitempty"`
316
317         // Unsigned integer identifying a volume in units of bytes.
318         UplinkVolume *Volume `json:"uplinkVolume,omitempty"`
319 }
320
321 // Represents the same as the UsageThreshold data type but with the nullable:true property.
322 type UsageThresholdRm struct {
323         // Unsigned integer identifying a volume in units of bytes with "nullable=true" property.
324         DownlinkVolume *VolumeRm `json:"downlinkVolume"`
325
326         // Unsigned integer identifying a period of time in units of seconds with "nullable=true" property.
327         Duration *DurationSecRm `json:"duration"`
328
329         // Unsigned integer identifying a volume in units of bytes with "nullable=true" property.
330         TotalVolume *VolumeRm `json:"totalVolume"`
331
332         // Unsigned integer identifying a volume in units of bytes with "nullable=true" property.
333         UplinkVolume *VolumeRm `json:"uplinkVolume"`
334 }
335
336 // Unsigned integer identifying a volume in units of bytes.
337 type Volume int64
338
339 // Unsigned integer identifying a volume in units of bytes with "nullable=true" property.
340 type VolumeRm int64
341
342 // Represents the configuration information for the delivery of notifications over Websockets.
343 type WebsockNotifConfig struct {
344         // Set by the SCS/AS to indicate that the Websocket delivery is requested.
345         RequestWebsocketUri *bool `json:"requestWebsocketUri,omitempty"`
346
347         // string formatted according to IETF RFC 3986 identifying a referenced resource.
348         WebsocketUri *Link `json:"websocketUri,omitempty"`
349 }
350
351 // Base64 encoded, gzipped, json marshaled Swagger object
352 var swaggerSpec = []string{
353
354         "H4sIAAAAAAAC/+Rb724iuZZ/laPale4dLU0IJOnuSCstDaQvqyQgisxoNRlFpupA+XaVXWu7oLmjPNC+",
355         "xj7ZynYVVIGhoLvnZnfvl5km+Pj8zrHPXx9+9wKepJwhU9K7/d0TKFPOJJoPndZ7/b8QZSBoqihn3q03",
356         "xSTlgog1TDCkAgPlNbwISYjCEN3zgNilu5RdBiRWKBhRdInwNBkCn4OKEARKnokAm17DE/ifGRUYerdK",
357         "ZNjwZBBhQvRuap2id+tJJShbeK+vr68Nr9P6sM9ojCIhWqT/FRCvWi39VcCZQqb0P0maxtRCuEgFn8WY",
358         "/MtfpcWz3eufBc69W++fLrYndGG/lRdjS9VHRWgsPcOnKsknEoLGiVJ5BsTlG4B4YiRTERf0bxhaFJ03",
359         "QHHHxYyGITIL4eoNIDxyBXc8Y7kWbt4IQjcIMFVkFqPF8fENcPQ4m8c0sLfy8i1u5T2yhYpgUlixAdJ+",
360         "AyBjgQFnIdUf4Y7QuADzFlYyJuuYkxCmnMM9EQt7RS7fwlq02zUwuHaiGsX1mzgvmaUpFwpDeMCQEphq",
361         "767xtN/CcLRGHghbm4uLUkkN5fpNgsuQmRgZg49iiQIGQnBh4bzF1dUoaIDwxMiS0LjwbyHOSRar/Sj/",
362         "GRkKGhSwX4sIbpKDbhBkSRYTheGTJAvcJ59gKlBqjEAYkO16yDSBzhBSwVMUito8KuQrFlP25WceZwnW",
363         "yZuv0gJkYpOnHKPo5+t8DDSZ4orE5/LK0vMRal424eGzv6J16d3gC+OrGMMFJvkVOKw9kFkQoJTzLAZS",
364         "JdR5FwHGFZ3n18eh1/xK7KdxEGUJYe8EklDfBsCvaUyY2QZkioHeFBQHFVF5BITX2MvoytnfrxsEvzk0",
365         "8YmwcEVDFe3jo0zhAgVQFhrh2AIIzIr1QBnMqJKQogBpQoSWPaGMJlni3bY2zPJ9DLdQTXCOAlmAw3Cf",
366         "pRUAaIhM0fnasvzUn8KGCoZ9IBJCnFOGoQYRxCSTCNfNTrOjz6PzeTyGqQ/tj83L66vmvnZ2YUwSR/2g",
367         "VR4SRUATA61w1Jm2JAnCiqw1GP25uuWWtAGzTMGKqsgsY1lsLB/yO7IGicqcsciMTRYLiqx9HztlRKwP",
368         "qs5wmnOREAXP3swsfvZ2VDZKkXXHQ/DzS7a5ufvc1godV9d3MlsrPI1VA2hTa4ZIvLl6hyzgIYYQRESQ",
369         "QKGQTig6JaOLCUqntywZLGcIgVmcexytbG07GrIw9Bo0EFgInqV/kpBgMsvZcoajuXf76+8VC8KvNpQM",
370         "Q+n99tqofplIKkOmv/ht1/bLdHuQBySIAGPrSHIjQ+OtC7LCECiKosJ7GmiUVGEi6xzgYMNcqy+hbGip",
371         "LjfKJUKQtfkyF6EGY4HGXvkHH2gRYsf+9PFi6PcfgWVal0DiWNevGBpVn4n8wcCpRW3PcoJE1kefSXnt",
372         "roOsbOTykn2icEoTPNHsQqLwnaLJQXPQmrCrvdvtatetLzi7nNS38bbrnzee5l+1o3n2Nh7pILZa17TB",
373         "yn80Vh0iRyxen4y1IDiCdT2a/4L45XDcm6FaITIgTEMK4izUElyaz+8hRB32TYBaIX4JyboJlyAjEscb",
374         "Y4YHzkKybhgSEzWymdR5MVMFkcxJZrihCkvhAr8qiOgiQpEblmzC+10ufqa5mOhLvtro+74UiS9dkbjI",
375         "xh6oo8H0xCRd2JPIU4BKQE5RUB4aj0QTjRsypjMBPoeEskyhrJwLZarTrk0NyunhDwRkMxPZPIe/y9a+",
376         "G8EpZldGeMDaDiDmfyDiY8ZXRnzA5kqIByq6i/lqyOb8aAQfqAgFQwXzmK+AMnuVnNk12i37260cUWy4",
377         "Ca7aqFISfNF701jnGkVgrfBswlDlVqarREIZPN1rK77gAvr3OwBLzJrPzBHkejxJOOsTRZprksTuaL0n",
378         "iIl/5Gse/9o1wVAjcaXUVdl3NLtJL0oZ1+a8doJkzsAVHgdLZxE15lJSnewuSZzpzEYgvAN/4PvD0ePL",
379         "dDB5GD52p8PR4y2UURIFk68gdcLGmU69FYqEMu0Zm/AO7ke+/zK6e/k06E4GEyjTEoi5lLYomyERKDTB",
380         "ZNAb/TyY/MeWqEojMOBLFOt9uvtB1x8cJouRSNylevK7nwcvk8F4NJlW5UJbeYPAlAsFqJXWBHgHd93h",
381         "/aD/Mhn4o6dJb+C/dO/vRz2HZrYN/iK/yjU0N205zd5/6vUGvn/3dP89+22LTXuhkWkb/9VznJ3X8Kon",
382         "4jW8fY2bP+6o02t4ZWV5De+IIryGVyNa6WZuw7y5mROj8LoWiTmP/HD2/QxxNFyO5Zt7DZrXhoeFmRzN",
383         "2s2ijUG7vFk1DR+OjTHnlrNCgaBlgjAzGZcVSycemy1KDmrfRx9xMjsOwYrj9Ad55fFZ11dH6vzct9qA",
384         "pO9fpeKZ8zjmKwxhtoZn7990jshCIBDyRDvkkvOCTzxPmPY2KTKvPaJt3lXUn0SCxZWrMuTAuNoEAMIK",
385         "GKVCFXxE6JkOhISr5k2zbTjqf1WbEZ3mzYe2qYUSLnA3pu3f223t9g+hvFx336GxkxKL3FaOpxTzH5JP",
386         "5KyatnUFipcbVR92GlXtyysjqdEmZYu6/KOQ43DmsaefH51JbFT5g3KIIVuSmIZjIkhy9AzNhdx+qTVJ",
387         "LS2kmhj1KTTyDk/+uAwCNR8MIcxQn8U+xf49SN1QukoJOssU/kkCI0nFBAj8uz96hDE3jZEGcAH2RT9f",
388         "67y5YtPAqOkP24UNwOaiCc9ekkmlTZBAyiU1owC53p+9Zm1T2ErnPIl0edUNQ3Fie1YvBxKGAqXMS3u1",
389         "7ZM+eyE3n0MMaELiZ0/7BZtoVEv+4WB6B5O7Hlxe3tw4FVUAO9Jf+DtAa5xSF9X2H4bp8uY8Jd84JCFB",
390         "wIVpS2z9y1UF8fXH63YTphFCQr9iaFVidtvK6tjkWptVZZPcHWmnPtOZLIaHzujm3DP6dsnqz+KPE732",
391         "iO8p+3JQCQck3fDtfPxws6MpUbwvhJU5HydfVwvD/5Gcz3rXMKGptn1YDDx1BZKaF7lMooBNwUIEkn33",
392         "HWDs7rtX6kUqzSNeD+MYPsd8RmKw+bXepojlht0qokG02wPXTPLutq6bBC6oVCjsDTkSjI/F34AuadC1",
393         "FoHH8/+tAIaosKM95Loo2KLMO/PNb+xU9Er4aoVBxkP8dPI54KNenmvZHAFluea3+INMCGQqXjslOU/Z",
394         "C+QLQdKIBvranartLZW5fH+ktj9XANa/ifBMUbbQa+uKx604E0sEmurw9a8X6zzVK0GCL2djneZUf1ew",
395         "rhmCsru6/ny2w9IYWQkiUYoEEYbaaV5/driz/2Ne4f+Boe2KwFbmquZF5hlbP6JacfFlQ+28Tw9BcDBm",
396         "F3UhEHjgMxoj9HjGlFhDj4e6AhWqUM34/uGxARqEoObFuwMhXVAlGztJbVF+dj40ry47zkzigZ0DKZfy",
397         "BEhtXRh9Dy77PnxmbpXnd529zkyr1cmbFma3mX2Ef/CHfv/Ryf+xNPCjT762Xi31GzSSmRlQWOLaSly0",
398         "jyHGJca2Y/dn+VPNXBFuW5sOa+rZtkHR5c0nBG0z0HSC7MSbTtlK4E4eLSi1VU9w80yS4JQRMZMx7xaq",
399         "ZfpGVWpX9TqOE+bqXuyeSGWygpg7uq/jxNrk0VmFwIyzJax+JQv2hNMMLLFTFmfbeu9hz2Thtp+Rv7QU",
400         "T9ctc9Y319ed68rzsPlL3Yuo5n7Sw+JJ/E8qm48BrH9e3JnBPBqRQzvQTOKKbWq0+bQcmI+AQnABxQ9O",
401         "HGFZ+xRX7yYhQUQZbrs3pRnTfFdDuz/pxwOb4AZYONB8JFUXs1TCcAAy4lkcaj+SS2SQp4IvaVjh9E6g",
402         "Hfq0HEuyNoDOYTOJ6nRzVhPfO7h4WBwXT8qkIiyofV95EtQu33YNHSfe/2P6hCf5yEpDs85JSkVUJl1z",
403         "iAh/mU7HYBdAoGOrnag6UbUl+9hMit8hUZnAsghTv/3x+v3lyynpjL+3j3bzVMVOQ5ARF6qxe2VkliTE",
404         "vrmWcJuRybz5bW64eUOICFsgzAVPyhIrfubVsn844Vq5srNJ3vc49iATcYkMZmuDxO8N7jRGiWKJOsUp",
405         "RRwT8zdPr0+ToRPvZGe87ZTH9cmo+zB8/PzyOJqap9FfBv1b2Hkw3JmN3Nxss4VWONk+HQlOEpPkLQSa",
406         "IcAmvIPR9C+Dyctk0PXNg/KZuxcLtkbGVYQi725X35sd4ngNr8zf+errB7Irj5yUSfZKnRzCwO/5F13f",
407         "eQ6+dv1cDEtpUs28uCU4/spEpPNldFgeBe2WQkbx84GxdfIChn0n2px57d65VO5tdrKU7Z6NHLcrW5mi",
408         "VOXMuEZL5ezWnkhAmA5pJp7p6KEd8ipCcztIYV4VsgS1c6AyAV15ON5wKu/e35J9VjZwSk0THM37ZH3S",
409         "lLQuiyiJzZiiLoLmWZx/ODDUflPpRnc6nY9NGHwlSRqjbEC7dXt5fdtqbf/1rvXhttWCP+sY8QEingmd",
410         "jUWUhfA07f3kvDJahF8oC/mq5sgM0JVZuTUf4yeIDlBC2RX2pVkqnprPjlPRa4t52qO/GSnmbk2I5Ol5",
411         "NLtHueFa2sx1pDoIHHIdNscyLpGZX96e0k53at2MhUwjgTLicVjbPyILBFWs/sf+9U5Vc5P652LzY438",
412         "hxpV4tJvPJzvGabWqJQou88Y338Mk+QbD8ISnn0Uluz8w9B0ruPY7nHWAOrSkFUGT2drx+zwzVXt7O4G",
413         "34/CcNaMvAtj/fTuLziTPPhiAqb9aUvtNa6mVuW6tfiNRYgxLUYZy4FSAl+igJwnKkekzCugzRKnE/RR",
414         "bfNbnTDZGimfQzdBXH+32WQLyDyOGQ6Vh+MZ5zESM+q62uF8UqjeuYz6T8WPZ/o8cBRU5V+Htdvw8+X7",
415         "5vtmC6Yfto+ckHLK7E+EHrlQ0YxnLITueCi9hpeJ2Lv1IqVSeXtxsVqtmp1Fmja5WFzMVXrhpxjICyKC",
416         "iC7xov3xRaKgKC8suwtbsrqGlPqFH5Ll1pypH5YoSGz4NwGe2X//F7Rb7XbDdjBHYkEY/RvJmxljIhTT",
417         "2fafu5PhpwZ0p0O/Ab2e323AYOoPGzD1++Z/067+T+8ns2c3jkHQRaT0KZmKJbSJeF7VeVuN2QIRDN6p",
418         "xus1vCUKacW4bLabl1pKniIjKdUab7aaLX3diIr0gby+/k8AAAD//9JC9tDPQwAA",
419 }
420
421 // GetSwagger returns the content of the embedded swagger specification file
422 // or error if failed to decode
423 func decodeSpec() ([]byte, error) {
424         zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, ""))
425         if err != nil {
426                 return nil, fmt.Errorf("error base64 decoding spec: %s", err)
427         }
428         zr, err := gzip.NewReader(bytes.NewReader(zipped))
429         if err != nil {
430                 return nil, fmt.Errorf("error decompressing spec: %s", err)
431         }
432         var buf bytes.Buffer
433         _, err = buf.ReadFrom(zr)
434         if err != nil {
435                 return nil, fmt.Errorf("error decompressing spec: %s", err)
436         }
437
438         return buf.Bytes(), nil
439 }
440
441 var rawSpec = decodeSpecCached()
442
443 // a naive cached of a decoded swagger spec
444 func decodeSpecCached() func() ([]byte, error) {
445         data, err := decodeSpec()
446         return func() ([]byte, error) {
447                 return data, err
448         }
449 }
450
451 // Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
452 func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) {
453         var res = make(map[string]func() ([]byte, error))
454         if len(pathToFile) > 0 {
455                 res[pathToFile] = rawSpec
456         }
457
458         pathPrefix := path.Dir(pathToFile)
459
460         for rawPath, rawFunc := range externalRef0.PathToRawSpec(path.Join(pathPrefix, "CommonData.yaml")) {
461                 if _, ok := res[rawPath]; ok {
462                         // it is not possible to compare functions in golang, so always overwrite the old value
463                 }
464                 res[rawPath] = rawFunc
465         }
466         for rawPath, rawFunc := range externalRef1.PathToRawSpec(path.Join(pathPrefix, "TS29571_CommonData.yaml")) {
467                 if _, ok := res[rawPath]; ok {
468                         // it is not possible to compare functions in golang, so always overwrite the old value
469                 }
470                 res[rawPath] = rawFunc
471         }
472         return res
473 }
474
475 // GetSwagger returns the Swagger specification corresponding to the generated code
476 // in this file. The external references of Swagger specification are resolved.
477 // The logic of resolving external references is tightly connected to "import-mapping" feature.
478 // Externally referenced files must be embedded in the corresponding golang packages.
479 // Urls can be supported but this task was out of the scope.
480 func GetSwagger() (swagger *openapi3.T, err error) {
481         var resolvePath = PathToRawSpec("")
482
483         loader := openapi3.NewLoader()
484         loader.IsExternalRefsAllowed = true
485         loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) {
486                 var pathToFile = url.String()
487                 pathToFile = path.Clean(pathToFile)
488                 getSpec, ok := resolvePath[pathToFile]
489                 if !ok {
490                         err1 := fmt.Errorf("path not found: %s", pathToFile)
491                         return nil, err1
492                 }
493                 return getSpec()
494         }
495         var specData []byte
496         specData, err = rawSpec()
497         if err != nil {
498                 return
499         }
500         swagger, err = loader.LoadFromData(specData)
501         if err != nil {
502                 return
503         }
504         return
505 }