Skip to content

Commit

Permalink
APIBot: SDK update based on recent changes in Atlas API (#408)
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 Oct 3, 2024
1 parent 8d81843 commit 95b0af3
Show file tree
Hide file tree
Showing 42 changed files with 3,066 additions and 140 deletions.
4 changes: 2 additions & 2 deletions admin/api_monitoring_and_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1028,13 +1028,13 @@ func (a *MonitoringAndLogsApiService) GetHostLogsWithParams(ctx context.Context,
}
}

// Date and time when the period specifies the inclusive ending point for the range of log messages to retrieve. This parameter expresses its value in the number of seconds that have elapsed since the UNIX epoch.
// Specifies the date and time for the ending point of the range of log messages to retrieve, in the number of seconds that have elapsed since the UNIX epoch. This value will default to 24 hours after the start date. If the start date is also unspecified, the value will default to the time of the request.
func (r GetHostLogsApiRequest) EndDate(endDate int64) GetHostLogsApiRequest {
r.endDate = &endDate
return r
}

// Date and time when the period specifies the inclusive starting point for the range of log messages to retrieve. This parameter expresses its value in the number of seconds that have elapsed since the UNIX epoch.
// Specifies the date and time for the starting point of the range of log messages to retrieve, in the number of seconds that have elapsed since the UNIX epoch. This value will default to 24 hours prior to the end date. If the end date is also unspecified, the value will default to 24 hours prior to the time of the request.
func (r GetHostLogsApiRequest) StartDate(startDate int64) GetHostLogsApiRequest {
r.startDate = &startDate
return r
Expand Down
6 changes: 3 additions & 3 deletions admin/api_organizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ type OrganizationsApi interface {
ListOrganizationsExecute(r ListOrganizationsApiRequest) (*PaginatedOrganization, *http.Response, error)

/*
RemoveOrganizationUser Remove One MongoDB Cloud User from One Organization
RemoveOrganizationUser Remove One MongoDB Cloud User From One Organization
Removes one MongoDB Cloud user from the specified organization. To use this resource, the requesting API Key must have the Organization User Admin role.
Expand All @@ -290,7 +290,7 @@ type OrganizationsApi interface {
*/
RemoveOrganizationUser(ctx context.Context, orgId string, userId string) RemoveOrganizationUserApiRequest
/*
RemoveOrganizationUser Remove One MongoDB Cloud User from One Organization
RemoveOrganizationUser Remove One MongoDB Cloud User From One Organization
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
Expand Down Expand Up @@ -1885,7 +1885,7 @@ func (r RemoveOrganizationUserApiRequest) Execute() (interface{}, *http.Response
}

/*
RemoveOrganizationUser Remove One MongoDB Cloud User from One Organization
RemoveOrganizationUser Remove One MongoDB Cloud User From One Organization
Removes one MongoDB Cloud user from the specified organization. To use this resource, the requesting API Key must have the Organization User Admin role.
Expand Down
12 changes: 6 additions & 6 deletions admin/api_projects.go

Large diffs are not rendered by default.

582 changes: 582 additions & 0 deletions admin/api_streams.go

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions admin/model_cloud_database_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type CloudDatabaseUser struct {
DatabaseName string `json:"databaseName"`
// Date and time when MongoDB Cloud deletes the user. This parameter expresses its value in the ISO 8601 timestamp format in UTC and can include the time zone designation. You must specify a future date that falls within one week of making the Application Programming Interface (API) request.
DeleteAfterDate *time.Time `json:"deleteAfterDate,omitempty"`
// Description of this database user.
Description *string `json:"description,omitempty"`
// Unique 24-hexadecimal digit string that identifies the project.
// Write only field.
GroupId string `json:"groupId"`
Expand Down Expand Up @@ -168,6 +170,39 @@ func (o *CloudDatabaseUser) SetDeleteAfterDate(v time.Time) {
o.DeleteAfterDate = &v
}

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

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

return o.Description, true
}

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

return false
}

// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CloudDatabaseUser) SetDescription(v string) {
o.Description = &v
}

// GetGroupId returns the GroupId field value
func (o *CloudDatabaseUser) GetGroupId() string {
if o == nil {
Expand Down Expand Up @@ -497,6 +532,9 @@ func (o *CloudDatabaseUser) ToMap() (map[string]interface{}, error) {
if !IsNil(o.DeleteAfterDate) {
toSerialize["deleteAfterDate"] = o.DeleteAfterDate
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
toSerialize["groupId"] = o.GroupId
if !IsNil(o.Labels) {
toSerialize["labels"] = o.Labels
Expand Down
4 changes: 4 additions & 0 deletions admin/model_cluster_auto_scaling_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ type ClusterAutoScalingSettings struct {
// will change when the set of required properties is changed
func NewClusterAutoScalingSettings() *ClusterAutoScalingSettings {
this := ClusterAutoScalingSettings{}
var diskGBEnabled bool = false
this.DiskGBEnabled = &diskGBEnabled
return &this
}

Expand All @@ -27,6 +29,8 @@ func NewClusterAutoScalingSettings() *ClusterAutoScalingSettings {
// but it doesn't guarantee that properties required by API are set
func NewClusterAutoScalingSettingsWithDefaults() *ClusterAutoScalingSettings {
this := ClusterAutoScalingSettings{}
var diskGBEnabled bool = false
this.DiskGBEnabled = &diskGBEnabled
return &this
}

Expand Down
8 changes: 8 additions & 0 deletions admin/model_cluster_compute_auto_scaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ type ClusterComputeAutoScaling struct {
// will change when the set of required properties is changed
func NewClusterComputeAutoScaling() *ClusterComputeAutoScaling {
this := ClusterComputeAutoScaling{}
var enabled bool = false
this.Enabled = &enabled
var scaleDownEnabled bool = false
this.ScaleDownEnabled = &scaleDownEnabled
return &this
}

Expand All @@ -28,6 +32,10 @@ func NewClusterComputeAutoScaling() *ClusterComputeAutoScaling {
// but it doesn't guarantee that properties required by API are set
func NewClusterComputeAutoScalingWithDefaults() *ClusterComputeAutoScaling {
this := ClusterComputeAutoScaling{}
var enabled bool = false
this.Enabled = &enabled
var scaleDownEnabled bool = false
this.ScaleDownEnabled = &scaleDownEnabled
return &this
}

Expand Down
38 changes: 38 additions & 0 deletions admin/model_cluster_description20240805.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ type ClusterDescription20240805 struct {
Paused *bool `json:"paused,omitempty"`
// Flag that indicates whether the cluster uses continuous cloud backups.
PitEnabled *bool `json:"pitEnabled,omitempty"`
// Enable or disable log redaction.
RedactClientLogData *bool `json:"redactClientLogData,omitempty"`
// Set this field to configure the replica set scaling mode for your cluster. By default, Atlas scales under WORKLOAD_TYPE. This mode allows Atlas to scale your analytics nodes in parallel to your operational nodes. When configured as SEQUENTIAL, Atlas scales all nodes sequentially. This mode is intended for steady-state workloads and applications performing latency-sensitive secondary reads. When configured as NODE_TYPE, Atlas scales your electable nodes in parallel with your read-only and analytics nodes. This mode is intended for large, dynamic workloads requiring frequent and timely cluster tier scaling. This is the fastest scaling strategy, but it might impact latency of workloads when performing extensive secondary reads.
ReplicaSetScalingStrategy *string `json:"replicaSetScalingStrategy,omitempty"`
// List of settings that configure your cluster regions. This array has one object per shard representing node configurations in each shard. For replica sets there is only one object representing node configurations.
Expand Down Expand Up @@ -885,6 +887,39 @@ func (o *ClusterDescription20240805) SetPitEnabled(v bool) {
o.PitEnabled = &v
}

// GetRedactClientLogData returns the RedactClientLogData field value if set, zero value otherwise
func (o *ClusterDescription20240805) GetRedactClientLogData() bool {
if o == nil || IsNil(o.RedactClientLogData) {
var ret bool
return ret
}
return *o.RedactClientLogData
}

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

return o.RedactClientLogData, true
}

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

return false
}

// SetRedactClientLogData gets a reference to the given bool and assigns it to the RedactClientLogData field.
func (o *ClusterDescription20240805) SetRedactClientLogData(v bool) {
o.RedactClientLogData = &v
}

// GetReplicaSetScalingStrategy returns the ReplicaSetScalingStrategy field value if set, zero value otherwise
func (o *ClusterDescription20240805) GetReplicaSetScalingStrategy() string {
if o == nil || IsNil(o.ReplicaSetScalingStrategy) {
Expand Down Expand Up @@ -1171,6 +1206,9 @@ func (o *ClusterDescription20240805) ToMap() (map[string]interface{}, error) {
if !IsNil(o.PitEnabled) {
toSerialize["pitEnabled"] = o.PitEnabled
}
if !IsNil(o.RedactClientLogData) {
toSerialize["redactClientLogData"] = o.RedactClientLogData
}
if !IsNil(o.ReplicaSetScalingStrategy) {
toSerialize["replicaSetScalingStrategy"] = o.ReplicaSetScalingStrategy
}
Expand Down
44 changes: 43 additions & 1 deletion admin/model_cluster_description_process_args20240805.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ type ClusterDescriptionProcessArgs20240805 struct {
ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds *int `json:"changeStreamOptionsPreAndPostImagesExpireAfterSeconds,omitempty"`
// Number of threads on the source shard and the receiving shard for chunk migration. The number of threads should not exceed the half the total number of CPU cores in the sharded cluster.
ChunkMigrationConcurrency *int `json:"chunkMigrationConcurrency,omitempty"`
// Default time limit in milliseconds for individual read operations to complete.
DefaultMaxTimeMS *int `json:"defaultMaxTimeMS,omitempty"`
// Default level of acknowledgment requested from MongoDB for write operations when none is specified by the driver.
DefaultWriteConcern *string `json:"defaultWriteConcern,omitempty"`
// Flag that indicates whether the cluster allows execution of operations that perform server-side executions of JavaScript.
// Flag that indicates whether the cluster allows execution of operations that perform server-side executions of JavaScript. When using 8.0+, we recommend disabling server-side JavaScript and using operators of aggregation pipeline as more performant alternative.
JavascriptEnabled *bool `json:"javascriptEnabled,omitempty"`
// Minimum Transport Layer Security (TLS) version that the cluster accepts for incoming connections. Clusters using TLS 1.0 or 1.1 should consider setting TLS 1.2 as the minimum TLS protocol version.
MinimumEnabledTlsProtocol *string `json:"minimumEnabledTlsProtocol,omitempty"`
Expand All @@ -40,6 +42,8 @@ type ClusterDescriptionProcessArgs20240805 struct {
// will change when the set of required properties is changed
func NewClusterDescriptionProcessArgs20240805() *ClusterDescriptionProcessArgs20240805 {
this := ClusterDescriptionProcessArgs20240805{}
var changeStreamOptionsPreAndPostImagesExpireAfterSeconds int = -1
this.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds = &changeStreamOptionsPreAndPostImagesExpireAfterSeconds
var sampleRefreshIntervalBIConnector int = 0
this.SampleRefreshIntervalBIConnector = &sampleRefreshIntervalBIConnector
return &this
Expand All @@ -50,6 +54,8 @@ func NewClusterDescriptionProcessArgs20240805() *ClusterDescriptionProcessArgs20
// but it doesn't guarantee that properties required by API are set
func NewClusterDescriptionProcessArgs20240805WithDefaults() *ClusterDescriptionProcessArgs20240805 {
this := ClusterDescriptionProcessArgs20240805{}
var changeStreamOptionsPreAndPostImagesExpireAfterSeconds int = -1
this.ChangeStreamOptionsPreAndPostImagesExpireAfterSeconds = &changeStreamOptionsPreAndPostImagesExpireAfterSeconds
var sampleRefreshIntervalBIConnector int = 0
this.SampleRefreshIntervalBIConnector = &sampleRefreshIntervalBIConnector
return &this
Expand Down Expand Up @@ -121,6 +127,39 @@ func (o *ClusterDescriptionProcessArgs20240805) SetChunkMigrationConcurrency(v i
o.ChunkMigrationConcurrency = &v
}

// GetDefaultMaxTimeMS returns the DefaultMaxTimeMS field value if set, zero value otherwise
func (o *ClusterDescriptionProcessArgs20240805) GetDefaultMaxTimeMS() int {
if o == nil || IsNil(o.DefaultMaxTimeMS) {
var ret int
return ret
}
return *o.DefaultMaxTimeMS
}

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

return o.DefaultMaxTimeMS, true
}

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

return false
}

// SetDefaultMaxTimeMS gets a reference to the given int and assigns it to the DefaultMaxTimeMS field.
func (o *ClusterDescriptionProcessArgs20240805) SetDefaultMaxTimeMS(v int) {
o.DefaultMaxTimeMS = &v
}

// GetDefaultWriteConcern returns the DefaultWriteConcern field value if set, zero value otherwise
func (o *ClusterDescriptionProcessArgs20240805) GetDefaultWriteConcern() string {
if o == nil || IsNil(o.DefaultWriteConcern) {
Expand Down Expand Up @@ -467,6 +506,9 @@ func (o *ClusterDescriptionProcessArgs20240805) ToMap() (map[string]interface{},
if !IsNil(o.ChunkMigrationConcurrency) {
toSerialize["chunkMigrationConcurrency"] = o.ChunkMigrationConcurrency
}
if !IsNil(o.DefaultMaxTimeMS) {
toSerialize["defaultMaxTimeMS"] = o.DefaultMaxTimeMS
}
if !IsNil(o.DefaultWriteConcern) {
toSerialize["defaultWriteConcern"] = o.DefaultWriteConcern
}
Expand Down
4 changes: 2 additions & 2 deletions admin/model_data_federation_azure_cloud_provider_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ type DataFederationAzureCloudProviderConfig struct {
// The App ID generated by Atlas for the Service Principal's access policy.
// Read only field.
AtlasAppId *string `json:"atlasAppId,omitempty"`
// Unique identifier of the role that Data Federation can use to access the data stores.Required if specifying cloudProviderConfig.
// Unique identifier of the role that Data Federation can use to access the data stores. Required if specifying cloudProviderConfig.
RoleId string `json:"roleId"`
// The ID of the Service Principal for which there is an access policyfor Atlas to access Azure resources.
// The ID of the Service Principal for which there is an access policy for Atlas to access Azure resources.
// Read only field.
ServicePrincipalId *string `json:"servicePrincipalId,omitempty"`
// The Azure Active Directory / Entra ID tenant ID associated with the Service Principal.
Expand Down
105 changes: 105 additions & 0 deletions admin/model_data_federation_gcp_cloud_provider_config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// Code based on the AtlasAPI V2 OpenAPI file

package admin

import (
"encoding/json"
)

// DataFederationGCPCloudProviderConfig Configuration for running Data Federation in GCP.
type DataFederationGCPCloudProviderConfig struct {
// The email address of the Google Cloud Platform (GCP) service account created by Atlas which should be authorized to allow Atlas to access Google Cloud Storage.
// Read only field.
GcpServiceAccount *string `json:"gcpServiceAccount,omitempty"`
// Unique identifier of the role that Data Federation can use to access the data stores. Required if specifying cloudProviderConfig.
RoleId string `json:"roleId"`
}

// NewDataFederationGCPCloudProviderConfig instantiates a new DataFederationGCPCloudProviderConfig 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 NewDataFederationGCPCloudProviderConfig(roleId string) *DataFederationGCPCloudProviderConfig {
this := DataFederationGCPCloudProviderConfig{}
this.RoleId = roleId
return &this
}

// NewDataFederationGCPCloudProviderConfigWithDefaults instantiates a new DataFederationGCPCloudProviderConfig 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 NewDataFederationGCPCloudProviderConfigWithDefaults() *DataFederationGCPCloudProviderConfig {
this := DataFederationGCPCloudProviderConfig{}
return &this
}

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

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

return o.GcpServiceAccount, true
}

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

return false
}

// SetGcpServiceAccount gets a reference to the given string and assigns it to the GcpServiceAccount field.
func (o *DataFederationGCPCloudProviderConfig) SetGcpServiceAccount(v string) {
o.GcpServiceAccount = &v
}

// GetRoleId returns the RoleId field value
func (o *DataFederationGCPCloudProviderConfig) GetRoleId() string {
if o == nil {
var ret string
return ret
}

return o.RoleId
}

// GetRoleIdOk returns a tuple with the RoleId field value
// and a boolean to check if the value has been set.
func (o *DataFederationGCPCloudProviderConfig) GetRoleIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.RoleId, true
}

// SetRoleId sets field value
func (o *DataFederationGCPCloudProviderConfig) SetRoleId(v string) {
o.RoleId = v
}

func (o *DataFederationGCPCloudProviderConfig) MarshalJSONWithoutReadOnly() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}

func (o *DataFederationGCPCloudProviderConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["roleId"] = o.RoleId
return toSerialize, nil
}
Loading

0 comments on commit 95b0af3

Please sign in to comment.