Skip to content

Commit 5295b14

Browse files
authored
Releasing GO SDK 4.1.0
Release 2019 02 28
2 parents f1ecb80 + 091c9bf commit 5295b14

File tree

189 files changed

+12405
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+12405
-46
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66

7+
## 4.1.0 - 2019-02-28
8+
### Added
9+
- Support for the Monitoring service
10+
- Support for the Notification service
11+
- Support for the Resource Manager service
12+
- Support for the Compute Autoscaling service
13+
- Support for changing the compartment of a tag namespace in the Identity service
14+
- Support for specifying fault domains in the Database service
15+
- Support for managing instance monitoring in the Compute service
16+
- Support for attaching/detaching load balancers to instance pools in the Compute service
17+
718
## 4.0.0 - 2019-02-21
819
### Added
920
- Support for government-realm regions

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
DOC_SERVER_URL=https:\/\/docs.us-phoenix-1.oraclecloud.com
22

3-
GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas streaming ##SPECNAME##
3+
GEN_TARGETS = identity core objectstorage loadbalancer database audit dns filestorage email containerengine resourcesearch keymanagement announcementsservice healthchecks waas autoscaling streaming ons monitoring resourcemanager ##SPECNAME##
44
NON_GEN_TARGETS = common common/auth
55
TARGETS = $(NON_GEN_TARGETS) $(GEN_TARGETS)
66

