Add generated code
[nonrtric/plt/sme.git] / 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/sme/internal/common"
18         externalRef1 "oransc.org/nonrtric/sme/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 subclause 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 // 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.
109 type Event string
110
111 // Represents an event report.
112 type EventReport struct {
113         // Represents an accumulated usage.
114         AccumulatedUsage *AccumulatedUsage `json:"accumulatedUsage,omitempty"`
115
116         // 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.
117         Event Event `json:"event"`
118
119         // Identifies the IP flows that were sent during event subscription
120         FlowIds *[]int `json:"flowIds,omitempty"`
121 }
122
123 // 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.
124 type ExternalGroupId string
125
126 // 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.
127 type ExternalId string
128
129 // Represents flow information.
130 type FlowInfo struct {
131         // Indicates the packet filters of the IP flow. Refer to subclause 5.3.8 of 3GPP TS 29.214 for encoding. It shall contain UL and/or DL IP flow description.
132         FlowDescriptions *[]string `json:"flowDescriptions,omitempty"`
133
134         // Indicates the IP flow.
135         FlowId int `json:"flowId"`
136 }
137
138 // Represents the description of invalid parameters, for a request rejected due to invalid parameters.
139 type InvalidParam struct {
140         // Attribute's name encoded as a JSON Pointer, or header's name.
141         Param string `json:"param"`
142
143         // A human-readable reason, e.g. "must be a positive integer".
144         Reason *string `json:"reason,omitempty"`
145 }
146
147 // string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166.
148 type Ipv4Addr string
149
150 // string identifying a Ipv4 address formatted in the "dotted decimal" notation as defined in IETF RFC 1166, with "readOnly=true" property.
151 type Ipv4AddrRo string
152
153 // 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.
154 type Ipv6Addr string
155
156 // 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.
157 type Ipv6AddrRo string
158
159 // string formatted according to IETF RFC 3986 identifying a referenced resource.
160 type Link string
161
162 // Represents a user location area.
163 type LocationArea struct {
164         // Indicates a list of Cell Global Identities of the user which identifies the cell the UE is registered.
165         CellIds *[]string `json:"cellIds,omitempty"`
166
167         // Identifies a list of civic addresses of the user where the UE is located.
168         CivicAddresses *[]externalRef0.CivicAddress `json:"civicAddresses,omitempty"`
169
170         // Indicates a list of eNodeB identities in which the UE is currently located.
171         EnodeBIds *[]string `json:"enodeBIds,omitempty"`
172
173         // Identifies a list of geographic area of the user where the UE is located.
174         GeographicAreas *[]externalRef0.GeographicArea `json:"geographicAreas,omitempty"`
175
176         // Identifies a list of Routing Area Identities of the user where the UE is located.
177         RoutingAreaIds *[]string `json:"routingAreaIds,omitempty"`
178
179         // Identifies a list of Tracking Area Identities of the user where the UE is located.
180         TrackingAreaIds *[]string `json:"trackingAreaIds,omitempty"`
181 }
182
183 // Represents a user location area when the UE is attached to 5G.
184 type LocationArea5G struct {
185         // Identifies a list of civic addresses of the user where the UE is located.
186         CivicAddresses *[]externalRef0.CivicAddress `json:"civicAddresses,omitempty"`
187
188         // Identifies a list of geographic area of the user where the UE is located.
189         GeographicAreas *[]externalRef0.GeographicArea `json:"geographicAreas,omitempty"`
190
191         // Describes a network area information in which the NF service consumer requests the number of UEs.
192         NwAreaInfo *externalRef0.NetworkAreaInfo `json:"nwAreaInfo,omitempty"`
193 }
194
195 // String encoding a Mobile Country Code part of the PLMN, comprising 3 digits, as defined in 3GPP TS 38.413.
196 type Mcc string
197
198 // String encoding a Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in 3GPP TS 38.413.
199 type Mnc string
200
201 // string formatted according to subclause 3.3 of 3GPP TS 23.003 that describes an MSISDN.
202 type Msisdn string
203
204 // Represents the information to be conveyed in a bearer level event(s) notification.
205 type NotificationData struct {
206         // Contains the reported event and applicable information
207         EventReports []EventReport `json:"eventReports"`
208
209         // string formatted according to IETF RFC 3986 identifying a referenced resource.
210         Transaction Link `json:"transaction"`
211 }
212
213 // Represents the identifier of a PLMN.
214 type PlmnId struct {
215         // String encoding a Mobile Country Code part of the PLMN, comprising 3 digits, as defined in 3GPP TS 38.413.
216         Mcc Mcc `json:"mcc"`
217
218         // String encoding a Mobile Network Code part of the PLMN, comprising 2 or 3 digits, as defined in 3GPP TS 38.413.
219         Mnc Mnc `json:"mnc"`
220 }
221
222 // Unsigned integer with valid values between 0 and 65535.
223 type Port int
224
225 // Unsigned integer with valid values between 0 and 65535, with "readOnly=true" property.
226 type PortRo int
227
228 // Represents additional information and details on an error response.
229 type ProblemDetails struct {
230         // 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.
231         Cause *string `json:"cause,omitempty"`
232
233         // A human-readable explanation specific to this occurrence of the problem.
234         Detail *string `json:"detail,omitempty"`
235
236         // string providing an URI formatted according to IETF RFC 3986.
237         Instance *Uri `json:"instance,omitempty"`
238
239         // Description of invalid parameters, for a request rejected due to invalid parameters.
240         InvalidParams *[]InvalidParam `json:"invalidParams,omitempty"`
241
242         // The HTTP status code for this occurrence of the problem.
243         Status *int `json:"status,omitempty"`
244
245         // 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.
246         SupportedFeatures *externalRef1.SupportedFeatures `json:"supportedFeatures,omitempty"`
247
248         // A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem.
249         Title *string `json:"title,omitempty"`
250
251         // string providing an URI formatted according to IETF RFC 3986.
252         Type *Uri `json:"type,omitempty"`
253 }
254
255 // string chosen by the SCEF to serve as identifier in a resource URI.
256 type ResourceId string
257
258 // 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.
259 type ResultReason string
260
261 // string that identifies an SCS/AS.
262 type ScsAsId string
263
264 // Represents a sponsor information.
265 type SponsorInformation struct {
266         // It indicates Application Service Provider ID.
267         AspId string `json:"aspId"`
268
269         // It indicates Sponsor ID.
270         SponsorId string `json:"sponsorId"`
271 }
272
273 // Represents a notification that can be sent to test whether a chosen notification mechanism works.
274 type TestNotification struct {
275         // string formatted according to IETF RFC 3986 identifying a referenced resource.
276         Subscription Link `json:"subscription"`
277 }
278
279 // String with format partial-time or full-time as defined in subclause 5.6 of IETF RFC 3339. Examples, 20:15:00, 20:15:00-08:00 (for 8 hours behind UTC).
280 type TimeOfDay string
281
282 // Represents a time window identified by a start time and a stop time.
283 type TimeWindow struct {
284         // string with format "date-time" as defined in OpenAPI.
285         StartTime DateTime `json:"startTime"`
286
287         // string with format "date-time" as defined in OpenAPI.
288         StopTime DateTime `json:"stopTime"`
289 }
290
291 // string providing an URI formatted according to IETF RFC 3986.
292 type Uri string
293
294 // Represents a usage threshold.
295 type UsageThreshold struct {
296         // Unsigned integer identifying a volume in units of bytes.
297         DownlinkVolume *Volume `json:"downlinkVolume,omitempty"`
298
299         // Unsigned integer identifying a period of time in units of seconds.
300         Duration *DurationSec `json:"duration,omitempty"`
301
302         // Unsigned integer identifying a volume in units of bytes.
303         TotalVolume *Volume `json:"totalVolume,omitempty"`
304
305         // Unsigned integer identifying a volume in units of bytes.
306         UplinkVolume *Volume `json:"uplinkVolume,omitempty"`
307 }
308
309 // Represents the same as the UsageThreshold data type but with the nullable:true property.
310 type UsageThresholdRm struct {
311         // Unsigned integer identifying a volume in units of bytes with "nullable=true" property.
312         DownlinkVolume *VolumeRm `json:"downlinkVolume"`
313
314         // Unsigned integer identifying a period of time in units of seconds with "nullable=true" property.
315         Duration *DurationSecRm `json:"duration"`
316
317         // Unsigned integer identifying a volume in units of bytes with "nullable=true" property.
318         TotalVolume *VolumeRm `json:"totalVolume"`
319
320         // Unsigned integer identifying a volume in units of bytes with "nullable=true" property.
321         UplinkVolume *VolumeRm `json:"uplinkVolume"`
322 }
323
324 // Unsigned integer identifying a volume in units of bytes.
325 type Volume int64
326
327 // Unsigned integer identifying a volume in units of bytes with "nullable=true" property.
328 type VolumeRm int64
329
330 // Represents the configuration information for the delivery of notifications over Websockets.
331 type WebsockNotifConfig struct {
332         // Set by the SCS/AS to indicate that the Websocket delivery is requested.
333         RequestWebsocketUri *bool `json:"requestWebsocketUri,omitempty"`
334
335         // string formatted according to IETF RFC 3986 identifying a referenced resource.
336         WebsocketUri *Link `json:"websocketUri,omitempty"`
337 }
338
339 // Base64 encoded, gzipped, json marshaled Swagger object
340 var swaggerSpec = []string{
341
342         "H4sIAAAAAAAC/+Rb/W7juHZ/lQO1wL2LKooTJ5mZAAXqcZy5LvJhWM4uis0ioKVji3ckUiUpe3wXeaC+",
343         "Rp+sICnZks1Y9s7uTdv7z+445iF/55Dn+/hXL+JZzhkyJb3rXz2BMudMovnQ7XzQ/4tRRoLminLmXXsT",
344         "zHIuiFjBGGMqMFKe7yVIYhSG6I5HxC7dpuwxIKlCwYiiC4Sn8RD4DFSCIFDyQkQYeL4n8D8LKjD2rpUo",
345         "0PdklGBG9G5qlaN37UklKJt7r6+vr77X7XzcPWiEIiOapf8VEC86Hf1VxJlCpvQ/SZ6n1EI4zQWfppj9",
346         "y1+lxbPZ658Fzrxr759ONzd0ar+VpyNLdYOK0FR65pwmJ59JDBonSuUZEGfvAOKJkUIlXNC/YWxRdN8B",
347         "xS0XUxrHyCyEi3eA8MAV3PKClVK4eicIvSjCXJFpihbHp3fA0edsltLIvsqz93iVd8jmKoFxpcUGyPk7",
348         "ABkJjDiLqf4It4SmFZj30JIRWaWcxDDhHO6ImNsncvYe2qLNroHBtRHVKC7fxXjJIs+5UBjDPcaUwERb",
349         "d43n/D0UR0vknrCVebgoldRQLt/FuQyZ8ZEphCgWKGAgBBcWzns8XY2CRghPjCwITSv7FuOMFKna9fJf",
350         "kKGgUQX7tfLgJjjoRVGRFSlRGD9JMsdd8jHmAqXGCIQB2ayHQhPoCCEXPEehqI2jYr5kKWVff+RpkWEb",
351         "v+UqzUAh1nHKPoqbcl2IkSZTXJH02LOK/HiE+iwb8PDpX9Ga9F70lfFlivEcs/IJvC09kEUUoZSzIgXS",
352         "JNRxFwHGFZ2Vz8ch1/JJ7IZxkBQZYScCSaxfA+C3PCXMbAMyx0hvCoqDSqjcA8LzdyK6evT38xrBLw5J",
353         "fCYsXtJYJbv4KFM4RwGUxYY5NgcC02o9UAZTqiTkKEAaF6F5zyijWZF51531YeU+5rRYjXGGAlmEw3j3",
354         "SMsA0BiZorOVPfLzzQTWVDC8ASIhxhllGGsQsphGKSkkwmXQDbr6SrpfRiOYhHD+KTi7vAh2BbSNZJw5",
355         "Uggt9ZgoApoYaONQHWxLkiEsyUrj0Z+bW25IfZgWCpZUJWYZK1Kj/FA+kxVIVOaaRWHUslpQBe672Ckj",
356         "YvWm9MxJMy4youDZm5rFz96W1B5zZL3REMLyna0f7+5pK4WO1xs6D1spPOwoH2igJUMkXl2cIIt4jDFE",
357         "CREkUiikE4qOyuh8jNJpMGs6yxlCZBaXRkcLW6uPhiwMvQYNBOaCF/mfJGSYTctjOcPHmXf9868NJcJv",
358         "1psMY+n98uo3v8wklTHTX/yyrf51uh3IAxIlgKm1JaWeoTHYFVmlCxRFleQ9DTRKqjCTbTZwsD5ciy+j",
359         "bGipztbCJUKQlfmyZKEFY4XGPvn7EGjlZUfh5OF0GN48ACu0LIGkqU5hMTaiPhL5vYHTitre5RiJbHdA",
360         "4/rabRvZ2MhlKG+IwgnN8EC1i4nCE0WzN9VBS8Ku9q43q12vvjrZZaR+29l2/fPa0vyrNjTP3toivYmt",
361         "1TStsfLfG6v2ko8sXR2MtSLYg3X1OPsJ8evbrm+KaonIgDANKUqLWHNwZj5/gBi15zc+aon4NSarAM5A",
362         "JiRN18oM95zFZOUbEuM1iqnUoTFTFZEsSaa4popr7gK/KUjoPEFRKpYM4MP2KWGhTzEOmHyzDvhDzRmf",
363         "uZxxFZDdU0eN6YlJOrc3UUYBDZ+co6A8NhaJZho3FEwHA3wGGWWFQtm4F8pU97w1OqhHiL8jIBucyOCY",
364         "81269t0IDlG7OsI3tO0NxPwPRLxP+eqI39C5GuLBwhlvj7iUVAdFC5IW2gMKhBMIB2E4fHx4mQzG98OH",
365         "3mT4+HANw7WbVAlRMP4GUjt2znSIplBklGkNCuAE7h7D8OXx9uXzoDcejKFOSyDlUtr4fYpEoNAE40H/",
366         "8cfB+D82RE0agRFfoFjt0t0NeuHgbbIUicRtqqew92XwMh6MHseTJl9okzQQqFN7QC20AOAEbnvDu8HN",
367         "y3gQPj6N+4PwpXd399h3SGZTC678cCmhmang6OPDp35/EIa3T3ffs98mLwmemed7yPRb+Nlz3J3ne80b",
368         "8XxvV+Lmj1vi9HyvLizP9/YIwvO9FtZqDn7jDszLHBuBt2XT5j7Ky9lN+IgjN98Xl+zk8q++h5Wa7I3u",
369         "zKJX35ulfOmML4fNcG04Ar201JwlCgTNE8SF8cyWLe2g1lvUorVdXd4TmW1FV5YdV1hVRahfdBy+JyWM",
370         "OFOEMmu49PtrRMYznqZ8iTFMV/Ds/ZuOJVgMBGKeEcpqKwP4zEvHurNJ5aF3iDb+ucpTiASLqxRlzIFx",
371         "VYEEwioYtYQGQkTom0xVwkVwFZybE/W/mklrN7j6eG5i5owLbZatG30rP6vF+P8Qwitl9x0Su9XqwmZ8",
372         "r5prRdneqannesXNhtylfg0DmpPoKyqY0VSzVGVzpU4GtsQBim8VND5uFTTOzy4Mp0aalM0DGKpSxpUE",
373         "n+70dZxyATd31f5QQxY41HojnYx8K7X6vCX5smanje2KQW83HNiyEuV+LjMxZAuS0nhEBMn2Xpt5g5sv",
374         "tfCopYVcE6OWvV8m/2XrEQTqczCGuEB9A7sUu7efu6H0lBJ0Wij8kwRGssarJ/Dv4eMDjLjJmX3gAmy/",
375         "t1zrfKxindu2VA/tQh8wmAfw7GWFVFrrCORcUtMoLuX+7AWtJUPLnfMm8sVFL47FgcU7vRxIHAuUssz6",
376         "1KaE9uzF3HyOMaIZSZ89bQpsbNHMBoeDyS2Mb/twdnZ15RRUBWxP6vl3gOYfEjK3pqbDfHF1nJCvHJyQ",
377         "KOLCZKyKQ2lSLhqILz9dngcwSRAy+g1jKxKz24ZXxyaXWq0am5QWSNvxqQ5eMX7rjq6OvaPfzln7Xfxx",
378         "rLde8R1lX98Uwhucrs/tfvp4tSUpUZWe48YUyO65ZezeE0ha+h6FRAHrWJ8IJLtmMMLUXdpspFpUmlZJ",
379         "H9MUvqR8SlKwoanepvKE5rhlQqNku8yoDykLiDrlEDinUqGwkt7jyfY5r4guaNSzLwv3h84bBgxR9R53",
380         "kOt4eoOyLH66Kp59nmWc3RBFghXJUmdw36/ha2UGGY/x88H3gA96eSllcwWUlZLf4I8KIZCpdOXk5Dhh",
381         "z5HPBckTGulnd6i0N1Tm8f2R0v7SANheduaFomyu17blXRt2xpYINNXbz7+dreNErwSJvh6NdVJS/V3B",
382         "ujq1dXN1+eVog6UxshpEohSJEoy1Nb384jBn/8eswv8DRdtmgS3NUy3zsyO2fkC15OLrmtr5nu6j6M1e",
383         "ZpVSAYF7PqUpQp8XTIkV9Hms8zehKtGM7u4ffNAgBDVNxS7EdE6V9LeCwypz634MLs66To98z46BVHJ5",
384         "AKRznWB8Dy7bgjsyRtlkr92dukan0y1TfrPh1LY678NhePPghPBQm6zQl9+a+tUSdg1matrAC1xZpqvi",
385         "K6S4wNTWu/4sf2gZ4MBNYdChUH2bdFc10nIUy5bSTB3FjhbpDK0G7uAGbq0oeYClZ5JEh8zimOBzO+er",
386         "0/tNrl2J4CjNmCv7376RRv+amGe6K+PMquXejnBk5oYy1r6SRTvM6QMssZMXZ9F3p31i0glbGij7FFWD",
387         "sGPu+urysnvZaMKZv7T1nfTpB7VvDjr/oAx0H8D2Js7WsNtepxzbyVGSNnRToy3HksB8BBSCC6gm+x2e",
388         "WdsUVxkkI1FCGW4KIbVhvnJXQ7s7UsUjG+NGWNnQcvZP54VUwnAAMuFFGms7UnJkkOeCL2jcOOlEoJ2u",
389         "syfWePWBzmA98uc0c1YS3zsh9jY7rjMpk4qwqLU78SSoXb4pwDlu/OaPKbkdZCMbtcE2IykVUYV0TXsh",
390         "/GUyGYFdAJF2r3Zu5UDR1vRjPZJ7i0QVAussTMLzT5cfzl4OiWjCnX20macqdSqCTLhQ/vaTkUWWEdux",
391         "rOE2g2ll6di8cFOBTwibI8wEz+ocK37k07J/OOBZuQK0cVm82NfOSLhEBtOVQRL2B7cm8ECxQB3l1DyO",
392         "8fnrxuXTeOjEO94aIjqkNT1+7N0PH768PDxOTGPxp8HNNWy127Ym0NYv22yhBU42jRfBSWbivLlAM2oV",
393         "wAk8Tv4yGL+MB73QtGOP3L1asFEyrhIUZaG42a11sOP5Xv18Z880jGRP7rkpE+zVijmEQdgPT3uh8x5C",
394         "bfq5GNbCpJbBXEuwv01DpLOvOKwP3PVqLqOa0x5ZIy9geONEWx7eunfJlXubrShls6df4nZFKxOUqh4Z",
395         "t0ipHt3aG4kI0y7N+DPtPbRBXiZoXgep1KtBlqE2DlRmoJMPRzuk0TX+LdFnYwMn1zTDx9kNWR00i6oz",
396         "I0pSMwym86BZkZYf3p4evmrUdrvd7qcABt9IlqcofTjvXJ9dXnc6m3+ddD5edzrwZ+0mPkLCC6EDsoSy",
397         "GJ4m/R+cr0Zz8RNlMV+23JrBujQrNxpkTAXRPkoou8K2aqXiufnsuBi9thpc3DufXw04Gi/J8+Notm9z",
398         "fWptM9etaj/wlvWwYZaxisz8yvGQsrhT6mauYpIIlAlP49YqEpkjqGr1P/YvJZqSG7c3X81UfDkR3ySu",
399         "DdM7B+JNutHIUrYH4L7/GsbZb7wIS3j0VViy4y9D07muY7PHUZN+C0PWmPCbrhxDmlcXrUOSa3y/F4aj",
400         "hpFdGNvHJH/CqeTRV+Mz7W8IWp9xM7qqp67VMHuMKa1mAeu+UgJfoIDyTFQOZ1kmQeslTiMYotqEuDpm",
401         "smlSOfBr/Lj+br3JBpBpkZkTGm3YKecpEjNTv9w6+SBvvfUY9Z+qXync8MiRU9V/hnN+Dj+efQi6QQcm",
402         "HzfNSsg5Zfa3GA9cqGTKCxZDbzSUnu8VIvWuvUSp/Pr0dLlcBt15ngdczE9nKj8Nc4zkKRFRQhd4ev7p",
403         "RaKgKE/taac2aXUN+dxUZkjWi3Mmg1igIKk5Pnhm//1fcN45P/NtBfNRzAmjfyNlMWNEhGI62v5zbzz8",
404         "7ENvMgx96PfDng+DSTj0YRLemP9Nevo//R+CZ9ZLUxB0nih9QSZfiW0YXuZ03kZYNj0Eg3WisXq+t0Ah",
405         "LQtnwXnQOSFpnpDgQnPKc2Qkp1roQSfo6BdHVKLv5PX1fwIAAP//yz0VHT5BAAA=",
406 }
407
408 // GetSwagger returns the content of the embedded swagger specification file
409 // or error if failed to decode
410 func decodeSpec() ([]byte, error) {
411         zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, ""))
412         if err != nil {
413                 return nil, fmt.Errorf("error base64 decoding spec: %s", err)
414         }
415         zr, err := gzip.NewReader(bytes.NewReader(zipped))
416         if err != nil {
417                 return nil, fmt.Errorf("error decompressing spec: %s", err)
418         }
419         var buf bytes.Buffer
420         _, err = buf.ReadFrom(zr)
421         if err != nil {
422                 return nil, fmt.Errorf("error decompressing spec: %s", err)
423         }
424
425         return buf.Bytes(), nil
426 }
427
428 var rawSpec = decodeSpecCached()
429
430 // a naive cached of a decoded swagger spec
431 func decodeSpecCached() func() ([]byte, error) {
432         data, err := decodeSpec()
433         return func() ([]byte, error) {
434                 return data, err
435         }
436 }
437
438 // Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
439 func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) {
440         var res = make(map[string]func() ([]byte, error))
441         if len(pathToFile) > 0 {
442                 res[pathToFile] = rawSpec
443         }
444
445         pathPrefix := path.Dir(pathToFile)
446
447         for rawPath, rawFunc := range externalRef0.PathToRawSpec(path.Join(pathPrefix, "CommonData.yaml")) {
448                 if _, ok := res[rawPath]; ok {
449                         // it is not possible to compare functions in golang, so always overwrite the old value
450                 }
451                 res[rawPath] = rawFunc
452         }
453         for rawPath, rawFunc := range externalRef1.PathToRawSpec(path.Join(pathPrefix, "TS29571_CommonData.yaml")) {
454                 if _, ok := res[rawPath]; ok {
455                         // it is not possible to compare functions in golang, so always overwrite the old value
456                 }
457                 res[rawPath] = rawFunc
458         }
459         return res
460 }
461
462 // GetSwagger returns the Swagger specification corresponding to the generated code
463 // in this file. The external references of Swagger specification are resolved.
464 // The logic of resolving external references is tightly connected to "import-mapping" feature.
465 // Externally referenced files must be embedded in the corresponding golang packages.
466 // Urls can be supported but this task was out of the scope.
467 func GetSwagger() (swagger *openapi3.T, err error) {
468         var resolvePath = PathToRawSpec("")
469
470         loader := openapi3.NewLoader()
471         loader.IsExternalRefsAllowed = true
472         loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) {
473                 var pathToFile = url.String()
474                 pathToFile = path.Clean(pathToFile)
475                 getSpec, ok := resolvePath[pathToFile]
476                 if !ok {
477                         err1 := fmt.Errorf("path not found: %s", pathToFile)
478                         return nil, err1
479                 }
480                 return getSpec()
481         }
482         var specData []byte
483         specData, err = rawSpec()
484         if err != nil {
485                 return
486         }
487         swagger, err = loader.LoadFromData(specData)
488         if err != nil {
489                 return
490         }
491         return
492 }