Skip to content

Commit

Permalink
APIBot: SDK update based on recent changes in Atlas API (#477)
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 <981838+wtrocki@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 8, 2024
1 parent c8de2b3 commit 625dd5b
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 3 deletions.
39 changes: 39 additions & 0 deletions admin/model_organization_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package admin
type OrganizationSettings struct {
// Flag that indicates whether to require API operations to originate from an IP Address added to the API access list for the specified organization.
ApiAccessListRequired *bool `json:"apiAccessListRequired,omitempty"`
// Flag that indicates whether this organization has access to generative AI features. This setting only applies to Atlas Commercial and is enabled by default. Once this setting is turned on, Project Owners may be able to enable or disable individual AI features at the project level.
GenAIFeaturesEnabled *bool `json:"genAIFeaturesEnabled,omitempty"`
// Number that represents the maximum period before expiry in hours for new Atlas Admin API Service Account secrets within the specified organization.
MaxServiceAccountSecretValidityInHours *int `json:"maxServiceAccountSecretValidityInHours,omitempty"`
// Flag that indicates whether to require users to set up Multi-Factor Authentication (MFA) before accessing the specified organization. To learn more, see: https://www.mongodb.com/docs/atlas/security-multi-factor-authentication/.
Expand All @@ -22,6 +24,8 @@ type OrganizationSettings struct {
// will change when the set of required properties is changed
func NewOrganizationSettings() *OrganizationSettings {
this := OrganizationSettings{}
var genAIFeaturesEnabled bool = true
this.GenAIFeaturesEnabled = &genAIFeaturesEnabled
return &this
}

Expand All @@ -30,6 +34,8 @@ func NewOrganizationSettings() *OrganizationSettings {
// but it doesn't guarantee that properties required by API are set
func NewOrganizationSettingsWithDefaults() *OrganizationSettings {
this := OrganizationSettings{}
var genAIFeaturesEnabled bool = true
this.GenAIFeaturesEnabled = &genAIFeaturesEnabled
return &this
}

Expand Down Expand Up @@ -66,6 +72,39 @@ func (o *OrganizationSettings) SetApiAccessListRequired(v bool) {
o.ApiAccessListRequired = &v
}

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

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

return o.GenAIFeaturesEnabled, true
}

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

return false
}

// SetGenAIFeaturesEnabled gets a reference to the given bool and assigns it to the GenAIFeaturesEnabled field.
func (o *OrganizationSettings) SetGenAIFeaturesEnabled(v bool) {
o.GenAIFeaturesEnabled = &v
}

// GetMaxServiceAccountSecretValidityInHours returns the MaxServiceAccountSecretValidityInHours field value if set, zero value otherwise
func (o *OrganizationSettings) GetMaxServiceAccountSecretValidityInHours() int {
if o == nil || IsNil(o.MaxServiceAccountSecretValidityInHours) {
Expand Down
25 changes: 25 additions & 0 deletions docs/docs/OrganizationSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ApiAccessListRequired** | Pointer to **bool** | Flag that indicates whether to require API operations to originate from an IP Address added to the API access list for the specified organization. | [optional]
**GenAIFeaturesEnabled** | Pointer to **bool** | Flag that indicates whether this organization has access to generative AI features. This setting only applies to Atlas Commercial and is enabled by default. Once this setting is turned on, Project Owners may be able to enable or disable individual AI features at the project level. | [optional] [default to true]
**MaxServiceAccountSecretValidityInHours** | Pointer to **int** | Number that represents the maximum period before expiry in hours for new Atlas Admin API Service Account secrets within the specified organization. | [optional]
**MultiFactorAuthRequired** | Pointer to **bool** | Flag that indicates whether to require users to set up Multi-Factor Authentication (MFA) before accessing the specified organization. To learn more, see: https://www.mongodb.com/docs/atlas/security-multi-factor-authentication/. | [optional]
**RestrictEmployeeAccess** | Pointer to **bool** | Flag that indicates whether to block MongoDB Support from accessing Atlas infrastructure and cluster logs for any deployment in the specified organization without explicit permission. Once this setting is turned on, you can grant MongoDB Support a 24-hour bypass access to the Atlas deployment to resolve support issues. To learn more, see: https://www.mongodb.com/docs/atlas/security-restrict-support-access/. | [optional]
Expand Down Expand Up @@ -53,6 +54,30 @@ SetApiAccessListRequired sets ApiAccessListRequired field to given value.
`func (o *OrganizationSettings) HasApiAccessListRequired() bool`

HasApiAccessListRequired returns a boolean if a field has been set.
### GetGenAIFeaturesEnabled

`func (o *OrganizationSettings) GetGenAIFeaturesEnabled() bool`

GetGenAIFeaturesEnabled returns the GenAIFeaturesEnabled field if non-nil, zero value otherwise.

### GetGenAIFeaturesEnabledOk

`func (o *OrganizationSettings) GetGenAIFeaturesEnabledOk() (*bool, bool)`

GetGenAIFeaturesEnabledOk returns a tuple with the GenAIFeaturesEnabled field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetGenAIFeaturesEnabled

`func (o *OrganizationSettings) SetGenAIFeaturesEnabled(v bool)`

SetGenAIFeaturesEnabled sets GenAIFeaturesEnabled field to given value.

### HasGenAIFeaturesEnabled

`func (o *OrganizationSettings) HasGenAIFeaturesEnabled() bool`

HasGenAIFeaturesEnabled returns a boolean if a field has been set.
### GetMaxServiceAccountSecretValidityInHours

`func (o *OrganizationSettings) GetMaxServiceAccountSecretValidityInHours() int`
Expand Down
2 changes: 1 addition & 1 deletion internal/core/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package core
// For more information please see: https://github.com/mongodb/atlas-sdk-go/blob/main/docs/doc_1_concepts.md
const (
// SDK release tag version.
Version = "v20241023002.0.0"
Version = "v20241023002.1.0"
// Resource Version.
Resource = "20241023"
)
13 changes: 12 additions & 1 deletion openapi/atlas-api-transformed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ info:
termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions
title: MongoDB Atlas Administration API
version: "2.0"
x-xgen-sha: 717355e4e2b2ff77eca907c9e2c7e28401a2a901
x-xgen-sha: 08773c7fcc012f959b5c7403f0f37ae45cab24b4
servers:
- url: https://cloud.mongodb.com
security:
Expand Down Expand Up @@ -30283,6 +30283,17 @@ components:
description: Flag that indicates whether to require API operations to originate
from an IP Address added to the API access list for the specified
organization.
genAIFeaturesEnabled:
type: boolean
default: true
description: Flag that indicates whether this organization has access to
generative AI features. This setting only applies to Atlas
Commercial and is enabled by default. Once this setting is turned
on, Project Owners may be able to enable or disable individual AI
features at the project level.
externalDocs:
description: Generative AI FAQs
url: https://www.mongodb.com/docs/generative-ai-faq/
maxServiceAccountSecretValidityInHours:
type: integer
format: int32
Expand Down
13 changes: 12 additions & 1 deletion openapi/atlas-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ info:
termsOfService: https://www.mongodb.com/mongodb-management-service-terms-and-conditions
title: MongoDB Atlas Administration API
version: "2.0"
x-xgen-sha: 717355e4e2b2ff77eca907c9e2c7e28401a2a901
x-xgen-sha: 08773c7fcc012f959b5c7403f0f37ae45cab24b4
servers:
- url: https://cloud.mongodb.com
security:
Expand Down Expand Up @@ -46198,6 +46198,17 @@ components:
type: boolean
description: Flag that indicates whether to require API operations to originate
from an IP Address added to the API access list for the specified organization.
genAIFeaturesEnabled:
type: boolean
default: true
description: "Flag that indicates whether this organization has access to\
\ generative AI features. This setting only applies to Atlas Commercial\
\ and is enabled by default. Once this setting is turned on, Project Owners\
\ may be able to enable or disable individual AI features at the project\
\ level."
externalDocs:
description: Generative AI FAQs
url: https://www.mongodb.com/docs/generative-ai-faq/
maxServiceAccountSecretValidityInHours:
type: integer
format: int32
Expand Down

0 comments on commit 625dd5b

Please sign in to comment.