Skip to content

Commit

Permalink
APIBot: SDK update based on recent changes in Atlas API (#442)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: lantoli <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2024
1 parent 922a5ad commit ce39965
Show file tree
Hide file tree
Showing 144 changed files with 822 additions and 601 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autoupdate-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
## Using early preview changes
```sh
go get go.mongodb.org/atlas-sdk/v20240805004@dev-latest
go get go.mongodb.org/atlas-sdk/v20240805005@dev-latest
```
## Automated checks done for preview sdk
Expand Down
2 changes: 1 addition & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ filename: "{{ .InterfaceName | snakecase }}.go"
mockname: "{{.InterfaceName}}"

packages:
go.mongodb.org/atlas-sdk/v20240805004/admin:
go.mongodb.org/atlas-sdk/v20240805005/admin:
config:
include-regex: ".*Api"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Note that `atlas-sdk-go` only supports the two most recent major versions of Go.
### Adding Dependency

```terminal
go get go.mongodb.org/atlas-sdk/v20240805004
go get go.mongodb.org/atlas-sdk/v20240805005
```

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

```go
import "go.mongodb.org/atlas-sdk/v20240805004/admin"
import "go.mongodb.org/atlas-sdk/v20240805005/admin"

func example() {
ctx := context.Background()
Expand Down
4 changes: 2 additions & 2 deletions admin/atlas_client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package admin // import "go.mongodb.org/atlas-sdk/v20240805004/admin"
package admin // import "go.mongodb.org/atlas-sdk/v20240805005/admin"

import (
"errors"
Expand All @@ -8,7 +8,7 @@ import (
"strings"

"github.com/mongodb-forks/digest"
"go.mongodb.org/atlas-sdk/v20240805004/internal/core"
"go.mongodb.org/atlas-sdk/v20240805005/internal/core"
)

const (
Expand Down
13 changes: 6 additions & 7 deletions admin/model_cluster_free_auto_scaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ package admin

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

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

// GetCompute returns the Compute field value if set, zero value otherwise
func (o *ClusterFreeAutoScaling) GetCompute() string {
func (o *ClusterFreeAutoScaling) GetCompute() FreeComputeAutoScalingRules {
if o == nil || IsNil(o.Compute) {
var ret string
var ret FreeComputeAutoScalingRules
return ret
}
return *o.Compute
}

// GetComputeOk returns a tuple with the Compute field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ClusterFreeAutoScaling) GetComputeOk() (*string, bool) {
func (o *ClusterFreeAutoScaling) GetComputeOk() (*FreeComputeAutoScalingRules, bool) {
if o == nil || IsNil(o.Compute) {
return nil, false
}
Expand All @@ -53,7 +52,7 @@ func (o *ClusterFreeAutoScaling) HasCompute() bool {
return false
}

// SetCompute gets a reference to the given string and assigns it to the Compute field.
func (o *ClusterFreeAutoScaling) SetCompute(v string) {
// SetCompute gets a reference to the given FreeComputeAutoScalingRules and assigns it to the Compute field.
func (o *ClusterFreeAutoScaling) SetCompute(v FreeComputeAutoScalingRules) {
o.Compute = &v
}
94 changes: 94 additions & 0 deletions admin/model_free_compute_auto_scaling_rules.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
// Code based on the AtlasAPI V2 OpenAPI file

package admin

// FreeComputeAutoScalingRules Collection of settings that configures how a cluster might scale its cluster tier and whether the cluster can scale down.
type FreeComputeAutoScalingRules struct {
// Maximum instance size to which your cluster can automatically scale.
MaxInstanceSize *string `json:"maxInstanceSize,omitempty"`
// Minimum instance size to which your cluster can automatically scale.
MinInstanceSize *string `json:"minInstanceSize,omitempty"`
}

// NewFreeComputeAutoScalingRules instantiates a new FreeComputeAutoScalingRules object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewFreeComputeAutoScalingRules() *FreeComputeAutoScalingRules {
this := FreeComputeAutoScalingRules{}
return &this
}

// NewFreeComputeAutoScalingRulesWithDefaults instantiates a new FreeComputeAutoScalingRules object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewFreeComputeAutoScalingRulesWithDefaults() *FreeComputeAutoScalingRules {
this := FreeComputeAutoScalingRules{}
return &this
}

// GetMaxInstanceSize returns the MaxInstanceSize field value if set, zero value otherwise
func (o *FreeComputeAutoScalingRules) GetMaxInstanceSize() string {
if o == nil || IsNil(o.MaxInstanceSize) {
var ret string
return ret
}
return *o.MaxInstanceSize
}

// GetMaxInstanceSizeOk returns a tuple with the MaxInstanceSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FreeComputeAutoScalingRules) GetMaxInstanceSizeOk() (*string, bool) {
if o == nil || IsNil(o.MaxInstanceSize) {
return nil, false
}

return o.MaxInstanceSize, true
}

// HasMaxInstanceSize returns a boolean if a field has been set.
func (o *FreeComputeAutoScalingRules) HasMaxInstanceSize() bool {
if o != nil && !IsNil(o.MaxInstanceSize) {
return true
}

return false
}

// SetMaxInstanceSize gets a reference to the given string and assigns it to the MaxInstanceSize field.
func (o *FreeComputeAutoScalingRules) SetMaxInstanceSize(v string) {
o.MaxInstanceSize = &v
}

// GetMinInstanceSize returns the MinInstanceSize field value if set, zero value otherwise
func (o *FreeComputeAutoScalingRules) GetMinInstanceSize() string {
if o == nil || IsNil(o.MinInstanceSize) {
var ret string
return ret
}
return *o.MinInstanceSize
}

// GetMinInstanceSizeOk returns a tuple with the MinInstanceSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FreeComputeAutoScalingRules) GetMinInstanceSizeOk() (*string, bool) {
if o == nil || IsNil(o.MinInstanceSize) {
return nil, false
}

return o.MinInstanceSize, true
}

// HasMinInstanceSize returns a boolean if a field has been set.
func (o *FreeComputeAutoScalingRules) HasMinInstanceSize() bool {
if o != nil && !IsNil(o.MinInstanceSize) {
return true
}

return false
}

// SetMinInstanceSize gets a reference to the given string and assigns it to the MinInstanceSize field.
func (o *FreeComputeAutoScalingRules) SetMinInstanceSize(v string) {
o.MinInstanceSize = &v
}
2 changes: 1 addition & 1 deletion auth/code/device_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"time"

core "go.mongodb.org/atlas-sdk/v20240805004/internal/core"
core "go.mongodb.org/atlas-sdk/v20240805005/internal/core"
)

const authExpiredError = "DEVICE_AUTHORIZATION_EXPIRED"
Expand Down
2 changes: 1 addition & 1 deletion auth/code/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"runtime"
"strings"

"go.mongodb.org/atlas-sdk/v20240805004/internal/core"
"go.mongodb.org/atlas-sdk/v20240805005/internal/core"
)

const defaultBaseURL = "https://cloud.mongodb.com/"
Expand Down
2 changes: 1 addition & 1 deletion auth/code/oauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"reflect"
"testing"

core "go.mongodb.org/atlas-sdk/v20240805004/internal/core"
core "go.mongodb.org/atlas-sdk/v20240805005/internal/core"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion docs/doc_4_authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"log"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down
1 change: 1 addition & 0 deletions docs/doc_last_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ Class | Method | HTTP request | Description |
- [FederationOidcIdentityProviderUpdate](./docs/FederationOidcIdentityProviderUpdate.md)
- [FieldTransformation](./docs/FieldTransformation.md)
- [FieldViolation](./docs/FieldViolation.md)
- [FreeComputeAutoScalingRules](./docs/FreeComputeAutoScalingRules.md)
- [GCPConsumerForwardingRule](./docs/GCPConsumerForwardingRule.md)
- [GeoSharding20240805](./docs/GeoSharding20240805.md)
- [GoogleCloudKMS](./docs/GoogleCloudKMS.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/AWSClustersDNSApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -106,7 +106,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/AccessTrackingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -119,7 +119,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down
16 changes: 8 additions & 8 deletions docs/docs/AlertConfigurationsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -114,7 +114,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -195,7 +195,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -278,7 +278,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -349,7 +349,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -435,7 +435,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -524,7 +524,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -609,7 +609,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/AlertsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -113,7 +113,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -196,7 +196,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down Expand Up @@ -284,7 +284,7 @@ import (
"fmt"
"os"

"go.mongodb.org/atlas-sdk/v20240805004/admin"
"go.mongodb.org/atlas-sdk/v20240805005/admin"
)

func main() {
Expand Down
Loading

0 comments on commit ce39965

Please sign in to comment.