-
Notifications
You must be signed in to change notification settings - Fork 82
/
integration_instance_summary.go
407 lines (329 loc) · 19.6 KB
/
integration_instance_summary.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
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
// 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.
// Oracle Integration API
//
// Oracle Integration API.
//
package integration
import (
"encoding/json"
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// IntegrationInstanceSummary Summary of the Integration Instance.
type IntegrationInstanceSummary struct {
// Unique identifier that is immutable on creation.
Id *string `mandatory:"true" json:"id"`
// Integration Instance Identifier, can be renamed.
DisplayName *string `mandatory:"true" json:"displayName"`
// Compartment Identifier.
CompartmentId *string `mandatory:"true" json:"compartmentId"`
// Standard or Enterprise type,
// Oracle Integration Generation 2 uses ENTERPRISE and STANDARD,
// Oracle Integration 3 uses ENTERPRISEX and STANDARDX
IntegrationInstanceType IntegrationInstanceSummaryIntegrationInstanceTypeEnum `mandatory:"true" json:"integrationInstanceType"`
// Bring your own license.
IsByol *bool `mandatory:"true" json:"isByol"`
// The Integration Instance URL.
InstanceUrl *string `mandatory:"true" json:"instanceUrl"`
// The number of configured message packs (if any)
MessagePacks *int `mandatory:"true" json:"messagePacks"`
// The time the the Integration Instance was created. An RFC3339 formatted datetime string.
TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"`
// The time the IntegrationInstance was updated. An RFC3339 formatted datetime string.
TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"`
// The current state of the Integration Instance.
LifecycleState IntegrationInstanceSummaryLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"`
// An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
StateMessage *string `mandatory:"false" json:"stateMessage"`
// The file server is enabled or not.
IsFileServerEnabled *bool `mandatory:"false" json:"isFileServerEnabled"`
// Visual Builder is enabled or not.
IsVisualBuilderEnabled *bool `mandatory:"false" json:"isVisualBuilderEnabled"`
CustomEndpoint *CustomEndpointDetails `mandatory:"false" json:"customEndpoint"`
// A list of alternate custom endpoints used for the integration instance URL.
AlternateCustomEndpoints []CustomEndpointDetails `mandatory:"false" json:"alternateCustomEndpoints"`
// The entitlement used for billing purposes.
ConsumptionModel IntegrationInstanceSummaryConsumptionModelEnum `mandatory:"false" json:"consumptionModel,omitempty"`
NetworkEndpointDetails NetworkEndpointDetails `mandatory:"false" json:"networkEndpointDetails"`
// Simple key-value pair that is applied without any predefined name,
// type or scope. Exists for cross-compatibility only.
// Example: `{"bar-key": "value"}`
FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
// Usage of predefined tag keys. These predefined keys are scoped to
// namespaces.
// Example: `{"foo-namespace": {"bar-key": "value"}}`
DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
// Shape
Shape IntegrationInstanceSummaryShapeEnum `mandatory:"false" json:"shape,omitempty"`
PrivateEndpointOutboundConnection OutboundConnection `mandatory:"false" json:"privateEndpointOutboundConnection"`
}
func (m IntegrationInstanceSummary) String() string {
return common.PointerString(m)
}
// 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 (m IntegrationInstanceSummary) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if _, ok := GetMappingIntegrationInstanceSummaryIntegrationInstanceTypeEnum(string(m.IntegrationInstanceType)); !ok && m.IntegrationInstanceType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for IntegrationInstanceType: %s. Supported values are: %s.", m.IntegrationInstanceType, strings.Join(GetIntegrationInstanceSummaryIntegrationInstanceTypeEnumStringValues(), ",")))
}
if _, ok := GetMappingIntegrationInstanceSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetIntegrationInstanceSummaryLifecycleStateEnumStringValues(), ",")))
}
if _, ok := GetMappingIntegrationInstanceSummaryConsumptionModelEnum(string(m.ConsumptionModel)); !ok && m.ConsumptionModel != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConsumptionModel: %s. Supported values are: %s.", m.ConsumptionModel, strings.Join(GetIntegrationInstanceSummaryConsumptionModelEnumStringValues(), ",")))
}
if _, ok := GetMappingIntegrationInstanceSummaryShapeEnum(string(m.Shape)); !ok && m.Shape != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Shape: %s. Supported values are: %s.", m.Shape, strings.Join(GetIntegrationInstanceSummaryShapeEnumStringValues(), ",")))
}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
// UnmarshalJSON unmarshals from json
func (m *IntegrationInstanceSummary) UnmarshalJSON(data []byte) (e error) {
model := struct {
TimeCreated *common.SDKTime `json:"timeCreated"`
TimeUpdated *common.SDKTime `json:"timeUpdated"`
LifecycleState IntegrationInstanceSummaryLifecycleStateEnum `json:"lifecycleState"`
StateMessage *string `json:"stateMessage"`
IsFileServerEnabled *bool `json:"isFileServerEnabled"`
IsVisualBuilderEnabled *bool `json:"isVisualBuilderEnabled"`
CustomEndpoint *CustomEndpointDetails `json:"customEndpoint"`
AlternateCustomEndpoints []CustomEndpointDetails `json:"alternateCustomEndpoints"`
ConsumptionModel IntegrationInstanceSummaryConsumptionModelEnum `json:"consumptionModel"`
NetworkEndpointDetails networkendpointdetails `json:"networkEndpointDetails"`
FreeformTags map[string]string `json:"freeformTags"`
DefinedTags map[string]map[string]interface{} `json:"definedTags"`
Shape IntegrationInstanceSummaryShapeEnum `json:"shape"`
PrivateEndpointOutboundConnection outboundconnection `json:"privateEndpointOutboundConnection"`
Id *string `json:"id"`
DisplayName *string `json:"displayName"`
CompartmentId *string `json:"compartmentId"`
IntegrationInstanceType IntegrationInstanceSummaryIntegrationInstanceTypeEnum `json:"integrationInstanceType"`
IsByol *bool `json:"isByol"`
InstanceUrl *string `json:"instanceUrl"`
MessagePacks *int `json:"messagePacks"`
}{}
e = json.Unmarshal(data, &model)
if e != nil {
return
}
var nn interface{}
m.TimeCreated = model.TimeCreated
m.TimeUpdated = model.TimeUpdated
m.LifecycleState = model.LifecycleState
m.StateMessage = model.StateMessage
m.IsFileServerEnabled = model.IsFileServerEnabled
m.IsVisualBuilderEnabled = model.IsVisualBuilderEnabled
m.CustomEndpoint = model.CustomEndpoint
m.AlternateCustomEndpoints = make([]CustomEndpointDetails, len(model.AlternateCustomEndpoints))
copy(m.AlternateCustomEndpoints, model.AlternateCustomEndpoints)
m.ConsumptionModel = model.ConsumptionModel
nn, e = model.NetworkEndpointDetails.UnmarshalPolymorphicJSON(model.NetworkEndpointDetails.JsonData)
if e != nil {
return
}
if nn != nil {
m.NetworkEndpointDetails = nn.(NetworkEndpointDetails)
} else {
m.NetworkEndpointDetails = nil
}
m.FreeformTags = model.FreeformTags
m.DefinedTags = model.DefinedTags
m.Shape = model.Shape
nn, e = model.PrivateEndpointOutboundConnection.UnmarshalPolymorphicJSON(model.PrivateEndpointOutboundConnection.JsonData)
if e != nil {
return
}
if nn != nil {
m.PrivateEndpointOutboundConnection = nn.(OutboundConnection)
} else {
m.PrivateEndpointOutboundConnection = nil
}
m.Id = model.Id
m.DisplayName = model.DisplayName
m.CompartmentId = model.CompartmentId
m.IntegrationInstanceType = model.IntegrationInstanceType
m.IsByol = model.IsByol
m.InstanceUrl = model.InstanceUrl
m.MessagePacks = model.MessagePacks
return
}
// IntegrationInstanceSummaryIntegrationInstanceTypeEnum Enum with underlying type: string
type IntegrationInstanceSummaryIntegrationInstanceTypeEnum string
// Set of constants representing the allowable values for IntegrationInstanceSummaryIntegrationInstanceTypeEnum
const (
IntegrationInstanceSummaryIntegrationInstanceTypeStandard IntegrationInstanceSummaryIntegrationInstanceTypeEnum = "STANDARD"
IntegrationInstanceSummaryIntegrationInstanceTypeEnterprise IntegrationInstanceSummaryIntegrationInstanceTypeEnum = "ENTERPRISE"
IntegrationInstanceSummaryIntegrationInstanceTypeStandardx IntegrationInstanceSummaryIntegrationInstanceTypeEnum = "STANDARDX"
IntegrationInstanceSummaryIntegrationInstanceTypeEnterprisex IntegrationInstanceSummaryIntegrationInstanceTypeEnum = "ENTERPRISEX"
)
var mappingIntegrationInstanceSummaryIntegrationInstanceTypeEnum = map[string]IntegrationInstanceSummaryIntegrationInstanceTypeEnum{
"STANDARD": IntegrationInstanceSummaryIntegrationInstanceTypeStandard,
"ENTERPRISE": IntegrationInstanceSummaryIntegrationInstanceTypeEnterprise,
"STANDARDX": IntegrationInstanceSummaryIntegrationInstanceTypeStandardx,
"ENTERPRISEX": IntegrationInstanceSummaryIntegrationInstanceTypeEnterprisex,
}
var mappingIntegrationInstanceSummaryIntegrationInstanceTypeEnumLowerCase = map[string]IntegrationInstanceSummaryIntegrationInstanceTypeEnum{
"standard": IntegrationInstanceSummaryIntegrationInstanceTypeStandard,
"enterprise": IntegrationInstanceSummaryIntegrationInstanceTypeEnterprise,
"standardx": IntegrationInstanceSummaryIntegrationInstanceTypeStandardx,
"enterprisex": IntegrationInstanceSummaryIntegrationInstanceTypeEnterprisex,
}
// GetIntegrationInstanceSummaryIntegrationInstanceTypeEnumValues Enumerates the set of values for IntegrationInstanceSummaryIntegrationInstanceTypeEnum
func GetIntegrationInstanceSummaryIntegrationInstanceTypeEnumValues() []IntegrationInstanceSummaryIntegrationInstanceTypeEnum {
values := make([]IntegrationInstanceSummaryIntegrationInstanceTypeEnum, 0)
for _, v := range mappingIntegrationInstanceSummaryIntegrationInstanceTypeEnum {
values = append(values, v)
}
return values
}
// GetIntegrationInstanceSummaryIntegrationInstanceTypeEnumStringValues Enumerates the set of values in String for IntegrationInstanceSummaryIntegrationInstanceTypeEnum
func GetIntegrationInstanceSummaryIntegrationInstanceTypeEnumStringValues() []string {
return []string{
"STANDARD",
"ENTERPRISE",
"STANDARDX",
"ENTERPRISEX",
}
}
// GetMappingIntegrationInstanceSummaryIntegrationInstanceTypeEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingIntegrationInstanceSummaryIntegrationInstanceTypeEnum(val string) (IntegrationInstanceSummaryIntegrationInstanceTypeEnum, bool) {
enum, ok := mappingIntegrationInstanceSummaryIntegrationInstanceTypeEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// IntegrationInstanceSummaryLifecycleStateEnum Enum with underlying type: string
type IntegrationInstanceSummaryLifecycleStateEnum string
// Set of constants representing the allowable values for IntegrationInstanceSummaryLifecycleStateEnum
const (
IntegrationInstanceSummaryLifecycleStateCreating IntegrationInstanceSummaryLifecycleStateEnum = "CREATING"
IntegrationInstanceSummaryLifecycleStateUpdating IntegrationInstanceSummaryLifecycleStateEnum = "UPDATING"
IntegrationInstanceSummaryLifecycleStateActive IntegrationInstanceSummaryLifecycleStateEnum = "ACTIVE"
IntegrationInstanceSummaryLifecycleStateInactive IntegrationInstanceSummaryLifecycleStateEnum = "INACTIVE"
IntegrationInstanceSummaryLifecycleStateDeleting IntegrationInstanceSummaryLifecycleStateEnum = "DELETING"
IntegrationInstanceSummaryLifecycleStateDeleted IntegrationInstanceSummaryLifecycleStateEnum = "DELETED"
IntegrationInstanceSummaryLifecycleStateFailed IntegrationInstanceSummaryLifecycleStateEnum = "FAILED"
)
var mappingIntegrationInstanceSummaryLifecycleStateEnum = map[string]IntegrationInstanceSummaryLifecycleStateEnum{
"CREATING": IntegrationInstanceSummaryLifecycleStateCreating,
"UPDATING": IntegrationInstanceSummaryLifecycleStateUpdating,
"ACTIVE": IntegrationInstanceSummaryLifecycleStateActive,
"INACTIVE": IntegrationInstanceSummaryLifecycleStateInactive,
"DELETING": IntegrationInstanceSummaryLifecycleStateDeleting,
"DELETED": IntegrationInstanceSummaryLifecycleStateDeleted,
"FAILED": IntegrationInstanceSummaryLifecycleStateFailed,
}
var mappingIntegrationInstanceSummaryLifecycleStateEnumLowerCase = map[string]IntegrationInstanceSummaryLifecycleStateEnum{
"creating": IntegrationInstanceSummaryLifecycleStateCreating,
"updating": IntegrationInstanceSummaryLifecycleStateUpdating,
"active": IntegrationInstanceSummaryLifecycleStateActive,
"inactive": IntegrationInstanceSummaryLifecycleStateInactive,
"deleting": IntegrationInstanceSummaryLifecycleStateDeleting,
"deleted": IntegrationInstanceSummaryLifecycleStateDeleted,
"failed": IntegrationInstanceSummaryLifecycleStateFailed,
}
// GetIntegrationInstanceSummaryLifecycleStateEnumValues Enumerates the set of values for IntegrationInstanceSummaryLifecycleStateEnum
func GetIntegrationInstanceSummaryLifecycleStateEnumValues() []IntegrationInstanceSummaryLifecycleStateEnum {
values := make([]IntegrationInstanceSummaryLifecycleStateEnum, 0)
for _, v := range mappingIntegrationInstanceSummaryLifecycleStateEnum {
values = append(values, v)
}
return values
}
// GetIntegrationInstanceSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for IntegrationInstanceSummaryLifecycleStateEnum
func GetIntegrationInstanceSummaryLifecycleStateEnumStringValues() []string {
return []string{
"CREATING",
"UPDATING",
"ACTIVE",
"INACTIVE",
"DELETING",
"DELETED",
"FAILED",
}
}
// GetMappingIntegrationInstanceSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingIntegrationInstanceSummaryLifecycleStateEnum(val string) (IntegrationInstanceSummaryLifecycleStateEnum, bool) {
enum, ok := mappingIntegrationInstanceSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// IntegrationInstanceSummaryConsumptionModelEnum Enum with underlying type: string
type IntegrationInstanceSummaryConsumptionModelEnum string
// Set of constants representing the allowable values for IntegrationInstanceSummaryConsumptionModelEnum
const (
IntegrationInstanceSummaryConsumptionModelUcm IntegrationInstanceSummaryConsumptionModelEnum = "UCM"
IntegrationInstanceSummaryConsumptionModelGov IntegrationInstanceSummaryConsumptionModelEnum = "GOV"
IntegrationInstanceSummaryConsumptionModelOic4saas IntegrationInstanceSummaryConsumptionModelEnum = "OIC4SAAS"
)
var mappingIntegrationInstanceSummaryConsumptionModelEnum = map[string]IntegrationInstanceSummaryConsumptionModelEnum{
"UCM": IntegrationInstanceSummaryConsumptionModelUcm,
"GOV": IntegrationInstanceSummaryConsumptionModelGov,
"OIC4SAAS": IntegrationInstanceSummaryConsumptionModelOic4saas,
}
var mappingIntegrationInstanceSummaryConsumptionModelEnumLowerCase = map[string]IntegrationInstanceSummaryConsumptionModelEnum{
"ucm": IntegrationInstanceSummaryConsumptionModelUcm,
"gov": IntegrationInstanceSummaryConsumptionModelGov,
"oic4saas": IntegrationInstanceSummaryConsumptionModelOic4saas,
}
// GetIntegrationInstanceSummaryConsumptionModelEnumValues Enumerates the set of values for IntegrationInstanceSummaryConsumptionModelEnum
func GetIntegrationInstanceSummaryConsumptionModelEnumValues() []IntegrationInstanceSummaryConsumptionModelEnum {
values := make([]IntegrationInstanceSummaryConsumptionModelEnum, 0)
for _, v := range mappingIntegrationInstanceSummaryConsumptionModelEnum {
values = append(values, v)
}
return values
}
// GetIntegrationInstanceSummaryConsumptionModelEnumStringValues Enumerates the set of values in String for IntegrationInstanceSummaryConsumptionModelEnum
func GetIntegrationInstanceSummaryConsumptionModelEnumStringValues() []string {
return []string{
"UCM",
"GOV",
"OIC4SAAS",
}
}
// GetMappingIntegrationInstanceSummaryConsumptionModelEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingIntegrationInstanceSummaryConsumptionModelEnum(val string) (IntegrationInstanceSummaryConsumptionModelEnum, bool) {
enum, ok := mappingIntegrationInstanceSummaryConsumptionModelEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// IntegrationInstanceSummaryShapeEnum Enum with underlying type: string
type IntegrationInstanceSummaryShapeEnum string
// Set of constants representing the allowable values for IntegrationInstanceSummaryShapeEnum
const (
IntegrationInstanceSummaryShapeDevelopment IntegrationInstanceSummaryShapeEnum = "DEVELOPMENT"
IntegrationInstanceSummaryShapeProduction IntegrationInstanceSummaryShapeEnum = "PRODUCTION"
)
var mappingIntegrationInstanceSummaryShapeEnum = map[string]IntegrationInstanceSummaryShapeEnum{
"DEVELOPMENT": IntegrationInstanceSummaryShapeDevelopment,
"PRODUCTION": IntegrationInstanceSummaryShapeProduction,
}
var mappingIntegrationInstanceSummaryShapeEnumLowerCase = map[string]IntegrationInstanceSummaryShapeEnum{
"development": IntegrationInstanceSummaryShapeDevelopment,
"production": IntegrationInstanceSummaryShapeProduction,
}
// GetIntegrationInstanceSummaryShapeEnumValues Enumerates the set of values for IntegrationInstanceSummaryShapeEnum
func GetIntegrationInstanceSummaryShapeEnumValues() []IntegrationInstanceSummaryShapeEnum {
values := make([]IntegrationInstanceSummaryShapeEnum, 0)
for _, v := range mappingIntegrationInstanceSummaryShapeEnum {
values = append(values, v)
}
return values
}
// GetIntegrationInstanceSummaryShapeEnumStringValues Enumerates the set of values in String for IntegrationInstanceSummaryShapeEnum
func GetIntegrationInstanceSummaryShapeEnumStringValues() []string {
return []string{
"DEVELOPMENT",
"PRODUCTION",
}
}
// GetMappingIntegrationInstanceSummaryShapeEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingIntegrationInstanceSummaryShapeEnum(val string) (IntegrationInstanceSummaryShapeEnum, bool) {
enum, ok := mappingIntegrationInstanceSummaryShapeEnumLowerCase[strings.ToLower(val)]
return enum, ok
}