-
Notifications
You must be signed in to change notification settings - Fork 80
/
list_java_releases_request_response.go
376 lines (312 loc) · 16.6 KB
/
list_java_releases_request_response.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
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
// Code generated. DO NOT EDIT.
package jms
import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"net/http"
"strings"
)
// ListJavaReleasesRequest wrapper for the ListJavaReleases operation
//
// # See also
//
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/jms/ListJavaReleases.go.html to see an example of how to use ListJavaReleasesRequest.
type ListJavaReleasesRequest struct {
// Unique Java release version identifier
ReleaseVersion *string `mandatory:"false" contributesTo:"query" name:"releaseVersion"`
// The version identifier for the Java family.
FamilyVersion *string `mandatory:"false" contributesTo:"query" name:"familyVersion"`
// Java release type.
ReleaseType ListJavaReleasesReleaseTypeEnum `mandatory:"false" contributesTo:"query" name:"releaseType" omitEmpty:"true"`
// The security status of the Java Runtime.
JreSecurityStatus ListJavaReleasesJreSecurityStatusEnum `mandatory:"false" contributesTo:"query" name:"jreSecurityStatus" omitEmpty:"true"`
// Java license type.
LicenseType ListJavaReleasesLicenseTypeEnum `mandatory:"false" contributesTo:"query" name:"licenseType" omitEmpty:"true"`
// The maximum number of items to return.
Limit *int `mandatory:"false" contributesTo:"query" name:"limit"`
// The page token representing the page at which to start retrieving results. The token is usually retrieved from a previous list call.
Page *string `mandatory:"false" contributesTo:"query" name:"page"`
// The sort order, either 'asc' or 'desc'.
SortOrder ListJavaReleasesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"`
// If no value is specified _releaseDate_ is default.
SortBy ListJavaReleasesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"`
// The client request ID for tracing.
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
// Metadata about the request. This information will not be transmitted to the service, but
// represents information that the SDK will consume to drive retry behavior.
RequestMetadata common.RequestMetadata
}
func (request ListJavaReleasesRequest) String() string {
return common.PointerString(request)
}
// HTTPRequest implements the OCIRequest interface
func (request ListJavaReleasesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) {
_, err := request.ValidateEnumValue()
if err != nil {
return http.Request{}, err
}
return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders)
}
// BinaryRequestBody implements the OCIRequest interface
func (request ListJavaReleasesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) {
return nil, false
}
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
func (request ListJavaReleasesRequest) RetryPolicy() *common.RetryPolicy {
return request.RequestMetadata.RetryPolicy
}
// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (request ListJavaReleasesRequest) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if _, ok := GetMappingListJavaReleasesReleaseTypeEnum(string(request.ReleaseType)); !ok && request.ReleaseType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ReleaseType: %s. Supported values are: %s.", request.ReleaseType, strings.Join(GetListJavaReleasesReleaseTypeEnumStringValues(), ",")))
}
if _, ok := GetMappingListJavaReleasesJreSecurityStatusEnum(string(request.JreSecurityStatus)); !ok && request.JreSecurityStatus != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for JreSecurityStatus: %s. Supported values are: %s.", request.JreSecurityStatus, strings.Join(GetListJavaReleasesJreSecurityStatusEnumStringValues(), ",")))
}
if _, ok := GetMappingListJavaReleasesLicenseTypeEnum(string(request.LicenseType)); !ok && request.LicenseType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LicenseType: %s. Supported values are: %s.", request.LicenseType, strings.Join(GetListJavaReleasesLicenseTypeEnumStringValues(), ",")))
}
if _, ok := GetMappingListJavaReleasesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListJavaReleasesSortOrderEnumStringValues(), ",")))
}
if _, ok := GetMappingListJavaReleasesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListJavaReleasesSortByEnumStringValues(), ",")))
}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
// ListJavaReleasesResponse wrapper for the ListJavaReleases operation
type ListJavaReleasesResponse struct {
// The underlying http response
RawResponse *http.Response
// A list of JavaReleaseCollection instances
JavaReleaseCollection `presentIn:"body"`
// Unique Oracle-assigned identifier for the request. If you need to contact
// Oracle about a particular request, please provide the request ID.
OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
// For list pagination. When this header appears in the response, additional pages of results remain.
// Include this value as the `page` parameter for the subsequent GET request to get the next batch of items.
// For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
OpcNextPage *string `presentIn:"header" name:"opc-next-page"`
}
func (response ListJavaReleasesResponse) String() string {
return common.PointerString(response)
}
// HTTPResponse implements the OCIResponse interface
func (response ListJavaReleasesResponse) HTTPResponse() *http.Response {
return response.RawResponse
}
// ListJavaReleasesReleaseTypeEnum Enum with underlying type: string
type ListJavaReleasesReleaseTypeEnum string
// Set of constants representing the allowable values for ListJavaReleasesReleaseTypeEnum
const (
ListJavaReleasesReleaseTypeCpu ListJavaReleasesReleaseTypeEnum = "CPU"
ListJavaReleasesReleaseTypeFeature ListJavaReleasesReleaseTypeEnum = "FEATURE"
ListJavaReleasesReleaseTypeBpr ListJavaReleasesReleaseTypeEnum = "BPR"
ListJavaReleasesReleaseTypePatchRelease ListJavaReleasesReleaseTypeEnum = "PATCH_RELEASE"
)
var mappingListJavaReleasesReleaseTypeEnum = map[string]ListJavaReleasesReleaseTypeEnum{
"CPU": ListJavaReleasesReleaseTypeCpu,
"FEATURE": ListJavaReleasesReleaseTypeFeature,
"BPR": ListJavaReleasesReleaseTypeBpr,
"PATCH_RELEASE": ListJavaReleasesReleaseTypePatchRelease,
}
var mappingListJavaReleasesReleaseTypeEnumLowerCase = map[string]ListJavaReleasesReleaseTypeEnum{
"cpu": ListJavaReleasesReleaseTypeCpu,
"feature": ListJavaReleasesReleaseTypeFeature,
"bpr": ListJavaReleasesReleaseTypeBpr,
"patch_release": ListJavaReleasesReleaseTypePatchRelease,
}
// GetListJavaReleasesReleaseTypeEnumValues Enumerates the set of values for ListJavaReleasesReleaseTypeEnum
func GetListJavaReleasesReleaseTypeEnumValues() []ListJavaReleasesReleaseTypeEnum {
values := make([]ListJavaReleasesReleaseTypeEnum, 0)
for _, v := range mappingListJavaReleasesReleaseTypeEnum {
values = append(values, v)
}
return values
}
// GetListJavaReleasesReleaseTypeEnumStringValues Enumerates the set of values in String for ListJavaReleasesReleaseTypeEnum
func GetListJavaReleasesReleaseTypeEnumStringValues() []string {
return []string{
"CPU",
"FEATURE",
"BPR",
"PATCH_RELEASE",
}
}
// GetMappingListJavaReleasesReleaseTypeEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingListJavaReleasesReleaseTypeEnum(val string) (ListJavaReleasesReleaseTypeEnum, bool) {
enum, ok := mappingListJavaReleasesReleaseTypeEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// ListJavaReleasesJreSecurityStatusEnum Enum with underlying type: string
type ListJavaReleasesJreSecurityStatusEnum string
// Set of constants representing the allowable values for ListJavaReleasesJreSecurityStatusEnum
const (
ListJavaReleasesJreSecurityStatusEarlyAccess ListJavaReleasesJreSecurityStatusEnum = "EARLY_ACCESS"
ListJavaReleasesJreSecurityStatusUnknown ListJavaReleasesJreSecurityStatusEnum = "UNKNOWN"
ListJavaReleasesJreSecurityStatusUpToDate ListJavaReleasesJreSecurityStatusEnum = "UP_TO_DATE"
ListJavaReleasesJreSecurityStatusUpdateRequired ListJavaReleasesJreSecurityStatusEnum = "UPDATE_REQUIRED"
ListJavaReleasesJreSecurityStatusUpgradeRequired ListJavaReleasesJreSecurityStatusEnum = "UPGRADE_REQUIRED"
)
var mappingListJavaReleasesJreSecurityStatusEnum = map[string]ListJavaReleasesJreSecurityStatusEnum{
"EARLY_ACCESS": ListJavaReleasesJreSecurityStatusEarlyAccess,
"UNKNOWN": ListJavaReleasesJreSecurityStatusUnknown,
"UP_TO_DATE": ListJavaReleasesJreSecurityStatusUpToDate,
"UPDATE_REQUIRED": ListJavaReleasesJreSecurityStatusUpdateRequired,
"UPGRADE_REQUIRED": ListJavaReleasesJreSecurityStatusUpgradeRequired,
}
var mappingListJavaReleasesJreSecurityStatusEnumLowerCase = map[string]ListJavaReleasesJreSecurityStatusEnum{
"early_access": ListJavaReleasesJreSecurityStatusEarlyAccess,
"unknown": ListJavaReleasesJreSecurityStatusUnknown,
"up_to_date": ListJavaReleasesJreSecurityStatusUpToDate,
"update_required": ListJavaReleasesJreSecurityStatusUpdateRequired,
"upgrade_required": ListJavaReleasesJreSecurityStatusUpgradeRequired,
}
// GetListJavaReleasesJreSecurityStatusEnumValues Enumerates the set of values for ListJavaReleasesJreSecurityStatusEnum
func GetListJavaReleasesJreSecurityStatusEnumValues() []ListJavaReleasesJreSecurityStatusEnum {
values := make([]ListJavaReleasesJreSecurityStatusEnum, 0)
for _, v := range mappingListJavaReleasesJreSecurityStatusEnum {
values = append(values, v)
}
return values
}
// GetListJavaReleasesJreSecurityStatusEnumStringValues Enumerates the set of values in String for ListJavaReleasesJreSecurityStatusEnum
func GetListJavaReleasesJreSecurityStatusEnumStringValues() []string {
return []string{
"EARLY_ACCESS",
"UNKNOWN",
"UP_TO_DATE",
"UPDATE_REQUIRED",
"UPGRADE_REQUIRED",
}
}
// GetMappingListJavaReleasesJreSecurityStatusEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingListJavaReleasesJreSecurityStatusEnum(val string) (ListJavaReleasesJreSecurityStatusEnum, bool) {
enum, ok := mappingListJavaReleasesJreSecurityStatusEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// ListJavaReleasesLicenseTypeEnum Enum with underlying type: string
type ListJavaReleasesLicenseTypeEnum string
// Set of constants representing the allowable values for ListJavaReleasesLicenseTypeEnum
const (
ListJavaReleasesLicenseTypeOtn ListJavaReleasesLicenseTypeEnum = "OTN"
ListJavaReleasesLicenseTypeNftc ListJavaReleasesLicenseTypeEnum = "NFTC"
ListJavaReleasesLicenseTypeRestricted ListJavaReleasesLicenseTypeEnum = "RESTRICTED"
)
var mappingListJavaReleasesLicenseTypeEnum = map[string]ListJavaReleasesLicenseTypeEnum{
"OTN": ListJavaReleasesLicenseTypeOtn,
"NFTC": ListJavaReleasesLicenseTypeNftc,
"RESTRICTED": ListJavaReleasesLicenseTypeRestricted,
}
var mappingListJavaReleasesLicenseTypeEnumLowerCase = map[string]ListJavaReleasesLicenseTypeEnum{
"otn": ListJavaReleasesLicenseTypeOtn,
"nftc": ListJavaReleasesLicenseTypeNftc,
"restricted": ListJavaReleasesLicenseTypeRestricted,
}
// GetListJavaReleasesLicenseTypeEnumValues Enumerates the set of values for ListJavaReleasesLicenseTypeEnum
func GetListJavaReleasesLicenseTypeEnumValues() []ListJavaReleasesLicenseTypeEnum {
values := make([]ListJavaReleasesLicenseTypeEnum, 0)
for _, v := range mappingListJavaReleasesLicenseTypeEnum {
values = append(values, v)
}
return values
}
// GetListJavaReleasesLicenseTypeEnumStringValues Enumerates the set of values in String for ListJavaReleasesLicenseTypeEnum
func GetListJavaReleasesLicenseTypeEnumStringValues() []string {
return []string{
"OTN",
"NFTC",
"RESTRICTED",
}
}
// GetMappingListJavaReleasesLicenseTypeEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingListJavaReleasesLicenseTypeEnum(val string) (ListJavaReleasesLicenseTypeEnum, bool) {
enum, ok := mappingListJavaReleasesLicenseTypeEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// ListJavaReleasesSortOrderEnum Enum with underlying type: string
type ListJavaReleasesSortOrderEnum string
// Set of constants representing the allowable values for ListJavaReleasesSortOrderEnum
const (
ListJavaReleasesSortOrderAsc ListJavaReleasesSortOrderEnum = "ASC"
ListJavaReleasesSortOrderDesc ListJavaReleasesSortOrderEnum = "DESC"
)
var mappingListJavaReleasesSortOrderEnum = map[string]ListJavaReleasesSortOrderEnum{
"ASC": ListJavaReleasesSortOrderAsc,
"DESC": ListJavaReleasesSortOrderDesc,
}
var mappingListJavaReleasesSortOrderEnumLowerCase = map[string]ListJavaReleasesSortOrderEnum{
"asc": ListJavaReleasesSortOrderAsc,
"desc": ListJavaReleasesSortOrderDesc,
}
// GetListJavaReleasesSortOrderEnumValues Enumerates the set of values for ListJavaReleasesSortOrderEnum
func GetListJavaReleasesSortOrderEnumValues() []ListJavaReleasesSortOrderEnum {
values := make([]ListJavaReleasesSortOrderEnum, 0)
for _, v := range mappingListJavaReleasesSortOrderEnum {
values = append(values, v)
}
return values
}
// GetListJavaReleasesSortOrderEnumStringValues Enumerates the set of values in String for ListJavaReleasesSortOrderEnum
func GetListJavaReleasesSortOrderEnumStringValues() []string {
return []string{
"ASC",
"DESC",
}
}
// GetMappingListJavaReleasesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingListJavaReleasesSortOrderEnum(val string) (ListJavaReleasesSortOrderEnum, bool) {
enum, ok := mappingListJavaReleasesSortOrderEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// ListJavaReleasesSortByEnum Enum with underlying type: string
type ListJavaReleasesSortByEnum string
// Set of constants representing the allowable values for ListJavaReleasesSortByEnum
const (
ListJavaReleasesSortByReleasedate ListJavaReleasesSortByEnum = "releaseDate"
ListJavaReleasesSortByReleaseversion ListJavaReleasesSortByEnum = "releaseVersion"
ListJavaReleasesSortByFamilyversion ListJavaReleasesSortByEnum = "familyVersion"
ListJavaReleasesSortByLicensetype ListJavaReleasesSortByEnum = "licenseType"
)
var mappingListJavaReleasesSortByEnum = map[string]ListJavaReleasesSortByEnum{
"releaseDate": ListJavaReleasesSortByReleasedate,
"releaseVersion": ListJavaReleasesSortByReleaseversion,
"familyVersion": ListJavaReleasesSortByFamilyversion,
"licenseType": ListJavaReleasesSortByLicensetype,
}
var mappingListJavaReleasesSortByEnumLowerCase = map[string]ListJavaReleasesSortByEnum{
"releasedate": ListJavaReleasesSortByReleasedate,
"releaseversion": ListJavaReleasesSortByReleaseversion,
"familyversion": ListJavaReleasesSortByFamilyversion,
"licensetype": ListJavaReleasesSortByLicensetype,
}
// GetListJavaReleasesSortByEnumValues Enumerates the set of values for ListJavaReleasesSortByEnum
func GetListJavaReleasesSortByEnumValues() []ListJavaReleasesSortByEnum {
values := make([]ListJavaReleasesSortByEnum, 0)
for _, v := range mappingListJavaReleasesSortByEnum {
values = append(values, v)
}
return values
}
// GetListJavaReleasesSortByEnumStringValues Enumerates the set of values in String for ListJavaReleasesSortByEnum
func GetListJavaReleasesSortByEnumStringValues() []string {
return []string{
"releaseDate",
"releaseVersion",
"familyVersion",
"licenseType",
}
}
// GetMappingListJavaReleasesSortByEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingListJavaReleasesSortByEnum(val string) (ListJavaReleasesSortByEnum, bool) {
enum, ok := mappingListJavaReleasesSortByEnumLowerCase[strings.ToLower(val)]
return enum, ok
}