-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2738 in SDK/oci-go-sdk from merge_to_github2024-0…
…5-06 to github Releasing Version 65.65.1 Squashed commit of the following: commit b90568bcbb5fe33ebebe9a610201a0cdccdfc26c Author: oci-dex-release-bot <[email protected]> Date: Mon May 6 16:10:08 2024 +0000 Releasing version 65 65 1
- Loading branch information
DEXREQ Automation
committed
May 6, 2024
1 parent
526148d
commit bbed598
Showing
65 changed files
with
3,020 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// 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. | ||
|
||
// Big Data Service API | ||
// | ||
// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. | ||
// | ||
|
||
package bds | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// BatchingBasedPatchingConfigs Patching configurations which allows patch the nodes batch by batch. | ||
type BatchingBasedPatchingConfigs struct { | ||
|
||
// How many nodes to be patched and rebooted in each iteration. | ||
BatchSize *int `mandatory:"true" json:"batchSize"` | ||
|
||
// The wait time between batches in seconds. | ||
WaitTimeBetweenBatchInSeconds *int `mandatory:"true" json:"waitTimeBetweenBatchInSeconds"` | ||
|
||
// Acceptable number of failed-to-be-patched nodes in each batch. The maximum number of failed-to-patch nodes cannot exceed 20% of the number of nodes. | ||
ToleranceThresholdPerBatch *int `mandatory:"true" json:"toleranceThresholdPerBatch"` | ||
} | ||
|
||
func (m BatchingBasedPatchingConfigs) 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 BatchingBasedPatchingConfigs) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} | ||
|
||
// MarshalJSON marshals to json representation | ||
func (m BatchingBasedPatchingConfigs) MarshalJSON() (buff []byte, e error) { | ||
type MarshalTypeBatchingBasedPatchingConfigs BatchingBasedPatchingConfigs | ||
s := struct { | ||
DiscriminatorParam string `json:"patchingConfigStrategy"` | ||
MarshalTypeBatchingBasedPatchingConfigs | ||
}{ | ||
"BATCHING_BASED", | ||
(MarshalTypeBatchingBasedPatchingConfigs)(m), | ||
} | ||
|
||
return json.Marshal(&s) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// 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. | ||
|
||
// Big Data Service API | ||
// | ||
// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. | ||
// | ||
|
||
package bds | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// DowntimeBasedPatchingConfigs Patching configurations which allows downtime. This patching config will patch and reboot all the nodes in parallel. | ||
type DowntimeBasedPatchingConfigs struct { | ||
} | ||
|
||
func (m DowntimeBasedPatchingConfigs) 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 DowntimeBasedPatchingConfigs) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} | ||
|
||
// MarshalJSON marshals to json representation | ||
func (m DowntimeBasedPatchingConfigs) MarshalJSON() (buff []byte, e error) { | ||
type MarshalTypeDowntimeBasedPatchingConfigs DowntimeBasedPatchingConfigs | ||
s := struct { | ||
DiscriminatorParam string `json:"patchingConfigStrategy"` | ||
MarshalTypeDowntimeBasedPatchingConfigs | ||
}{ | ||
"DOWNTIME_BASED", | ||
(MarshalTypeDowntimeBasedPatchingConfigs)(m), | ||
} | ||
|
||
return json.Marshal(&s) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
// 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. | ||
|
||
// Big Data Service API | ||
// | ||
// REST API for Oracle Big Data Service. Use this API to build, deploy, and manage fully elastic Big Data Service clusters. Build on Hadoop, Spark and Data Science distributions, which can be fully integrated with existing enterprise data in Oracle Database and Oracle applications. | ||
// | ||
|
||
package bds | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// PatchingConfigs Detailed configurations for defining the behavior when installing os patches. If not provided, nodes will be patched and rebooted AD/FD by AD/FD. | ||
type PatchingConfigs interface { | ||
} | ||
|
||
type patchingconfigs struct { | ||
JsonData []byte | ||
PatchingConfigStrategy string `json:"patchingConfigStrategy"` | ||
} | ||
|
||
// UnmarshalJSON unmarshals json | ||
func (m *patchingconfigs) UnmarshalJSON(data []byte) error { | ||
m.JsonData = data | ||
type Unmarshalerpatchingconfigs patchingconfigs | ||
s := struct { | ||
Model Unmarshalerpatchingconfigs | ||
}{} | ||
err := json.Unmarshal(data, &s.Model) | ||
if err != nil { | ||
return err | ||
} | ||
m.PatchingConfigStrategy = s.Model.PatchingConfigStrategy | ||
|
||
return err | ||
} | ||
|
||
// UnmarshalPolymorphicJSON unmarshals polymorphic json | ||
func (m *patchingconfigs) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { | ||
|
||
if data == nil || string(data) == "null" { | ||
return nil, nil | ||
} | ||
|
||
var err error | ||
switch m.PatchingConfigStrategy { | ||
case "BATCHING_BASED": | ||
mm := BatchingBasedPatchingConfigs{} | ||
err = json.Unmarshal(data, &mm) | ||
return mm, err | ||
case "DOWNTIME_BASED": | ||
mm := DowntimeBasedPatchingConfigs{} | ||
err = json.Unmarshal(data, &mm) | ||
return mm, err | ||
default: | ||
common.Logf("Recieved unsupported enum value for PatchingConfigs: %s.", m.PatchingConfigStrategy) | ||
return *m, nil | ||
} | ||
} | ||
|
||
func (m patchingconfigs) 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 patchingconfigs) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} | ||
|
||
// PatchingConfigsPatchingConfigStrategyEnum Enum with underlying type: string | ||
type PatchingConfigsPatchingConfigStrategyEnum string | ||
|
||
// Set of constants representing the allowable values for PatchingConfigsPatchingConfigStrategyEnum | ||
const ( | ||
PatchingConfigsPatchingConfigStrategyDowntimeBased PatchingConfigsPatchingConfigStrategyEnum = "DOWNTIME_BASED" | ||
PatchingConfigsPatchingConfigStrategyBatchingBased PatchingConfigsPatchingConfigStrategyEnum = "BATCHING_BASED" | ||
) | ||
|
||
var mappingPatchingConfigsPatchingConfigStrategyEnum = map[string]PatchingConfigsPatchingConfigStrategyEnum{ | ||
"DOWNTIME_BASED": PatchingConfigsPatchingConfigStrategyDowntimeBased, | ||
"BATCHING_BASED": PatchingConfigsPatchingConfigStrategyBatchingBased, | ||
} | ||
|
||
var mappingPatchingConfigsPatchingConfigStrategyEnumLowerCase = map[string]PatchingConfigsPatchingConfigStrategyEnum{ | ||
"downtime_based": PatchingConfigsPatchingConfigStrategyDowntimeBased, | ||
"batching_based": PatchingConfigsPatchingConfigStrategyBatchingBased, | ||
} | ||
|
||
// GetPatchingConfigsPatchingConfigStrategyEnumValues Enumerates the set of values for PatchingConfigsPatchingConfigStrategyEnum | ||
func GetPatchingConfigsPatchingConfigStrategyEnumValues() []PatchingConfigsPatchingConfigStrategyEnum { | ||
values := make([]PatchingConfigsPatchingConfigStrategyEnum, 0) | ||
for _, v := range mappingPatchingConfigsPatchingConfigStrategyEnum { | ||
values = append(values, v) | ||
} | ||
return values | ||
} | ||
|
||
// GetPatchingConfigsPatchingConfigStrategyEnumStringValues Enumerates the set of values in String for PatchingConfigsPatchingConfigStrategyEnum | ||
func GetPatchingConfigsPatchingConfigStrategyEnumStringValues() []string { | ||
return []string{ | ||
"DOWNTIME_BASED", | ||
"BATCHING_BASED", | ||
} | ||
} | ||
|
||
// GetMappingPatchingConfigsPatchingConfigStrategyEnum performs case Insensitive comparison on enum value and return the desired enum | ||
func GetMappingPatchingConfigsPatchingConfigStrategyEnum(val string) (PatchingConfigsPatchingConfigStrategyEnum, bool) { | ||
enum, ok := mappingPatchingConfigsPatchingConfigStrategyEnumLowerCase[strings.ToLower(val)] | ||
return enum, ok | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.