autoscaling/action.go

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
// Code generated. DO NOT EDIT.
3+
4+
// Auto Scaling API
5+
//
6+
// Auto Scaling API spec
7+
//
8+
9+
package autoscaling
10+
11+
import (
12+
"github.com/oracle/oci-go-sdk/common"
13+
)
14+
15+
// Action The action to take if a scale event has been triggered. Positive values indicate scale out
16+
// and negative value indicate scale in.
17+
type Action struct {
18+
19+
// Action type to take
20+
Type ActionTypeEnum `mandatory:"true" json:"type"`
21+
22+
Value *int `mandatory:"true" json:"value"`
23+
}
24+
25+
func (m Action) String() string {
26+
return common.PointerString(m)
27+
}
28+
29+
// ActionTypeEnum Enum with underlying type: string
30+
type ActionTypeEnum string
31+
32+
// Set of constants representing the allowable values for ActionTypeEnum
33+
const (
34+
ActionTypeBy ActionTypeEnum = "CHANGE_COUNT_BY"
35+
)
36+
37+
var mappingActionType = map[string]ActionTypeEnum{
38+
"CHANGE_COUNT_BY": ActionTypeBy,
39+
}
40+
41+
// GetActionTypeEnumValues Enumerates the set of values for ActionTypeEnum
42+
func GetActionTypeEnumValues() []ActionTypeEnum {
43+
values := make([]ActionTypeEnum, 0)
44+
for _, v := range mappingActionType {
45+
values = append(values, v)
46+
}
47+
return values
48+
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
// Code generated. DO NOT EDIT.
3+
4+
// Auto Scaling API
5+
//
6+
// Auto Scaling API spec
7+
//
8+
9+
package autoscaling
10+
11+
import (
12+
"encoding/json"
13+
"github.com/oracle/oci-go-sdk/common"
14+
)
15+
16+
// AutoScalingConfiguration The representation of AutoScalingConfiguration
17+
type AutoScalingConfiguration struct {
18+
19+
// The OCID of the compartment containing the AutoScalingConfiguration.
20+
CompartmentId *string `mandatory:"true" json:"compartmentId"`
21+
22+
// The OCID of the AutoScalingConfiguration
23+
Id *string `mandatory:"true" json:"id"`
24+
25+
Resource Resource `mandatory:"true" json:"resource"`
26+
27+
// AutoScalingConfiguration policy definitions
28+
Policies []AutoScalingPolicy `mandatory:"true" json:"policies"`
29+
30+
// The date and time the AutoScalingConfiguration was created, in the format defined by RFC3339.
31+
// Example: `2016-08-25T21:10:29.600Z`
32+
TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
33+
34+
// Defined tags for this resource. Each key is predefined and scoped to a
35+
// namespace. For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
36+
// Example: `{"Operations": {"CostCenter": "42"}}`
37+
DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
38+
39+
// A user-friendly name for the AutoScalingConfiguration. Does not have to be unique, and it's changeable.
40+
// Avoid entering confidential information.
41+
DisplayName *string `mandatory:"false" json:"displayName"`
42+
43+
// Free-form tags for this resource. Each tag is a simple key-value pair with no
44+
// predefined name, type, or namespace. For more information, see Resource Tags (https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
45+
// Example: `{"Department": "Finance"}`
46+
FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
47+
48+
// The minimum period of time between scaling actions. The default is 300 seconds.
49+
CoolDownInSeconds *int `mandatory:"false" json:"coolDownInSeconds"`
50+
51+
// If the AutoScalingConfiguration is enabled
52+
IsEnabled *bool `mandatory:"false" json:"isEnabled"`
53+
}
54+
55+
func (m AutoScalingConfiguration) String() string {
56+
return common.PointerString(m)
57+
}
58+
59+
// UnmarshalJSON unmarshals from json
60+
func (m *AutoScalingConfiguration) UnmarshalJSON(data []byte) (e error) {
61+
model := struct {
62+
DefinedTags map[string]map[string]interface{} `json:"definedTags"`
63+
DisplayName *string `json:"displayName"`
64+
FreeformTags map[string]string `json:"freeformTags"`
65+
CoolDownInSeconds *int `json:"coolDownInSeconds"`
66+
IsEnabled *bool `json:"isEnabled"`
67+
CompartmentId *string `json:"compartmentId"`
68+
Id *string `json:"id"`
69+
Resource resource `json:"resource"`
70+
Policies []autoscalingpolicy `json:"policies"`
71+
TimeCreated *common.SDKTime `json:"timeCreated"`
72+
}{}
73+
74+
e = json.Unmarshal(data, &model)
75+
if e != nil {
76+
return
77+
}
78+
m.DefinedTags = model.DefinedTags
79+
m.DisplayName = model.DisplayName
80+
m.FreeformTags = model.FreeformTags
81+
m.CoolDownInSeconds = model.CoolDownInSeconds
82+
m.IsEnabled = model.IsEnabled
83+
m.CompartmentId = model.CompartmentId
84+
m.Id = model.Id
85+
nn, e := model.Resource.UnmarshalPolymorphicJSON(model.Resource.JsonData)
86+
if e != nil {
87+
return
88+
}
89+
if nn != nil {
90+
m.Resource = nn.(Resource)
91+
} else {
92+
m.Resource = nil
93+
}
94+
m.Policies = make([]AutoScalingPolicy, len(model.Policies))
95+
for i, n := range model.Policies {
96+
nn, err := n.UnmarshalPolymorphicJSON(n.JsonData)
97+
if err != nil {
98+
return err
99+
}
100+
if nn != nil {
101+
m.Policies[i] = nn.(AutoScalingPolicy)
102+
} else {
103+
m.Policies[i] = nil
104+
}
105+
}
106+
m.TimeCreated = model.TimeCreated
107+
return
108+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
// Code generated. DO NOT EDIT.
3+
4+
// Auto Scaling API
5+
//
6+
// Auto Scaling API spec
7+
//
8+
9+
package autoscaling
10+
11+
import (
12+
"encoding/json"
13+
"github.com/oracle/oci-go-sdk/common"
14+
)
15+
16+
// AutoScalingConfigurationSummary The representation of AutoScalingConfigurationSummary
17+
type AutoScalingConfigurationSummary struct {
18+
19+
// The OCID of the compartment containing the AutoScalingConfiguration.
20+
CompartmentId *string `mandatory:"true" json:"compartmentId"`
21+
22+
// The OCID of the AutoScalingConfiguration
23+
Id *string `mandatory:"true" json:"id"`
24+
25+
// The date and time the AutoScalingConfiguration was created, in the format defined by RFC3339.
26+
// Example: `2016-08-25T21:10:29.600Z`
27+
TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
28+
29+
// A user-friendly name for the AutoScalingConfiguration. Does not have to be unique, and it's changeable.
30+
// Avoid entering confidential information.
31+
DisplayName *string `mandatory:"false" json:"displayName"`
32+
33+
// The minimum period of time between scaling actions. The default is 300 seconds.
34+
CoolDownInSeconds *int `mandatory:"false" json:"coolDownInSeconds"`
35+
36+
// If the AutoScalingConfiguration is enabled
37+
IsEnabled *bool `mandatory:"false" json:"isEnabled"`
38+
39+
Resource Resource `mandatory:"false" json:"resource"`
40+
}
41+
42+
func (m AutoScalingConfigurationSummary) String() string {
43+
return common.PointerString(m)
44+
}
45+
46+
// UnmarshalJSON unmarshals from json
47+
func (m *AutoScalingConfigurationSummary) UnmarshalJSON(data []byte) (e error) {
48+
model := struct {
49+
DisplayName *string `json:"displayName"`
50+
CoolDownInSeconds *int `json:"coolDownInSeconds"`
51+
IsEnabled *bool `json:"isEnabled"`
52+
Resource resource `json:"resource"`
53+
CompartmentId *string `json:"compartmentId"`
54+
Id *string `json:"id"`
55+
TimeCreated *common.SDKTime `json:"timeCreated"`
56+
}{}
57+
58+
e = json.Unmarshal(data, &model)
59+
if e != nil {
60+
return
61+
}
62+
m.DisplayName = model.DisplayName
63+
m.CoolDownInSeconds = model.CoolDownInSeconds
64+
m.IsEnabled = model.IsEnabled
65+
nn, e := model.Resource.UnmarshalPolymorphicJSON(model.Resource.JsonData)
66+
if e != nil {
67+
return
68+
}
69+
if nn != nil {
70+
m.Resource = nn.(Resource)
71+
} else {
72+
m.Resource = nil
73+
}
74+
m.CompartmentId = model.CompartmentId
75+
m.Id = model.Id
76+
m.TimeCreated = model.TimeCreated
77+
return
78+
}

autoscaling/auto_scaling_policy.go

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
// Code generated. DO NOT EDIT.
3+
4+
// Auto Scaling API
5+
//
6+
// Auto Scaling API spec
7+
//
8+
9+
package autoscaling
10+
11+
import (
12+
"encoding/json"
13+
"github.com/oracle/oci-go-sdk/common"
14+
)
15+
16+
// AutoScalingPolicy A Policy defines the rules and actions of an AutoScalingConfiguration. The only supported type is 'threshold'
17+
type AutoScalingPolicy interface {
18+
19+
// The capacity requirements of the Policy
20+
GetCapacity() *Capacity
21+
22+
// The date and time the AutoScalingConfiguration was created, in the format defined by RFC3339.
23+
// Example: `2016-08-25T21:10:29.600Z`
24+
GetTimeCreated() *common.SDKTime
25+
26+
// The ID of the policy that is assigned after creation
27+
GetId() *string
28+
29+
// A user-friendly name for the Policy. Does not have to be unique, and it's changeable. Avoid entering
30+
// confidential information.
31+
GetDisplayName() *string
32+
}
33+
34+
type autoscalingpolicy struct {
35+
JsonData []byte
36+
Capacity *Capacity `mandatory:"true" json:"capacity"`
37+
TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
38+
Id *string `mandatory:"false" json:"id"`
39+
DisplayName *string `mandatory:"false" json:"displayName"`
40+
PolicyType string `json:"policyType"`
41+
}
42+
43+
// UnmarshalJSON unmarshals json
44+
func (m *autoscalingpolicy) UnmarshalJSON(data []byte) error {
45+
m.JsonData = data
46+
type Unmarshalerautoscalingpolicy autoscalingpolicy
47+
s := struct {
48+
Model Unmarshalerautoscalingpolicy
49+
}{}
50+
err := json.Unmarshal(data, &s.Model)
51+
if err != nil {
52+
return err
53+
}
54+
m.Capacity = s.Model.Capacity
55+
m.TimeCreated = s.Model.TimeCreated
56+
m.Id = s.Model.Id
57+
m.DisplayName = s.Model.DisplayName
58+
m.PolicyType = s.Model.PolicyType
59+
60+
return err
61+
}
62+
63+
// UnmarshalPolymorphicJSON unmarshals polymorphic json
64+
func (m *autoscalingpolicy) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) {
65+
66+
if data == nil || string(data) == "null" {
67+
return nil, nil
68+
}
69+
70+
var err error
71+
switch m.PolicyType {
72+
case "threshold":
73+
mm := ThresholdPolicy{}
74+
err = json.Unmarshal(data, &mm)
75+
return mm, err
76+
default:
77+
return *m, nil
78+
}
79+
}
80+
81+
//GetCapacity returns Capacity
82+
func (m autoscalingpolicy) GetCapacity() *Capacity {
83+
return m.Capacity
84+
}
85+
86+
//GetTimeCreated returns TimeCreated
87+
func (m autoscalingpolicy) GetTimeCreated() *common.SDKTime {
88+
return m.TimeCreated
89+
}
90+
91+
//GetId returns Id
92+
func (m autoscalingpolicy) GetId() *string {
93+
return m.Id
94+
}
95+
96+
//GetDisplayName returns DisplayName
97+
func (m autoscalingpolicy) GetDisplayName() *string {
98+
return m.DisplayName
99+
}
100+
101+
func (m autoscalingpolicy) String() string {
102+
return common.PointerString(m)
103+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
// Code generated. DO NOT EDIT.
3+
4+
// Auto Scaling API
5+
//
6+
// Auto Scaling API spec
7+
//
8+
9+
package autoscaling
10+
11+
import (
12+
"github.com/oracle/oci-go-sdk/common"
13+
)
14+
15+
// AutoScalingPolicySummary The representation of AutoScalingPolicySummary
16+
type AutoScalingPolicySummary struct {
17+
18+
// The ID of the policy that is assigned after creation
19+
Id *string `mandatory:"true" json:"id"`
20+
21+
// Indicates type of Policy
22+
PolicyType *string `mandatory:"true" json:"policyType"`
23+
24+
// A user-friendly name for the Policy. Does not have to be unique, and it's changeable. Avoid entering
25+
// confidential information.
26+
DisplayName *string `mandatory:"false" json:"displayName"`
27+
}
28+
29+
func (m AutoScalingPolicySummary) String() string {
30+
return common.PointerString(m)
31+
}

0 commit comments

Comments
 (0)