Skip to content

Commit 8c1c4c7

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

40 files changed

+14947
-18
lines changed

admin/api_service_accounts.go

+3,412
Large diffs are not rendered by default.

admin/client.go

+3
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ type APIClient struct {
119119

120120
ServerlessPrivateEndpointsApi ServerlessPrivateEndpointsApi
121121

122+
ServiceAccountsApi ServiceAccountsApi
123+
122124
SharedTierRestoreJobsApi SharedTierRestoreJobsApi
123125

124126
SharedTierSnapshotsApi SharedTierSnapshotsApi
@@ -188,6 +190,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
188190
c.RootApi = (*RootApiService)(&c.common)
189191
c.ServerlessInstancesApi = (*ServerlessInstancesApiService)(&c.common)
190192
c.ServerlessPrivateEndpointsApi = (*ServerlessPrivateEndpointsApiService)(&c.common)
193+
c.ServiceAccountsApi = (*ServiceAccountsApiService)(&c.common)
191194
c.SharedTierRestoreJobsApi = (*SharedTierRestoreJobsApiService)(&c.common)
192195
c.SharedTierSnapshotsApi = (*SharedTierSnapshotsApiService)(&c.common)
193196
c.StreamsApi = (*StreamsApiService)(&c.common)

admin/model_group_service_account.go

+238
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
// Code based on the AtlasAPI V2 OpenAPI file
2+
3+
package admin
4+
5+
import (
6+
"time"
7+
)
8+
9+
// GroupServiceAccount struct for GroupServiceAccount
10+
type GroupServiceAccount struct {
11+
// The Client ID of the Service Account.
12+
ClientId *string `json:"clientId,omitempty"`
13+
// The date that the Service Account was created on.
14+
CreatedAt *time.Time `json:"createdAt,omitempty"`
15+
// Human readable description for the Service Account.
16+
Description *string `json:"description,omitempty"`
17+
// Human-readable name for the Service Account.
18+
Name *string `json:"name,omitempty"`
19+
// A list of Project roles associated with the Service Account.
20+
Roles *[]string `json:"roles,omitempty"`
21+
// A list of secrets associated with the specified Service Account.
22+
Secrets *[]ServiceAccountSecret `json:"secrets,omitempty"`
23+
}
24+
25+
// NewGroupServiceAccount instantiates a new GroupServiceAccount object
26+
// This constructor will assign default values to properties that have it defined,
27+
// and makes sure properties required by API are set, but the set of arguments
28+
// will change when the set of required properties is changed
29+
func NewGroupServiceAccount() *GroupServiceAccount {
30+
this := GroupServiceAccount{}
31+
return &this
32+
}
33+
34+
// NewGroupServiceAccountWithDefaults instantiates a new GroupServiceAccount object
35+
// This constructor will only assign default values to properties that have it defined,
36+
// but it doesn't guarantee that properties required by API are set
37+
func NewGroupServiceAccountWithDefaults() *GroupServiceAccount {
38+
this := GroupServiceAccount{}
39+
return &this
40+
}
41+
42+
// GetClientId returns the ClientId field value if set, zero value otherwise
43+
func (o *GroupServiceAccount) GetClientId() string {
44+
if o == nil || IsNil(o.ClientId) {
45+
var ret string
46+
return ret
47+
}
48+
return *o.ClientId
49+
}
50+
51+
// GetClientIdOk returns a tuple with the ClientId field value if set, nil otherwise
52+
// and a boolean to check if the value has been set.
53+
func (o *GroupServiceAccount) GetClientIdOk() (*string, bool) {
54+
if o == nil || IsNil(o.ClientId) {
55+
return nil, false
56+
}
57+
58+
return o.ClientId, true
59+
}
60+
61+
// HasClientId returns a boolean if a field has been set.
62+
func (o *GroupServiceAccount) HasClientId() bool {
63+
if o != nil && !IsNil(o.ClientId) {
64+
return true
65+
}
66+
67+
return false
68+
}
69+
70+
// SetClientId gets a reference to the given string and assigns it to the ClientId field.
71+
func (o *GroupServiceAccount) SetClientId(v string) {
72+
o.ClientId = &v
73+
}
74+
75+
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise
76+
func (o *GroupServiceAccount) GetCreatedAt() time.Time {
77+
if o == nil || IsNil(o.CreatedAt) {
78+
var ret time.Time
79+
return ret
80+
}
81+
return *o.CreatedAt
82+
}
83+
84+
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
85+
// and a boolean to check if the value has been set.
86+
func (o *GroupServiceAccount) GetCreatedAtOk() (*time.Time, bool) {
87+
if o == nil || IsNil(o.CreatedAt) {
88+
return nil, false
89+
}
90+
91+
return o.CreatedAt, true
92+
}
93+
94+
// HasCreatedAt returns a boolean if a field has been set.
95+
func (o *GroupServiceAccount) HasCreatedAt() bool {
96+
if o != nil && !IsNil(o.CreatedAt) {
97+
return true
98+
}
99+
100+
return false
101+
}
102+
103+
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
104+
func (o *GroupServiceAccount) SetCreatedAt(v time.Time) {
105+
o.CreatedAt = &v
106+
}
107+
108+
// GetDescription returns the Description field value if set, zero value otherwise
109+
func (o *GroupServiceAccount) GetDescription() string {
110+
if o == nil || IsNil(o.Description) {
111+
var ret string
112+
return ret
113+
}
114+
return *o.Description
115+
}
116+
117+
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
118+
// and a boolean to check if the value has been set.
119+
func (o *GroupServiceAccount) GetDescriptionOk() (*string, bool) {
120+
if o == nil || IsNil(o.Description) {
121+
return nil, false
122+
}
123+
124+
return o.Description, true
125+
}
126+
127+
// HasDescription returns a boolean if a field has been set.
128+
func (o *GroupServiceAccount) HasDescription() bool {
129+
if o != nil && !IsNil(o.Description) {
130+
return true
131+
}
132+
133+
return false
134+
}
135+
136+
// SetDescription gets a reference to the given string and assigns it to the Description field.
137+
func (o *GroupServiceAccount) SetDescription(v string) {
138+
o.Description = &v
139+
}
140+
141+
// GetName returns the Name field value if set, zero value otherwise
142+
func (o *GroupServiceAccount) GetName() string {
143+
if o == nil || IsNil(o.Name) {
144+
var ret string
145+
return ret
146+
}
147+
return *o.Name
148+
}
149+
150+
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
151+
// and a boolean to check if the value has been set.
152+
func (o *GroupServiceAccount) GetNameOk() (*string, bool) {
153+
if o == nil || IsNil(o.Name) {
154+
return nil, false
155+
}
156+
157+
return o.Name, true
158+
}
159+
160+
// HasName returns a boolean if a field has been set.
161+
func (o *GroupServiceAccount) HasName() bool {
162+
if o != nil && !IsNil(o.Name) {
163+
return true
164+
}
165+
166+
return false
167+
}
168+
169+
// SetName gets a reference to the given string and assigns it to the Name field.
170+
func (o *GroupServiceAccount) SetName(v string) {
171+
o.Name = &v
172+
}
173+
174+
// GetRoles returns the Roles field value if set, zero value otherwise
175+
func (o *GroupServiceAccount) GetRoles() []string {
176+
if o == nil || IsNil(o.Roles) {
177+
var ret []string
178+
return ret
179+
}
180+
return *o.Roles
181+
}
182+
183+
// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise
184+
// and a boolean to check if the value has been set.
185+
func (o *GroupServiceAccount) GetRolesOk() (*[]string, bool) {
186+
if o == nil || IsNil(o.Roles) {
187+
return nil, false
188+
}
189+
190+
return o.Roles, true
191+
}
192+
193+
// HasRoles returns a boolean if a field has been set.
194+
func (o *GroupServiceAccount) HasRoles() bool {
195+
if o != nil && !IsNil(o.Roles) {
196+
return true
197+
}
198+
199+
return false
200+
}
201+
202+
// SetRoles gets a reference to the given []string and assigns it to the Roles field.
203+
func (o *GroupServiceAccount) SetRoles(v []string) {
204+
o.Roles = &v
205+
}
206+
207+
// GetSecrets returns the Secrets field value if set, zero value otherwise
208+
func (o *GroupServiceAccount) GetSecrets() []ServiceAccountSecret {
209+
if o == nil || IsNil(o.Secrets) {
210+
var ret []ServiceAccountSecret
211+
return ret
212+
}
213+
return *o.Secrets
214+
}
215+
216+
// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise
217+
// and a boolean to check if the value has been set.
218+
func (o *GroupServiceAccount) GetSecretsOk() (*[]ServiceAccountSecret, bool) {
219+
if o == nil || IsNil(o.Secrets) {
220+
return nil, false
221+
}
222+
223+
return o.Secrets, true
224+
}
225+
226+
// HasSecrets returns a boolean if a field has been set.
227+
func (o *GroupServiceAccount) HasSecrets() bool {
228+
if o != nil && !IsNil(o.Secrets) {
229+
return true
230+
}
231+
232+
return false
233+
}
234+
235+
// SetSecrets gets a reference to the given []ServiceAccountSecret and assigns it to the Secrets field.
236+
func (o *GroupServiceAccount) SetSecrets(v []ServiceAccountSecret) {
237+
o.Secrets = &v
238+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
// Code based on the AtlasAPI V2 OpenAPI file
2+
3+
package admin
4+
5+
// GroupServiceAccountRequest struct for GroupServiceAccountRequest
6+
type GroupServiceAccountRequest struct {
7+
// Human readable description for the Service Account.
8+
Description string `json:"description"`
9+
// Human-readable name for the Service Account. The name is modifiable and does not have to be unique.
10+
Name string `json:"name"`
11+
// A list of project-level roles for the Service Account.
12+
Roles []string `json:"roles"`
13+
// The expiration time of the new Service Account secret. The expiration is provided in hours.
14+
SecretExpiresAfterHours int `json:"secretExpiresAfterHours"`
15+
}
16+
17+
// NewGroupServiceAccountRequest instantiates a new GroupServiceAccountRequest object
18+
// This constructor will assign default values to properties that have it defined,
19+
// and makes sure properties required by API are set, but the set of arguments
20+
// will change when the set of required properties is changed
21+
func NewGroupServiceAccountRequest(description string, name string, roles []string, secretExpiresAfterHours int) *GroupServiceAccountRequest {
22+
this := GroupServiceAccountRequest{}
23+
this.Description = description
24+
this.Name = name
25+
this.Roles = roles
26+
this.SecretExpiresAfterHours = secretExpiresAfterHours
27+
return &this
28+
}
29+
30+
// NewGroupServiceAccountRequestWithDefaults instantiates a new GroupServiceAccountRequest object
31+
// This constructor will only assign default values to properties that have it defined,
32+
// but it doesn't guarantee that properties required by API are set
33+
func NewGroupServiceAccountRequestWithDefaults() *GroupServiceAccountRequest {
34+
this := GroupServiceAccountRequest{}
35+
return &this
36+
}
37+
38+
// GetDescription returns the Description field value
39+
func (o *GroupServiceAccountRequest) GetDescription() string {
40+
if o == nil {
41+
var ret string
42+
return ret
43+
}
44+
45+
return o.Description
46+
}
47+
48+
// GetDescriptionOk returns a tuple with the Description field value
49+
// and a boolean to check if the value has been set.
50+
func (o *GroupServiceAccountRequest) GetDescriptionOk() (*string, bool) {
51+
if o == nil {
52+
return nil, false
53+
}
54+
return &o.Description, true
55+
}
56+
57+
// SetDescription sets field value
58+
func (o *GroupServiceAccountRequest) SetDescription(v string) {
59+
o.Description = v
60+
}
61+
62+
// GetName returns the Name field value
63+
func (o *GroupServiceAccountRequest) GetName() string {
64+
if o == nil {
65+
var ret string
66+
return ret
67+
}
68+
69+
return o.Name
70+
}
71+
72+
// GetNameOk returns a tuple with the Name field value
73+
// and a boolean to check if the value has been set.
74+
func (o *GroupServiceAccountRequest) GetNameOk() (*string, bool) {
75+
if o == nil {
76+
return nil, false
77+
}
78+
return &o.Name, true
79+
}
80+
81+
// SetName sets field value
82+
func (o *GroupServiceAccountRequest) SetName(v string) {
83+
o.Name = v
84+
}
85+
86+
// GetRoles returns the Roles field value
87+
func (o *GroupServiceAccountRequest) GetRoles() []string {
88+
if o == nil {
89+
var ret []string
90+
return ret
91+
}
92+
93+
return o.Roles
94+
}
95+
96+
// GetRolesOk returns a tuple with the Roles field value
97+
// and a boolean to check if the value has been set.
98+
func (o *GroupServiceAccountRequest) GetRolesOk() (*[]string, bool) {
99+
if o == nil {
100+
return nil, false
101+
}
102+
return &o.Roles, true
103+
}
104+
105+
// SetRoles sets field value
106+
func (o *GroupServiceAccountRequest) SetRoles(v []string) {
107+
o.Roles = v
108+
}
109+
110+
// GetSecretExpiresAfterHours returns the SecretExpiresAfterHours field value
111+
func (o *GroupServiceAccountRequest) GetSecretExpiresAfterHours() int {
112+
if o == nil {
113+
var ret int
114+
return ret
115+
}
116+
117+
return o.SecretExpiresAfterHours
118+
}
119+
120+
// GetSecretExpiresAfterHoursOk returns a tuple with the SecretExpiresAfterHours field value
121+
// and a boolean to check if the value has been set.
122+
func (o *GroupServiceAccountRequest) GetSecretExpiresAfterHoursOk() (*int, bool) {
123+
if o == nil {
124+
return nil, false
125+
}
126+
return &o.SecretExpiresAfterHours, true
127+
}
128+
129+
// SetSecretExpiresAfterHours sets field value
130+
func (o *GroupServiceAccountRequest) SetSecretExpiresAfterHours(v int) {
131+
o.SecretExpiresAfterHours = v
132+
}

0 commit comments

Comments
 (0)