Skip to content

Commit ce39965

Browse files
svc-apix-Botgithub-actions[bot]lantoli
authored
APIBot: SDK update based on recent changes in Atlas API (#442)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: lantoli <[email protected]>
1 parent 922a5ad commit ce39965

File tree

144 files changed

+822
-601
lines changed

Some content is hidden

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

144 files changed

+822
-601
lines changed

.github/workflows/autoupdate-preview.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
## Using early preview changes
5757
5858
```sh
59-
go get go.mongodb.org/atlas-sdk/v20240805004@dev-latest
59+
go get go.mongodb.org/atlas-sdk/v20240805005@dev-latest
6060
```
6161
6262
## Automated checks done for preview sdk

.mockery.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ filename: "{{ .InterfaceName | snakecase }}.go"
66
mockname: "{{.InterfaceName}}"
77

88
packages:
9-
go.mongodb.org/atlas-sdk/v20240805004/admin:
9+
go.mongodb.org/atlas-sdk/v20240805005/admin:
1010
config:
1111
include-regex: ".*Api"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Note that `atlas-sdk-go` only supports the two most recent major versions of Go.
1212
### Adding Dependency
1313

1414
```terminal
15-
go get go.mongodb.org/atlas-sdk/v20240805004
15+
go get go.mongodb.org/atlas-sdk/v20240805005
1616
```
1717

1818
### Using in the code
@@ -21,7 +21,7 @@ Construct a new Atlas SDK client, then use the various services on the client to
2121
access different parts of the Atlas API. For example:
2222

2323
```go
24-
import "go.mongodb.org/atlas-sdk/v20240805004/admin"
24+
import "go.mongodb.org/atlas-sdk/v20240805005/admin"
2525

2626
func example() {
2727
ctx := context.Background()

admin/atlas_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package admin // import "go.mongodb.org/atlas-sdk/v20240805004/admin"
1+
package admin // import "go.mongodb.org/atlas-sdk/v20240805005/admin"
22

33
import (
44
"errors"
@@ -8,7 +8,7 @@ import (
88
"strings"
99

1010
"github.com/mongodb-forks/digest"
11-
"go.mongodb.org/atlas-sdk/v20240805004/internal/core"
11+
"go.mongodb.org/atlas-sdk/v20240805005/internal/core"
1212
)
1313

1414
const (

admin/model_cluster_free_auto_scaling.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ package admin
44

55
// ClusterFreeAutoScaling Range of instance sizes to which your cluster can scale.
66
type ClusterFreeAutoScaling struct {
7-
// Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down.
8-
Compute *string `json:"compute,omitempty"`
7+
Compute *FreeComputeAutoScalingRules `json:"compute,omitempty"`
98
}
109

1110
// NewClusterFreeAutoScaling instantiates a new ClusterFreeAutoScaling object
@@ -26,17 +25,17 @@ func NewClusterFreeAutoScalingWithDefaults() *ClusterFreeAutoScaling {
2625
}
2726

2827
// GetCompute returns the Compute field value if set, zero value otherwise
29-
func (o *ClusterFreeAutoScaling) GetCompute() string {
28+
func (o *ClusterFreeAutoScaling) GetCompute() FreeComputeAutoScalingRules {
3029
if o == nil || IsNil(o.Compute) {
31-
var ret string
30+
var ret FreeComputeAutoScalingRules
3231
return ret
3332
}
3433
return *o.Compute
3534
}
3635

3736
// GetComputeOk returns a tuple with the Compute field value if set, nil otherwise
3837
// and a boolean to check if the value has been set.
39-
func (o *ClusterFreeAutoScaling) GetComputeOk() (*string, bool) {
38+
func (o *ClusterFreeAutoScaling) GetComputeOk() (*FreeComputeAutoScalingRules, bool) {
4039
if o == nil || IsNil(o.Compute) {
4140
return nil, false
4241
}
@@ -53,7 +52,7 @@ func (o *ClusterFreeAutoScaling) HasCompute() bool {
5352
return false
5453
}
5554

56-
// SetCompute gets a reference to the given string and assigns it to the Compute field.
57-
func (o *ClusterFreeAutoScaling) SetCompute(v string) {
55+
// SetCompute gets a reference to the given FreeComputeAutoScalingRules and assigns it to the Compute field.
56+
func (o *ClusterFreeAutoScaling) SetCompute(v FreeComputeAutoScalingRules) {
5857
o.Compute = &v
5958
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
// Code based on the AtlasAPI V2 OpenAPI file
2+
3+
package admin
4+
5+
// FreeComputeAutoScalingRules Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down.
6+
type FreeComputeAutoScalingRules struct {
7+
// Maximum instance size to which your cluster can automatically scale.
8+
MaxInstanceSize *string `json:"maxInstanceSize,omitempty"`
9+
// Minimum instance size to which your cluster can automatically scale.
10+
MinInstanceSize *string `json:"minInstanceSize,omitempty"`
11+
}
12+
13+
// NewFreeComputeAutoScalingRules instantiates a new FreeComputeAutoScalingRules object
14+
// This constructor will assign default values to properties that have it defined,
15+
// and makes sure properties required by API are set, but the set of arguments
16+
// will change when the set of required properties is changed
17+
func NewFreeComputeAutoScalingRules() *FreeComputeAutoScalingRules {
18+
this := FreeComputeAutoScalingRules{}
19+
return &this
20+
}
21+
22+
// NewFreeComputeAutoScalingRulesWithDefaults instantiates a new FreeComputeAutoScalingRules object
23+
// This constructor will only assign default values to properties that have it defined,
24+
// but it doesn't guarantee that properties required by API are set
25+
func NewFreeComputeAutoScalingRulesWithDefaults() *FreeComputeAutoScalingRules {
26+
this := FreeComputeAutoScalingRules{}
27+
return &this
28+
}
29+
30+
// GetMaxInstanceSize returns the MaxInstanceSize field value if set, zero value otherwise
31+
func (o *FreeComputeAutoScalingRules) GetMaxInstanceSize() string {
32+
if o == nil || IsNil(o.MaxInstanceSize) {
33+
var ret string
34+
return ret
35+
}
36+
return *o.MaxInstanceSize
37+
}
38+
39+
// GetMaxInstanceSizeOk returns a tuple with the MaxInstanceSize field value if set, nil otherwise
40+
// and a boolean to check if the value has been set.
41+
func (o *FreeComputeAutoScalingRules) GetMaxInstanceSizeOk() (*string, bool) {
42+
if o == nil || IsNil(o.MaxInstanceSize) {
43+
return nil, false
44+
}
45+
46+
return o.MaxInstanceSize, true
47+
}
48+
49+
// HasMaxInstanceSize returns a boolean if a field has been set.
50+
func (o *FreeComputeAutoScalingRules) HasMaxInstanceSize() bool {
51+
if o != nil && !IsNil(o.MaxInstanceSize) {
52+
return true
53+
}
54+
55+
return false
56+
}
57+
58+
// SetMaxInstanceSize gets a reference to the given string and assigns it to the MaxInstanceSize field.
59+
func (o *FreeComputeAutoScalingRules) SetMaxInstanceSize(v string) {
60+
o.MaxInstanceSize = &v
61+
}
62+
63+
// GetMinInstanceSize returns the MinInstanceSize field value if set, zero value otherwise
64+
func (o *FreeComputeAutoScalingRules) GetMinInstanceSize() string {
65+
if o == nil || IsNil(o.MinInstanceSize) {
66+
var ret string
67+
return ret
68+
}
69+
return *o.MinInstanceSize
70+
}
71+
72+
// GetMinInstanceSizeOk returns a tuple with the MinInstanceSize field value if set, nil otherwise
73+
// and a boolean to check if the value has been set.
74+
func (o *FreeComputeAutoScalingRules) GetMinInstanceSizeOk() (*string, bool) {
75+
if o == nil || IsNil(o.MinInstanceSize) {
76+
return nil, false
77+
}
78+
79+
return o.MinInstanceSize, true
80+
}
81+
82+
// HasMinInstanceSize returns a boolean if a field has been set.
83+
func (o *FreeComputeAutoScalingRules) HasMinInstanceSize() bool {
84+
if o != nil && !IsNil(o.MinInstanceSize) {
85+
return true
86+
}
87+
88+
return false
89+
}
90+
91+
// SetMinInstanceSize gets a reference to the given string and assigns it to the MinInstanceSize field.
92+
func (o *FreeComputeAutoScalingRules) SetMinInstanceSize(v string) {
93+
o.MinInstanceSize = &v
94+
}

auth/code/device_flow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"strings"
2323
"time"
2424

25-
core "go.mongodb.org/atlas-sdk/v20240805004/internal/core"
25+
core "go.mongodb.org/atlas-sdk/v20240805005/internal/core"
2626
)
2727

2828
const authExpiredError = "DEVICE_AUTHORIZATION_EXPIRED"

auth/code/oauth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"runtime"
2727
"strings"
2828

29-
"go.mongodb.org/atlas-sdk/v20240805004/internal/core"
29+
"go.mongodb.org/atlas-sdk/v20240805005/internal/core"
3030
)
3131

3232
const defaultBaseURL = "https://cloud.mongodb.com/"

auth/code/oauth_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"reflect"
2525
"testing"
2626

27-
core "go.mongodb.org/atlas-sdk/v20240805004/internal/core"
27+
core "go.mongodb.org/atlas-sdk/v20240805005/internal/core"
2828
)
2929

3030
const (

docs/doc_4_authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"log"
2020
"os"
2121

22-
"go.mongodb.org/atlas-sdk/v20240805004/admin"
22+
"go.mongodb.org/atlas-sdk/v20240805005/admin"
2323
)
2424

2525
func main() {

0 commit comments

Comments
 (0)