Skip to content

Commit 60a45f7

Browse files
APIBot: SDK update based on recent changes in Atlas API (#243)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: wtrocki <[email protected]>
1 parent 1b2620d commit 60a45f7

12 files changed

+1805
-81
lines changed

admin/api_push_based_log_export.go

Lines changed: 612 additions & 0 deletions
Large diffs are not rendered by default.

admin/client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ type APIClient struct {
108108

109109
ProjectsApi ProjectsApi
110110

111+
PushBasedLogExportApi PushBasedLogExportApi
112+
111113
RollingIndexApi RollingIndexApi
112114

113115
RootApi RootApi
@@ -179,6 +181,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
179181
c.ProgrammaticAPIKeysApi = (*ProgrammaticAPIKeysApiService)(&c.common)
180182
c.ProjectIPAccessListApi = (*ProjectIPAccessListApiService)(&c.common)
181183
c.ProjectsApi = (*ProjectsApiService)(&c.common)
184+
c.PushBasedLogExportApi = (*PushBasedLogExportApiService)(&c.common)
182185
c.RollingIndexApi = (*RollingIndexApiService)(&c.common)
183186
c.RootApi = (*RootApiService)(&c.common)
184187
c.ServerlessInstancesApi = (*ServerlessInstancesApiService)(&c.common)

admin/model_data_lake_tenant.go

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import (
88

99
// DataLakeTenant struct for DataLakeTenant
1010
type DataLakeTenant struct {
11-
// List that contains the sets of private endpoints and hostnames.
12-
PrivateEndpointHostnames []PrivateEndpointHostname `json:"_privateEndpointHostnames,omitempty"`
13-
CloudProviderConfig *DataLakeCloudProviderConfig `json:"cloudProviderConfig,omitempty"`
14-
DataProcessRegion *DataLakeDataProcessRegion `json:"dataProcessRegion,omitempty"`
11+
CloudProviderConfig *DataLakeCloudProviderConfig `json:"cloudProviderConfig,omitempty"`
12+
DataProcessRegion *DataLakeDataProcessRegion `json:"dataProcessRegion,omitempty"`
1513
// Unique 24-hexadecimal character string that identifies the project.
1614
GroupId *string `json:"groupId,omitempty"`
1715
// List that contains the hostnames assigned to the Data Lake instance.
1816
Hostnames []string `json:"hostnames,omitempty"`
1917
// Human-readable label that identifies the data lake.
2018
Name *string `json:"name,omitempty"`
19+
// List that contains the sets of private endpoints and hostnames.
20+
PrivateEndpointHostnames []PrivateEndpointHostname `json:"privateEndpointHostnames,omitempty"`
2121
// Label that indicates the status of the Data Lake instance.
2222
State *string `json:"state,omitempty"`
2323
Storage *DataLakeStorage `json:"storage,omitempty"`
@@ -40,39 +40,6 @@ func NewDataLakeTenantWithDefaults() *DataLakeTenant {
4040
return &this
4141
}
4242

43-
// GetPrivateEndpointHostnames returns the PrivateEndpointHostnames field value if set, zero value otherwise
44-
func (o *DataLakeTenant) GetPrivateEndpointHostnames() []PrivateEndpointHostname {
45-
if o == nil || IsNil(o.PrivateEndpointHostnames) {
46-
var ret []PrivateEndpointHostname
47-
return ret
48-
}
49-
return o.PrivateEndpointHostnames
50-
}
51-
52-
// GetPrivateEndpointHostnamesOk returns a tuple with the PrivateEndpointHostnames field value if set, nil otherwise
53-
// and a boolean to check if the value has been set.
54-
func (o *DataLakeTenant) GetPrivateEndpointHostnamesOk() ([]PrivateEndpointHostname, bool) {
55-
if o == nil || IsNil(o.PrivateEndpointHostnames) {
56-
return nil, false
57-
}
58-
59-
return o.PrivateEndpointHostnames, true
60-
}
61-
62-
// HasPrivateEndpointHostnames returns a boolean if a field has been set.
63-
func (o *DataLakeTenant) HasPrivateEndpointHostnames() bool {
64-
if o != nil && !IsNil(o.PrivateEndpointHostnames) {
65-
return true
66-
}
67-
68-
return false
69-
}
70-
71-
// SetPrivateEndpointHostnames gets a reference to the given []PrivateEndpointHostname and assigns it to the PrivateEndpointHostnames field.
72-
func (o *DataLakeTenant) SetPrivateEndpointHostnames(v []PrivateEndpointHostname) {
73-
o.PrivateEndpointHostnames = v
74-
}
75-
7643
// GetCloudProviderConfig returns the CloudProviderConfig field value if set, zero value otherwise
7744
func (o *DataLakeTenant) GetCloudProviderConfig() DataLakeCloudProviderConfig {
7845
if o == nil || IsNil(o.CloudProviderConfig) {
@@ -238,6 +205,39 @@ func (o *DataLakeTenant) SetName(v string) {
238205
o.Name = &v
239206
}
240207

208+
// GetPrivateEndpointHostnames returns the PrivateEndpointHostnames field value if set, zero value otherwise
209+
func (o *DataLakeTenant) GetPrivateEndpointHostnames() []PrivateEndpointHostname {
210+
if o == nil || IsNil(o.PrivateEndpointHostnames) {
211+
var ret []PrivateEndpointHostname
212+
return ret
213+
}
214+
return o.PrivateEndpointHostnames
215+
}
216+
217+
// GetPrivateEndpointHostnamesOk returns a tuple with the PrivateEndpointHostnames field value if set, nil otherwise
218+
// and a boolean to check if the value has been set.
219+
func (o *DataLakeTenant) GetPrivateEndpointHostnamesOk() ([]PrivateEndpointHostname, bool) {
220+
if o == nil || IsNil(o.PrivateEndpointHostnames) {
221+
return nil, false
222+
}
223+
224+
return o.PrivateEndpointHostnames, true
225+
}
226+
227+
// HasPrivateEndpointHostnames returns a boolean if a field has been set.
228+
func (o *DataLakeTenant) HasPrivateEndpointHostnames() bool {
229+
if o != nil && !IsNil(o.PrivateEndpointHostnames) {
230+
return true
231+
}
232+
233+
return false
234+
}
235+
236+
// SetPrivateEndpointHostnames gets a reference to the given []PrivateEndpointHostname and assigns it to the PrivateEndpointHostnames field.
237+
func (o *DataLakeTenant) SetPrivateEndpointHostnames(v []PrivateEndpointHostname) {
238+
o.PrivateEndpointHostnames = v
239+
}
240+
241241
// GetState returns the State field value if set, zero value otherwise
242242
func (o *DataLakeTenant) GetState() string {
243243
if o == nil || IsNil(o.State) {
Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
// Code based on the AtlasAPI V2 OpenAPI file
2+
3+
package admin
4+
5+
import (
6+
"encoding/json"
7+
"time"
8+
)
9+
10+
// PushBasedLogExportProject struct for PushBasedLogExportProject
11+
type PushBasedLogExportProject struct {
12+
// The name of the bucket to which the agent will send the logs to.
13+
BucketName *string `json:"bucketName,omitempty"`
14+
// Date and time that this feature was enabled on.
15+
CreateDate *time.Time `json:"createDate,omitempty"`
16+
// ID of the AWS IAM role that will be used to write to the S3 bucket.
17+
IamRoleId *string `json:"iamRoleId,omitempty"`
18+
// 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.
19+
Links []Link `json:"links,omitempty"`
20+
// S3 directory in which vector will write to in order to store the logs.
21+
PrefixPath *string `json:"prefixPath,omitempty"`
22+
// Describes whether or not the feature is enabled and what status it is in.
23+
State *string `json:"state,omitempty"`
24+
}
25+
26+
// NewPushBasedLogExportProject instantiates a new PushBasedLogExportProject object
27+
// This constructor will assign default values to properties that have it defined,
28+
// and makes sure properties required by API are set, but the set of arguments
29+
// will change when the set of required properties is changed
30+
func NewPushBasedLogExportProject() *PushBasedLogExportProject {
31+
this := PushBasedLogExportProject{}
32+
return &this
33+
}
34+
35+
// NewPushBasedLogExportProjectWithDefaults instantiates a new PushBasedLogExportProject object
36+
// This constructor will only assign default values to properties that have it defined,
37+
// but it doesn't guarantee that properties required by API are set
38+
func NewPushBasedLogExportProjectWithDefaults() *PushBasedLogExportProject {
39+
this := PushBasedLogExportProject{}
40+
return &this
41+
}
42+
43+
// GetBucketName returns the BucketName field value if set, zero value otherwise
44+
func (o *PushBasedLogExportProject) GetBucketName() string {
45+
if o == nil || IsNil(o.BucketName) {
46+
var ret string
47+
return ret
48+
}
49+
return *o.BucketName
50+
}
51+
52+
// GetBucketNameOk returns a tuple with the BucketName field value if set, nil otherwise
53+
// and a boolean to check if the value has been set.
54+
func (o *PushBasedLogExportProject) GetBucketNameOk() (*string, bool) {
55+
if o == nil || IsNil(o.BucketName) {
56+
return nil, false
57+
}
58+
59+
return o.BucketName, true
60+
}
61+
62+
// HasBucketName returns a boolean if a field has been set.
63+
func (o *PushBasedLogExportProject) HasBucketName() bool {
64+
if o != nil && !IsNil(o.BucketName) {
65+
return true
66+
}
67+
68+
return false
69+
}
70+
71+
// SetBucketName gets a reference to the given string and assigns it to the BucketName field.
72+
func (o *PushBasedLogExportProject) SetBucketName(v string) {
73+
o.BucketName = &v
74+
}
75+
76+
// GetCreateDate returns the CreateDate field value if set, zero value otherwise
77+
func (o *PushBasedLogExportProject) GetCreateDate() time.Time {
78+
if o == nil || IsNil(o.CreateDate) {
79+
var ret time.Time
80+
return ret
81+
}
82+
return *o.CreateDate
83+
}
84+
85+
// GetCreateDateOk returns a tuple with the CreateDate field value if set, nil otherwise
86+
// and a boolean to check if the value has been set.
87+
func (o *PushBasedLogExportProject) GetCreateDateOk() (*time.Time, bool) {
88+
if o == nil || IsNil(o.CreateDate) {
89+
return nil, false
90+
}
91+
92+
return o.CreateDate, true
93+
}
94+
95+
// HasCreateDate returns a boolean if a field has been set.
96+
func (o *PushBasedLogExportProject) HasCreateDate() bool {
97+
if o != nil && !IsNil(o.CreateDate) {
98+
return true
99+
}
100+
101+
return false
102+
}
103+
104+
// SetCreateDate gets a reference to the given time.Time and assigns it to the CreateDate field.
105+
func (o *PushBasedLogExportProject) SetCreateDate(v time.Time) {
106+
o.CreateDate = &v
107+
}
108+
109+
// GetIamRoleId returns the IamRoleId field value if set, zero value otherwise
110+
func (o *PushBasedLogExportProject) GetIamRoleId() string {
111+
if o == nil || IsNil(o.IamRoleId) {
112+
var ret string
113+
return ret
114+
}
115+
return *o.IamRoleId
116+
}
117+
118+
// GetIamRoleIdOk returns a tuple with the IamRoleId field value if set, nil otherwise
119+
// and a boolean to check if the value has been set.
120+
func (o *PushBasedLogExportProject) GetIamRoleIdOk() (*string, bool) {
121+
if o == nil || IsNil(o.IamRoleId) {
122+
return nil, false
123+
}
124+
125+
return o.IamRoleId, true
126+
}
127+
128+
// HasIamRoleId returns a boolean if a field has been set.
129+
func (o *PushBasedLogExportProject) HasIamRoleId() bool {
130+
if o != nil && !IsNil(o.IamRoleId) {
131+
return true
132+
}
133+
134+
return false
135+
}
136+
137+
// SetIamRoleId gets a reference to the given string and assigns it to the IamRoleId field.
138+
func (o *PushBasedLogExportProject) SetIamRoleId(v string) {
139+
o.IamRoleId = &v
140+
}
141+
142+
// GetLinks returns the Links field value if set, zero value otherwise
143+
func (o *PushBasedLogExportProject) GetLinks() []Link {
144+
if o == nil || IsNil(o.Links) {
145+
var ret []Link
146+
return ret
147+
}
148+
return o.Links
149+
}
150+
151+
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
152+
// and a boolean to check if the value has been set.
153+
func (o *PushBasedLogExportProject) GetLinksOk() ([]Link, bool) {
154+
if o == nil || IsNil(o.Links) {
155+
return nil, false
156+
}
157+
158+
return o.Links, true
159+
}
160+
161+
// HasLinks returns a boolean if a field has been set.
162+
func (o *PushBasedLogExportProject) HasLinks() bool {
163+
if o != nil && !IsNil(o.Links) {
164+
return true
165+
}
166+
167+
return false
168+
}
169+
170+
// SetLinks gets a reference to the given []Link and assigns it to the Links field.
171+
func (o *PushBasedLogExportProject) SetLinks(v []Link) {
172+
o.Links = v
173+
}
174+
175+
// GetPrefixPath returns the PrefixPath field value if set, zero value otherwise
176+
func (o *PushBasedLogExportProject) GetPrefixPath() string {
177+
if o == nil || IsNil(o.PrefixPath) {
178+
var ret string
179+
return ret
180+
}
181+
return *o.PrefixPath
182+
}
183+
184+
// GetPrefixPathOk returns a tuple with the PrefixPath field value if set, nil otherwise
185+
// and a boolean to check if the value has been set.
186+
func (o *PushBasedLogExportProject) GetPrefixPathOk() (*string, bool) {
187+
if o == nil || IsNil(o.PrefixPath) {
188+
return nil, false
189+
}
190+
191+
return o.PrefixPath, true
192+
}
193+
194+
// HasPrefixPath returns a boolean if a field has been set.
195+
func (o *PushBasedLogExportProject) HasPrefixPath() bool {
196+
if o != nil && !IsNil(o.PrefixPath) {
197+
return true
198+
}
199+
200+
return false
201+
}
202+
203+
// SetPrefixPath gets a reference to the given string and assigns it to the PrefixPath field.
204+
func (o *PushBasedLogExportProject) SetPrefixPath(v string) {
205+
o.PrefixPath = &v
206+
}
207+
208+
// GetState returns the State field value if set, zero value otherwise
209+
func (o *PushBasedLogExportProject) GetState() string {
210+
if o == nil || IsNil(o.State) {
211+
var ret string
212+
return ret
213+
}
214+
return *o.State
215+
}
216+
217+
// GetStateOk returns a tuple with the State field value if set, nil otherwise
218+
// and a boolean to check if the value has been set.
219+
func (o *PushBasedLogExportProject) GetStateOk() (*string, bool) {
220+
if o == nil || IsNil(o.State) {
221+
return nil, false
222+
}
223+
224+
return o.State, true
225+
}
226+
227+
// HasState returns a boolean if a field has been set.
228+
func (o *PushBasedLogExportProject) HasState() bool {
229+
if o != nil && !IsNil(o.State) {
230+
return true
231+
}
232+
233+
return false
234+
}
235+
236+
// SetState gets a reference to the given string and assigns it to the State field.
237+
func (o *PushBasedLogExportProject) SetState(v string) {
238+
o.State = &v
239+
}
240+
241+
func (o PushBasedLogExportProject) MarshalJSONWithoutReadOnly() ([]byte, error) {
242+
toSerialize, err := o.ToMap()
243+
if err != nil {
244+
return []byte{}, err
245+
}
246+
return json.Marshal(toSerialize)
247+
}
248+
func (o PushBasedLogExportProject) ToMap() (map[string]interface{}, error) {
249+
toSerialize := map[string]interface{}{}
250+
if !IsNil(o.BucketName) {
251+
toSerialize["bucketName"] = o.BucketName
252+
}
253+
if !IsNil(o.IamRoleId) {
254+
toSerialize["iamRoleId"] = o.IamRoleId
255+
}
256+
if !IsNil(o.PrefixPath) {
257+
toSerialize["prefixPath"] = o.PrefixPath
258+
}
259+
if !IsNil(o.State) {
260+
toSerialize["state"] = o.State
261+
}
262+
return toSerialize, nil
263+
}

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* [Using Getters Instead of Direct Field Access](./doc_5_best_practices.md#using-getters-instead-of-direct-field-access)
3434
* [Check for Empty Strings for String Pointers](./doc_5_best_practices.md#check-for-empty-strings-for-string-pointers)
3535
* [Working with Date Fields](./doc_5_best_practices.md#working-with-date-fields)
36+
* [Working with Binary Responses](./doc_5_best_practices.md#working-with-binary-responses)
3637
* [Use Method for Creating Models](./doc_5_best_practices.md#use-method-for-creating-models)
3738
* [Use golangci-lint Validators](./doc_5_best_practices.md#use-golangci-lint-validators)
3839
* [Linting Issues](./doc_5_best_practices.md#linting-issues)

0 commit comments

Comments
 (0)