Skip to content

Commit

Permalink
APIBot: SDK update based on recent changes in Atlas API (#367)
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: wtrocki <[email protected]>
  • Loading branch information
3 people authored Jul 24, 2024
1 parent 8dd4ce9 commit 91c5bd7
Show file tree
Hide file tree
Showing 145 changed files with 942 additions and 788 deletions.
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/v20240530004/admin:
go.mongodb.org/atlas-sdk/v20240530005/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/v20240530004
go get go.mongodb.org/atlas-sdk/v20240530005
```

### 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/v20240530004/admin"
import "go.mongodb.org/atlas-sdk/v20240530005/admin"

func example() {
ctx := context.Background()
Expand Down
54 changes: 27 additions & 27 deletions admin/api_cloud_backups.go

Large diffs are not rendered by default.

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/v20240530004/admin"
package admin // import "go.mongodb.org/atlas-sdk/v20240530005/admin"

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

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

const (
Expand Down
4 changes: 2 additions & 2 deletions admin/model_auto_export_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"encoding/json"
)

// AutoExportPolicy Policy for automatically exporting cloud backup snapshots.
// AutoExportPolicy Policy for automatically exporting Cloud Backup Snapshots.
type AutoExportPolicy struct {
// Unique 24-hexadecimal character string that identifies the AWS Bucket.
// Unique 24-hexadecimal character string that identifies the Export Bucket.
ExportBucketId *string `json:"exportBucketId,omitempty"`
// Human-readable label that indicates the rate at which the export policy item occurs.
FrequencyType *string `json:"frequencyType,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions admin/model_disk_backup_api_policy_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import (

// DiskBackupApiPolicyItem Specifications for one policy.
type DiskBackupApiPolicyItem struct {
// Number that indicates the frequency interval for a set of snapshots. A value of `1` specifies the first instance of the corresponding `frequencyType`. - In a yearly policy item, `1` indicates that the yearly snapshot occurs on the first day of January and `12` indicates the first day of December. - In a monthly policy item, `1` indicates that the monthly snapshot occurs on the first day of the month and `40` indicates the last day of the month. - In a weekly policy item, `1` indicates that the weekly snapshot occurs on Monday and `7` indicates Sunday. - In an hourly policy item, you can set the frequency interval to `1`, `2`, `4`, `6`, `8`, or `12`. For hourly policy items for NVMe clusters, MongoDB Cloud accepts only `12` as the frequency interval value. MongoDB Cloud ignores this setting for non-hourly policy items in Backup Compliance Policy settings.
// Number that indicates the frequency interval for a set of Snapshots. A value of `1` specifies the first instance of the corresponding `frequencyType`. - In a yearly policy item, `1` indicates that the yearly Snapshot occurs on the first day of January and `12` indicates the first day of December. - In a monthly policy item, `1` indicates that the monthly Snapshot occurs on the first day of the month and `40` indicates the last day of the month. - In a weekly policy item, `1` indicates that the weekly Snapshot occurs on Monday and `7` indicates Sunday. - In an hourly policy item, you can set the frequency interval to `1`, `2`, `4`, `6`, `8`, or `12`. For hourly policy items for NVMe clusters, MongoDB Cloud accepts only `12` as the frequency interval value. MongoDB Cloud ignores this setting for non-hourly policy items in Backup Compliance Policy settings.
FrequencyInterval int `json:"frequencyInterval"`
// Human-readable label that identifies the frequency type associated with the backup policy.
FrequencyType string `json:"frequencyType"`
// Unique 24-hexadecimal digit string that identifies this backup policy item.
// Read only field.
Id *string `json:"id,omitempty"`
// Unit of time in which MongoDB Cloud measures snapshot retention.
// Unit of time in which MongoDB Cloud measures Snapshot retention.
RetentionUnit string `json:"retentionUnit"`
// Duration in days, weeks, months, or years that MongoDB Cloud retains the snapshot. For less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items. For example: If the hourly policy item specifies a retention of two days, you must specify two days or greater for the retention of the weekly policy item.
// Duration in days, weeks, months, or years that MongoDB Cloud retains the Snapshot. For less frequent policy items, MongoDB Cloud requires that you specify a value greater than or equal to the value specified for more frequent policy items. For example: If the hourly policy item specifies a retention of two days, you must specify two days or greater for the retention of the weekly policy item.
RetentionValue int `json:"retentionValue"`
}

Expand Down
2 changes: 1 addition & 1 deletion admin/model_disk_backup_export_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type DiskBackupExportJob struct {
// One or more Uniform Resource Locators (URLs) that point to the compressed snapshot files for manual download. MongoDB Cloud returns this parameter when `\"deliveryType\" : \"download\"`.
// Read only field.
DeliveryUrl *[]string `json:"deliveryUrl,omitempty"`
// Unique 24-hexadecimal character string that identifies the AWS bucket to which MongoDB Cloud exports the Cloud Backup snapshot.
// Unique 24-hexadecimal character string that identifies the Export Bucket to export to.
// Read only field.
ExportBucketId string `json:"exportBucketId"`
ExportStatus *ExportStatus `json:"exportStatus,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions admin/model_disk_backup_export_job_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
type DiskBackupExportJobRequest struct {
// Collection of key-value pairs that represent custom data to add to the metadata file that MongoDB Cloud uploads to the bucket when the export job finishes.
CustomData *[]BackupLabel `json:"customData,omitempty"`
// Unique 24-hexadecimal character string that identifies the AWS bucket to which MongoDB Cloud exports the Cloud Backup snapshot.
// Unique 24-hexadecimal character string that identifies the Export Bucket to export to.
// Write only field.
ExportBucketId string `json:"exportBucketId"`
// List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships.
// Read only field.
Links *[]Link `json:"links,omitempty"`
// Unique 24-hexadecimal character string that identifies the Cloud Backup snasphot to export.
// Unique 24-hexadecimal character string that identifies the Cloud Backup Snapshot to export.
// Write only field.
SnapshotId string `json:"snapshotId"`
}
Expand Down
84 changes: 32 additions & 52 deletions admin/model_disk_backup_snapshot_export_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,36 @@ import (
"encoding/json"
)

// DiskBackupSnapshotExportBucket Disk backup snapshot export bucket.
// DiskBackupSnapshotExportBucket Disk backup snapshot Export Bucket.
type DiskBackupSnapshotExportBucket struct {
// Unique 24-hexadecimal character string that identifies the Amazon Web Services (AWS) Simple Storage Service (S3) export bucket.
// Unique 24-hexadecimal character string that identifies the Export Bucket.
// Read only field.
Id *string `json:"_id,omitempty"`
// Human-readable label that identifies the AWS bucket that the role is authorized to access.
BucketName *string `json:"bucketName,omitempty"`
// Human-readable label that identifies the cloud provider that stores this snapshot.
CloudProvider *string `json:"cloudProvider,omitempty"`
// Human-readable label that identifies the AWS S3 Bucket or Azure Storage Container that the role is authorized to export to.
BucketName string `json:"bucketName"`
// Human-readable label that identifies the cloud provider that Snapshots will be exported to.
CloudProvider string `json:"cloudProvider"`
// List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships.
// Read only field.
Links *[]Link `json:"links,omitempty"`
// Unique 24-hexadecimal character string that identifies the <a href='https://www.mongodb.com/docs/atlas/security/set-up-unified-aws-access/' target='_blank'>Unified AWS Access role ID</a> that MongoDB Cloud uses to access the AWS S3 bucket.
IamRoleId *string `json:"iamRoleId,omitempty"`
// Unique 24-hexadecimal digit string that identifies the Azure Service Principal that MongoDB Cloud uses to access the Azure Blob Storage.
// Unique 24-hexadecimal digit string that identifies the Azure Service Principal that MongoDB Cloud uses to access the Azure Blob Storage Container.
RoleId *string `json:"roleId,omitempty"`
// Url that identifies the Azure Blob Storage Account.
// URL that identifies the blob Endpoint of the Azure Blob Storage Account.
ServiceUrl *string `json:"serviceUrl,omitempty"`
// UUID String that identifies the Azure Active Directory Tenant ID.
// UUID that identifies the Azure Active Directory Tenant ID.
TenantId *string `json:"tenantId,omitempty"`
}

// NewDiskBackupSnapshotExportBucket instantiates a new DiskBackupSnapshotExportBucket 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 NewDiskBackupSnapshotExportBucket() *DiskBackupSnapshotExportBucket {
func NewDiskBackupSnapshotExportBucket(bucketName string, cloudProvider string) *DiskBackupSnapshotExportBucket {
this := DiskBackupSnapshotExportBucket{}
this.BucketName = bucketName
this.CloudProvider = cloudProvider
return &this
}

Expand Down Expand Up @@ -78,70 +80,52 @@ func (o *DiskBackupSnapshotExportBucket) SetId(v string) {
o.Id = &v
}

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

return o.BucketName
}

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

return o.BucketName, true
return &o.BucketName, true
}

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

return false
}

// SetBucketName gets a reference to the given string and assigns it to the BucketName field.
// SetBucketName sets field value
func (o *DiskBackupSnapshotExportBucket) SetBucketName(v string) {
o.BucketName = &v
o.BucketName = v
}

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

return o.CloudProvider
}

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

return o.CloudProvider, true
return &o.CloudProvider, true
}

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

return false
}

// SetCloudProvider gets a reference to the given string and assigns it to the CloudProvider field.
// SetCloudProvider sets field value
func (o *DiskBackupSnapshotExportBucket) SetCloudProvider(v string) {
o.CloudProvider = &v
o.CloudProvider = v
}

// GetLinks returns the Links field value if set, zero value otherwise
Expand Down Expand Up @@ -318,12 +302,8 @@ func (o DiskBackupSnapshotExportBucket) MarshalJSONWithoutReadOnly() ([]byte, er
}
func (o DiskBackupSnapshotExportBucket) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.BucketName) {
toSerialize["bucketName"] = o.BucketName
}
if !IsNil(o.CloudProvider) {
toSerialize["cloudProvider"] = o.CloudProvider
}
toSerialize["bucketName"] = o.BucketName
toSerialize["cloudProvider"] = o.CloudProvider
if !IsNil(o.IamRoleId) {
toSerialize["iamRoleId"] = o.IamRoleId
}
Expand Down
18 changes: 9 additions & 9 deletions admin/model_disk_backup_snapshot_schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (

// DiskBackupSnapshotSchedule struct for DiskBackupSnapshotSchedule
type DiskBackupSnapshotSchedule struct {
// Flag that indicates whether MongoDB Cloud automatically exports cloud backup snapshots to the AWS bucket.
// Flag that indicates whether MongoDB Cloud automatically exports Cloud Backup Snapshots to the Export Bucket.
AutoExportEnabled *bool `json:"autoExportEnabled,omitempty"`
// Unique 24-hexadecimal digit string that identifies the cluster with the snapshot you want to return.
// Unique 24-hexadecimal digit string that identifies the cluster with the Snapshot you want to return.
// Read only field.
ClusterId *string `json:"clusterId,omitempty"`
// Human-readable label that identifies the cluster with the snapshot you want to return.
// Human-readable label that identifies the cluster with the Snapshot you want to return.
// Read only field.
ClusterName *string `json:"clusterName,omitempty"`
// List that contains a document for each copy setting item in the desired backup policy.
Expand All @@ -28,21 +28,21 @@ type DiskBackupSnapshotSchedule struct {
// List of one or more Uniform Resource Locators (URLs) that point to API sub-resources, related API resources, or both. RFC 5988 outlines these relationships.
// Read only field.
Links *[]Link `json:"links,omitempty"`
// Date and time when MongoDB Cloud takes the next snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
// Date and time when MongoDB Cloud takes the next Snapshot. This parameter expresses its value in the ISO 8601 timestamp format in UTC.
// Read only field.
NextSnapshot *time.Time `json:"nextSnapshot,omitempty"`
// Rules set for this backup schedule.
Policies *[]AdvancedDiskBackupSnapshotSchedulePolicy `json:"policies,omitempty"`
// Hour of day in Coordinated Universal Time (UTC) that represents when MongoDB Cloud takes the snapshot.
// Hour of day in Coordinated Universal Time (UTC) that represents when MongoDB Cloud takes the Snapshot.
ReferenceHourOfDay *int `json:"referenceHourOfDay,omitempty"`
// Minute of the **referenceHourOfDay** that represents when MongoDB Cloud takes the snapshot.
// Minute of the **referenceHourOfDay** that represents when MongoDB Cloud takes the Snapshot.
ReferenceMinuteOfHour *int `json:"referenceMinuteOfHour,omitempty"`
// Number of previous days that you can restore back to with Continuous Cloud Backup accuracy. You must specify a positive, non-zero integer. This parameter applies to continuous cloud backups only.
// Number of previous days that you can restore back to with Continuous Cloud Backup accuracy. You must specify a positive, non-zero integer. This parameter applies to continuous Cloud Backups only.
RestoreWindowDays *int `json:"restoreWindowDays,omitempty"`
// Flag that indicates whether to apply the retention changes in the updated backup policy to snapshots that MongoDB Cloud took previously.
// Flag that indicates whether to apply the retention changes in the updated backup policy to Snapshots that MongoDB Cloud took previously.
// Write only field.
UpdateSnapshots *bool `json:"updateSnapshots,omitempty"`
// Flag that indicates whether to use organization and project names instead of organization and project UUIDs in the path to the metadata files that MongoDB Cloud uploads to your AWS bucket.
// Flag that indicates whether to use organization and project names instead of organization and project UUIDs in the path to the metadata files that MongoDB Cloud uploads to your Export Bucket.
UseOrgAndGroupNamesInExportPrefix *bool `json:"useOrgAndGroupNamesInExportPrefix,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion auth/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/v20240530004/internal/core"
core "go.mongodb.org/atlas-sdk/v20240530005/internal/core"
)

const authExpiredError = "DEVICE_AUTHORIZATION_EXPIRED"
Expand Down
2 changes: 1 addition & 1 deletion auth/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/v20240530004/internal/core"
"go.mongodb.org/atlas-sdk/v20240530005/internal/core"
)

const defaultBaseURL = "https://cloud.mongodb.com/"
Expand Down
2 changes: 1 addition & 1 deletion auth/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/v20240530004/internal/core"
core "go.mongodb.org/atlas-sdk/v20240530005/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/v20240530004/admin"
"go.mongodb.org/atlas-sdk/v20240530005/admin"
)

func main() {
Expand Down
Loading

0 comments on commit 91c5bd7

Please sign in to comment.