/
load_sql_tuning_set_details.go
643 lines (531 loc) · 31.2 KB
/
load_sql_tuning_set_details.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
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
// 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.
// Database Management API
//
// Use the Database Management API to perform tasks such as obtaining performance and resource usage metrics
// for a fleet of Managed Databases or a specific Managed Database, creating Managed Database Groups, and
// running a SQL job on a Managed Database or Managed Database Group.
//
package databasemanagement
import (
"encoding/json"
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// LoadSqlTuningSetDetails The details required to load the Sql statements into the Sql tuning set.
// It takes either credentialDetails or databaseCredential. It's recommended to provide databaseCredential
type LoadSqlTuningSetDetails struct {
// The name of the Sql tuning set.
Name *string `mandatory:"true" json:"name"`
// Specifies the loading method into the Sql tuning set.
LoadType LoadSqlTuningSetDetailsLoadTypeEnum `mandatory:"true" json:"loadType"`
CredentialDetails SqlTuningSetAdminCredentialDetails `mandatory:"false" json:"credentialDetails"`
DatabaseCredential DatabaseCredentialDetails `mandatory:"false" json:"databaseCredential"`
// Flag to indicate whether to create the Sql tuning set or just display the plsql used to create Sql tuning set.
ShowSqlOnly *int `mandatory:"false" json:"showSqlOnly"`
// The owner of the Sql tuning set.
Owner *string `mandatory:"false" json:"owner"`
// Specifies the Sql predicate to filter the Sql from the Sql tuning set defined on attributes of the SQLSET_ROW.
// User could use any combination of the following columns with appropriate values as Sql predicate
// Refer to the documentation https://docs.oracle.com/en/database/oracle/oracle-database/18/arpls/DBMS_SQLTUNE.html#GUID-1F4AFB03-7B29-46FC-B3F2-CB01EC36326C
BasicFilter *string `mandatory:"false" json:"basicFilter"`
// Specifies that the filter must include recursive Sql in the Sql tuning set.
RecursiveSql LoadSqlTuningSetDetailsRecursiveSqlEnum `mandatory:"false" json:"recursiveSql,omitempty"`
// Specifies a filter that picks the top n% according to the supplied ranking measure.
// Note that this parameter applies only if one ranking measure is supplied.
ResultPercentage *float64 `mandatory:"false" json:"resultPercentage"`
// The top limit Sql from the filtered source, ranked by the ranking measure.
ResultLimit *int `mandatory:"false" json:"resultLimit"`
// Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures.
RankingMeasure1 RankingMeasureEnum `mandatory:"false" json:"rankingMeasure1,omitempty"`
// Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures.
RankingMeasure2 RankingMeasureEnum `mandatory:"false" json:"rankingMeasure2,omitempty"`
// Specifies an ORDER BY clause on the selected Sql. User can specify upto three ranking measures.
RankingMeasure3 RankingMeasureEnum `mandatory:"false" json:"rankingMeasure3,omitempty"`
// Defines the total amount of time, in seconds, to execute.
TotalTimeLimit *int `mandatory:"false" json:"totalTimeLimit"`
// Defines the amount of time, in seconds, to pause between sampling.
RepeatInterval *int `mandatory:"false" json:"repeatInterval"`
// Specifies whether to insert new statements, update existing statements, or both.
CaptureOption LoadSqlTuningSetDetailsCaptureOptionEnum `mandatory:"false" json:"captureOption,omitempty"`
// Specifies the capture mode. Note that this parameter is applicable only for UPDATE and MERGE capture options.
// Capture mode can take one of the following values
// - MODE_REPLACE_OLD_STATS
// Replaces statistics when the number of executions is greater than the number stored in the Sql tuning set
// - MODE_ACCUMULATE_STATS
// Adds new values to current values for Sql that is already stored.
// Note that this mode detects if a statement has been aged out, so the final value for a statistics is the sum of the statistics of all cursors that statement existed under.
CaptureMode LoadSqlTuningSetDetailsCaptureModeEnum `mandatory:"false" json:"captureMode,omitempty"`
// Specifies the list of Sql statement attributes to return in the result.
// Note that this parameter cannot be made an enum since custom value can take a list of comma separated attribute names.
// Attribute list can take one of the following values.
// TYPICAL - Specifies BASIC plus Sql plan (without row source statistics) and without object reference list (default).
// BASIC - Specifies all attributes (such as execution statistics and binds) except the plans. The execution context is always part of the result.
// ALL - Specifies all attributes.
// CUSTOM - Comma-separated list of the following attribute names.
// - EXECUTION_STATISTICS
// - BIND_LIST
// - OBJECT_LIST
// - SQL_PLAN
// - SQL_PLAN_STATISTICS
// Usage examples:
// 1. "attributeList": "TYPICAL"
// 2. "attributeList": "ALL"
// 3. "attributeList": "EXECUTION_STATISTICS,OBJECT_LIST,SQL_PLAN"
AttributeList *string `mandatory:"false" json:"attributeList"`
// Specifies which statements are loaded into the Sql tuning set.
// The possible values are.
// - INSERT (default)
// Adds only new statements.
// - UPDATE
// Updates existing the Sql statements and ignores any new statements.
// - MERGE
// Inserts new statements and updates the information of the existing ones.
LoadOption LoadSqlTuningSetDetailsLoadOptionEnum `mandatory:"false" json:"loadOption,omitempty"`
// Specifies how existing Sql statements are updated.
// This parameter is applicable only if load_option is specified with UPDATE or MERGE as an option.
// Update option can take one of the following values.
// REPLACE (default) - Updates the statement using the new statistics, bind list, object list, and so on.
// ACCUMULATE - Combines attributes when possible (for example, statistics such as elapsed_time), otherwise replaces the existing values (for example, module and action) with the provided values.
// Following Sql statement attributes can be accumulated.
// elapsed_time
// buffer_gets
// direct_writes
// disk_reads
// row_processed
// fetches
// executions
// end_of_fetch_count
// stat_period
// active_stat_period
UpdateOption LoadSqlTuningSetDetailsUpdateOptionEnum `mandatory:"false" json:"updateOption,omitempty"`
// Specifies the list of Sql statement attributes to update during a merge or update.
// Note that this parameter cannot be made an enum since custom value can take a list of comma separated attribute names.
// Update attributes can take one of the following values.
// NULL (default) - Specifies the content of the input cursor except the execution context. On other terms, it is equivalent to ALL without execution contexts such as module and action.
// BASIC - Specifies statistics and binds only.
// TYPICAL - Specifies BASIC with Sql plans (without row source statistics) and without an object reference list.
// ALL - Specifies all attributes, including the execution context attributes such as module and action.
// CUSTOM - List of comma separated attribute names to update
// EXECUTION_CONTEXT
// EXECUTION_STATISTICS
// SQL_BINDS
// SQL_PLAN
// SQL_PLAN_STATISTICS (similar to SQL_PLAN with added row source statistics)
// Usage examples:
// 1. "updateAttributes": "TYPICAL"
// 2. "updateAttributes": "BASIC"
// 3. "updateAttributes": "EXECUTION_STATISTICS,SQL_PLAN_STATISTICS,SQL_PLAN"
// 4. "updateAttributes": "EXECUTION_STATISTICS,SQL_PLAN"
UpdateAttributes *string `mandatory:"false" json:"updateAttributes"`
// Specifies when to perform the update.
// The procedure only performs the update when the specified condition is satisfied.
// The condition can refer to either the data source or destination.
// The condition must use the following prefixes to refer to attributes from the source or the destination:
// OLD — Refers to statement attributes from the SQL tuning set (destination).
// NEW — Refers to statement attributes from the input statements (source).
// NULL — No updates are performed.
UpdateCondition LoadSqlTuningSetDetailsUpdateConditionEnum `mandatory:"false" json:"updateCondition,omitempty"`
// Specifies whether to update attributes when the new value is NULL.
// If TRUE, then the procedure does not update an attribute when the new value is NULL.
// That is, do not override with NULL values unless intentional.
// Possible values - true or false
IsIgnoreNull *bool `mandatory:"false" json:"isIgnoreNull"`
// Specifies whether to commit statements after DML.
// If a value is provided, then the load commits after each specified number of statements is inserted.
// If NULL is provided, then the load commits only once, at the end of the operation.
CommitRows *int `mandatory:"false" json:"commitRows"`
// Defines the beginning AWR snapshot (non-inclusive).
BeginSnapshot *int64 `mandatory:"false" json:"beginSnapshot"`
// Defines the ending AWR snapshot (inclusive).
EndSnapshot *int64 `mandatory:"false" json:"endSnapshot"`
// Specifies the name of the AWR baseline period.
// When loading the sql statements from AWR, following inputs has to be provided:
// beginSnapshot and endSnapshot
// OR
// baselineName
BaselineName *string `mandatory:"false" json:"baselineName"`
}
func (m LoadSqlTuningSetDetails) 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 LoadSqlTuningSetDetails) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if _, ok := GetMappingLoadSqlTuningSetDetailsLoadTypeEnum(string(m.LoadType)); !ok && m.LoadType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LoadType: %s. Supported values are: %s.", m.LoadType, strings.Join(GetLoadSqlTuningSetDetailsLoadTypeEnumStringValues(), ",")))
}
if _, ok := GetMappingLoadSqlTuningSetDetailsRecursiveSqlEnum(string(m.RecursiveSql)); !ok && m.RecursiveSql != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RecursiveSql: %s. Supported values are: %s.", m.RecursiveSql, strings.Join(GetLoadSqlTuningSetDetailsRecursiveSqlEnumStringValues(), ",")))
}
if _, ok := GetMappingRankingMeasureEnum(string(m.RankingMeasure1)); !ok && m.RankingMeasure1 != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RankingMeasure1: %s. Supported values are: %s.", m.RankingMeasure1, strings.Join(GetRankingMeasureEnumStringValues(), ",")))
}
if _, ok := GetMappingRankingMeasureEnum(string(m.RankingMeasure2)); !ok && m.RankingMeasure2 != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RankingMeasure2: %s. Supported values are: %s.", m.RankingMeasure2, strings.Join(GetRankingMeasureEnumStringValues(), ",")))
}
if _, ok := GetMappingRankingMeasureEnum(string(m.RankingMeasure3)); !ok && m.RankingMeasure3 != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RankingMeasure3: %s. Supported values are: %s.", m.RankingMeasure3, strings.Join(GetRankingMeasureEnumStringValues(), ",")))
}
if _, ok := GetMappingLoadSqlTuningSetDetailsCaptureOptionEnum(string(m.CaptureOption)); !ok && m.CaptureOption != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CaptureOption: %s. Supported values are: %s.", m.CaptureOption, strings.Join(GetLoadSqlTuningSetDetailsCaptureOptionEnumStringValues(), ",")))
}
if _, ok := GetMappingLoadSqlTuningSetDetailsCaptureModeEnum(string(m.CaptureMode)); !ok && m.CaptureMode != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CaptureMode: %s. Supported values are: %s.", m.CaptureMode, strings.Join(GetLoadSqlTuningSetDetailsCaptureModeEnumStringValues(), ",")))
}
if _, ok := GetMappingLoadSqlTuningSetDetailsLoadOptionEnum(string(m.LoadOption)); !ok && m.LoadOption != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LoadOption: %s. Supported values are: %s.", m.LoadOption, strings.Join(GetLoadSqlTuningSetDetailsLoadOptionEnumStringValues(), ",")))
}
if _, ok := GetMappingLoadSqlTuningSetDetailsUpdateOptionEnum(string(m.UpdateOption)); !ok && m.UpdateOption != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for UpdateOption: %s. Supported values are: %s.", m.UpdateOption, strings.Join(GetLoadSqlTuningSetDetailsUpdateOptionEnumStringValues(), ",")))
}
if _, ok := GetMappingLoadSqlTuningSetDetailsUpdateConditionEnum(string(m.UpdateCondition)); !ok && m.UpdateCondition != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for UpdateCondition: %s. Supported values are: %s.", m.UpdateCondition, strings.Join(GetLoadSqlTuningSetDetailsUpdateConditionEnumStringValues(), ",")))
}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
// UnmarshalJSON unmarshals from json
func (m *LoadSqlTuningSetDetails) UnmarshalJSON(data []byte) (e error) {
model := struct {
CredentialDetails sqltuningsetadmincredentialdetails `json:"credentialDetails"`
DatabaseCredential databasecredentialdetails `json:"databaseCredential"`
ShowSqlOnly *int `json:"showSqlOnly"`
Owner *string `json:"owner"`
BasicFilter *string `json:"basicFilter"`
RecursiveSql LoadSqlTuningSetDetailsRecursiveSqlEnum `json:"recursiveSql"`
ResultPercentage *float64 `json:"resultPercentage"`
ResultLimit *int `json:"resultLimit"`
RankingMeasure1 RankingMeasureEnum `json:"rankingMeasure1"`
RankingMeasure2 RankingMeasureEnum `json:"rankingMeasure2"`
RankingMeasure3 RankingMeasureEnum `json:"rankingMeasure3"`
TotalTimeLimit *int `json:"totalTimeLimit"`
RepeatInterval *int `json:"repeatInterval"`
CaptureOption LoadSqlTuningSetDetailsCaptureOptionEnum `json:"captureOption"`
CaptureMode LoadSqlTuningSetDetailsCaptureModeEnum `json:"captureMode"`
AttributeList *string `json:"attributeList"`
LoadOption LoadSqlTuningSetDetailsLoadOptionEnum `json:"loadOption"`
UpdateOption LoadSqlTuningSetDetailsUpdateOptionEnum `json:"updateOption"`
UpdateAttributes *string `json:"updateAttributes"`
UpdateCondition LoadSqlTuningSetDetailsUpdateConditionEnum `json:"updateCondition"`
IsIgnoreNull *bool `json:"isIgnoreNull"`
CommitRows *int `json:"commitRows"`
BeginSnapshot *int64 `json:"beginSnapshot"`
EndSnapshot *int64 `json:"endSnapshot"`
BaselineName *string `json:"baselineName"`
Name *string `json:"name"`
LoadType LoadSqlTuningSetDetailsLoadTypeEnum `json:"loadType"`
}{}
e = json.Unmarshal(data, &model)
if e != nil {
return
}
var nn interface{}
nn, e = model.CredentialDetails.UnmarshalPolymorphicJSON(model.CredentialDetails.JsonData)
if e != nil {
return
}
if nn != nil {
m.CredentialDetails = nn.(SqlTuningSetAdminCredentialDetails)
} else {
m.CredentialDetails = nil
}
nn, e = model.DatabaseCredential.UnmarshalPolymorphicJSON(model.DatabaseCredential.JsonData)
if e != nil {
return
}
if nn != nil {
m.DatabaseCredential = nn.(DatabaseCredentialDetails)
} else {
m.DatabaseCredential = nil
}
m.ShowSqlOnly = model.ShowSqlOnly
m.Owner = model.Owner
m.BasicFilter = model.BasicFilter
m.RecursiveSql = model.RecursiveSql
m.ResultPercentage = model.ResultPercentage
m.ResultLimit = model.ResultLimit
m.RankingMeasure1 = model.RankingMeasure1
m.RankingMeasure2 = model.RankingMeasure2
m.RankingMeasure3 = model.RankingMeasure3
m.TotalTimeLimit = model.TotalTimeLimit
m.RepeatInterval = model.RepeatInterval
m.CaptureOption = model.CaptureOption
m.CaptureMode = model.CaptureMode
m.AttributeList = model.AttributeList
m.LoadOption = model.LoadOption
m.UpdateOption = model.UpdateOption
m.UpdateAttributes = model.UpdateAttributes
m.UpdateCondition = model.UpdateCondition
m.IsIgnoreNull = model.IsIgnoreNull
m.CommitRows = model.CommitRows
m.BeginSnapshot = model.BeginSnapshot
m.EndSnapshot = model.EndSnapshot
m.BaselineName = model.BaselineName
m.Name = model.Name
m.LoadType = model.LoadType
return
}
// LoadSqlTuningSetDetailsLoadTypeEnum Enum with underlying type: string
type LoadSqlTuningSetDetailsLoadTypeEnum string
// Set of constants representing the allowable values for LoadSqlTuningSetDetailsLoadTypeEnum
const (
LoadSqlTuningSetDetailsLoadTypeIncrementalCursorCache LoadSqlTuningSetDetailsLoadTypeEnum = "INCREMENTAL_CURSOR_CACHE"
LoadSqlTuningSetDetailsLoadTypeCurrentCursorCache LoadSqlTuningSetDetailsLoadTypeEnum = "CURRENT_CURSOR_CACHE"
LoadSqlTuningSetDetailsLoadTypeAwr LoadSqlTuningSetDetailsLoadTypeEnum = "AWR"
)
var mappingLoadSqlTuningSetDetailsLoadTypeEnum = map[string]LoadSqlTuningSetDetailsLoadTypeEnum{
"INCREMENTAL_CURSOR_CACHE": LoadSqlTuningSetDetailsLoadTypeIncrementalCursorCache,
"CURRENT_CURSOR_CACHE": LoadSqlTuningSetDetailsLoadTypeCurrentCursorCache,
"AWR": LoadSqlTuningSetDetailsLoadTypeAwr,
}
var mappingLoadSqlTuningSetDetailsLoadTypeEnumLowerCase = map[string]LoadSqlTuningSetDetailsLoadTypeEnum{
"incremental_cursor_cache": LoadSqlTuningSetDetailsLoadTypeIncrementalCursorCache,
"current_cursor_cache": LoadSqlTuningSetDetailsLoadTypeCurrentCursorCache,
"awr": LoadSqlTuningSetDetailsLoadTypeAwr,
}
// GetLoadSqlTuningSetDetailsLoadTypeEnumValues Enumerates the set of values for LoadSqlTuningSetDetailsLoadTypeEnum
func GetLoadSqlTuningSetDetailsLoadTypeEnumValues() []LoadSqlTuningSetDetailsLoadTypeEnum {
values := make([]LoadSqlTuningSetDetailsLoadTypeEnum, 0)
for _, v := range mappingLoadSqlTuningSetDetailsLoadTypeEnum {
values = append(values, v)
}
return values
}
// GetLoadSqlTuningSetDetailsLoadTypeEnumStringValues Enumerates the set of values in String for LoadSqlTuningSetDetailsLoadTypeEnum
func GetLoadSqlTuningSetDetailsLoadTypeEnumStringValues() []string {
return []string{
"INCREMENTAL_CURSOR_CACHE",
"CURRENT_CURSOR_CACHE",
"AWR",
}
}
// GetMappingLoadSqlTuningSetDetailsLoadTypeEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingLoadSqlTuningSetDetailsLoadTypeEnum(val string) (LoadSqlTuningSetDetailsLoadTypeEnum, bool) {
enum, ok := mappingLoadSqlTuningSetDetailsLoadTypeEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// LoadSqlTuningSetDetailsRecursiveSqlEnum Enum with underlying type: string
type LoadSqlTuningSetDetailsRecursiveSqlEnum string
// Set of constants representing the allowable values for LoadSqlTuningSetDetailsRecursiveSqlEnum
const (
LoadSqlTuningSetDetailsRecursiveSqlHasRecursiveSql LoadSqlTuningSetDetailsRecursiveSqlEnum = "HAS_RECURSIVE_SQL"
LoadSqlTuningSetDetailsRecursiveSqlNoRecursiveSql LoadSqlTuningSetDetailsRecursiveSqlEnum = "NO_RECURSIVE_SQL"
)
var mappingLoadSqlTuningSetDetailsRecursiveSqlEnum = map[string]LoadSqlTuningSetDetailsRecursiveSqlEnum{
"HAS_RECURSIVE_SQL": LoadSqlTuningSetDetailsRecursiveSqlHasRecursiveSql,
"NO_RECURSIVE_SQL": LoadSqlTuningSetDetailsRecursiveSqlNoRecursiveSql,
}
var mappingLoadSqlTuningSetDetailsRecursiveSqlEnumLowerCase = map[string]LoadSqlTuningSetDetailsRecursiveSqlEnum{
"has_recursive_sql": LoadSqlTuningSetDetailsRecursiveSqlHasRecursiveSql,
"no_recursive_sql": LoadSqlTuningSetDetailsRecursiveSqlNoRecursiveSql,
}
// GetLoadSqlTuningSetDetailsRecursiveSqlEnumValues Enumerates the set of values for LoadSqlTuningSetDetailsRecursiveSqlEnum
func GetLoadSqlTuningSetDetailsRecursiveSqlEnumValues() []LoadSqlTuningSetDetailsRecursiveSqlEnum {
values := make([]LoadSqlTuningSetDetailsRecursiveSqlEnum, 0)
for _, v := range mappingLoadSqlTuningSetDetailsRecursiveSqlEnum {
values = append(values, v)
}
return values
}
// GetLoadSqlTuningSetDetailsRecursiveSqlEnumStringValues Enumerates the set of values in String for LoadSqlTuningSetDetailsRecursiveSqlEnum
func GetLoadSqlTuningSetDetailsRecursiveSqlEnumStringValues() []string {
return []string{
"HAS_RECURSIVE_SQL",
"NO_RECURSIVE_SQL",
}
}
// GetMappingLoadSqlTuningSetDetailsRecursiveSqlEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingLoadSqlTuningSetDetailsRecursiveSqlEnum(val string) (LoadSqlTuningSetDetailsRecursiveSqlEnum, bool) {
enum, ok := mappingLoadSqlTuningSetDetailsRecursiveSqlEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// LoadSqlTuningSetDetailsCaptureOptionEnum Enum with underlying type: string
type LoadSqlTuningSetDetailsCaptureOptionEnum string
// Set of constants representing the allowable values for LoadSqlTuningSetDetailsCaptureOptionEnum
const (
LoadSqlTuningSetDetailsCaptureOptionInsert LoadSqlTuningSetDetailsCaptureOptionEnum = "INSERT"
LoadSqlTuningSetDetailsCaptureOptionUpdate LoadSqlTuningSetDetailsCaptureOptionEnum = "UPDATE"
LoadSqlTuningSetDetailsCaptureOptionMerge LoadSqlTuningSetDetailsCaptureOptionEnum = "MERGE"
)
var mappingLoadSqlTuningSetDetailsCaptureOptionEnum = map[string]LoadSqlTuningSetDetailsCaptureOptionEnum{
"INSERT": LoadSqlTuningSetDetailsCaptureOptionInsert,
"UPDATE": LoadSqlTuningSetDetailsCaptureOptionUpdate,
"MERGE": LoadSqlTuningSetDetailsCaptureOptionMerge,
}
var mappingLoadSqlTuningSetDetailsCaptureOptionEnumLowerCase = map[string]LoadSqlTuningSetDetailsCaptureOptionEnum{
"insert": LoadSqlTuningSetDetailsCaptureOptionInsert,
"update": LoadSqlTuningSetDetailsCaptureOptionUpdate,
"merge": LoadSqlTuningSetDetailsCaptureOptionMerge,
}
// GetLoadSqlTuningSetDetailsCaptureOptionEnumValues Enumerates the set of values for LoadSqlTuningSetDetailsCaptureOptionEnum
func GetLoadSqlTuningSetDetailsCaptureOptionEnumValues() []LoadSqlTuningSetDetailsCaptureOptionEnum {
values := make([]LoadSqlTuningSetDetailsCaptureOptionEnum, 0)
for _, v := range mappingLoadSqlTuningSetDetailsCaptureOptionEnum {
values = append(values, v)
}
return values
}
// GetLoadSqlTuningSetDetailsCaptureOptionEnumStringValues Enumerates the set of values in String for LoadSqlTuningSetDetailsCaptureOptionEnum
func GetLoadSqlTuningSetDetailsCaptureOptionEnumStringValues() []string {
return []string{
"INSERT",
"UPDATE",
"MERGE",
}
}
// GetMappingLoadSqlTuningSetDetailsCaptureOptionEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingLoadSqlTuningSetDetailsCaptureOptionEnum(val string) (LoadSqlTuningSetDetailsCaptureOptionEnum, bool) {
enum, ok := mappingLoadSqlTuningSetDetailsCaptureOptionEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// LoadSqlTuningSetDetailsCaptureModeEnum Enum with underlying type: string
type LoadSqlTuningSetDetailsCaptureModeEnum string
// Set of constants representing the allowable values for LoadSqlTuningSetDetailsCaptureModeEnum
const (
LoadSqlTuningSetDetailsCaptureModeReplaceOldStats LoadSqlTuningSetDetailsCaptureModeEnum = "MODE_REPLACE_OLD_STATS"
LoadSqlTuningSetDetailsCaptureModeAccumulateStats LoadSqlTuningSetDetailsCaptureModeEnum = "MODE_ACCUMULATE_STATS"
)
var mappingLoadSqlTuningSetDetailsCaptureModeEnum = map[string]LoadSqlTuningSetDetailsCaptureModeEnum{
"MODE_REPLACE_OLD_STATS": LoadSqlTuningSetDetailsCaptureModeReplaceOldStats,
"MODE_ACCUMULATE_STATS": LoadSqlTuningSetDetailsCaptureModeAccumulateStats,
}
var mappingLoadSqlTuningSetDetailsCaptureModeEnumLowerCase = map[string]LoadSqlTuningSetDetailsCaptureModeEnum{
"mode_replace_old_stats": LoadSqlTuningSetDetailsCaptureModeReplaceOldStats,
"mode_accumulate_stats": LoadSqlTuningSetDetailsCaptureModeAccumulateStats,
}
// GetLoadSqlTuningSetDetailsCaptureModeEnumValues Enumerates the set of values for LoadSqlTuningSetDetailsCaptureModeEnum
func GetLoadSqlTuningSetDetailsCaptureModeEnumValues() []LoadSqlTuningSetDetailsCaptureModeEnum {
values := make([]LoadSqlTuningSetDetailsCaptureModeEnum, 0)
for _, v := range mappingLoadSqlTuningSetDetailsCaptureModeEnum {
values = append(values, v)
}
return values
}
// GetLoadSqlTuningSetDetailsCaptureModeEnumStringValues Enumerates the set of values in String for LoadSqlTuningSetDetailsCaptureModeEnum
func GetLoadSqlTuningSetDetailsCaptureModeEnumStringValues() []string {
return []string{
"MODE_REPLACE_OLD_STATS",
"MODE_ACCUMULATE_STATS",
}
}
// GetMappingLoadSqlTuningSetDetailsCaptureModeEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingLoadSqlTuningSetDetailsCaptureModeEnum(val string) (LoadSqlTuningSetDetailsCaptureModeEnum, bool) {
enum, ok := mappingLoadSqlTuningSetDetailsCaptureModeEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// LoadSqlTuningSetDetailsLoadOptionEnum Enum with underlying type: string
type LoadSqlTuningSetDetailsLoadOptionEnum string
// Set of constants representing the allowable values for LoadSqlTuningSetDetailsLoadOptionEnum
const (
LoadSqlTuningSetDetailsLoadOptionInsert LoadSqlTuningSetDetailsLoadOptionEnum = "INSERT"
LoadSqlTuningSetDetailsLoadOptionUpdate LoadSqlTuningSetDetailsLoadOptionEnum = "UPDATE"
LoadSqlTuningSetDetailsLoadOptionMerge LoadSqlTuningSetDetailsLoadOptionEnum = "MERGE"
)
var mappingLoadSqlTuningSetDetailsLoadOptionEnum = map[string]LoadSqlTuningSetDetailsLoadOptionEnum{
"INSERT": LoadSqlTuningSetDetailsLoadOptionInsert,
"UPDATE": LoadSqlTuningSetDetailsLoadOptionUpdate,
"MERGE": LoadSqlTuningSetDetailsLoadOptionMerge,
}
var mappingLoadSqlTuningSetDetailsLoadOptionEnumLowerCase = map[string]LoadSqlTuningSetDetailsLoadOptionEnum{
"insert": LoadSqlTuningSetDetailsLoadOptionInsert,
"update": LoadSqlTuningSetDetailsLoadOptionUpdate,
"merge": LoadSqlTuningSetDetailsLoadOptionMerge,
}
// GetLoadSqlTuningSetDetailsLoadOptionEnumValues Enumerates the set of values for LoadSqlTuningSetDetailsLoadOptionEnum
func GetLoadSqlTuningSetDetailsLoadOptionEnumValues() []LoadSqlTuningSetDetailsLoadOptionEnum {
values := make([]LoadSqlTuningSetDetailsLoadOptionEnum, 0)
for _, v := range mappingLoadSqlTuningSetDetailsLoadOptionEnum {
values = append(values, v)
}
return values
}
// GetLoadSqlTuningSetDetailsLoadOptionEnumStringValues Enumerates the set of values in String for LoadSqlTuningSetDetailsLoadOptionEnum
func GetLoadSqlTuningSetDetailsLoadOptionEnumStringValues() []string {
return []string{
"INSERT",
"UPDATE",
"MERGE",
}
}
// GetMappingLoadSqlTuningSetDetailsLoadOptionEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingLoadSqlTuningSetDetailsLoadOptionEnum(val string) (LoadSqlTuningSetDetailsLoadOptionEnum, bool) {
enum, ok := mappingLoadSqlTuningSetDetailsLoadOptionEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// LoadSqlTuningSetDetailsUpdateOptionEnum Enum with underlying type: string
type LoadSqlTuningSetDetailsUpdateOptionEnum string
// Set of constants representing the allowable values for LoadSqlTuningSetDetailsUpdateOptionEnum
const (
LoadSqlTuningSetDetailsUpdateOptionReplace LoadSqlTuningSetDetailsUpdateOptionEnum = "REPLACE"
LoadSqlTuningSetDetailsUpdateOptionAccumulate LoadSqlTuningSetDetailsUpdateOptionEnum = "ACCUMULATE"
)
var mappingLoadSqlTuningSetDetailsUpdateOptionEnum = map[string]LoadSqlTuningSetDetailsUpdateOptionEnum{
"REPLACE": LoadSqlTuningSetDetailsUpdateOptionReplace,
"ACCUMULATE": LoadSqlTuningSetDetailsUpdateOptionAccumulate,
}
var mappingLoadSqlTuningSetDetailsUpdateOptionEnumLowerCase = map[string]LoadSqlTuningSetDetailsUpdateOptionEnum{
"replace": LoadSqlTuningSetDetailsUpdateOptionReplace,
"accumulate": LoadSqlTuningSetDetailsUpdateOptionAccumulate,
}
// GetLoadSqlTuningSetDetailsUpdateOptionEnumValues Enumerates the set of values for LoadSqlTuningSetDetailsUpdateOptionEnum
func GetLoadSqlTuningSetDetailsUpdateOptionEnumValues() []LoadSqlTuningSetDetailsUpdateOptionEnum {
values := make([]LoadSqlTuningSetDetailsUpdateOptionEnum, 0)
for _, v := range mappingLoadSqlTuningSetDetailsUpdateOptionEnum {
values = append(values, v)
}
return values
}
// GetLoadSqlTuningSetDetailsUpdateOptionEnumStringValues Enumerates the set of values in String for LoadSqlTuningSetDetailsUpdateOptionEnum
func GetLoadSqlTuningSetDetailsUpdateOptionEnumStringValues() []string {
return []string{
"REPLACE",
"ACCUMULATE",
}
}
// GetMappingLoadSqlTuningSetDetailsUpdateOptionEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingLoadSqlTuningSetDetailsUpdateOptionEnum(val string) (LoadSqlTuningSetDetailsUpdateOptionEnum, bool) {
enum, ok := mappingLoadSqlTuningSetDetailsUpdateOptionEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// LoadSqlTuningSetDetailsUpdateConditionEnum Enum with underlying type: string
type LoadSqlTuningSetDetailsUpdateConditionEnum string
// Set of constants representing the allowable values for LoadSqlTuningSetDetailsUpdateConditionEnum
const (
LoadSqlTuningSetDetailsUpdateConditionOld LoadSqlTuningSetDetailsUpdateConditionEnum = "OLD"
LoadSqlTuningSetDetailsUpdateConditionNew LoadSqlTuningSetDetailsUpdateConditionEnum = "NEW"
)
var mappingLoadSqlTuningSetDetailsUpdateConditionEnum = map[string]LoadSqlTuningSetDetailsUpdateConditionEnum{
"OLD": LoadSqlTuningSetDetailsUpdateConditionOld,
"NEW": LoadSqlTuningSetDetailsUpdateConditionNew,
}
var mappingLoadSqlTuningSetDetailsUpdateConditionEnumLowerCase = map[string]LoadSqlTuningSetDetailsUpdateConditionEnum{
"old": LoadSqlTuningSetDetailsUpdateConditionOld,
"new": LoadSqlTuningSetDetailsUpdateConditionNew,
}
// GetLoadSqlTuningSetDetailsUpdateConditionEnumValues Enumerates the set of values for LoadSqlTuningSetDetailsUpdateConditionEnum
func GetLoadSqlTuningSetDetailsUpdateConditionEnumValues() []LoadSqlTuningSetDetailsUpdateConditionEnum {
values := make([]LoadSqlTuningSetDetailsUpdateConditionEnum, 0)
for _, v := range mappingLoadSqlTuningSetDetailsUpdateConditionEnum {
values = append(values, v)
}
return values
}
// GetLoadSqlTuningSetDetailsUpdateConditionEnumStringValues Enumerates the set of values in String for LoadSqlTuningSetDetailsUpdateConditionEnum
func GetLoadSqlTuningSetDetailsUpdateConditionEnumStringValues() []string {
return []string{
"OLD",
"NEW",
}
}
// GetMappingLoadSqlTuningSetDetailsUpdateConditionEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingLoadSqlTuningSetDetailsUpdateConditionEnum(val string) (LoadSqlTuningSetDetailsUpdateConditionEnum, bool) {
enum, ok := mappingLoadSqlTuningSetDetailsUpdateConditionEnumLowerCase[strings.ToLower(val)]
return enum, ok
}