diff --git a/CHANGELOG.md b/CHANGELOG.md index 94fb7f0bf..92fa241d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,20 @@ +## Release (2024-XX-XX) + +- `mongodbflex`: [v0.15.0](services/mongodbflex/CHANGELOG.md#v0150-2024-09-02) + - **Feature**: New method `ListAdvisorSlowQueries` that gets slow queries from the Opsmanager performance advisor. + - **Feature**: New method `ListSuggestedIndexes` that gets suggested indexes from the Opsmanager performance advisor. + - **Breaking change**: Remove nullable fields. + ## Release (2024-08-26) > [!WARNING] -> -> **The STACKIT Argus service was renamed to STACKIT Observability.** -> +> +> **The STACKIT Argus service was renamed to STACKIT Observability.** +> > In the SDK, this means that there is a new `observability` service, which offers the same functionality as the deprecated `argus` service. -> +> > SDK updates from now on will be released on the new `observability` service, meaning `argus` will no longer get updates. -> +> > Please migrate to `github.com/stackitcloud/stackit-sdk-go/services/observability`. - `observability`: [v0.1.0](services/observability/CHANGELOG.md#v010-2024-08-21) @@ -43,6 +50,7 @@ - **Feature:** `Plan` has a new field `SkuName` ## Release (2024-07-24) + - `iaas`: [v0.5.0](services/iaas/CHANGELOG.md#v050-2024-07-24) - **Feature:** `CreateNetworkAddressFamily` and `UpdateNetworkAddressFamily` have a new field `Ipv6` - **Feature:** `Network` has new fields: `NameserversV6` and `PrefixesV6` diff --git a/services/mongodbflex/CHANGELOG.md b/services/mongodbflex/CHANGELOG.md index 1976992bd..3fce7c8e9 100644 --- a/services/mongodbflex/CHANGELOG.md +++ b/services/mongodbflex/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.15.0 (2024-09-02) + +- **Feature**: New method `ListAdvisorSlowQueries` that gets slow queries from the Opsmanager performance advisor. +- **Feature**: New method `ListSuggestedIndexes` that gets suggested indexes from the Opsmanager performance advisor. +- **Breaking change**: Remove nullable fields. + ## v0.14.0 (2024-05-22) - **Breaking change**: Remove unused data types. diff --git a/services/mongodbflex/api_default.go b/services/mongodbflex/api_default.go index 82da53eaa..955bcd3c2 100644 --- a/services/mongodbflex/api_default.go +++ b/services/mongodbflex/api_default.go @@ -1369,6 +1369,160 @@ func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instan return r.Execute() } +type ApiListAdvisorSlowQueriesRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + instanceId string +} + +func (r ApiListAdvisorSlowQueriesRequest) Execute() (*HandlersInstancesSlowQueriesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HandlersInstancesSlowQueriesResponse + ) + a := r.apiService + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListAdvisorSlowQueries") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/advisor/slow-queries" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +ListAdvisorSlowQueries: Get slow queries + +gets slow queries from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListAdvisorSlowQueriesRequest +*/ +func (a *APIClient) ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string) ApiListAdvisorSlowQueriesRequest { + return ApiListAdvisorSlowQueriesRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +func (a *APIClient) ListAdvisorSlowQueriesExecute(ctx context.Context, projectId string, instanceId string) (*HandlersInstancesSlowQueriesResponse, error) { + r := ApiListAdvisorSlowQueriesRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } + return r.Execute() +} + type ApiListBackupsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2290,6 +2444,160 @@ func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, f return r.Execute() } +type ApiListSuggestedIndexesRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + instanceId string +} + +func (r ApiListSuggestedIndexesRequest) Execute() (*HandlersInstancesSuggestedIndexesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HandlersInstancesSuggestedIndexesResponse + ) + a := r.apiService + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.ListSuggestedIndexes") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/advisor/suggested-indexes" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +/* +ListSuggestedIndexes: Get suggested indexes + +gets suggested indexes from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListSuggestedIndexesRequest +*/ +func (a *APIClient) ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string) ApiListSuggestedIndexesRequest { + return ApiListSuggestedIndexesRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +func (a *APIClient) ListSuggestedIndexesExecute(ctx context.Context, projectId string, instanceId string) (*HandlersInstancesSuggestedIndexesResponse, error) { + r := ApiListSuggestedIndexesRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } + return r.Execute() +} + type ApiListUsersRequest struct { ctx context.Context apiService *DefaultApiService diff --git a/services/mongodbflex/api_default_test.go b/services/mongodbflex/api_default_test.go index 4b87b1640..86e33b101 100644 --- a/services/mongodbflex/api_default_test.go +++ b/services/mongodbflex/api_default_test.go @@ -506,6 +506,61 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { } }) + t.Run("Test DefaultApiService ListAdvisorSlowQueries", func(t *testing.T) { + path := "/v1/projects/{projectId}/instances/{instanceId}/advisor/slow-queries" + projectIdValue := "projectId" + path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + instanceIdValue := "instanceId" + path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + data := HandlersInstancesSlowQueriesResponse{} + w.Header().Add("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) + }) + testServer := httptest.NewServer(testDefaultApiServeMux) + defer testServer.Close() + + configuration := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Region: "test_region", + Servers: config.ServerConfigurations{ + { + URL: testServer.URL, + Description: "Localhost for mongodbflex_DefaultApi", + Variables: map[string]config.ServerVariable{ + "region": { + DefaultValue: "test_region.", + EnumValues: []string{ + "test_region.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) + if err != nil { + t.Fatalf("creating API client: %v", err) + } + + projectId := "projectId" + instanceId := "instanceId" + + resp, reqErr := apiClient.ListAdvisorSlowQueries(context.Background(), projectId, instanceId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if resp == nil { + t.Fatalf("response not present") + } + }) + t.Run("Test DefaultApiService ListBackups", func(t *testing.T) { path := "/v1/projects/{projectId}/instances/{instanceId}/backups" projectIdValue := "projectId" @@ -835,6 +890,61 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { } }) + t.Run("Test DefaultApiService ListSuggestedIndexes", func(t *testing.T) { + path := "/v1/projects/{projectId}/instances/{instanceId}/advisor/suggested-indexes" + projectIdValue := "projectId" + path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + instanceIdValue := "instanceId" + path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + + testDefaultApiServeMux := http.NewServeMux() + testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { + data := HandlersInstancesSuggestedIndexesResponse{} + w.Header().Add("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) + }) + testServer := httptest.NewServer(testDefaultApiServeMux) + defer testServer.Close() + + configuration := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Region: "test_region", + Servers: config.ServerConfigurations{ + { + URL: testServer.URL, + Description: "Localhost for mongodbflex_DefaultApi", + Variables: map[string]config.ServerVariable{ + "region": { + DefaultValue: "test_region.", + EnumValues: []string{ + "test_region.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + apiClient, err := NewAPIClient(config.WithCustomConfiguration(configuration), config.WithoutAuthentication()) + if err != nil { + t.Fatalf("creating API client: %v", err) + } + + projectId := "projectId" + instanceId := "instanceId" + + resp, reqErr := apiClient.ListSuggestedIndexes(context.Background(), projectId, instanceId).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + if resp == nil { + t.Fatalf("response not present") + } + }) + t.Run("Test DefaultApiService ListUsers", func(t *testing.T) { path := "/v1/projects/{projectId}/instances/{instanceId}/users" projectIdValue := "projectId" diff --git a/services/mongodbflex/model_acl.go b/services/mongodbflex/model_acl.go index a33179267..bd7c563e6 100644 --- a/services/mongodbflex/model_acl.go +++ b/services/mongodbflex/model_acl.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ACL type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ACL{} - // ACL struct for ACL type ACL struct { Items *[]string `json:"items,omitempty"` } - -// NewACL instantiates a new ACL 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 NewACL() *ACL { - this := ACL{} - return &this -} - -// NewACLWithDefaults instantiates a new ACL 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 NewACLWithDefaults() *ACL { - this := ACL{} - return &this -} - -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ACL) GetItems() *[]string { - if o == nil || IsNil(o.Items) { - var ret *[]string - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ACL) GetItemsOk() (*[]string, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ACL) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []string and assigns it to the Items field. -func (o *ACL) SetItems(v *[]string) { - o.Items = v -} - -func (o ACL) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Items) { - toSerialize["items"] = o.Items - } - return toSerialize, nil -} - -type NullableACL struct { - value *ACL - isSet bool -} - -func (v NullableACL) Get() *ACL { - return v.value -} - -func (v *NullableACL) Set(val *ACL) { - v.value = val - v.isSet = true -} - -func (v NullableACL) IsSet() bool { - return v.isSet -} - -func (v *NullableACL) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableACL(val *ACL) *NullableACL { - return &NullableACL{value: val, isSet: true} -} - -func (v NullableACL) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableACL) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_backup.go b/services/mongodbflex/model_backup.go index 4afa30ab2..d396b5df0 100644 --- a/services/mongodbflex/model_backup.go +++ b/services/mongodbflex/model_backup.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the Backup type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Backup{} - // Backup struct for Backup type Backup struct { EndTime *string `json:"endTime,omitempty"` @@ -28,341 +21,3 @@ type Backup struct { Size *int64 `json:"size,omitempty"` StartTime *string `json:"startTime,omitempty"` } - -// NewBackup instantiates a new Backup 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 NewBackup() *Backup { - this := Backup{} - return &this -} - -// NewBackupWithDefaults instantiates a new Backup 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 NewBackupWithDefaults() *Backup { - this := Backup{} - return &this -} - -// GetEndTime returns the EndTime field value if set, zero value otherwise. -func (o *Backup) GetEndTime() *string { - if o == nil || IsNil(o.EndTime) { - var ret *string - return ret - } - return o.EndTime -} - -// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Backup) GetEndTimeOk() (*string, bool) { - if o == nil || IsNil(o.EndTime) { - return nil, false - } - return o.EndTime, true -} - -// HasEndTime returns a boolean if a field has been set. -func (o *Backup) HasEndTime() bool { - if o != nil && !IsNil(o.EndTime) { - return true - } - - return false -} - -// SetEndTime gets a reference to the given string and assigns it to the EndTime field. -func (o *Backup) SetEndTime(v *string) { - o.EndTime = v -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *Backup) GetError() *string { - if o == nil || IsNil(o.Error) { - var ret *string - return ret - } - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Backup) GetErrorOk() (*string, bool) { - if o == nil || IsNil(o.Error) { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *Backup) HasError() bool { - if o != nil && !IsNil(o.Error) { - return true - } - - return false -} - -// SetError gets a reference to the given string and assigns it to the Error field. -func (o *Backup) SetError(v *string) { - o.Error = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Backup) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Backup) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Backup) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Backup) SetId(v *string) { - o.Id = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *Backup) GetLabels() *[]string { - if o == nil || IsNil(o.Labels) { - var ret *[]string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Backup) GetLabelsOk() (*[]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *Backup) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. -func (o *Backup) SetLabels(v *[]string) { - o.Labels = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Backup) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Backup) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Backup) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Backup) SetName(v *string) { - o.Name = v -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *Backup) GetOptions() *map[string]string { - if o == nil || IsNil(o.Options) { - var ret *map[string]string - return ret - } - return o.Options -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Backup) GetOptionsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true -} - -// HasOptions returns a boolean if a field has been set. -func (o *Backup) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false -} - -// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. -func (o *Backup) SetOptions(v *map[string]string) { - o.Options = v -} - -// GetSize returns the Size field value if set, zero value otherwise. -func (o *Backup) GetSize() *int64 { - if o == nil || IsNil(o.Size) { - var ret *int64 - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Backup) GetSizeOk() (*int64, bool) { - if o == nil || IsNil(o.Size) { - return nil, false - } - return o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *Backup) HasSize() bool { - if o != nil && !IsNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -func (o *Backup) SetSize(v *int64) { - o.Size = v -} - -// GetStartTime returns the StartTime field value if set, zero value otherwise. -func (o *Backup) GetStartTime() *string { - if o == nil || IsNil(o.StartTime) { - var ret *string - return ret - } - return o.StartTime -} - -// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Backup) GetStartTimeOk() (*string, bool) { - if o == nil || IsNil(o.StartTime) { - return nil, false - } - return o.StartTime, true -} - -// HasStartTime returns a boolean if a field has been set. -func (o *Backup) HasStartTime() bool { - if o != nil && !IsNil(o.StartTime) { - return true - } - - return false -} - -// SetStartTime gets a reference to the given string and assigns it to the StartTime field. -func (o *Backup) SetStartTime(v *string) { - o.StartTime = v -} - -func (o Backup) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.EndTime) { - toSerialize["endTime"] = o.EndTime - } - if !IsNil(o.Error) { - toSerialize["error"] = o.Error - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options - } - if !IsNil(o.Size) { - toSerialize["size"] = o.Size - } - if !IsNil(o.StartTime) { - toSerialize["startTime"] = o.StartTime - } - return toSerialize, nil -} - -type NullableBackup struct { - value *Backup - isSet bool -} - -func (v NullableBackup) Get() *Backup { - return v.value -} - -func (v *NullableBackup) Set(val *Backup) { - v.value = val - v.isSet = true -} - -func (v NullableBackup) IsSet() bool { - return v.isSet -} - -func (v *NullableBackup) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBackup(val *Backup) *NullableBackup { - return &NullableBackup{value: val, isSet: true} -} - -func (v NullableBackup) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBackup) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_backup_schedule.go b/services/mongodbflex/model_backup_schedule.go index eee12a95e..f4bb1565f 100644 --- a/services/mongodbflex/model_backup_schedule.go +++ b/services/mongodbflex/model_backup_schedule.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the BackupSchedule type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &BackupSchedule{} - // BackupSchedule struct for BackupSchedule type BackupSchedule struct { BackupSchedule *string `json:"backupSchedule,omitempty"` @@ -26,271 +19,3 @@ type BackupSchedule struct { SnapshotRetentionDays *int64 `json:"snapshotRetentionDays,omitempty"` WeeklySnapshotRetentionWeeks *int64 `json:"weeklySnapshotRetentionWeeks,omitempty"` } - -// NewBackupSchedule instantiates a new BackupSchedule 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 NewBackupSchedule() *BackupSchedule { - this := BackupSchedule{} - return &this -} - -// NewBackupScheduleWithDefaults instantiates a new BackupSchedule 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 NewBackupScheduleWithDefaults() *BackupSchedule { - this := BackupSchedule{} - return &this -} - -// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. -func (o *BackupSchedule) GetBackupSchedule() *string { - if o == nil || IsNil(o.BackupSchedule) { - var ret *string - return ret - } - return o.BackupSchedule -} - -// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BackupSchedule) GetBackupScheduleOk() (*string, bool) { - if o == nil || IsNil(o.BackupSchedule) { - return nil, false - } - return o.BackupSchedule, true -} - -// HasBackupSchedule returns a boolean if a field has been set. -func (o *BackupSchedule) HasBackupSchedule() bool { - if o != nil && !IsNil(o.BackupSchedule) { - return true - } - - return false -} - -// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. -func (o *BackupSchedule) SetBackupSchedule(v *string) { - o.BackupSchedule = v -} - -// GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays field value if set, zero value otherwise. -func (o *BackupSchedule) GetDailySnapshotRetentionDays() *int64 { - if o == nil || IsNil(o.DailySnapshotRetentionDays) { - var ret *int64 - return ret - } - return o.DailySnapshotRetentionDays -} - -// GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BackupSchedule) GetDailySnapshotRetentionDaysOk() (*int64, bool) { - if o == nil || IsNil(o.DailySnapshotRetentionDays) { - return nil, false - } - return o.DailySnapshotRetentionDays, true -} - -// HasDailySnapshotRetentionDays returns a boolean if a field has been set. -func (o *BackupSchedule) HasDailySnapshotRetentionDays() bool { - if o != nil && !IsNil(o.DailySnapshotRetentionDays) { - return true - } - - return false -} - -// SetDailySnapshotRetentionDays gets a reference to the given int64 and assigns it to the DailySnapshotRetentionDays field. -func (o *BackupSchedule) SetDailySnapshotRetentionDays(v *int64) { - o.DailySnapshotRetentionDays = v -} - -// GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths field value if set, zero value otherwise. -func (o *BackupSchedule) GetMonthlySnapshotRetentionMonths() *int64 { - if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { - var ret *int64 - return ret - } - return o.MonthlySnapshotRetentionMonths -} - -// GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BackupSchedule) GetMonthlySnapshotRetentionMonthsOk() (*int64, bool) { - if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { - return nil, false - } - return o.MonthlySnapshotRetentionMonths, true -} - -// HasMonthlySnapshotRetentionMonths returns a boolean if a field has been set. -func (o *BackupSchedule) HasMonthlySnapshotRetentionMonths() bool { - if o != nil && !IsNil(o.MonthlySnapshotRetentionMonths) { - return true - } - - return false -} - -// SetMonthlySnapshotRetentionMonths gets a reference to the given int64 and assigns it to the MonthlySnapshotRetentionMonths field. -func (o *BackupSchedule) SetMonthlySnapshotRetentionMonths(v *int64) { - o.MonthlySnapshotRetentionMonths = v -} - -// GetPointInTimeWindowHours returns the PointInTimeWindowHours field value if set, zero value otherwise. -func (o *BackupSchedule) GetPointInTimeWindowHours() *int64 { - if o == nil || IsNil(o.PointInTimeWindowHours) { - var ret *int64 - return ret - } - return o.PointInTimeWindowHours -} - -// GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BackupSchedule) GetPointInTimeWindowHoursOk() (*int64, bool) { - if o == nil || IsNil(o.PointInTimeWindowHours) { - return nil, false - } - return o.PointInTimeWindowHours, true -} - -// HasPointInTimeWindowHours returns a boolean if a field has been set. -func (o *BackupSchedule) HasPointInTimeWindowHours() bool { - if o != nil && !IsNil(o.PointInTimeWindowHours) { - return true - } - - return false -} - -// SetPointInTimeWindowHours gets a reference to the given int64 and assigns it to the PointInTimeWindowHours field. -func (o *BackupSchedule) SetPointInTimeWindowHours(v *int64) { - o.PointInTimeWindowHours = v -} - -// GetSnapshotRetentionDays returns the SnapshotRetentionDays field value if set, zero value otherwise. -func (o *BackupSchedule) GetSnapshotRetentionDays() *int64 { - if o == nil || IsNil(o.SnapshotRetentionDays) { - var ret *int64 - return ret - } - return o.SnapshotRetentionDays -} - -// GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BackupSchedule) GetSnapshotRetentionDaysOk() (*int64, bool) { - if o == nil || IsNil(o.SnapshotRetentionDays) { - return nil, false - } - return o.SnapshotRetentionDays, true -} - -// HasSnapshotRetentionDays returns a boolean if a field has been set. -func (o *BackupSchedule) HasSnapshotRetentionDays() bool { - if o != nil && !IsNil(o.SnapshotRetentionDays) { - return true - } - - return false -} - -// SetSnapshotRetentionDays gets a reference to the given int64 and assigns it to the SnapshotRetentionDays field. -func (o *BackupSchedule) SetSnapshotRetentionDays(v *int64) { - o.SnapshotRetentionDays = v -} - -// GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks field value if set, zero value otherwise. -func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeks() *int64 { - if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { - var ret *int64 - return ret - } - return o.WeeklySnapshotRetentionWeeks -} - -// GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeksOk() (*int64, bool) { - if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { - return nil, false - } - return o.WeeklySnapshotRetentionWeeks, true -} - -// HasWeeklySnapshotRetentionWeeks returns a boolean if a field has been set. -func (o *BackupSchedule) HasWeeklySnapshotRetentionWeeks() bool { - if o != nil && !IsNil(o.WeeklySnapshotRetentionWeeks) { - return true - } - - return false -} - -// SetWeeklySnapshotRetentionWeeks gets a reference to the given int64 and assigns it to the WeeklySnapshotRetentionWeeks field. -func (o *BackupSchedule) SetWeeklySnapshotRetentionWeeks(v *int64) { - o.WeeklySnapshotRetentionWeeks = v -} - -func (o BackupSchedule) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.BackupSchedule) { - toSerialize["backupSchedule"] = o.BackupSchedule - } - if !IsNil(o.DailySnapshotRetentionDays) { - toSerialize["dailySnapshotRetentionDays"] = o.DailySnapshotRetentionDays - } - if !IsNil(o.MonthlySnapshotRetentionMonths) { - toSerialize["monthlySnapshotRetentionMonths"] = o.MonthlySnapshotRetentionMonths - } - if !IsNil(o.PointInTimeWindowHours) { - toSerialize["pointInTimeWindowHours"] = o.PointInTimeWindowHours - } - if !IsNil(o.SnapshotRetentionDays) { - toSerialize["snapshotRetentionDays"] = o.SnapshotRetentionDays - } - if !IsNil(o.WeeklySnapshotRetentionWeeks) { - toSerialize["weeklySnapshotRetentionWeeks"] = o.WeeklySnapshotRetentionWeeks - } - return toSerialize, nil -} - -type NullableBackupSchedule struct { - value *BackupSchedule - isSet bool -} - -func (v NullableBackupSchedule) Get() *BackupSchedule { - return v.value -} - -func (v *NullableBackupSchedule) Set(val *BackupSchedule) { - v.value = val - v.isSet = true -} - -func (v NullableBackupSchedule) IsSet() bool { - return v.isSet -} - -func (v *NullableBackupSchedule) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableBackupSchedule(val *BackupSchedule) *NullableBackupSchedule { - return &NullableBackupSchedule{value: val, isSet: true} -} - -func (v NullableBackupSchedule) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableBackupSchedule) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_clone_instance_payload.go b/services/mongodbflex/model_clone_instance_payload.go index 4f6784f96..63f084b06 100644 --- a/services/mongodbflex/model_clone_instance_payload.go +++ b/services/mongodbflex/model_clone_instance_payload.go @@ -10,137 +10,9 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the CloneInstancePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CloneInstancePayload{} - // CloneInstancePayload struct for CloneInstancePayload type CloneInstancePayload struct { // REQUIRED InstanceId *string `json:"instanceId"` Timestamp *string `json:"timestamp,omitempty"` } - -type _CloneInstancePayload CloneInstancePayload - -// NewCloneInstancePayload instantiates a new CloneInstancePayload 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 NewCloneInstancePayload(instanceId *string) *CloneInstancePayload { - this := CloneInstancePayload{} - this.InstanceId = instanceId - return &this -} - -// NewCloneInstancePayloadWithDefaults instantiates a new CloneInstancePayload 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 NewCloneInstancePayloadWithDefaults() *CloneInstancePayload { - this := CloneInstancePayload{} - return &this -} - -// GetInstanceId returns the InstanceId field value -func (o *CloneInstancePayload) GetInstanceId() *string { - if o == nil { - var ret *string - return ret - } - - return o.InstanceId -} - -// GetInstanceIdOk returns a tuple with the InstanceId field value -// and a boolean to check if the value has been set. -func (o *CloneInstancePayload) GetInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.InstanceId, true -} - -// SetInstanceId sets field value -func (o *CloneInstancePayload) SetInstanceId(v *string) { - o.InstanceId = v -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *CloneInstancePayload) GetTimestamp() *string { - if o == nil || IsNil(o.Timestamp) { - var ret *string - return ret - } - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CloneInstancePayload) GetTimestampOk() (*string, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *CloneInstancePayload) HasTimestamp() bool { - if o != nil && !IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. -func (o *CloneInstancePayload) SetTimestamp(v *string) { - o.Timestamp = v -} - -func (o CloneInstancePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["instanceId"] = o.InstanceId - if !IsNil(o.Timestamp) { - toSerialize["timestamp"] = o.Timestamp - } - return toSerialize, nil -} - -type NullableCloneInstancePayload struct { - value *CloneInstancePayload - isSet bool -} - -func (v NullableCloneInstancePayload) Get() *CloneInstancePayload { - return v.value -} - -func (v *NullableCloneInstancePayload) Set(val *CloneInstancePayload) { - v.value = val - v.isSet = true -} - -func (v NullableCloneInstancePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCloneInstancePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCloneInstancePayload(val *CloneInstancePayload) *NullableCloneInstancePayload { - return &NullableCloneInstancePayload{value: val, isSet: true} -} - -func (v NullableCloneInstancePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCloneInstancePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_clone_instance_response.go b/services/mongodbflex/model_clone_instance_response.go index d80fcf112..a9230884f 100644 --- a/services/mongodbflex/model_clone_instance_response.go +++ b/services/mongodbflex/model_clone_instance_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the CloneInstanceResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CloneInstanceResponse{} - // CloneInstanceResponse struct for CloneInstanceResponse type CloneInstanceResponse struct { InstanceId *string `json:"instanceId,omitempty"` } - -// NewCloneInstanceResponse instantiates a new CloneInstanceResponse 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 NewCloneInstanceResponse() *CloneInstanceResponse { - this := CloneInstanceResponse{} - return &this -} - -// NewCloneInstanceResponseWithDefaults instantiates a new CloneInstanceResponse 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 NewCloneInstanceResponseWithDefaults() *CloneInstanceResponse { - this := CloneInstanceResponse{} - return &this -} - -// GetInstanceId returns the InstanceId field value if set, zero value otherwise. -func (o *CloneInstanceResponse) GetInstanceId() *string { - if o == nil || IsNil(o.InstanceId) { - var ret *string - return ret - } - return o.InstanceId -} - -// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CloneInstanceResponse) GetInstanceIdOk() (*string, bool) { - if o == nil || IsNil(o.InstanceId) { - return nil, false - } - return o.InstanceId, true -} - -// HasInstanceId returns a boolean if a field has been set. -func (o *CloneInstanceResponse) HasInstanceId() bool { - if o != nil && !IsNil(o.InstanceId) { - return true - } - - return false -} - -// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. -func (o *CloneInstanceResponse) SetInstanceId(v *string) { - o.InstanceId = v -} - -func (o CloneInstanceResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.InstanceId) { - toSerialize["instanceId"] = o.InstanceId - } - return toSerialize, nil -} - -type NullableCloneInstanceResponse struct { - value *CloneInstanceResponse - isSet bool -} - -func (v NullableCloneInstanceResponse) Get() *CloneInstanceResponse { - return v.value -} - -func (v *NullableCloneInstanceResponse) Set(val *CloneInstanceResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCloneInstanceResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCloneInstanceResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCloneInstanceResponse(val *CloneInstanceResponse) *NullableCloneInstanceResponse { - return &NullableCloneInstanceResponse{value: val, isSet: true} -} - -func (v NullableCloneInstanceResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCloneInstanceResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_create_instance_payload.go b/services/mongodbflex/model_create_instance_payload.go index 552cc0073..69e94e6cd 100644 --- a/services/mongodbflex/model_create_instance_payload.go +++ b/services/mongodbflex/model_create_instance_payload.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateInstancePayload{} - // CreateInstancePayload struct for CreateInstancePayload type CreateInstancePayload struct { // REQUIRED @@ -38,306 +31,3 @@ type CreateInstancePayload struct { // REQUIRED Version *string `json:"version"` } - -type _CreateInstancePayload CreateInstancePayload - -// NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(acl *ACL, backupSchedule *string, flavorId *string, name *string, options *map[string]string, replicas *int64, storage *Storage, version *string) *CreateInstancePayload { - this := CreateInstancePayload{} - this.Acl = acl - this.BackupSchedule = backupSchedule - this.FlavorId = flavorId - this.Name = name - this.Options = options - this.Replicas = replicas - this.Storage = storage - this.Version = version - return &this -} - -// NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { - this := CreateInstancePayload{} - return &this -} - -// GetAcl returns the Acl field value -func (o *CreateInstancePayload) GetAcl() *ACL { - if o == nil { - var ret *ACL - return ret - } - - return o.Acl -} - -// GetAclOk returns a tuple with the Acl field value -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetAclOk() (*ACL, bool) { - if o == nil { - return nil, false - } - return o.Acl, true -} - -// SetAcl sets field value -func (o *CreateInstancePayload) SetAcl(v *ACL) { - o.Acl = v -} - -// GetBackupSchedule returns the BackupSchedule field value -func (o *CreateInstancePayload) GetBackupSchedule() *string { - if o == nil { - var ret *string - return ret - } - - return o.BackupSchedule -} - -// GetBackupScheduleOk returns a tuple with the BackupSchedule field value -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetBackupScheduleOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.BackupSchedule, true -} - -// SetBackupSchedule sets field value -func (o *CreateInstancePayload) SetBackupSchedule(v *string) { - o.BackupSchedule = v -} - -// GetFlavorId returns the FlavorId field value -func (o *CreateInstancePayload) GetFlavorId() *string { - if o == nil { - var ret *string - return ret - } - - return o.FlavorId -} - -// GetFlavorIdOk returns a tuple with the FlavorId field value -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetFlavorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FlavorId, true -} - -// SetFlavorId sets field value -func (o *CreateInstancePayload) SetFlavorId(v *string) { - o.FlavorId = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *CreateInstancePayload) GetLabels() *map[string]string { - if o == nil || IsNil(o.Labels) { - var ret *map[string]string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetLabelsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *CreateInstancePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -func (o *CreateInstancePayload) SetLabels(v *map[string]string) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *CreateInstancePayload) GetName() *string { - if o == nil { - var ret *string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true -} - -// SetName sets field value -func (o *CreateInstancePayload) SetName(v *string) { - o.Name = v -} - -// GetOptions returns the Options field value -func (o *CreateInstancePayload) GetOptions() *map[string]string { - if o == nil { - var ret *map[string]string - return ret - } - - return o.Options -} - -// GetOptionsOk returns a tuple with the Options field value -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetOptionsOk() (*map[string]string, bool) { - if o == nil { - return nil, false - } - return o.Options, true -} - -// SetOptions sets field value -func (o *CreateInstancePayload) SetOptions(v *map[string]string) { - o.Options = v -} - -// GetReplicas returns the Replicas field value -func (o *CreateInstancePayload) GetReplicas() *int64 { - if o == nil { - var ret *int64 - return ret - } - - return o.Replicas -} - -// GetReplicasOk returns a tuple with the Replicas field value -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetReplicasOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Replicas, true -} - -// SetReplicas sets field value -func (o *CreateInstancePayload) SetReplicas(v *int64) { - o.Replicas = v -} - -// GetStorage returns the Storage field value -func (o *CreateInstancePayload) GetStorage() *Storage { - if o == nil { - var ret *Storage - return ret - } - - return o.Storage -} - -// GetStorageOk returns a tuple with the Storage field value -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetStorageOk() (*Storage, bool) { - if o == nil { - return nil, false - } - return o.Storage, true -} - -// SetStorage sets field value -func (o *CreateInstancePayload) SetStorage(v *Storage) { - o.Storage = v -} - -// GetVersion returns the Version field value -func (o *CreateInstancePayload) GetVersion() *string { - if o == nil { - var ret *string - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *CreateInstancePayload) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Version, true -} - -// SetVersion sets field value -func (o *CreateInstancePayload) SetVersion(v *string) { - o.Version = v -} - -func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["acl"] = o.Acl - toSerialize["backupSchedule"] = o.BackupSchedule - toSerialize["flavorId"] = o.FlavorId - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - toSerialize["options"] = o.Options - toSerialize["replicas"] = o.Replicas - toSerialize["storage"] = o.Storage - toSerialize["version"] = o.Version - return toSerialize, nil -} - -type NullableCreateInstancePayload struct { - value *CreateInstancePayload - isSet bool -} - -func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { - return v.value -} - -func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateInstancePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateInstancePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { - return &NullableCreateInstancePayload{value: val, isSet: true} -} - -func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_create_instance_response.go b/services/mongodbflex/model_create_instance_response.go index ac44dbdf9..285e88ba6 100644 --- a/services/mongodbflex/model_create_instance_response.go +++ b/services/mongodbflex/model_create_instance_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateInstanceResponse{} - // CreateInstanceResponse struct for CreateInstanceResponse type CreateInstanceResponse struct { Id *string `json:"id,omitempty"` } - -// NewCreateInstanceResponse instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponse() *CreateInstanceResponse { - this := CreateInstanceResponse{} - return &this -} - -// NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { - this := CreateInstanceResponse{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *CreateInstanceResponse) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateInstanceResponse) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *CreateInstanceResponse) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *CreateInstanceResponse) SetId(v *string) { - o.Id = v -} - -func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableCreateInstanceResponse struct { - value *CreateInstanceResponse - isSet bool -} - -func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse { - return v.value -} - -func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCreateInstanceResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateInstanceResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse { - return &NullableCreateInstanceResponse{value: val, isSet: true} -} - -func (v NullableCreateInstanceResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_create_user_payload.go b/services/mongodbflex/model_create_user_payload.go index 6a69edd15..57d73a8ee 100644 --- a/services/mongodbflex/model_create_user_payload.go +++ b/services/mongodbflex/model_create_user_payload.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the CreateUserPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateUserPayload{} - // CreateUserPayload struct for CreateUserPayload type CreateUserPayload struct { // REQUIRED @@ -25,150 +18,3 @@ type CreateUserPayload struct { Roles *[]string `json:"roles"` Username *string `json:"username,omitempty"` } - -type _CreateUserPayload CreateUserPayload - -// NewCreateUserPayload instantiates a new CreateUserPayload 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 NewCreateUserPayload(database *string, roles *[]string) *CreateUserPayload { - this := CreateUserPayload{} - this.Database = database - this.Roles = roles - return &this -} - -// NewCreateUserPayloadWithDefaults instantiates a new CreateUserPayload 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 NewCreateUserPayloadWithDefaults() *CreateUserPayload { - this := CreateUserPayload{} - return &this -} - -// GetDatabase returns the Database field value -func (o *CreateUserPayload) GetDatabase() *string { - if o == nil { - var ret *string - return ret - } - - return o.Database -} - -// GetDatabaseOk returns a tuple with the Database field value -// and a boolean to check if the value has been set. -func (o *CreateUserPayload) GetDatabaseOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Database, true -} - -// SetDatabase sets field value -func (o *CreateUserPayload) SetDatabase(v *string) { - o.Database = v -} - -// GetRoles returns the Roles field value -func (o *CreateUserPayload) GetRoles() *[]string { - if o == nil { - var ret *[]string - return ret - } - - return o.Roles -} - -// GetRolesOk returns a tuple with the Roles field value -// and a boolean to check if the value has been set. -func (o *CreateUserPayload) GetRolesOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return o.Roles, true -} - -// SetRoles sets field value -func (o *CreateUserPayload) SetRoles(v *[]string) { - o.Roles = v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *CreateUserPayload) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateUserPayload) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *CreateUserPayload) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *CreateUserPayload) SetUsername(v *string) { - o.Username = v -} - -func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["database"] = o.Database - toSerialize["roles"] = o.Roles - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - return toSerialize, nil -} - -type NullableCreateUserPayload struct { - value *CreateUserPayload - isSet bool -} - -func (v NullableCreateUserPayload) Get() *CreateUserPayload { - return v.value -} - -func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateUserPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateUserPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { - return &NullableCreateUserPayload{value: val, isSet: true} -} - -func (v NullableCreateUserPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateUserPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_create_user_response.go b/services/mongodbflex/model_create_user_response.go index 741482aa9..33b1b1344 100644 --- a/services/mongodbflex/model_create_user_response.go +++ b/services/mongodbflex/model_create_user_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateUserResponse{} - // CreateUserResponse struct for CreateUserResponse type CreateUserResponse struct { Item *User `json:"item,omitempty"` } - -// NewCreateUserResponse instantiates a new CreateUserResponse 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 NewCreateUserResponse() *CreateUserResponse { - this := CreateUserResponse{} - return &this -} - -// NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse 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 NewCreateUserResponseWithDefaults() *CreateUserResponse { - this := CreateUserResponse{} - return &this -} - -// GetItem returns the Item field value if set, zero value otherwise. -func (o *CreateUserResponse) GetItem() *User { - if o == nil || IsNil(o.Item) { - var ret *User - return ret - } - return o.Item -} - -// GetItemOk returns a tuple with the Item field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateUserResponse) GetItemOk() (*User, bool) { - if o == nil || IsNil(o.Item) { - return nil, false - } - return o.Item, true -} - -// HasItem returns a boolean if a field has been set. -func (o *CreateUserResponse) HasItem() bool { - if o != nil && !IsNil(o.Item) { - return true - } - - return false -} - -// SetItem gets a reference to the given User and assigns it to the Item field. -func (o *CreateUserResponse) SetItem(v *User) { - o.Item = v -} - -func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Item) { - toSerialize["item"] = o.Item - } - return toSerialize, nil -} - -type NullableCreateUserResponse struct { - value *CreateUserResponse - isSet bool -} - -func (v NullableCreateUserResponse) Get() *CreateUserResponse { - return v.value -} - -func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCreateUserResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateUserResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse { - return &NullableCreateUserResponse{value: val, isSet: true} -} - -func (v NullableCreateUserResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateUserResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_data_point.go b/services/mongodbflex/model_data_point.go index 536464ba0..51ace5995 100644 --- a/services/mongodbflex/model_data_point.go +++ b/services/mongodbflex/model_data_point.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the DataPoint type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DataPoint{} - // DataPoint struct for DataPoint type DataPoint struct { Timestamp *string `json:"timestamp,omitempty"` Value *float64 `json:"value,omitempty"` } - -// NewDataPoint instantiates a new DataPoint 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 NewDataPoint() *DataPoint { - this := DataPoint{} - return &this -} - -// NewDataPointWithDefaults instantiates a new DataPoint 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 NewDataPointWithDefaults() *DataPoint { - this := DataPoint{} - return &this -} - -// GetTimestamp returns the Timestamp field value if set, zero value otherwise. -func (o *DataPoint) GetTimestamp() *string { - if o == nil || IsNil(o.Timestamp) { - var ret *string - return ret - } - return o.Timestamp -} - -// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DataPoint) GetTimestampOk() (*string, bool) { - if o == nil || IsNil(o.Timestamp) { - return nil, false - } - return o.Timestamp, true -} - -// HasTimestamp returns a boolean if a field has been set. -func (o *DataPoint) HasTimestamp() bool { - if o != nil && !IsNil(o.Timestamp) { - return true - } - - return false -} - -// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. -func (o *DataPoint) SetTimestamp(v *string) { - o.Timestamp = v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *DataPoint) GetValue() *float64 { - if o == nil || IsNil(o.Value) { - var ret *float64 - return ret - } - return o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DataPoint) GetValueOk() (*float64, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *DataPoint) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given float64 and assigns it to the Value field. -func (o *DataPoint) SetValue(v *float64) { - o.Value = v -} - -func (o DataPoint) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Timestamp) { - toSerialize["timestamp"] = o.Timestamp - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - return toSerialize, nil -} - -type NullableDataPoint struct { - value *DataPoint - isSet bool -} - -func (v NullableDataPoint) Get() *DataPoint { - return v.value -} - -func (v *NullableDataPoint) Set(val *DataPoint) { - v.value = val - v.isSet = true -} - -func (v NullableDataPoint) IsSet() bool { - return v.isSet -} - -func (v *NullableDataPoint) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDataPoint(val *DataPoint) *NullableDataPoint { - return &NullableDataPoint{value: val, isSet: true} -} - -func (v NullableDataPoint) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDataPoint) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_error.go b/services/mongodbflex/model_error.go index 525121388..a80570fbd 100644 --- a/services/mongodbflex/model_error.go +++ b/services/mongodbflex/model_error.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the Error type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Error{} - // Error struct for Error type Error struct { Code *int64 `json:"code,omitempty"` @@ -24,201 +17,3 @@ type Error struct { Message *string `json:"message,omitempty"` Type *string `json:"type,omitempty"` } - -// NewError instantiates a new Error 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 NewError() *Error { - this := Error{} - return &this -} - -// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error { - this := Error{} - return &this -} - -// GetCode returns the Code field value if set, zero value otherwise. -func (o *Error) GetCode() *int64 { - if o == nil || IsNil(o.Code) { - var ret *int64 - return ret - } - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Error) GetCodeOk() (*int64, bool) { - if o == nil || IsNil(o.Code) { - return nil, false - } - return o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *Error) HasCode() bool { - if o != nil && !IsNil(o.Code) { - return true - } - - return false -} - -// SetCode gets a reference to the given int64 and assigns it to the Code field. -func (o *Error) SetCode(v *int64) { - o.Code = v -} - -// GetFields returns the Fields field value if set, zero value otherwise. -func (o *Error) GetFields() *map[string][]string { - if o == nil || IsNil(o.Fields) { - var ret *map[string][]string - return ret - } - return o.Fields -} - -// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Error) GetFieldsOk() (*map[string][]string, bool) { - if o == nil || IsNil(o.Fields) { - return nil, false - } - return o.Fields, true -} - -// HasFields returns a boolean if a field has been set. -func (o *Error) HasFields() bool { - if o != nil && !IsNil(o.Fields) { - return true - } - - return false -} - -// SetFields gets a reference to the given map[string][]string and assigns it to the Fields field. -func (o *Error) SetFields(v *map[string][]string) { - o.Fields = v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *Error) GetMessage() *string { - if o == nil || IsNil(o.Message) { - var ret *string - return ret - } - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Error) GetMessageOk() (*string, bool) { - if o == nil || IsNil(o.Message) { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *Error) HasMessage() bool { - if o != nil && !IsNil(o.Message) { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *Error) SetMessage(v *string) { - o.Message = v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *Error) GetType() *string { - if o == nil || IsNil(o.Type) { - var ret *string - return ret - } - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Error) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *Error) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *Error) SetType(v *string) { - o.Type = v -} - -func (o Error) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Code) { - toSerialize["code"] = o.Code - } - if !IsNil(o.Fields) { - toSerialize["fields"] = o.Fields - } - if !IsNil(o.Message) { - toSerialize["message"] = o.Message - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - return toSerialize, nil -} - -type NullableError struct { - value *Error - isSet bool -} - -func (v NullableError) Get() *Error { - return v.value -} - -func (v *NullableError) Set(val *Error) { - v.value = val - v.isSet = true -} - -func (v NullableError) IsSet() bool { - return v.isSet -} - -func (v *NullableError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableError(val *Error) *NullableError { - return &NullableError{value: val, isSet: true} -} - -func (v NullableError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_flavor.go b/services/mongodbflex/model_flavor.go index ab91dadd9..7cbe4b312 100644 --- a/services/mongodbflex/model_flavor.go +++ b/services/mongodbflex/model_flavor.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the Flavor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Flavor{} - // Flavor struct for Flavor type Flavor struct { Cpu *int64 `json:"cpu,omitempty"` @@ -24,201 +17,3 @@ type Flavor struct { Id *string `json:"id,omitempty"` Memory *int64 `json:"memory,omitempty"` } - -// NewFlavor instantiates a new Flavor 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 NewFlavor() *Flavor { - this := Flavor{} - return &this -} - -// NewFlavorWithDefaults instantiates a new Flavor 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 NewFlavorWithDefaults() *Flavor { - this := Flavor{} - return &this -} - -// GetCpu returns the Cpu field value if set, zero value otherwise. -func (o *Flavor) GetCpu() *int64 { - if o == nil || IsNil(o.Cpu) { - var ret *int64 - return ret - } - return o.Cpu -} - -// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Flavor) GetCpuOk() (*int64, bool) { - if o == nil || IsNil(o.Cpu) { - return nil, false - } - return o.Cpu, true -} - -// HasCpu returns a boolean if a field has been set. -func (o *Flavor) HasCpu() bool { - if o != nil && !IsNil(o.Cpu) { - return true - } - - return false -} - -// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. -func (o *Flavor) SetCpu(v *int64) { - o.Cpu = v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *Flavor) 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 *Flavor) 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 *Flavor) 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 *Flavor) SetDescription(v *string) { - o.Description = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Flavor) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Flavor) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Flavor) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Flavor) SetId(v *string) { - o.Id = v -} - -// GetMemory returns the Memory field value if set, zero value otherwise. -func (o *Flavor) GetMemory() *int64 { - if o == nil || IsNil(o.Memory) { - var ret *int64 - return ret - } - return o.Memory -} - -// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Flavor) GetMemoryOk() (*int64, bool) { - if o == nil || IsNil(o.Memory) { - return nil, false - } - return o.Memory, true -} - -// HasMemory returns a boolean if a field has been set. -func (o *Flavor) HasMemory() bool { - if o != nil && !IsNil(o.Memory) { - return true - } - - return false -} - -// SetMemory gets a reference to the given int64 and assigns it to the Memory field. -func (o *Flavor) SetMemory(v *int64) { - o.Memory = v -} - -func (o Flavor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Cpu) { - toSerialize["cpu"] = o.Cpu - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Memory) { - toSerialize["memory"] = o.Memory - } - return toSerialize, nil -} - -type NullableFlavor struct { - value *Flavor - isSet bool -} - -func (v NullableFlavor) Get() *Flavor { - return v.value -} - -func (v *NullableFlavor) Set(val *Flavor) { - v.value = val - v.isSet = true -} - -func (v NullableFlavor) IsSet() bool { - return v.isSet -} - -func (v *NullableFlavor) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFlavor(val *Flavor) *NullableFlavor { - return &NullableFlavor{value: val, isSet: true} -} - -func (v NullableFlavor) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFlavor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_get_backup_response.go b/services/mongodbflex/model_get_backup_response.go index 98aa18088..c3d555db9 100644 --- a/services/mongodbflex/model_get_backup_response.go +++ b/services/mongodbflex/model_get_backup_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the GetBackupResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetBackupResponse{} - // GetBackupResponse struct for GetBackupResponse type GetBackupResponse struct { Item *Backup `json:"item,omitempty"` } - -// NewGetBackupResponse instantiates a new GetBackupResponse 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 NewGetBackupResponse() *GetBackupResponse { - this := GetBackupResponse{} - return &this -} - -// NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse 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 NewGetBackupResponseWithDefaults() *GetBackupResponse { - this := GetBackupResponse{} - return &this -} - -// GetItem returns the Item field value if set, zero value otherwise. -func (o *GetBackupResponse) GetItem() *Backup { - if o == nil || IsNil(o.Item) { - var ret *Backup - return ret - } - return o.Item -} - -// GetItemOk returns a tuple with the Item field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetBackupResponse) GetItemOk() (*Backup, bool) { - if o == nil || IsNil(o.Item) { - return nil, false - } - return o.Item, true -} - -// HasItem returns a boolean if a field has been set. -func (o *GetBackupResponse) HasItem() bool { - if o != nil && !IsNil(o.Item) { - return true - } - - return false -} - -// SetItem gets a reference to the given Backup and assigns it to the Item field. -func (o *GetBackupResponse) SetItem(v *Backup) { - o.Item = v -} - -func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Item) { - toSerialize["item"] = o.Item - } - return toSerialize, nil -} - -type NullableGetBackupResponse struct { - value *GetBackupResponse - isSet bool -} - -func (v NullableGetBackupResponse) Get() *GetBackupResponse { - return v.value -} - -func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetBackupResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetBackupResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse { - return &NullableGetBackupResponse{value: val, isSet: true} -} - -func (v NullableGetBackupResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetBackupResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_get_instance_response.go b/services/mongodbflex/model_get_instance_response.go index 98b8cb444..cde846cdb 100644 --- a/services/mongodbflex/model_get_instance_response.go +++ b/services/mongodbflex/model_get_instance_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the GetInstanceResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetInstanceResponse{} - // GetInstanceResponse struct for GetInstanceResponse type GetInstanceResponse struct { Item *Instance `json:"item,omitempty"` } - -// NewGetInstanceResponse instantiates a new GetInstanceResponse 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 NewGetInstanceResponse() *GetInstanceResponse { - this := GetInstanceResponse{} - return &this -} - -// NewGetInstanceResponseWithDefaults instantiates a new GetInstanceResponse 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 NewGetInstanceResponseWithDefaults() *GetInstanceResponse { - this := GetInstanceResponse{} - return &this -} - -// GetItem returns the Item field value if set, zero value otherwise. -func (o *GetInstanceResponse) GetItem() *Instance { - if o == nil || IsNil(o.Item) { - var ret *Instance - return ret - } - return o.Item -} - -// GetItemOk returns a tuple with the Item field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetInstanceResponse) GetItemOk() (*Instance, bool) { - if o == nil || IsNil(o.Item) { - return nil, false - } - return o.Item, true -} - -// HasItem returns a boolean if a field has been set. -func (o *GetInstanceResponse) HasItem() bool { - if o != nil && !IsNil(o.Item) { - return true - } - - return false -} - -// SetItem gets a reference to the given Instance and assigns it to the Item field. -func (o *GetInstanceResponse) SetItem(v *Instance) { - o.Item = v -} - -func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Item) { - toSerialize["item"] = o.Item - } - return toSerialize, nil -} - -type NullableGetInstanceResponse struct { - value *GetInstanceResponse - isSet bool -} - -func (v NullableGetInstanceResponse) Get() *GetInstanceResponse { - return v.value -} - -func (v *NullableGetInstanceResponse) Set(val *GetInstanceResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetInstanceResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetInstanceResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetInstanceResponse(val *GetInstanceResponse) *NullableGetInstanceResponse { - return &NullableGetInstanceResponse{value: val, isSet: true} -} - -func (v NullableGetInstanceResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetInstanceResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_get_user_response.go b/services/mongodbflex/model_get_user_response.go index e618f9853..6b70288fd 100644 --- a/services/mongodbflex/model_get_user_response.go +++ b/services/mongodbflex/model_get_user_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the GetUserResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GetUserResponse{} - // GetUserResponse struct for GetUserResponse type GetUserResponse struct { Item *InstanceResponseUser `json:"item,omitempty"` } - -// NewGetUserResponse instantiates a new GetUserResponse 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 NewGetUserResponse() *GetUserResponse { - this := GetUserResponse{} - return &this -} - -// NewGetUserResponseWithDefaults instantiates a new GetUserResponse 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 NewGetUserResponseWithDefaults() *GetUserResponse { - this := GetUserResponse{} - return &this -} - -// GetItem returns the Item field value if set, zero value otherwise. -func (o *GetUserResponse) GetItem() *InstanceResponseUser { - if o == nil || IsNil(o.Item) { - var ret *InstanceResponseUser - return ret - } - return o.Item -} - -// GetItemOk returns a tuple with the Item field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GetUserResponse) GetItemOk() (*InstanceResponseUser, bool) { - if o == nil || IsNil(o.Item) { - return nil, false - } - return o.Item, true -} - -// HasItem returns a boolean if a field has been set. -func (o *GetUserResponse) HasItem() bool { - if o != nil && !IsNil(o.Item) { - return true - } - - return false -} - -// SetItem gets a reference to the given InstanceResponseUser and assigns it to the Item field. -func (o *GetUserResponse) SetItem(v *InstanceResponseUser) { - o.Item = v -} - -func (o GetUserResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Item) { - toSerialize["item"] = o.Item - } - return toSerialize, nil -} - -type NullableGetUserResponse struct { - value *GetUserResponse - isSet bool -} - -func (v NullableGetUserResponse) Get() *GetUserResponse { - return v.value -} - -func (v *NullableGetUserResponse) Set(val *GetUserResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGetUserResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGetUserResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse { - return &NullableGetUserResponse{value: val, isSet: true} -} - -func (v NullableGetUserResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGetUserResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_handlers_infra_flavor.go b/services/mongodbflex/model_handlers_infra_flavor.go index 9a7240acd..7528c9c75 100644 --- a/services/mongodbflex/model_handlers_infra_flavor.go +++ b/services/mongodbflex/model_handlers_infra_flavor.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the HandlersInfraFlavor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HandlersInfraFlavor{} - // HandlersInfraFlavor struct for HandlersInfraFlavor type HandlersInfraFlavor struct { Categories *[]string `json:"categories,omitempty"` @@ -25,236 +18,3 @@ type HandlersInfraFlavor struct { Id *string `json:"id,omitempty"` Memory *int64 `json:"memory,omitempty"` } - -// NewHandlersInfraFlavor instantiates a new HandlersInfraFlavor 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 NewHandlersInfraFlavor() *HandlersInfraFlavor { - this := HandlersInfraFlavor{} - return &this -} - -// NewHandlersInfraFlavorWithDefaults instantiates a new HandlersInfraFlavor 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 NewHandlersInfraFlavorWithDefaults() *HandlersInfraFlavor { - this := HandlersInfraFlavor{} - return &this -} - -// GetCategories returns the Categories field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) GetCategories() *[]string { - if o == nil || IsNil(o.Categories) { - var ret *[]string - return ret - } - return o.Categories -} - -// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HandlersInfraFlavor) GetCategoriesOk() (*[]string, bool) { - if o == nil || IsNil(o.Categories) { - return nil, false - } - return o.Categories, true -} - -// HasCategories returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasCategories() bool { - if o != nil && !IsNil(o.Categories) { - return true - } - - return false -} - -// SetCategories gets a reference to the given []string and assigns it to the Categories field. -func (o *HandlersInfraFlavor) SetCategories(v *[]string) { - o.Categories = v -} - -// GetCpu returns the Cpu field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) GetCpu() *int64 { - if o == nil || IsNil(o.Cpu) { - var ret *int64 - return ret - } - return o.Cpu -} - -// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HandlersInfraFlavor) GetCpuOk() (*int64, bool) { - if o == nil || IsNil(o.Cpu) { - return nil, false - } - return o.Cpu, true -} - -// HasCpu returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasCpu() bool { - if o != nil && !IsNil(o.Cpu) { - return true - } - - return false -} - -// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. -func (o *HandlersInfraFlavor) SetCpu(v *int64) { - o.Cpu = v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) SetDescription(v *string) { - o.Description = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HandlersInfraFlavor) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *HandlersInfraFlavor) SetId(v *string) { - o.Id = v -} - -// GetMemory returns the Memory field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) GetMemory() *int64 { - if o == nil || IsNil(o.Memory) { - var ret *int64 - return ret - } - return o.Memory -} - -// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HandlersInfraFlavor) GetMemoryOk() (*int64, bool) { - if o == nil || IsNil(o.Memory) { - return nil, false - } - return o.Memory, true -} - -// HasMemory returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasMemory() bool { - if o != nil && !IsNil(o.Memory) { - return true - } - - return false -} - -// SetMemory gets a reference to the given int64 and assigns it to the Memory field. -func (o *HandlersInfraFlavor) SetMemory(v *int64) { - o.Memory = v -} - -func (o HandlersInfraFlavor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Categories) { - toSerialize["categories"] = o.Categories - } - if !IsNil(o.Cpu) { - toSerialize["cpu"] = o.Cpu - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Memory) { - toSerialize["memory"] = o.Memory - } - return toSerialize, nil -} - -type NullableHandlersInfraFlavor struct { - value *HandlersInfraFlavor - isSet bool -} - -func (v NullableHandlersInfraFlavor) Get() *HandlersInfraFlavor { - return v.value -} - -func (v *NullableHandlersInfraFlavor) Set(val *HandlersInfraFlavor) { - v.value = val - v.isSet = true -} - -func (v NullableHandlersInfraFlavor) IsSet() bool { - return v.isSet -} - -func (v *NullableHandlersInfraFlavor) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHandlersInfraFlavor(val *HandlersInfraFlavor) *NullableHandlersInfraFlavor { - return &NullableHandlersInfraFlavor{value: val, isSet: true} -} - -func (v NullableHandlersInfraFlavor) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHandlersInfraFlavor) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_handlers_infra_get_flavors_response.go b/services/mongodbflex/model_handlers_infra_get_flavors_response.go index aafa411bc..c56ff7518 100644 --- a/services/mongodbflex/model_handlers_infra_get_flavors_response.go +++ b/services/mongodbflex/model_handlers_infra_get_flavors_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the HandlersInfraGetFlavorsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HandlersInfraGetFlavorsResponse{} - // HandlersInfraGetFlavorsResponse struct for HandlersInfraGetFlavorsResponse type HandlersInfraGetFlavorsResponse struct { Flavors *[]HandlersInfraFlavor `json:"flavors,omitempty"` } - -// NewHandlersInfraGetFlavorsResponse instantiates a new HandlersInfraGetFlavorsResponse 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 NewHandlersInfraGetFlavorsResponse() *HandlersInfraGetFlavorsResponse { - this := HandlersInfraGetFlavorsResponse{} - return &this -} - -// NewHandlersInfraGetFlavorsResponseWithDefaults instantiates a new HandlersInfraGetFlavorsResponse 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 NewHandlersInfraGetFlavorsResponseWithDefaults() *HandlersInfraGetFlavorsResponse { - this := HandlersInfraGetFlavorsResponse{} - return &this -} - -// GetFlavors returns the Flavors field value if set, zero value otherwise. -func (o *HandlersInfraGetFlavorsResponse) GetFlavors() *[]HandlersInfraFlavor { - if o == nil || IsNil(o.Flavors) { - var ret *[]HandlersInfraFlavor - return ret - } - return o.Flavors -} - -// GetFlavorsOk returns a tuple with the Flavors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HandlersInfraGetFlavorsResponse) GetFlavorsOk() (*[]HandlersInfraFlavor, bool) { - if o == nil || IsNil(o.Flavors) { - return nil, false - } - return o.Flavors, true -} - -// HasFlavors returns a boolean if a field has been set. -func (o *HandlersInfraGetFlavorsResponse) HasFlavors() bool { - if o != nil && !IsNil(o.Flavors) { - return true - } - - return false -} - -// SetFlavors gets a reference to the given []HandlersInfraFlavor and assigns it to the Flavors field. -func (o *HandlersInfraGetFlavorsResponse) SetFlavors(v *[]HandlersInfraFlavor) { - o.Flavors = v -} - -func (o HandlersInfraGetFlavorsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Flavors) { - toSerialize["flavors"] = o.Flavors - } - return toSerialize, nil -} - -type NullableHandlersInfraGetFlavorsResponse struct { - value *HandlersInfraGetFlavorsResponse - isSet bool -} - -func (v NullableHandlersInfraGetFlavorsResponse) Get() *HandlersInfraGetFlavorsResponse { - return v.value -} - -func (v *NullableHandlersInfraGetFlavorsResponse) Set(val *HandlersInfraGetFlavorsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableHandlersInfraGetFlavorsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableHandlersInfraGetFlavorsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHandlersInfraGetFlavorsResponse(val *HandlersInfraGetFlavorsResponse) *NullableHandlersInfraGetFlavorsResponse { - return &NullableHandlersInfraGetFlavorsResponse{value: val, isSet: true} -} - -func (v NullableHandlersInfraGetFlavorsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHandlersInfraGetFlavorsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_handlers_instances_get_instance_response.go b/services/mongodbflex/model_handlers_instances_get_instance_response.go index de049b133..88fd64af3 100644 --- a/services/mongodbflex/model_handlers_instances_get_instance_response.go +++ b/services/mongodbflex/model_handlers_instances_get_instance_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the HandlersInstancesGetInstanceResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HandlersInstancesGetInstanceResponse{} - // HandlersInstancesGetInstanceResponse struct for HandlersInstancesGetInstanceResponse type HandlersInstancesGetInstanceResponse struct { Item *Instance `json:"item,omitempty"` } - -// NewHandlersInstancesGetInstanceResponse instantiates a new HandlersInstancesGetInstanceResponse 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 NewHandlersInstancesGetInstanceResponse() *HandlersInstancesGetInstanceResponse { - this := HandlersInstancesGetInstanceResponse{} - return &this -} - -// NewHandlersInstancesGetInstanceResponseWithDefaults instantiates a new HandlersInstancesGetInstanceResponse 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 NewHandlersInstancesGetInstanceResponseWithDefaults() *HandlersInstancesGetInstanceResponse { - this := HandlersInstancesGetInstanceResponse{} - return &this -} - -// GetItem returns the Item field value if set, zero value otherwise. -func (o *HandlersInstancesGetInstanceResponse) GetItem() *Instance { - if o == nil || IsNil(o.Item) { - var ret *Instance - return ret - } - return o.Item -} - -// GetItemOk returns a tuple with the Item field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HandlersInstancesGetInstanceResponse) GetItemOk() (*Instance, bool) { - if o == nil || IsNil(o.Item) { - return nil, false - } - return o.Item, true -} - -// HasItem returns a boolean if a field has been set. -func (o *HandlersInstancesGetInstanceResponse) HasItem() bool { - if o != nil && !IsNil(o.Item) { - return true - } - - return false -} - -// SetItem gets a reference to the given Instance and assigns it to the Item field. -func (o *HandlersInstancesGetInstanceResponse) SetItem(v *Instance) { - o.Item = v -} - -func (o HandlersInstancesGetInstanceResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Item) { - toSerialize["item"] = o.Item - } - return toSerialize, nil -} - -type NullableHandlersInstancesGetInstanceResponse struct { - value *HandlersInstancesGetInstanceResponse - isSet bool -} - -func (v NullableHandlersInstancesGetInstanceResponse) Get() *HandlersInstancesGetInstanceResponse { - return v.value -} - -func (v *NullableHandlersInstancesGetInstanceResponse) Set(val *HandlersInstancesGetInstanceResponse) { - v.value = val - v.isSet = true -} - -func (v NullableHandlersInstancesGetInstanceResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableHandlersInstancesGetInstanceResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHandlersInstancesGetInstanceResponse(val *HandlersInstancesGetInstanceResponse) *NullableHandlersInstancesGetInstanceResponse { - return &NullableHandlersInstancesGetInstanceResponse{value: val, isSet: true} -} - -func (v NullableHandlersInstancesGetInstanceResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHandlersInstancesGetInstanceResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_handlers_instances_slow_queries_response.go b/services/mongodbflex/model_handlers_instances_slow_queries_response.go new file mode 100644 index 000000000..b0aea7bcf --- /dev/null +++ b/services/mongodbflex/model_handlers_instances_slow_queries_response.go @@ -0,0 +1,17 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +// HandlersInstancesSlowQueriesResponse struct for HandlersInstancesSlowQueriesResponse +type HandlersInstancesSlowQueriesResponse struct { + // A list of documents with information about slow queries as detected by the Performance Advisor. + SlowQueries *[]SlowQuery `json:"slowQueries,omitempty"` +} diff --git a/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go b/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go new file mode 100644 index 000000000..13cf09310 --- /dev/null +++ b/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go @@ -0,0 +1,19 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +// HandlersInstancesSuggestedIndexesResponse struct for HandlersInstancesSuggestedIndexesResponse +type HandlersInstancesSuggestedIndexesResponse struct { + // Documents with information about the query shapes that are served by the suggested indexes. + Shapes *[]Shape `json:"shapes,omitempty"` + // Documents with information about the indexes suggested by the Performance Advisor. + SuggestedIndexes *[]SuggestedIndex `json:"suggestedIndexes,omitempty"` +} diff --git a/services/mongodbflex/model_host.go b/services/mongodbflex/model_host.go index 108bf3b24..3ed38737a 100644 --- a/services/mongodbflex/model_host.go +++ b/services/mongodbflex/model_host.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the Host type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Host{} - // Host struct for Host type Host struct { HostMetrics *[]HostMetric `json:"hostMetrics,omitempty"` Id *string `json:"id,omitempty"` } - -// NewHost instantiates a new Host 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 NewHost() *Host { - this := Host{} - return &this -} - -// NewHostWithDefaults instantiates a new Host 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 NewHostWithDefaults() *Host { - this := Host{} - return &this -} - -// GetHostMetrics returns the HostMetrics field value if set, zero value otherwise. -func (o *Host) GetHostMetrics() *[]HostMetric { - if o == nil || IsNil(o.HostMetrics) { - var ret *[]HostMetric - return ret - } - return o.HostMetrics -} - -// GetHostMetricsOk returns a tuple with the HostMetrics field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Host) GetHostMetricsOk() (*[]HostMetric, bool) { - if o == nil || IsNil(o.HostMetrics) { - return nil, false - } - return o.HostMetrics, true -} - -// HasHostMetrics returns a boolean if a field has been set. -func (o *Host) HasHostMetrics() bool { - if o != nil && !IsNil(o.HostMetrics) { - return true - } - - return false -} - -// SetHostMetrics gets a reference to the given []HostMetric and assigns it to the HostMetrics field. -func (o *Host) SetHostMetrics(v *[]HostMetric) { - o.HostMetrics = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Host) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Host) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Host) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Host) SetId(v *string) { - o.Id = v -} - -func (o Host) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.HostMetrics) { - toSerialize["hostMetrics"] = o.HostMetrics - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableHost struct { - value *Host - isSet bool -} - -func (v NullableHost) Get() *Host { - return v.value -} - -func (v *NullableHost) Set(val *Host) { - v.value = val - v.isSet = true -} - -func (v NullableHost) IsSet() bool { - return v.isSet -} - -func (v *NullableHost) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHost(val *Host) *NullableHost { - return &NullableHost{value: val, isSet: true} -} - -func (v NullableHost) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHost) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_host_metric.go b/services/mongodbflex/model_host_metric.go index ac5a8602c..7b893a263 100644 --- a/services/mongodbflex/model_host_metric.go +++ b/services/mongodbflex/model_host_metric.go @@ -10,179 +10,9 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the HostMetric type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HostMetric{} - // HostMetric struct for HostMetric type HostMetric struct { Datapoints *[]DataPoint `json:"datapoints,omitempty"` Name *string `json:"name,omitempty"` Units *string `json:"units,omitempty"` } - -// NewHostMetric instantiates a new HostMetric 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 NewHostMetric() *HostMetric { - this := HostMetric{} - return &this -} - -// NewHostMetricWithDefaults instantiates a new HostMetric 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 NewHostMetricWithDefaults() *HostMetric { - this := HostMetric{} - return &this -} - -// GetDatapoints returns the Datapoints field value if set, zero value otherwise. -func (o *HostMetric) GetDatapoints() *[]DataPoint { - if o == nil || IsNil(o.Datapoints) { - var ret *[]DataPoint - return ret - } - return o.Datapoints -} - -// GetDatapointsOk returns a tuple with the Datapoints field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HostMetric) GetDatapointsOk() (*[]DataPoint, bool) { - if o == nil || IsNil(o.Datapoints) { - return nil, false - } - return o.Datapoints, true -} - -// HasDatapoints returns a boolean if a field has been set. -func (o *HostMetric) HasDatapoints() bool { - if o != nil && !IsNil(o.Datapoints) { - return true - } - - return false -} - -// SetDatapoints gets a reference to the given []DataPoint and assigns it to the Datapoints field. -func (o *HostMetric) SetDatapoints(v *[]DataPoint) { - o.Datapoints = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *HostMetric) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HostMetric) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *HostMetric) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *HostMetric) SetName(v *string) { - o.Name = v -} - -// GetUnits returns the Units field value if set, zero value otherwise. -func (o *HostMetric) GetUnits() *string { - if o == nil || IsNil(o.Units) { - var ret *string - return ret - } - return o.Units -} - -// GetUnitsOk returns a tuple with the Units field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HostMetric) GetUnitsOk() (*string, bool) { - if o == nil || IsNil(o.Units) { - return nil, false - } - return o.Units, true -} - -// HasUnits returns a boolean if a field has been set. -func (o *HostMetric) HasUnits() bool { - if o != nil && !IsNil(o.Units) { - return true - } - - return false -} - -// SetUnits gets a reference to the given string and assigns it to the Units field. -func (o *HostMetric) SetUnits(v *string) { - o.Units = v -} - -func (o HostMetric) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Datapoints) { - toSerialize["datapoints"] = o.Datapoints - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Units) { - toSerialize["units"] = o.Units - } - return toSerialize, nil -} - -type NullableHostMetric struct { - value *HostMetric - isSet bool -} - -func (v NullableHostMetric) Get() *HostMetric { - return v.value -} - -func (v *NullableHostMetric) Set(val *HostMetric) { - v.value = val - v.isSet = true -} - -func (v NullableHostMetric) IsSet() bool { - return v.isSet -} - -func (v *NullableHostMetric) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHostMetric(val *HostMetric) *NullableHostMetric { - return &NullableHostMetric{value: val, isSet: true} -} - -func (v NullableHostMetric) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHostMetric) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_instance.go b/services/mongodbflex/model_instance.go index 395013e80..de2231ab9 100644 --- a/services/mongodbflex/model_instance.go +++ b/services/mongodbflex/model_instance.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the Instance type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Instance{} - // Instance struct for Instance type Instance struct { Acl *ACL `json:"acl,omitempty"` @@ -30,411 +23,3 @@ type Instance struct { Storage *Storage `json:"storage,omitempty"` Version *string `json:"version,omitempty"` } - -// NewInstance instantiates a new Instance 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 NewInstance() *Instance { - this := Instance{} - return &this -} - -// NewInstanceWithDefaults instantiates a new Instance 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 NewInstanceWithDefaults() *Instance { - this := Instance{} - return &this -} - -// GetAcl returns the Acl field value if set, zero value otherwise. -func (o *Instance) GetAcl() *ACL { - if o == nil || IsNil(o.Acl) { - var ret *ACL - return ret - } - return o.Acl -} - -// GetAclOk returns a tuple with the Acl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetAclOk() (*ACL, bool) { - if o == nil || IsNil(o.Acl) { - return nil, false - } - return o.Acl, true -} - -// HasAcl returns a boolean if a field has been set. -func (o *Instance) HasAcl() bool { - if o != nil && !IsNil(o.Acl) { - return true - } - - return false -} - -// SetAcl gets a reference to the given ACL and assigns it to the Acl field. -func (o *Instance) SetAcl(v *ACL) { - o.Acl = v -} - -// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. -func (o *Instance) GetBackupSchedule() *string { - if o == nil || IsNil(o.BackupSchedule) { - var ret *string - return ret - } - return o.BackupSchedule -} - -// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetBackupScheduleOk() (*string, bool) { - if o == nil || IsNil(o.BackupSchedule) { - return nil, false - } - return o.BackupSchedule, true -} - -// HasBackupSchedule returns a boolean if a field has been set. -func (o *Instance) HasBackupSchedule() bool { - if o != nil && !IsNil(o.BackupSchedule) { - return true - } - - return false -} - -// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. -func (o *Instance) SetBackupSchedule(v *string) { - o.BackupSchedule = v -} - -// GetFlavor returns the Flavor field value if set, zero value otherwise. -func (o *Instance) GetFlavor() *Flavor { - if o == nil || IsNil(o.Flavor) { - var ret *Flavor - return ret - } - return o.Flavor -} - -// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetFlavorOk() (*Flavor, bool) { - if o == nil || IsNil(o.Flavor) { - return nil, false - } - return o.Flavor, true -} - -// HasFlavor returns a boolean if a field has been set. -func (o *Instance) HasFlavor() bool { - if o != nil && !IsNil(o.Flavor) { - return true - } - - return false -} - -// SetFlavor gets a reference to the given Flavor and assigns it to the Flavor field. -func (o *Instance) SetFlavor(v *Flavor) { - o.Flavor = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *Instance) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *Instance) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *Instance) SetId(v *string) { - o.Id = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Instance) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Instance) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Instance) SetName(v *string) { - o.Name = v -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *Instance) GetOptions() *map[string]string { - if o == nil || IsNil(o.Options) { - var ret *map[string]string - return ret - } - return o.Options -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetOptionsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true -} - -// HasOptions returns a boolean if a field has been set. -func (o *Instance) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false -} - -// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. -func (o *Instance) SetOptions(v *map[string]string) { - o.Options = v -} - -// GetReplicas returns the Replicas field value if set, zero value otherwise. -func (o *Instance) GetReplicas() *int64 { - if o == nil || IsNil(o.Replicas) { - var ret *int64 - return ret - } - return o.Replicas -} - -// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetReplicasOk() (*int64, bool) { - if o == nil || IsNil(o.Replicas) { - return nil, false - } - return o.Replicas, true -} - -// HasReplicas returns a boolean if a field has been set. -func (o *Instance) HasReplicas() bool { - if o != nil && !IsNil(o.Replicas) { - return true - } - - return false -} - -// SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. -func (o *Instance) SetReplicas(v *int64) { - o.Replicas = v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *Instance) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *Instance) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *Instance) SetStatus(v *string) { - o.Status = v -} - -// GetStorage returns the Storage field value if set, zero value otherwise. -func (o *Instance) GetStorage() *Storage { - if o == nil || IsNil(o.Storage) { - var ret *Storage - return ret - } - return o.Storage -} - -// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetStorageOk() (*Storage, bool) { - if o == nil || IsNil(o.Storage) { - return nil, false - } - return o.Storage, true -} - -// HasStorage returns a boolean if a field has been set. -func (o *Instance) HasStorage() bool { - if o != nil && !IsNil(o.Storage) { - return true - } - - return false -} - -// SetStorage gets a reference to the given Storage and assigns it to the Storage field. -func (o *Instance) SetStorage(v *Storage) { - o.Storage = v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *Instance) GetVersion() *string { - if o == nil || IsNil(o.Version) { - var ret *string - return ret - } - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *Instance) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *Instance) SetVersion(v *string) { - o.Version = v -} - -func (o Instance) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Acl) { - toSerialize["acl"] = o.Acl - } - if !IsNil(o.BackupSchedule) { - toSerialize["backupSchedule"] = o.BackupSchedule - } - if !IsNil(o.Flavor) { - toSerialize["flavor"] = o.Flavor - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options - } - if !IsNil(o.Replicas) { - toSerialize["replicas"] = o.Replicas - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.Storage) { - toSerialize["storage"] = o.Storage - } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - return toSerialize, nil -} - -type NullableInstance struct { - value *Instance - isSet bool -} - -func (v NullableInstance) Get() *Instance { - return v.value -} - -func (v *NullableInstance) Set(val *Instance) { - v.value = val - v.isSet = true -} - -func (v NullableInstance) IsSet() bool { - return v.isSet -} - -func (v *NullableInstance) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInstance(val *Instance) *NullableInstance { - return &NullableInstance{value: val, isSet: true} -} - -func (v NullableInstance) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInstance) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_instance_list_instance.go b/services/mongodbflex/model_instance_list_instance.go index 38ae2ea14..b3a49fdeb 100644 --- a/services/mongodbflex/model_instance_list_instance.go +++ b/services/mongodbflex/model_instance_list_instance.go @@ -10,179 +10,9 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the InstanceListInstance type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceListInstance{} - // InstanceListInstance struct for InstanceListInstance type InstanceListInstance struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Status *string `json:"status,omitempty"` } - -// NewInstanceListInstance instantiates a new InstanceListInstance 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 NewInstanceListInstance() *InstanceListInstance { - this := InstanceListInstance{} - return &this -} - -// NewInstanceListInstanceWithDefaults instantiates a new InstanceListInstance 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 NewInstanceListInstanceWithDefaults() *InstanceListInstance { - this := InstanceListInstance{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *InstanceListInstance) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceListInstance) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *InstanceListInstance) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *InstanceListInstance) SetId(v *string) { - o.Id = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *InstanceListInstance) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceListInstance) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *InstanceListInstance) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *InstanceListInstance) SetName(v *string) { - o.Name = v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *InstanceListInstance) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceListInstance) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *InstanceListInstance) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *InstanceListInstance) SetStatus(v *string) { - o.Status = v -} - -func (o InstanceListInstance) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableInstanceListInstance struct { - value *InstanceListInstance - isSet bool -} - -func (v NullableInstanceListInstance) Get() *InstanceListInstance { - return v.value -} - -func (v *NullableInstanceListInstance) Set(val *InstanceListInstance) { - v.value = val - v.isSet = true -} - -func (v NullableInstanceListInstance) IsSet() bool { - return v.isSet -} - -func (v *NullableInstanceListInstance) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInstanceListInstance(val *InstanceListInstance) *NullableInstanceListInstance { - return &NullableInstanceListInstance{value: val, isSet: true} -} - -func (v NullableInstanceListInstance) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInstanceListInstance) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_instance_response_user.go b/services/mongodbflex/model_instance_response_user.go index b29de9978..f06e52617 100644 --- a/services/mongodbflex/model_instance_response_user.go +++ b/services/mongodbflex/model_instance_response_user.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the InstanceResponseUser type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InstanceResponseUser{} - // InstanceResponseUser struct for InstanceResponseUser type InstanceResponseUser struct { Database *string `json:"database,omitempty"` @@ -26,271 +19,3 @@ type InstanceResponseUser struct { Roles *[]string `json:"roles,omitempty"` Username *string `json:"username,omitempty"` } - -// NewInstanceResponseUser instantiates a new InstanceResponseUser 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 NewInstanceResponseUser() *InstanceResponseUser { - this := InstanceResponseUser{} - return &this -} - -// NewInstanceResponseUserWithDefaults instantiates a new InstanceResponseUser 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 NewInstanceResponseUserWithDefaults() *InstanceResponseUser { - this := InstanceResponseUser{} - return &this -} - -// GetDatabase returns the Database field value if set, zero value otherwise. -func (o *InstanceResponseUser) GetDatabase() *string { - if o == nil || IsNil(o.Database) { - var ret *string - return ret - } - return o.Database -} - -// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceResponseUser) GetDatabaseOk() (*string, bool) { - if o == nil || IsNil(o.Database) { - return nil, false - } - return o.Database, true -} - -// HasDatabase returns a boolean if a field has been set. -func (o *InstanceResponseUser) HasDatabase() bool { - if o != nil && !IsNil(o.Database) { - return true - } - - return false -} - -// SetDatabase gets a reference to the given string and assigns it to the Database field. -func (o *InstanceResponseUser) SetDatabase(v *string) { - o.Database = v -} - -// GetHost returns the Host field value if set, zero value otherwise. -func (o *InstanceResponseUser) GetHost() *string { - if o == nil || IsNil(o.Host) { - var ret *string - return ret - } - return o.Host -} - -// GetHostOk returns a tuple with the Host field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceResponseUser) GetHostOk() (*string, bool) { - if o == nil || IsNil(o.Host) { - return nil, false - } - return o.Host, true -} - -// HasHost returns a boolean if a field has been set. -func (o *InstanceResponseUser) HasHost() bool { - if o != nil && !IsNil(o.Host) { - return true - } - - return false -} - -// SetHost gets a reference to the given string and assigns it to the Host field. -func (o *InstanceResponseUser) SetHost(v *string) { - o.Host = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *InstanceResponseUser) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceResponseUser) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *InstanceResponseUser) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *InstanceResponseUser) SetId(v *string) { - o.Id = v -} - -// GetPort returns the Port field value if set, zero value otherwise. -func (o *InstanceResponseUser) GetPort() *int64 { - if o == nil || IsNil(o.Port) { - var ret *int64 - return ret - } - return o.Port -} - -// GetPortOk returns a tuple with the Port field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceResponseUser) GetPortOk() (*int64, bool) { - if o == nil || IsNil(o.Port) { - return nil, false - } - return o.Port, true -} - -// HasPort returns a boolean if a field has been set. -func (o *InstanceResponseUser) HasPort() bool { - if o != nil && !IsNil(o.Port) { - return true - } - - return false -} - -// SetPort gets a reference to the given int64 and assigns it to the Port field. -func (o *InstanceResponseUser) SetPort(v *int64) { - o.Port = v -} - -// GetRoles returns the Roles field value if set, zero value otherwise. -func (o *InstanceResponseUser) GetRoles() *[]string { - if o == nil || IsNil(o.Roles) { - var ret *[]string - return ret - } - return o.Roles -} - -// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceResponseUser) GetRolesOk() (*[]string, bool) { - if o == nil || IsNil(o.Roles) { - return nil, false - } - return o.Roles, true -} - -// HasRoles returns a boolean if a field has been set. -func (o *InstanceResponseUser) HasRoles() bool { - if o != nil && !IsNil(o.Roles) { - return true - } - - return false -} - -// SetRoles gets a reference to the given []string and assigns it to the Roles field. -func (o *InstanceResponseUser) SetRoles(v *[]string) { - o.Roles = v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *InstanceResponseUser) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InstanceResponseUser) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *InstanceResponseUser) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *InstanceResponseUser) SetUsername(v *string) { - o.Username = v -} - -func (o InstanceResponseUser) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Database) { - toSerialize["database"] = o.Database - } - if !IsNil(o.Host) { - toSerialize["host"] = o.Host - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Port) { - toSerialize["port"] = o.Port - } - if !IsNil(o.Roles) { - toSerialize["roles"] = o.Roles - } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - return toSerialize, nil -} - -type NullableInstanceResponseUser struct { - value *InstanceResponseUser - isSet bool -} - -func (v NullableInstanceResponseUser) Get() *InstanceResponseUser { - return v.value -} - -func (v *NullableInstanceResponseUser) Set(val *InstanceResponseUser) { - v.value = val - v.isSet = true -} - -func (v NullableInstanceResponseUser) IsSet() bool { - return v.isSet -} - -func (v *NullableInstanceResponseUser) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInstanceResponseUser(val *InstanceResponseUser) *NullableInstanceResponseUser { - return &NullableInstanceResponseUser{value: val, isSet: true} -} - -func (v NullableInstanceResponseUser) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInstanceResponseUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_backups_response.go b/services/mongodbflex/model_list_backups_response.go index e53dd33a9..3836a458c 100644 --- a/services/mongodbflex/model_list_backups_response.go +++ b/services/mongodbflex/model_list_backups_response.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListBackupsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListBackupsResponse{} - // ListBackupsResponse struct for ListBackupsResponse type ListBackupsResponse struct { Count *int64 `json:"count,omitempty"` Items *[]Backup `json:"items,omitempty"` } - -// NewListBackupsResponse instantiates a new ListBackupsResponse 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 NewListBackupsResponse() *ListBackupsResponse { - this := ListBackupsResponse{} - return &this -} - -// NewListBackupsResponseWithDefaults instantiates a new ListBackupsResponse 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 NewListBackupsResponseWithDefaults() *ListBackupsResponse { - this := ListBackupsResponse{} - return &this -} - -// GetCount returns the Count field value if set, zero value otherwise. -func (o *ListBackupsResponse) GetCount() *int64 { - if o == nil || IsNil(o.Count) { - var ret *int64 - return ret - } - return o.Count -} - -// GetCountOk returns a tuple with the Count field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListBackupsResponse) GetCountOk() (*int64, bool) { - if o == nil || IsNil(o.Count) { - return nil, false - } - return o.Count, true -} - -// HasCount returns a boolean if a field has been set. -func (o *ListBackupsResponse) HasCount() bool { - if o != nil && !IsNil(o.Count) { - return true - } - - return false -} - -// SetCount gets a reference to the given int64 and assigns it to the Count field. -func (o *ListBackupsResponse) SetCount(v *int64) { - o.Count = v -} - -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ListBackupsResponse) GetItems() *[]Backup { - if o == nil || IsNil(o.Items) { - var ret *[]Backup - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListBackupsResponse) GetItemsOk() (*[]Backup, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ListBackupsResponse) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []Backup and assigns it to the Items field. -func (o *ListBackupsResponse) SetItems(v *[]Backup) { - o.Items = v -} - -func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Count) { - toSerialize["count"] = o.Count - } - if !IsNil(o.Items) { - toSerialize["items"] = o.Items - } - return toSerialize, nil -} - -type NullableListBackupsResponse struct { - value *ListBackupsResponse - isSet bool -} - -func (v NullableListBackupsResponse) Get() *ListBackupsResponse { - return v.value -} - -func (v *NullableListBackupsResponse) Set(val *ListBackupsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListBackupsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListBackupsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListBackupsResponse(val *ListBackupsResponse) *NullableListBackupsResponse { - return &NullableListBackupsResponse{value: val, isSet: true} -} - -func (v NullableListBackupsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListBackupsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_flavors_response.go b/services/mongodbflex/model_list_flavors_response.go index 3ee76b4cc..53519f98e 100644 --- a/services/mongodbflex/model_list_flavors_response.go +++ b/services/mongodbflex/model_list_flavors_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListFlavorsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListFlavorsResponse{} - // ListFlavorsResponse struct for ListFlavorsResponse type ListFlavorsResponse struct { Flavors *[]HandlersInfraFlavor `json:"flavors,omitempty"` } - -// NewListFlavorsResponse instantiates a new ListFlavorsResponse 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 NewListFlavorsResponse() *ListFlavorsResponse { - this := ListFlavorsResponse{} - return &this -} - -// NewListFlavorsResponseWithDefaults instantiates a new ListFlavorsResponse 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 NewListFlavorsResponseWithDefaults() *ListFlavorsResponse { - this := ListFlavorsResponse{} - return &this -} - -// GetFlavors returns the Flavors field value if set, zero value otherwise. -func (o *ListFlavorsResponse) GetFlavors() *[]HandlersInfraFlavor { - if o == nil || IsNil(o.Flavors) { - var ret *[]HandlersInfraFlavor - return ret - } - return o.Flavors -} - -// GetFlavorsOk returns a tuple with the Flavors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListFlavorsResponse) GetFlavorsOk() (*[]HandlersInfraFlavor, bool) { - if o == nil || IsNil(o.Flavors) { - return nil, false - } - return o.Flavors, true -} - -// HasFlavors returns a boolean if a field has been set. -func (o *ListFlavorsResponse) HasFlavors() bool { - if o != nil && !IsNil(o.Flavors) { - return true - } - - return false -} - -// SetFlavors gets a reference to the given []HandlersInfraFlavor and assigns it to the Flavors field. -func (o *ListFlavorsResponse) SetFlavors(v *[]HandlersInfraFlavor) { - o.Flavors = v -} - -func (o ListFlavorsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Flavors) { - toSerialize["flavors"] = o.Flavors - } - return toSerialize, nil -} - -type NullableListFlavorsResponse struct { - value *ListFlavorsResponse - isSet bool -} - -func (v NullableListFlavorsResponse) Get() *ListFlavorsResponse { - return v.value -} - -func (v *NullableListFlavorsResponse) Set(val *ListFlavorsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListFlavorsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListFlavorsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListFlavorsResponse(val *ListFlavorsResponse) *NullableListFlavorsResponse { - return &NullableListFlavorsResponse{value: val, isSet: true} -} - -func (v NullableListFlavorsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListFlavorsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_instances_response.go b/services/mongodbflex/model_list_instances_response.go index 7effc027b..d09c2f4ab 100644 --- a/services/mongodbflex/model_list_instances_response.go +++ b/services/mongodbflex/model_list_instances_response.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListInstancesResponse{} - // ListInstancesResponse struct for ListInstancesResponse type ListInstancesResponse struct { Count *int64 `json:"count,omitempty"` Items *[]InstanceListInstance `json:"items,omitempty"` } - -// NewListInstancesResponse instantiates a new ListInstancesResponse 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 NewListInstancesResponse() *ListInstancesResponse { - this := ListInstancesResponse{} - return &this -} - -// NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse 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 NewListInstancesResponseWithDefaults() *ListInstancesResponse { - this := ListInstancesResponse{} - return &this -} - -// GetCount returns the Count field value if set, zero value otherwise. -func (o *ListInstancesResponse) GetCount() *int64 { - if o == nil || IsNil(o.Count) { - var ret *int64 - return ret - } - return o.Count -} - -// GetCountOk returns a tuple with the Count field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListInstancesResponse) GetCountOk() (*int64, bool) { - if o == nil || IsNil(o.Count) { - return nil, false - } - return o.Count, true -} - -// HasCount returns a boolean if a field has been set. -func (o *ListInstancesResponse) HasCount() bool { - if o != nil && !IsNil(o.Count) { - return true - } - - return false -} - -// SetCount gets a reference to the given int64 and assigns it to the Count field. -func (o *ListInstancesResponse) SetCount(v *int64) { - o.Count = v -} - -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ListInstancesResponse) GetItems() *[]InstanceListInstance { - if o == nil || IsNil(o.Items) { - var ret *[]InstanceListInstance - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListInstancesResponse) GetItemsOk() (*[]InstanceListInstance, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ListInstancesResponse) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []InstanceListInstance and assigns it to the Items field. -func (o *ListInstancesResponse) SetItems(v *[]InstanceListInstance) { - o.Items = v -} - -func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Count) { - toSerialize["count"] = o.Count - } - if !IsNil(o.Items) { - toSerialize["items"] = o.Items - } - return toSerialize, nil -} - -type NullableListInstancesResponse struct { - value *ListInstancesResponse - isSet bool -} - -func (v NullableListInstancesResponse) Get() *ListInstancesResponse { - return v.value -} - -func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListInstancesResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListInstancesResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { - return &NullableListInstancesResponse{value: val, isSet: true} -} - -func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListInstancesResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_metrics_response.go b/services/mongodbflex/model_list_metrics_response.go index c13024581..e59777f1d 100644 --- a/services/mongodbflex/model_list_metrics_response.go +++ b/services/mongodbflex/model_list_metrics_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListMetricsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListMetricsResponse{} - // ListMetricsResponse struct for ListMetricsResponse type ListMetricsResponse struct { Hosts *[]Host `json:"hosts,omitempty"` } - -// NewListMetricsResponse instantiates a new ListMetricsResponse 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 NewListMetricsResponse() *ListMetricsResponse { - this := ListMetricsResponse{} - return &this -} - -// NewListMetricsResponseWithDefaults instantiates a new ListMetricsResponse 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 NewListMetricsResponseWithDefaults() *ListMetricsResponse { - this := ListMetricsResponse{} - return &this -} - -// GetHosts returns the Hosts field value if set, zero value otherwise. -func (o *ListMetricsResponse) GetHosts() *[]Host { - if o == nil || IsNil(o.Hosts) { - var ret *[]Host - return ret - } - return o.Hosts -} - -// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListMetricsResponse) GetHostsOk() (*[]Host, bool) { - if o == nil || IsNil(o.Hosts) { - return nil, false - } - return o.Hosts, true -} - -// HasHosts returns a boolean if a field has been set. -func (o *ListMetricsResponse) HasHosts() bool { - if o != nil && !IsNil(o.Hosts) { - return true - } - - return false -} - -// SetHosts gets a reference to the given []Host and assigns it to the Hosts field. -func (o *ListMetricsResponse) SetHosts(v *[]Host) { - o.Hosts = v -} - -func (o ListMetricsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Hosts) { - toSerialize["hosts"] = o.Hosts - } - return toSerialize, nil -} - -type NullableListMetricsResponse struct { - value *ListMetricsResponse - isSet bool -} - -func (v NullableListMetricsResponse) Get() *ListMetricsResponse { - return v.value -} - -func (v *NullableListMetricsResponse) Set(val *ListMetricsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListMetricsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListMetricsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListMetricsResponse(val *ListMetricsResponse) *NullableListMetricsResponse { - return &NullableListMetricsResponse{value: val, isSet: true} -} - -func (v NullableListMetricsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListMetricsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_restore_jobs_response.go b/services/mongodbflex/model_list_restore_jobs_response.go index 5e6d44db5..404558ecc 100644 --- a/services/mongodbflex/model_list_restore_jobs_response.go +++ b/services/mongodbflex/model_list_restore_jobs_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListRestoreJobsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListRestoreJobsResponse{} - // ListRestoreJobsResponse struct for ListRestoreJobsResponse type ListRestoreJobsResponse struct { Items *[]RestoreInstanceStatus `json:"items,omitempty"` } - -// NewListRestoreJobsResponse instantiates a new ListRestoreJobsResponse 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 NewListRestoreJobsResponse() *ListRestoreJobsResponse { - this := ListRestoreJobsResponse{} - return &this -} - -// NewListRestoreJobsResponseWithDefaults instantiates a new ListRestoreJobsResponse 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 NewListRestoreJobsResponseWithDefaults() *ListRestoreJobsResponse { - this := ListRestoreJobsResponse{} - return &this -} - -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ListRestoreJobsResponse) GetItems() *[]RestoreInstanceStatus { - if o == nil || IsNil(o.Items) { - var ret *[]RestoreInstanceStatus - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListRestoreJobsResponse) GetItemsOk() (*[]RestoreInstanceStatus, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ListRestoreJobsResponse) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []RestoreInstanceStatus and assigns it to the Items field. -func (o *ListRestoreJobsResponse) SetItems(v *[]RestoreInstanceStatus) { - o.Items = v -} - -func (o ListRestoreJobsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Items) { - toSerialize["items"] = o.Items - } - return toSerialize, nil -} - -type NullableListRestoreJobsResponse struct { - value *ListRestoreJobsResponse - isSet bool -} - -func (v NullableListRestoreJobsResponse) Get() *ListRestoreJobsResponse { - return v.value -} - -func (v *NullableListRestoreJobsResponse) Set(val *ListRestoreJobsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListRestoreJobsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListRestoreJobsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListRestoreJobsResponse(val *ListRestoreJobsResponse) *NullableListRestoreJobsResponse { - return &NullableListRestoreJobsResponse{value: val, isSet: true} -} - -func (v NullableListRestoreJobsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListRestoreJobsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_storages_response.go b/services/mongodbflex/model_list_storages_response.go index 58920acfa..fe6e2380f 100644 --- a/services/mongodbflex/model_list_storages_response.go +++ b/services/mongodbflex/model_list_storages_response.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListStoragesResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListStoragesResponse{} - // ListStoragesResponse struct for ListStoragesResponse type ListStoragesResponse struct { StorageClasses *[]string `json:"storageClasses,omitempty"` StorageRange *StorageRange `json:"storageRange,omitempty"` } - -// NewListStoragesResponse instantiates a new ListStoragesResponse 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 NewListStoragesResponse() *ListStoragesResponse { - this := ListStoragesResponse{} - return &this -} - -// NewListStoragesResponseWithDefaults instantiates a new ListStoragesResponse 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 NewListStoragesResponseWithDefaults() *ListStoragesResponse { - this := ListStoragesResponse{} - return &this -} - -// GetStorageClasses returns the StorageClasses field value if set, zero value otherwise. -func (o *ListStoragesResponse) GetStorageClasses() *[]string { - if o == nil || IsNil(o.StorageClasses) { - var ret *[]string - return ret - } - return o.StorageClasses -} - -// GetStorageClassesOk returns a tuple with the StorageClasses field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListStoragesResponse) GetStorageClassesOk() (*[]string, bool) { - if o == nil || IsNil(o.StorageClasses) { - return nil, false - } - return o.StorageClasses, true -} - -// HasStorageClasses returns a boolean if a field has been set. -func (o *ListStoragesResponse) HasStorageClasses() bool { - if o != nil && !IsNil(o.StorageClasses) { - return true - } - - return false -} - -// SetStorageClasses gets a reference to the given []string and assigns it to the StorageClasses field. -func (o *ListStoragesResponse) SetStorageClasses(v *[]string) { - o.StorageClasses = v -} - -// GetStorageRange returns the StorageRange field value if set, zero value otherwise. -func (o *ListStoragesResponse) GetStorageRange() *StorageRange { - if o == nil || IsNil(o.StorageRange) { - var ret *StorageRange - return ret - } - return o.StorageRange -} - -// GetStorageRangeOk returns a tuple with the StorageRange field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListStoragesResponse) GetStorageRangeOk() (*StorageRange, bool) { - if o == nil || IsNil(o.StorageRange) { - return nil, false - } - return o.StorageRange, true -} - -// HasStorageRange returns a boolean if a field has been set. -func (o *ListStoragesResponse) HasStorageRange() bool { - if o != nil && !IsNil(o.StorageRange) { - return true - } - - return false -} - -// SetStorageRange gets a reference to the given StorageRange and assigns it to the StorageRange field. -func (o *ListStoragesResponse) SetStorageRange(v *StorageRange) { - o.StorageRange = v -} - -func (o ListStoragesResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.StorageClasses) { - toSerialize["storageClasses"] = o.StorageClasses - } - if !IsNil(o.StorageRange) { - toSerialize["storageRange"] = o.StorageRange - } - return toSerialize, nil -} - -type NullableListStoragesResponse struct { - value *ListStoragesResponse - isSet bool -} - -func (v NullableListStoragesResponse) Get() *ListStoragesResponse { - return v.value -} - -func (v *NullableListStoragesResponse) Set(val *ListStoragesResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListStoragesResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListStoragesResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListStoragesResponse(val *ListStoragesResponse) *NullableListStoragesResponse { - return &NullableListStoragesResponse{value: val, isSet: true} -} - -func (v NullableListStoragesResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListStoragesResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_user.go b/services/mongodbflex/model_list_user.go index bbbc06b4e..ea7904461 100644 --- a/services/mongodbflex/model_list_user.go +++ b/services/mongodbflex/model_list_user.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListUser type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListUser{} - // ListUser struct for ListUser type ListUser struct { Id *string `json:"id,omitempty"` Username *string `json:"username,omitempty"` } - -// NewListUser instantiates a new ListUser 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 NewListUser() *ListUser { - this := ListUser{} - return &this -} - -// NewListUserWithDefaults instantiates a new ListUser 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 NewListUserWithDefaults() *ListUser { - this := ListUser{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ListUser) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListUser) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ListUser) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *ListUser) SetId(v *string) { - o.Id = v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *ListUser) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListUser) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *ListUser) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *ListUser) SetUsername(v *string) { - o.Username = v -} - -func (o ListUser) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - return toSerialize, nil -} - -type NullableListUser struct { - value *ListUser - isSet bool -} - -func (v NullableListUser) Get() *ListUser { - return v.value -} - -func (v *NullableListUser) Set(val *ListUser) { - v.value = val - v.isSet = true -} - -func (v NullableListUser) IsSet() bool { - return v.isSet -} - -func (v *NullableListUser) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListUser(val *ListUser) *NullableListUser { - return &NullableListUser{value: val, isSet: true} -} - -func (v NullableListUser) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_users_response.go b/services/mongodbflex/model_list_users_response.go index e38c9432a..2dc63e37a 100644 --- a/services/mongodbflex/model_list_users_response.go +++ b/services/mongodbflex/model_list_users_response.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListUsersResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListUsersResponse{} - // ListUsersResponse struct for ListUsersResponse type ListUsersResponse struct { Count *int64 `json:"count,omitempty"` Items *[]ListUser `json:"items,omitempty"` } - -// NewListUsersResponse instantiates a new ListUsersResponse 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 NewListUsersResponse() *ListUsersResponse { - this := ListUsersResponse{} - return &this -} - -// NewListUsersResponseWithDefaults instantiates a new ListUsersResponse 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 NewListUsersResponseWithDefaults() *ListUsersResponse { - this := ListUsersResponse{} - return &this -} - -// GetCount returns the Count field value if set, zero value otherwise. -func (o *ListUsersResponse) GetCount() *int64 { - if o == nil || IsNil(o.Count) { - var ret *int64 - return ret - } - return o.Count -} - -// GetCountOk returns a tuple with the Count field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListUsersResponse) GetCountOk() (*int64, bool) { - if o == nil || IsNil(o.Count) { - return nil, false - } - return o.Count, true -} - -// HasCount returns a boolean if a field has been set. -func (o *ListUsersResponse) HasCount() bool { - if o != nil && !IsNil(o.Count) { - return true - } - - return false -} - -// SetCount gets a reference to the given int64 and assigns it to the Count field. -func (o *ListUsersResponse) SetCount(v *int64) { - o.Count = v -} - -// GetItems returns the Items field value if set, zero value otherwise. -func (o *ListUsersResponse) GetItems() *[]ListUser { - if o == nil || IsNil(o.Items) { - var ret *[]ListUser - return ret - } - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListUsersResponse) GetItemsOk() (*[]ListUser, bool) { - if o == nil || IsNil(o.Items) { - return nil, false - } - return o.Items, true -} - -// HasItems returns a boolean if a field has been set. -func (o *ListUsersResponse) HasItems() bool { - if o != nil && !IsNil(o.Items) { - return true - } - - return false -} - -// SetItems gets a reference to the given []ListUser and assigns it to the Items field. -func (o *ListUsersResponse) SetItems(v *[]ListUser) { - o.Items = v -} - -func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Count) { - toSerialize["count"] = o.Count - } - if !IsNil(o.Items) { - toSerialize["items"] = o.Items - } - return toSerialize, nil -} - -type NullableListUsersResponse struct { - value *ListUsersResponse - isSet bool -} - -func (v NullableListUsersResponse) Get() *ListUsersResponse { - return v.value -} - -func (v *NullableListUsersResponse) Set(val *ListUsersResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListUsersResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListUsersResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListUsersResponse(val *ListUsersResponse) *NullableListUsersResponse { - return &NullableListUsersResponse{value: val, isSet: true} -} - -func (v NullableListUsersResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListUsersResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_list_versions_response.go b/services/mongodbflex/model_list_versions_response.go index 9245e3ebe..6dd4e3859 100644 --- a/services/mongodbflex/model_list_versions_response.go +++ b/services/mongodbflex/model_list_versions_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the ListVersionsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListVersionsResponse{} - // ListVersionsResponse struct for ListVersionsResponse type ListVersionsResponse struct { Versions *[]string `json:"versions,omitempty"` } - -// NewListVersionsResponse instantiates a new ListVersionsResponse 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 NewListVersionsResponse() *ListVersionsResponse { - this := ListVersionsResponse{} - return &this -} - -// NewListVersionsResponseWithDefaults instantiates a new ListVersionsResponse 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 NewListVersionsResponseWithDefaults() *ListVersionsResponse { - this := ListVersionsResponse{} - return &this -} - -// GetVersions returns the Versions field value if set, zero value otherwise. -func (o *ListVersionsResponse) GetVersions() *[]string { - if o == nil || IsNil(o.Versions) { - var ret *[]string - return ret - } - return o.Versions -} - -// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ListVersionsResponse) GetVersionsOk() (*[]string, bool) { - if o == nil || IsNil(o.Versions) { - return nil, false - } - return o.Versions, true -} - -// HasVersions returns a boolean if a field has been set. -func (o *ListVersionsResponse) HasVersions() bool { - if o != nil && !IsNil(o.Versions) { - return true - } - - return false -} - -// SetVersions gets a reference to the given []string and assigns it to the Versions field. -func (o *ListVersionsResponse) SetVersions(v *[]string) { - o.Versions = v -} - -func (o ListVersionsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Versions) { - toSerialize["versions"] = o.Versions - } - return toSerialize, nil -} - -type NullableListVersionsResponse struct { - value *ListVersionsResponse - isSet bool -} - -func (v NullableListVersionsResponse) Get() *ListVersionsResponse { - return v.value -} - -func (v *NullableListVersionsResponse) Set(val *ListVersionsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListVersionsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListVersionsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListVersionsResponse(val *ListVersionsResponse) *NullableListVersionsResponse { - return &NullableListVersionsResponse{value: val, isSet: true} -} - -func (v NullableListVersionsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListVersionsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_mongodbatlas_operation.go b/services/mongodbflex/model_mongodbatlas_operation.go new file mode 100644 index 000000000..f8351f93f --- /dev/null +++ b/services/mongodbflex/model_mongodbatlas_operation.go @@ -0,0 +1,20 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +// MongodbatlasOperation struct for MongodbatlasOperation +type MongodbatlasOperation struct { + // Documents containing the search criteria used by the query. + Predicates *[]map[string]interface{} `json:"predicates,omitempty"` + // Raw log line produced by the query. + Raw *string `json:"raw,omitempty"` + Stats *MongodbatlasOperationStats `json:"stats,omitempty"` +} diff --git a/services/mongodbflex/model_mongodbatlas_operation_stats.go b/services/mongodbflex/model_mongodbatlas_operation_stats.go new file mode 100644 index 000000000..7602241fd --- /dev/null +++ b/services/mongodbflex/model_mongodbatlas_operation_stats.go @@ -0,0 +1,23 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +// MongodbatlasOperationStats Query statistics. +type MongodbatlasOperationStats struct { + // Duration in milliseconds of the query. + Ms *float64 `json:"ms,omitempty"` + // Number of results returned by the query. + NReturned *int64 `json:"nReturned,omitempty"` + // Number of documents read by the query. + NScanned *int64 `json:"nScanned,omitempty"` + // Query timestamp, in seconds since epoch. + Ts *int64 `json:"ts,omitempty"` +} diff --git a/services/mongodbflex/model_mongodbatlas_stats.go b/services/mongodbflex/model_mongodbatlas_stats.go new file mode 100644 index 000000000..43bcb42c7 --- /dev/null +++ b/services/mongodbflex/model_mongodbatlas_stats.go @@ -0,0 +1,23 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +// MongodbatlasStats struct for MongodbatlasStats +type MongodbatlasStats struct { + // Duration in milliseconds of the query. + Ms *float64 `json:"ms,omitempty"` + // Number of results returned by the query. + NReturned *int64 `json:"nReturned,omitempty"` + // Number of documents read by the query. + NScanned *int64 `json:"nScanned,omitempty"` + // Query timestamp, in seconds since epoch. + Ts *int64 `json:"ts,omitempty"` +} diff --git a/services/mongodbflex/model_partial_update_instance_payload.go b/services/mongodbflex/model_partial_update_instance_payload.go index c1f0f2b28..1662acb0b 100644 --- a/services/mongodbflex/model_partial_update_instance_payload.go +++ b/services/mongodbflex/model_partial_update_instance_payload.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the PartialUpdateInstancePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PartialUpdateInstancePayload{} - // PartialUpdateInstancePayload struct for PartialUpdateInstancePayload type PartialUpdateInstancePayload struct { Acl *ACL `json:"acl,omitempty"` @@ -30,376 +23,3 @@ type PartialUpdateInstancePayload struct { Storage *Storage `json:"storage,omitempty"` Version *string `json:"version,omitempty"` } - -// NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { - this := PartialUpdateInstancePayload{} - return &this -} - -// NewPartialUpdateInstancePayloadWithDefaults instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload { - this := PartialUpdateInstancePayload{} - return &this -} - -// GetAcl returns the Acl field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetAcl() *ACL { - if o == nil || IsNil(o.Acl) { - var ret *ACL - return ret - } - return o.Acl -} - -// GetAclOk returns a tuple with the Acl field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetAclOk() (*ACL, bool) { - if o == nil || IsNil(o.Acl) { - return nil, false - } - return o.Acl, true -} - -// HasAcl returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasAcl() bool { - if o != nil && !IsNil(o.Acl) { - return true - } - - return false -} - -// SetAcl gets a reference to the given ACL and assigns it to the Acl field. -func (o *PartialUpdateInstancePayload) SetAcl(v *ACL) { - o.Acl = v -} - -// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetBackupSchedule() *string { - if o == nil || IsNil(o.BackupSchedule) { - var ret *string - return ret - } - return o.BackupSchedule -} - -// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { - if o == nil || IsNil(o.BackupSchedule) { - return nil, false - } - return o.BackupSchedule, true -} - -// HasBackupSchedule returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasBackupSchedule() bool { - if o != nil && !IsNil(o.BackupSchedule) { - return true - } - - return false -} - -// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. -func (o *PartialUpdateInstancePayload) SetBackupSchedule(v *string) { - o.BackupSchedule = v -} - -// GetFlavorId returns the FlavorId field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetFlavorId() *string { - if o == nil || IsNil(o.FlavorId) { - var ret *string - return ret - } - return o.FlavorId -} - -// GetFlavorIdOk returns a tuple with the FlavorId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetFlavorIdOk() (*string, bool) { - if o == nil || IsNil(o.FlavorId) { - return nil, false - } - return o.FlavorId, true -} - -// HasFlavorId returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasFlavorId() bool { - if o != nil && !IsNil(o.FlavorId) { - return true - } - - return false -} - -// SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. -func (o *PartialUpdateInstancePayload) SetFlavorId(v *string) { - o.FlavorId = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetLabels() *map[string]string { - if o == nil || IsNil(o.Labels) { - var ret *map[string]string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetLabelsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -func (o *PartialUpdateInstancePayload) SetLabels(v *map[string]string) { - o.Labels = v -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetName() *string { - if o == nil || IsNil(o.Name) { - var ret *string - return ret - } - return o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *PartialUpdateInstancePayload) SetName(v *string) { - o.Name = v -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetOptions() *map[string]string { - if o == nil || IsNil(o.Options) { - var ret *map[string]string - return ret - } - return o.Options -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true -} - -// HasOptions returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false -} - -// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. -func (o *PartialUpdateInstancePayload) SetOptions(v *map[string]string) { - o.Options = v -} - -// GetReplicas returns the Replicas field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetReplicas() *int64 { - if o == nil || IsNil(o.Replicas) { - var ret *int64 - return ret - } - return o.Replicas -} - -// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetReplicasOk() (*int64, bool) { - if o == nil || IsNil(o.Replicas) { - return nil, false - } - return o.Replicas, true -} - -// HasReplicas returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasReplicas() bool { - if o != nil && !IsNil(o.Replicas) { - return true - } - - return false -} - -// SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. -func (o *PartialUpdateInstancePayload) SetReplicas(v *int64) { - o.Replicas = v -} - -// GetStorage returns the Storage field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetStorage() *Storage { - if o == nil || IsNil(o.Storage) { - var ret *Storage - return ret - } - return o.Storage -} - -// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetStorageOk() (*Storage, bool) { - if o == nil || IsNil(o.Storage) { - return nil, false - } - return o.Storage, true -} - -// HasStorage returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasStorage() bool { - if o != nil && !IsNil(o.Storage) { - return true - } - - return false -} - -// SetStorage gets a reference to the given Storage and assigns it to the Storage field. -func (o *PartialUpdateInstancePayload) SetStorage(v *Storage) { - o.Storage = v -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *PartialUpdateInstancePayload) GetVersion() *string { - if o == nil || IsNil(o.Version) { - var ret *string - return ret - } - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateInstancePayload) GetVersionOk() (*string, bool) { - if o == nil || IsNil(o.Version) { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *PartialUpdateInstancePayload) HasVersion() bool { - if o != nil && !IsNil(o.Version) { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *PartialUpdateInstancePayload) SetVersion(v *string) { - o.Version = v -} - -func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Acl) { - toSerialize["acl"] = o.Acl - } - if !IsNil(o.BackupSchedule) { - toSerialize["backupSchedule"] = o.BackupSchedule - } - if !IsNil(o.FlavorId) { - toSerialize["flavorId"] = o.FlavorId - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Options) { - toSerialize["options"] = o.Options - } - if !IsNil(o.Replicas) { - toSerialize["replicas"] = o.Replicas - } - if !IsNil(o.Storage) { - toSerialize["storage"] = o.Storage - } - if !IsNil(o.Version) { - toSerialize["version"] = o.Version - } - return toSerialize, nil -} - -type NullablePartialUpdateInstancePayload struct { - value *PartialUpdateInstancePayload - isSet bool -} - -func (v NullablePartialUpdateInstancePayload) Get() *PartialUpdateInstancePayload { - return v.value -} - -func (v *NullablePartialUpdateInstancePayload) Set(val *PartialUpdateInstancePayload) { - v.value = val - v.isSet = true -} - -func (v NullablePartialUpdateInstancePayload) IsSet() bool { - return v.isSet -} - -func (v *NullablePartialUpdateInstancePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePartialUpdateInstancePayload(val *PartialUpdateInstancePayload) *NullablePartialUpdateInstancePayload { - return &NullablePartialUpdateInstancePayload{value: val, isSet: true} -} - -func (v NullablePartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePartialUpdateInstancePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_partial_update_user_payload.go b/services/mongodbflex/model_partial_update_user_payload.go index bf28aa96b..9b01df37d 100644 --- a/services/mongodbflex/model_partial_update_user_payload.go +++ b/services/mongodbflex/model_partial_update_user_payload.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the PartialUpdateUserPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PartialUpdateUserPayload{} - // PartialUpdateUserPayload struct for PartialUpdateUserPayload type PartialUpdateUserPayload struct { Database *string `json:"database,omitempty"` Roles *[]string `json:"roles,omitempty"` } - -// NewPartialUpdateUserPayload instantiates a new PartialUpdateUserPayload 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 NewPartialUpdateUserPayload() *PartialUpdateUserPayload { - this := PartialUpdateUserPayload{} - return &this -} - -// NewPartialUpdateUserPayloadWithDefaults instantiates a new PartialUpdateUserPayload 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 NewPartialUpdateUserPayloadWithDefaults() *PartialUpdateUserPayload { - this := PartialUpdateUserPayload{} - return &this -} - -// GetDatabase returns the Database field value if set, zero value otherwise. -func (o *PartialUpdateUserPayload) GetDatabase() *string { - if o == nil || IsNil(o.Database) { - var ret *string - return ret - } - return o.Database -} - -// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateUserPayload) GetDatabaseOk() (*string, bool) { - if o == nil || IsNil(o.Database) { - return nil, false - } - return o.Database, true -} - -// HasDatabase returns a boolean if a field has been set. -func (o *PartialUpdateUserPayload) HasDatabase() bool { - if o != nil && !IsNil(o.Database) { - return true - } - - return false -} - -// SetDatabase gets a reference to the given string and assigns it to the Database field. -func (o *PartialUpdateUserPayload) SetDatabase(v *string) { - o.Database = v -} - -// GetRoles returns the Roles field value if set, zero value otherwise. -func (o *PartialUpdateUserPayload) GetRoles() *[]string { - if o == nil || IsNil(o.Roles) { - var ret *[]string - return ret - } - return o.Roles -} - -// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PartialUpdateUserPayload) GetRolesOk() (*[]string, bool) { - if o == nil || IsNil(o.Roles) { - return nil, false - } - return o.Roles, true -} - -// HasRoles returns a boolean if a field has been set. -func (o *PartialUpdateUserPayload) HasRoles() bool { - if o != nil && !IsNil(o.Roles) { - return true - } - - return false -} - -// SetRoles gets a reference to the given []string and assigns it to the Roles field. -func (o *PartialUpdateUserPayload) SetRoles(v *[]string) { - o.Roles = v -} - -func (o PartialUpdateUserPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Database) { - toSerialize["database"] = o.Database - } - if !IsNil(o.Roles) { - toSerialize["roles"] = o.Roles - } - return toSerialize, nil -} - -type NullablePartialUpdateUserPayload struct { - value *PartialUpdateUserPayload - isSet bool -} - -func (v NullablePartialUpdateUserPayload) Get() *PartialUpdateUserPayload { - return v.value -} - -func (v *NullablePartialUpdateUserPayload) Set(val *PartialUpdateUserPayload) { - v.value = val - v.isSet = true -} - -func (v NullablePartialUpdateUserPayload) IsSet() bool { - return v.isSet -} - -func (v *NullablePartialUpdateUserPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePartialUpdateUserPayload(val *PartialUpdateUserPayload) *NullablePartialUpdateUserPayload { - return &NullablePartialUpdateUserPayload{value: val, isSet: true} -} - -func (v NullablePartialUpdateUserPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePartialUpdateUserPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_restore_instance_payload.go b/services/mongodbflex/model_restore_instance_payload.go index 89310cb13..3e473c128 100644 --- a/services/mongodbflex/model_restore_instance_payload.go +++ b/services/mongodbflex/model_restore_instance_payload.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the RestoreInstancePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RestoreInstancePayload{} - // RestoreInstancePayload struct for RestoreInstancePayload type RestoreInstancePayload struct { // REQUIRED @@ -24,115 +17,3 @@ type RestoreInstancePayload struct { // REQUIRED InstanceId *string `json:"instanceId"` } - -type _RestoreInstancePayload RestoreInstancePayload - -// NewRestoreInstancePayload instantiates a new RestoreInstancePayload 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 NewRestoreInstancePayload(backupId *string, instanceId *string) *RestoreInstancePayload { - this := RestoreInstancePayload{} - this.BackupId = backupId - this.InstanceId = instanceId - return &this -} - -// NewRestoreInstancePayloadWithDefaults instantiates a new RestoreInstancePayload 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 NewRestoreInstancePayloadWithDefaults() *RestoreInstancePayload { - this := RestoreInstancePayload{} - return &this -} - -// GetBackupId returns the BackupId field value -func (o *RestoreInstancePayload) GetBackupId() *string { - if o == nil { - var ret *string - return ret - } - - return o.BackupId -} - -// GetBackupIdOk returns a tuple with the BackupId field value -// and a boolean to check if the value has been set. -func (o *RestoreInstancePayload) GetBackupIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.BackupId, true -} - -// SetBackupId sets field value -func (o *RestoreInstancePayload) SetBackupId(v *string) { - o.BackupId = v -} - -// GetInstanceId returns the InstanceId field value -func (o *RestoreInstancePayload) GetInstanceId() *string { - if o == nil { - var ret *string - return ret - } - - return o.InstanceId -} - -// GetInstanceIdOk returns a tuple with the InstanceId field value -// and a boolean to check if the value has been set. -func (o *RestoreInstancePayload) GetInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.InstanceId, true -} - -// SetInstanceId sets field value -func (o *RestoreInstancePayload) SetInstanceId(v *string) { - o.InstanceId = v -} - -func (o RestoreInstancePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["backupId"] = o.BackupId - toSerialize["instanceId"] = o.InstanceId - return toSerialize, nil -} - -type NullableRestoreInstancePayload struct { - value *RestoreInstancePayload - isSet bool -} - -func (v NullableRestoreInstancePayload) Get() *RestoreInstancePayload { - return v.value -} - -func (v *NullableRestoreInstancePayload) Set(val *RestoreInstancePayload) { - v.value = val - v.isSet = true -} - -func (v NullableRestoreInstancePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableRestoreInstancePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRestoreInstancePayload(val *RestoreInstancePayload) *NullableRestoreInstancePayload { - return &NullableRestoreInstancePayload{value: val, isSet: true} -} - -func (v NullableRestoreInstancePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRestoreInstancePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_restore_instance_response.go b/services/mongodbflex/model_restore_instance_response.go index fee79067b..0edbcb74d 100644 --- a/services/mongodbflex/model_restore_instance_response.go +++ b/services/mongodbflex/model_restore_instance_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the RestoreInstanceResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RestoreInstanceResponse{} - // RestoreInstanceResponse struct for RestoreInstanceResponse type RestoreInstanceResponse struct { Item *RestoreInstanceStatus `json:"item,omitempty"` } - -// NewRestoreInstanceResponse instantiates a new RestoreInstanceResponse 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 NewRestoreInstanceResponse() *RestoreInstanceResponse { - this := RestoreInstanceResponse{} - return &this -} - -// NewRestoreInstanceResponseWithDefaults instantiates a new RestoreInstanceResponse 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 NewRestoreInstanceResponseWithDefaults() *RestoreInstanceResponse { - this := RestoreInstanceResponse{} - return &this -} - -// GetItem returns the Item field value if set, zero value otherwise. -func (o *RestoreInstanceResponse) GetItem() *RestoreInstanceStatus { - if o == nil || IsNil(o.Item) { - var ret *RestoreInstanceStatus - return ret - } - return o.Item -} - -// GetItemOk returns a tuple with the Item field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestoreInstanceResponse) GetItemOk() (*RestoreInstanceStatus, bool) { - if o == nil || IsNil(o.Item) { - return nil, false - } - return o.Item, true -} - -// HasItem returns a boolean if a field has been set. -func (o *RestoreInstanceResponse) HasItem() bool { - if o != nil && !IsNil(o.Item) { - return true - } - - return false -} - -// SetItem gets a reference to the given RestoreInstanceStatus and assigns it to the Item field. -func (o *RestoreInstanceResponse) SetItem(v *RestoreInstanceStatus) { - o.Item = v -} - -func (o RestoreInstanceResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Item) { - toSerialize["item"] = o.Item - } - return toSerialize, nil -} - -type NullableRestoreInstanceResponse struct { - value *RestoreInstanceResponse - isSet bool -} - -func (v NullableRestoreInstanceResponse) Get() *RestoreInstanceResponse { - return v.value -} - -func (v *NullableRestoreInstanceResponse) Set(val *RestoreInstanceResponse) { - v.value = val - v.isSet = true -} - -func (v NullableRestoreInstanceResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableRestoreInstanceResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRestoreInstanceResponse(val *RestoreInstanceResponse) *NullableRestoreInstanceResponse { - return &NullableRestoreInstanceResponse{value: val, isSet: true} -} - -func (v NullableRestoreInstanceResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRestoreInstanceResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_restore_instance_status.go b/services/mongodbflex/model_restore_instance_status.go index 0f9c9fbcb..94d81d8e8 100644 --- a/services/mongodbflex/model_restore_instance_status.go +++ b/services/mongodbflex/model_restore_instance_status.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the RestoreInstanceStatus type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RestoreInstanceStatus{} - // RestoreInstanceStatus struct for RestoreInstanceStatus type RestoreInstanceStatus struct { BackupID *string `json:"backupID,omitempty"` @@ -25,236 +18,3 @@ type RestoreInstanceStatus struct { InstanceId *string `json:"instanceId,omitempty"` Status *string `json:"status,omitempty"` } - -// NewRestoreInstanceStatus instantiates a new RestoreInstanceStatus 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 NewRestoreInstanceStatus() *RestoreInstanceStatus { - this := RestoreInstanceStatus{} - return &this -} - -// NewRestoreInstanceStatusWithDefaults instantiates a new RestoreInstanceStatus 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 NewRestoreInstanceStatusWithDefaults() *RestoreInstanceStatus { - this := RestoreInstanceStatus{} - return &this -} - -// GetBackupID returns the BackupID field value if set, zero value otherwise. -func (o *RestoreInstanceStatus) GetBackupID() *string { - if o == nil || IsNil(o.BackupID) { - var ret *string - return ret - } - return o.BackupID -} - -// GetBackupIDOk returns a tuple with the BackupID field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestoreInstanceStatus) GetBackupIDOk() (*string, bool) { - if o == nil || IsNil(o.BackupID) { - return nil, false - } - return o.BackupID, true -} - -// HasBackupID returns a boolean if a field has been set. -func (o *RestoreInstanceStatus) HasBackupID() bool { - if o != nil && !IsNil(o.BackupID) { - return true - } - - return false -} - -// SetBackupID gets a reference to the given string and assigns it to the BackupID field. -func (o *RestoreInstanceStatus) SetBackupID(v *string) { - o.BackupID = v -} - -// GetDate returns the Date field value if set, zero value otherwise. -func (o *RestoreInstanceStatus) GetDate() *string { - if o == nil || IsNil(o.Date) { - var ret *string - return ret - } - return o.Date -} - -// GetDateOk returns a tuple with the Date field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestoreInstanceStatus) GetDateOk() (*string, bool) { - if o == nil || IsNil(o.Date) { - return nil, false - } - return o.Date, true -} - -// HasDate returns a boolean if a field has been set. -func (o *RestoreInstanceStatus) HasDate() bool { - if o != nil && !IsNil(o.Date) { - return true - } - - return false -} - -// SetDate gets a reference to the given string and assigns it to the Date field. -func (o *RestoreInstanceStatus) SetDate(v *string) { - o.Date = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RestoreInstanceStatus) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestoreInstanceStatus) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RestoreInstanceStatus) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RestoreInstanceStatus) SetId(v *string) { - o.Id = v -} - -// GetInstanceId returns the InstanceId field value if set, zero value otherwise. -func (o *RestoreInstanceStatus) GetInstanceId() *string { - if o == nil || IsNil(o.InstanceId) { - var ret *string - return ret - } - return o.InstanceId -} - -// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestoreInstanceStatus) GetInstanceIdOk() (*string, bool) { - if o == nil || IsNil(o.InstanceId) { - return nil, false - } - return o.InstanceId, true -} - -// HasInstanceId returns a boolean if a field has been set. -func (o *RestoreInstanceStatus) HasInstanceId() bool { - if o != nil && !IsNil(o.InstanceId) { - return true - } - - return false -} - -// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. -func (o *RestoreInstanceStatus) SetInstanceId(v *string) { - o.InstanceId = v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *RestoreInstanceStatus) GetStatus() *string { - if o == nil || IsNil(o.Status) { - var ret *string - return ret - } - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RestoreInstanceStatus) GetStatusOk() (*string, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *RestoreInstanceStatus) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *RestoreInstanceStatus) SetStatus(v *string) { - o.Status = v -} - -func (o RestoreInstanceStatus) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.BackupID) { - toSerialize["backupID"] = o.BackupID - } - if !IsNil(o.Date) { - toSerialize["date"] = o.Date - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.InstanceId) { - toSerialize["instanceId"] = o.InstanceId - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - return toSerialize, nil -} - -type NullableRestoreInstanceStatus struct { - value *RestoreInstanceStatus - isSet bool -} - -func (v NullableRestoreInstanceStatus) Get() *RestoreInstanceStatus { - return v.value -} - -func (v *NullableRestoreInstanceStatus) Set(val *RestoreInstanceStatus) { - v.value = val - v.isSet = true -} - -func (v NullableRestoreInstanceStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableRestoreInstanceStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRestoreInstanceStatus(val *RestoreInstanceStatus) *NullableRestoreInstanceStatus { - return &NullableRestoreInstanceStatus{value: val, isSet: true} -} - -func (v NullableRestoreInstanceStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRestoreInstanceStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_shape.go b/services/mongodbflex/model_shape.go new file mode 100644 index 000000000..fa8c76daf --- /dev/null +++ b/services/mongodbflex/model_shape.go @@ -0,0 +1,27 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +// Shape struct for Shape +type Shape struct { + // Average duration in milliseconds for the queries examined that match this shape. + AvgMs *float64 `json:"avgMs,omitempty"` + // Number of queries examined that match this shape. + Count *int64 `json:"count,omitempty"` + // Unique id for this shape. Exists only for the duration of the API request. + Id *string `json:"id,omitempty"` + // Average number of documents read for every document returned by the query. + InefficiencyScore *int64 `json:"inefficiencyScore,omitempty"` + // The namespace in which the slow query ran. + Namespace *string `json:"namespace,omitempty"` + // It represents documents with specific information and log lines for individual queries. + Operations *[]MongodbatlasOperation `json:"operations,omitempty"` +} diff --git a/services/mongodbflex/model_slow_query.go b/services/mongodbflex/model_slow_query.go new file mode 100644 index 000000000..9a0aba575 --- /dev/null +++ b/services/mongodbflex/model_slow_query.go @@ -0,0 +1,19 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +// SlowQuery struct for SlowQuery +type SlowQuery struct { + // The raw log line pertaining to the slow query. + Line *string `json:"line,omitempty"` + // The namespace in which the slow query ran. + Namespace *string `json:"namespace,omitempty"` +} diff --git a/services/mongodbflex/model_storage.go b/services/mongodbflex/model_storage.go index 8a22c78ee..f345cc648 100644 --- a/services/mongodbflex/model_storage.go +++ b/services/mongodbflex/model_storage.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the Storage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Storage{} - // Storage struct for Storage type Storage struct { Class *string `json:"class,omitempty"` Size *int64 `json:"size,omitempty"` } - -// NewStorage instantiates a new Storage 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 NewStorage() *Storage { - this := Storage{} - return &this -} - -// NewStorageWithDefaults instantiates a new Storage 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 NewStorageWithDefaults() *Storage { - this := Storage{} - return &this -} - -// GetClass returns the Class field value if set, zero value otherwise. -func (o *Storage) GetClass() *string { - if o == nil || IsNil(o.Class) { - var ret *string - return ret - } - return o.Class -} - -// GetClassOk returns a tuple with the Class field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Storage) GetClassOk() (*string, bool) { - if o == nil || IsNil(o.Class) { - return nil, false - } - return o.Class, true -} - -// HasClass returns a boolean if a field has been set. -func (o *Storage) HasClass() bool { - if o != nil && !IsNil(o.Class) { - return true - } - - return false -} - -// SetClass gets a reference to the given string and assigns it to the Class field. -func (o *Storage) SetClass(v *string) { - o.Class = v -} - -// GetSize returns the Size field value if set, zero value otherwise. -func (o *Storage) GetSize() *int64 { - if o == nil || IsNil(o.Size) { - var ret *int64 - return ret - } - return o.Size -} - -// GetSizeOk returns a tuple with the Size field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Storage) GetSizeOk() (*int64, bool) { - if o == nil || IsNil(o.Size) { - return nil, false - } - return o.Size, true -} - -// HasSize returns a boolean if a field has been set. -func (o *Storage) HasSize() bool { - if o != nil && !IsNil(o.Size) { - return true - } - - return false -} - -// SetSize gets a reference to the given int64 and assigns it to the Size field. -func (o *Storage) SetSize(v *int64) { - o.Size = v -} - -func (o Storage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Class) { - toSerialize["class"] = o.Class - } - if !IsNil(o.Size) { - toSerialize["size"] = o.Size - } - return toSerialize, nil -} - -type NullableStorage struct { - value *Storage - isSet bool -} - -func (v NullableStorage) Get() *Storage { - return v.value -} - -func (v *NullableStorage) Set(val *Storage) { - v.value = val - v.isSet = true -} - -func (v NullableStorage) IsSet() bool { - return v.isSet -} - -func (v *NullableStorage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStorage(val *Storage) *NullableStorage { - return &NullableStorage{value: val, isSet: true} -} - -func (v NullableStorage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStorage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_storage_range.go b/services/mongodbflex/model_storage_range.go index ca660aada..640c96580 100644 --- a/services/mongodbflex/model_storage_range.go +++ b/services/mongodbflex/model_storage_range.go @@ -10,143 +10,8 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the StorageRange type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StorageRange{} - // StorageRange struct for StorageRange type StorageRange struct { Max *int64 `json:"max,omitempty"` Min *int64 `json:"min,omitempty"` } - -// NewStorageRange instantiates a new StorageRange 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 NewStorageRange() *StorageRange { - this := StorageRange{} - return &this -} - -// NewStorageRangeWithDefaults instantiates a new StorageRange 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 NewStorageRangeWithDefaults() *StorageRange { - this := StorageRange{} - return &this -} - -// GetMax returns the Max field value if set, zero value otherwise. -func (o *StorageRange) GetMax() *int64 { - if o == nil || IsNil(o.Max) { - var ret *int64 - return ret - } - return o.Max -} - -// GetMaxOk returns a tuple with the Max field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StorageRange) GetMaxOk() (*int64, bool) { - if o == nil || IsNil(o.Max) { - return nil, false - } - return o.Max, true -} - -// HasMax returns a boolean if a field has been set. -func (o *StorageRange) HasMax() bool { - if o != nil && !IsNil(o.Max) { - return true - } - - return false -} - -// SetMax gets a reference to the given int64 and assigns it to the Max field. -func (o *StorageRange) SetMax(v *int64) { - o.Max = v -} - -// GetMin returns the Min field value if set, zero value otherwise. -func (o *StorageRange) GetMin() *int64 { - if o == nil || IsNil(o.Min) { - var ret *int64 - return ret - } - return o.Min -} - -// GetMinOk returns a tuple with the Min field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *StorageRange) GetMinOk() (*int64, bool) { - if o == nil || IsNil(o.Min) { - return nil, false - } - return o.Min, true -} - -// HasMin returns a boolean if a field has been set. -func (o *StorageRange) HasMin() bool { - if o != nil && !IsNil(o.Min) { - return true - } - - return false -} - -// SetMin gets a reference to the given int64 and assigns it to the Min field. -func (o *StorageRange) SetMin(v *int64) { - o.Min = v -} - -func (o StorageRange) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Max) { - toSerialize["max"] = o.Max - } - if !IsNil(o.Min) { - toSerialize["min"] = o.Min - } - return toSerialize, nil -} - -type NullableStorageRange struct { - value *StorageRange - isSet bool -} - -func (v NullableStorageRange) Get() *StorageRange { - return v.value -} - -func (v *NullableStorageRange) Set(val *StorageRange) { - v.value = val - v.isSet = true -} - -func (v NullableStorageRange) IsSet() bool { - return v.isSet -} - -func (v *NullableStorageRange) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStorageRange(val *StorageRange) *NullableStorageRange { - return &NullableStorageRange{value: val, isSet: true} -} - -func (v NullableStorageRange) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStorageRange) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_suggested_index.go b/services/mongodbflex/model_suggested_index.go new file mode 100644 index 000000000..4da7be975 --- /dev/null +++ b/services/mongodbflex/model_suggested_index.go @@ -0,0 +1,25 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +// SuggestedIndex struct for SuggestedIndex +type SuggestedIndex struct { + // Unique id for this suggested index. + Id *string `json:"id,omitempty"` + // List of unique identifiers which correspond the query shapes in this response which pertain to this suggested index. + Impact *[]string `json:"impact,omitempty"` + // Array of documents that specifies a key in the index and its sort order, ascending or descending. + Index *[]map[string]int32 `json:"index,omitempty"` + // Namespace of the suggested index. + Namespace *string `json:"namespace,omitempty"` + // Estimated percentage performance improvement that the suggested index would provide. + Weight *float64 `json:"weight,omitempty"` +} diff --git a/services/mongodbflex/model_update_backup_schedule_payload.go b/services/mongodbflex/model_update_backup_schedule_payload.go index 07fdec948..a93f18f09 100644 --- a/services/mongodbflex/model_update_backup_schedule_payload.go +++ b/services/mongodbflex/model_update_backup_schedule_payload.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the UpdateBackupSchedulePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateBackupSchedulePayload{} - // UpdateBackupSchedulePayload struct for UpdateBackupSchedulePayload type UpdateBackupSchedulePayload struct { BackupSchedule *string `json:"backupSchedule,omitempty"` @@ -26,271 +19,3 @@ type UpdateBackupSchedulePayload struct { SnapshotRetentionDays *int64 `json:"snapshotRetentionDays,omitempty"` WeeklySnapshotRetentionWeeks *int64 `json:"weeklySnapshotRetentionWeeks,omitempty"` } - -// NewUpdateBackupSchedulePayload instantiates a new UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayload() *UpdateBackupSchedulePayload { - this := UpdateBackupSchedulePayload{} - return &this -} - -// NewUpdateBackupSchedulePayloadWithDefaults instantiates a new UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayloadWithDefaults() *UpdateBackupSchedulePayload { - this := UpdateBackupSchedulePayload{} - return &this -} - -// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. -func (o *UpdateBackupSchedulePayload) GetBackupSchedule() *string { - if o == nil || IsNil(o.BackupSchedule) { - var ret *string - return ret - } - return o.BackupSchedule -} - -// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBackupSchedulePayload) GetBackupScheduleOk() (*string, bool) { - if o == nil || IsNil(o.BackupSchedule) { - return nil, false - } - return o.BackupSchedule, true -} - -// HasBackupSchedule returns a boolean if a field has been set. -func (o *UpdateBackupSchedulePayload) HasBackupSchedule() bool { - if o != nil && !IsNil(o.BackupSchedule) { - return true - } - - return false -} - -// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. -func (o *UpdateBackupSchedulePayload) SetBackupSchedule(v *string) { - o.BackupSchedule = v -} - -// GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays field value if set, zero value otherwise. -func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDays() *int64 { - if o == nil || IsNil(o.DailySnapshotRetentionDays) { - var ret *int64 - return ret - } - return o.DailySnapshotRetentionDays -} - -// GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDaysOk() (*int64, bool) { - if o == nil || IsNil(o.DailySnapshotRetentionDays) { - return nil, false - } - return o.DailySnapshotRetentionDays, true -} - -// HasDailySnapshotRetentionDays returns a boolean if a field has been set. -func (o *UpdateBackupSchedulePayload) HasDailySnapshotRetentionDays() bool { - if o != nil && !IsNil(o.DailySnapshotRetentionDays) { - return true - } - - return false -} - -// SetDailySnapshotRetentionDays gets a reference to the given int64 and assigns it to the DailySnapshotRetentionDays field. -func (o *UpdateBackupSchedulePayload) SetDailySnapshotRetentionDays(v *int64) { - o.DailySnapshotRetentionDays = v -} - -// GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths field value if set, zero value otherwise. -func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonths() *int64 { - if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { - var ret *int64 - return ret - } - return o.MonthlySnapshotRetentionMonths -} - -// GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonthsOk() (*int64, bool) { - if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { - return nil, false - } - return o.MonthlySnapshotRetentionMonths, true -} - -// HasMonthlySnapshotRetentionMonths returns a boolean if a field has been set. -func (o *UpdateBackupSchedulePayload) HasMonthlySnapshotRetentionMonths() bool { - if o != nil && !IsNil(o.MonthlySnapshotRetentionMonths) { - return true - } - - return false -} - -// SetMonthlySnapshotRetentionMonths gets a reference to the given int64 and assigns it to the MonthlySnapshotRetentionMonths field. -func (o *UpdateBackupSchedulePayload) SetMonthlySnapshotRetentionMonths(v *int64) { - o.MonthlySnapshotRetentionMonths = v -} - -// GetPointInTimeWindowHours returns the PointInTimeWindowHours field value if set, zero value otherwise. -func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHours() *int64 { - if o == nil || IsNil(o.PointInTimeWindowHours) { - var ret *int64 - return ret - } - return o.PointInTimeWindowHours -} - -// GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHoursOk() (*int64, bool) { - if o == nil || IsNil(o.PointInTimeWindowHours) { - return nil, false - } - return o.PointInTimeWindowHours, true -} - -// HasPointInTimeWindowHours returns a boolean if a field has been set. -func (o *UpdateBackupSchedulePayload) HasPointInTimeWindowHours() bool { - if o != nil && !IsNil(o.PointInTimeWindowHours) { - return true - } - - return false -} - -// SetPointInTimeWindowHours gets a reference to the given int64 and assigns it to the PointInTimeWindowHours field. -func (o *UpdateBackupSchedulePayload) SetPointInTimeWindowHours(v *int64) { - o.PointInTimeWindowHours = v -} - -// GetSnapshotRetentionDays returns the SnapshotRetentionDays field value if set, zero value otherwise. -func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDays() *int64 { - if o == nil || IsNil(o.SnapshotRetentionDays) { - var ret *int64 - return ret - } - return o.SnapshotRetentionDays -} - -// GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDaysOk() (*int64, bool) { - if o == nil || IsNil(o.SnapshotRetentionDays) { - return nil, false - } - return o.SnapshotRetentionDays, true -} - -// HasSnapshotRetentionDays returns a boolean if a field has been set. -func (o *UpdateBackupSchedulePayload) HasSnapshotRetentionDays() bool { - if o != nil && !IsNil(o.SnapshotRetentionDays) { - return true - } - - return false -} - -// SetSnapshotRetentionDays gets a reference to the given int64 and assigns it to the SnapshotRetentionDays field. -func (o *UpdateBackupSchedulePayload) SetSnapshotRetentionDays(v *int64) { - o.SnapshotRetentionDays = v -} - -// GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks field value if set, zero value otherwise. -func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeks() *int64 { - if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { - var ret *int64 - return ret - } - return o.WeeklySnapshotRetentionWeeks -} - -// GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeksOk() (*int64, bool) { - if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { - return nil, false - } - return o.WeeklySnapshotRetentionWeeks, true -} - -// HasWeeklySnapshotRetentionWeeks returns a boolean if a field has been set. -func (o *UpdateBackupSchedulePayload) HasWeeklySnapshotRetentionWeeks() bool { - if o != nil && !IsNil(o.WeeklySnapshotRetentionWeeks) { - return true - } - - return false -} - -// SetWeeklySnapshotRetentionWeeks gets a reference to the given int64 and assigns it to the WeeklySnapshotRetentionWeeks field. -func (o *UpdateBackupSchedulePayload) SetWeeklySnapshotRetentionWeeks(v *int64) { - o.WeeklySnapshotRetentionWeeks = v -} - -func (o UpdateBackupSchedulePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.BackupSchedule) { - toSerialize["backupSchedule"] = o.BackupSchedule - } - if !IsNil(o.DailySnapshotRetentionDays) { - toSerialize["dailySnapshotRetentionDays"] = o.DailySnapshotRetentionDays - } - if !IsNil(o.MonthlySnapshotRetentionMonths) { - toSerialize["monthlySnapshotRetentionMonths"] = o.MonthlySnapshotRetentionMonths - } - if !IsNil(o.PointInTimeWindowHours) { - toSerialize["pointInTimeWindowHours"] = o.PointInTimeWindowHours - } - if !IsNil(o.SnapshotRetentionDays) { - toSerialize["snapshotRetentionDays"] = o.SnapshotRetentionDays - } - if !IsNil(o.WeeklySnapshotRetentionWeeks) { - toSerialize["weeklySnapshotRetentionWeeks"] = o.WeeklySnapshotRetentionWeeks - } - return toSerialize, nil -} - -type NullableUpdateBackupSchedulePayload struct { - value *UpdateBackupSchedulePayload - isSet bool -} - -func (v NullableUpdateBackupSchedulePayload) Get() *UpdateBackupSchedulePayload { - return v.value -} - -func (v *NullableUpdateBackupSchedulePayload) Set(val *UpdateBackupSchedulePayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateBackupSchedulePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateBackupSchedulePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateBackupSchedulePayload(val *UpdateBackupSchedulePayload) *NullableUpdateBackupSchedulePayload { - return &NullableUpdateBackupSchedulePayload{value: val, isSet: true} -} - -func (v NullableUpdateBackupSchedulePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateBackupSchedulePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_update_instance_payload.go b/services/mongodbflex/model_update_instance_payload.go index ee6118869..a30f75caf 100644 --- a/services/mongodbflex/model_update_instance_payload.go +++ b/services/mongodbflex/model_update_instance_payload.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateInstancePayload{} - // UpdateInstancePayload struct for UpdateInstancePayload type UpdateInstancePayload struct { // REQUIRED @@ -38,306 +31,3 @@ type UpdateInstancePayload struct { // REQUIRED Version *string `json:"version"` } - -type _UpdateInstancePayload UpdateInstancePayload - -// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload(acl *ACL, backupSchedule *string, flavorId *string, name *string, options *map[string]string, replicas *int64, storage *Storage, version *string) *UpdateInstancePayload { - this := UpdateInstancePayload{} - this.Acl = acl - this.BackupSchedule = backupSchedule - this.FlavorId = flavorId - this.Name = name - this.Options = options - this.Replicas = replicas - this.Storage = storage - this.Version = version - return &this -} - -// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { - this := UpdateInstancePayload{} - return &this -} - -// GetAcl returns the Acl field value -func (o *UpdateInstancePayload) GetAcl() *ACL { - if o == nil { - var ret *ACL - return ret - } - - return o.Acl -} - -// GetAclOk returns a tuple with the Acl field value -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetAclOk() (*ACL, bool) { - if o == nil { - return nil, false - } - return o.Acl, true -} - -// SetAcl sets field value -func (o *UpdateInstancePayload) SetAcl(v *ACL) { - o.Acl = v -} - -// GetBackupSchedule returns the BackupSchedule field value -func (o *UpdateInstancePayload) GetBackupSchedule() *string { - if o == nil { - var ret *string - return ret - } - - return o.BackupSchedule -} - -// GetBackupScheduleOk returns a tuple with the BackupSchedule field value -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.BackupSchedule, true -} - -// SetBackupSchedule sets field value -func (o *UpdateInstancePayload) SetBackupSchedule(v *string) { - o.BackupSchedule = v -} - -// GetFlavorId returns the FlavorId field value -func (o *UpdateInstancePayload) GetFlavorId() *string { - if o == nil { - var ret *string - return ret - } - - return o.FlavorId -} - -// GetFlavorIdOk returns a tuple with the FlavorId field value -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetFlavorIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FlavorId, true -} - -// SetFlavorId sets field value -func (o *UpdateInstancePayload) SetFlavorId(v *string) { - o.FlavorId = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *UpdateInstancePayload) GetLabels() *map[string]string { - if o == nil || IsNil(o.Labels) { - var ret *map[string]string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetLabelsOk() (*map[string]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *UpdateInstancePayload) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. -func (o *UpdateInstancePayload) SetLabels(v *map[string]string) { - o.Labels = v -} - -// GetName returns the Name field value -func (o *UpdateInstancePayload) GetName() *string { - if o == nil { - var ret *string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true -} - -// SetName sets field value -func (o *UpdateInstancePayload) SetName(v *string) { - o.Name = v -} - -// GetOptions returns the Options field value -func (o *UpdateInstancePayload) GetOptions() *map[string]string { - if o == nil { - var ret *map[string]string - return ret - } - - return o.Options -} - -// GetOptionsOk returns a tuple with the Options field value -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { - if o == nil { - return nil, false - } - return o.Options, true -} - -// SetOptions sets field value -func (o *UpdateInstancePayload) SetOptions(v *map[string]string) { - o.Options = v -} - -// GetReplicas returns the Replicas field value -func (o *UpdateInstancePayload) GetReplicas() *int64 { - if o == nil { - var ret *int64 - return ret - } - - return o.Replicas -} - -// GetReplicasOk returns a tuple with the Replicas field value -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetReplicasOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.Replicas, true -} - -// SetReplicas sets field value -func (o *UpdateInstancePayload) SetReplicas(v *int64) { - o.Replicas = v -} - -// GetStorage returns the Storage field value -func (o *UpdateInstancePayload) GetStorage() *Storage { - if o == nil { - var ret *Storage - return ret - } - - return o.Storage -} - -// GetStorageOk returns a tuple with the Storage field value -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetStorageOk() (*Storage, bool) { - if o == nil { - return nil, false - } - return o.Storage, true -} - -// SetStorage sets field value -func (o *UpdateInstancePayload) SetStorage(v *Storage) { - o.Storage = v -} - -// GetVersion returns the Version field value -func (o *UpdateInstancePayload) GetVersion() *string { - if o == nil { - var ret *string - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *UpdateInstancePayload) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Version, true -} - -// SetVersion sets field value -func (o *UpdateInstancePayload) SetVersion(v *string) { - o.Version = v -} - -func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["acl"] = o.Acl - toSerialize["backupSchedule"] = o.BackupSchedule - toSerialize["flavorId"] = o.FlavorId - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["name"] = o.Name - toSerialize["options"] = o.Options - toSerialize["replicas"] = o.Replicas - toSerialize["storage"] = o.Storage - toSerialize["version"] = o.Version - return toSerialize, nil -} - -type NullableUpdateInstancePayload struct { - value *UpdateInstancePayload - isSet bool -} - -func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { - return v.value -} - -func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateInstancePayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateInstancePayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { - return &NullableUpdateInstancePayload{value: val, isSet: true} -} - -func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_update_instance_response.go b/services/mongodbflex/model_update_instance_response.go index bad477a4d..a870aab25 100644 --- a/services/mongodbflex/model_update_instance_response.go +++ b/services/mongodbflex/model_update_instance_response.go @@ -10,107 +10,7 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the UpdateInstanceResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateInstanceResponse{} - // UpdateInstanceResponse struct for UpdateInstanceResponse type UpdateInstanceResponse struct { Item *Instance `json:"item,omitempty"` } - -// NewUpdateInstanceResponse instantiates a new UpdateInstanceResponse 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 NewUpdateInstanceResponse() *UpdateInstanceResponse { - this := UpdateInstanceResponse{} - return &this -} - -// NewUpdateInstanceResponseWithDefaults instantiates a new UpdateInstanceResponse 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 NewUpdateInstanceResponseWithDefaults() *UpdateInstanceResponse { - this := UpdateInstanceResponse{} - return &this -} - -// GetItem returns the Item field value if set, zero value otherwise. -func (o *UpdateInstanceResponse) GetItem() *Instance { - if o == nil || IsNil(o.Item) { - var ret *Instance - return ret - } - return o.Item -} - -// GetItemOk returns a tuple with the Item field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateInstanceResponse) GetItemOk() (*Instance, bool) { - if o == nil || IsNil(o.Item) { - return nil, false - } - return o.Item, true -} - -// HasItem returns a boolean if a field has been set. -func (o *UpdateInstanceResponse) HasItem() bool { - if o != nil && !IsNil(o.Item) { - return true - } - - return false -} - -// SetItem gets a reference to the given Instance and assigns it to the Item field. -func (o *UpdateInstanceResponse) SetItem(v *Instance) { - o.Item = v -} - -func (o UpdateInstanceResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Item) { - toSerialize["item"] = o.Item - } - return toSerialize, nil -} - -type NullableUpdateInstanceResponse struct { - value *UpdateInstanceResponse - isSet bool -} - -func (v NullableUpdateInstanceResponse) Get() *UpdateInstanceResponse { - return v.value -} - -func (v *NullableUpdateInstanceResponse) Set(val *UpdateInstanceResponse) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateInstanceResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateInstanceResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateInstanceResponse(val *UpdateInstanceResponse) *NullableUpdateInstanceResponse { - return &NullableUpdateInstanceResponse{value: val, isSet: true} -} - -func (v NullableUpdateInstanceResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateInstanceResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_update_user_payload.go b/services/mongodbflex/model_update_user_payload.go index 9f984f812..c446f4845 100644 --- a/services/mongodbflex/model_update_user_payload.go +++ b/services/mongodbflex/model_update_user_payload.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the UpdateUserPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateUserPayload{} - // UpdateUserPayload struct for UpdateUserPayload type UpdateUserPayload struct { // REQUIRED @@ -24,115 +17,3 @@ type UpdateUserPayload struct { // REQUIRED Roles *[]string `json:"roles"` } - -type _UpdateUserPayload UpdateUserPayload - -// NewUpdateUserPayload instantiates a new UpdateUserPayload 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 NewUpdateUserPayload(database *string, roles *[]string) *UpdateUserPayload { - this := UpdateUserPayload{} - this.Database = database - this.Roles = roles - return &this -} - -// NewUpdateUserPayloadWithDefaults instantiates a new UpdateUserPayload 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 NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { - this := UpdateUserPayload{} - return &this -} - -// GetDatabase returns the Database field value -func (o *UpdateUserPayload) GetDatabase() *string { - if o == nil { - var ret *string - return ret - } - - return o.Database -} - -// GetDatabaseOk returns a tuple with the Database field value -// and a boolean to check if the value has been set. -func (o *UpdateUserPayload) GetDatabaseOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Database, true -} - -// SetDatabase sets field value -func (o *UpdateUserPayload) SetDatabase(v *string) { - o.Database = v -} - -// GetRoles returns the Roles field value -func (o *UpdateUserPayload) GetRoles() *[]string { - if o == nil { - var ret *[]string - return ret - } - - return o.Roles -} - -// GetRolesOk returns a tuple with the Roles field value -// and a boolean to check if the value has been set. -func (o *UpdateUserPayload) GetRolesOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return o.Roles, true -} - -// SetRoles sets field value -func (o *UpdateUserPayload) SetRoles(v *[]string) { - o.Roles = v -} - -func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["database"] = o.Database - toSerialize["roles"] = o.Roles - return toSerialize, nil -} - -type NullableUpdateUserPayload struct { - value *UpdateUserPayload - isSet bool -} - -func (v NullableUpdateUserPayload) Get() *UpdateUserPayload { - return v.value -} - -func (v *NullableUpdateUserPayload) Set(val *UpdateUserPayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateUserPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateUserPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateUserPayload(val *UpdateUserPayload) *NullableUpdateUserPayload { - return &NullableUpdateUserPayload{value: val, isSet: true} -} - -func (v NullableUpdateUserPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateUserPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/mongodbflex/model_user.go b/services/mongodbflex/model_user.go index b80e5b298..4d27981e5 100644 --- a/services/mongodbflex/model_user.go +++ b/services/mongodbflex/model_user.go @@ -10,13 +10,6 @@ API version: 1.0.0 package mongodbflex -import ( - "encoding/json" -) - -// checks if the User type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &User{} - // User struct for User type User struct { Database *string `json:"database,omitempty"` @@ -28,341 +21,3 @@ type User struct { Uri *string `json:"uri,omitempty"` Username *string `json:"username,omitempty"` } - -// NewUser instantiates a new User 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 NewUser() *User { - this := User{} - return &this -} - -// NewUserWithDefaults instantiates a new User 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 NewUserWithDefaults() *User { - this := User{} - return &this -} - -// GetDatabase returns the Database field value if set, zero value otherwise. -func (o *User) GetDatabase() *string { - if o == nil || IsNil(o.Database) { - var ret *string - return ret - } - return o.Database -} - -// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetDatabaseOk() (*string, bool) { - if o == nil || IsNil(o.Database) { - return nil, false - } - return o.Database, true -} - -// HasDatabase returns a boolean if a field has been set. -func (o *User) HasDatabase() bool { - if o != nil && !IsNil(o.Database) { - return true - } - - return false -} - -// SetDatabase gets a reference to the given string and assigns it to the Database field. -func (o *User) SetDatabase(v *string) { - o.Database = v -} - -// GetHost returns the Host field value if set, zero value otherwise. -func (o *User) GetHost() *string { - if o == nil || IsNil(o.Host) { - var ret *string - return ret - } - return o.Host -} - -// GetHostOk returns a tuple with the Host field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetHostOk() (*string, bool) { - if o == nil || IsNil(o.Host) { - return nil, false - } - return o.Host, true -} - -// HasHost returns a boolean if a field has been set. -func (o *User) HasHost() bool { - if o != nil && !IsNil(o.Host) { - return true - } - - return false -} - -// SetHost gets a reference to the given string and assigns it to the Host field. -func (o *User) SetHost(v *string) { - o.Host = v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *User) GetId() *string { - if o == nil || IsNil(o.Id) { - var ret *string - return ret - } - return o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *User) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *User) SetId(v *string) { - o.Id = v -} - -// GetPassword returns the Password field value if set, zero value otherwise. -func (o *User) GetPassword() *string { - if o == nil || IsNil(o.Password) { - var ret *string - return ret - } - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetPasswordOk() (*string, bool) { - if o == nil || IsNil(o.Password) { - return nil, false - } - return o.Password, true -} - -// HasPassword returns a boolean if a field has been set. -func (o *User) HasPassword() bool { - if o != nil && !IsNil(o.Password) { - return true - } - - return false -} - -// SetPassword gets a reference to the given string and assigns it to the Password field. -func (o *User) SetPassword(v *string) { - o.Password = v -} - -// GetPort returns the Port field value if set, zero value otherwise. -func (o *User) GetPort() *int64 { - if o == nil || IsNil(o.Port) { - var ret *int64 - return ret - } - return o.Port -} - -// GetPortOk returns a tuple with the Port field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetPortOk() (*int64, bool) { - if o == nil || IsNil(o.Port) { - return nil, false - } - return o.Port, true -} - -// HasPort returns a boolean if a field has been set. -func (o *User) HasPort() bool { - if o != nil && !IsNil(o.Port) { - return true - } - - return false -} - -// SetPort gets a reference to the given int64 and assigns it to the Port field. -func (o *User) SetPort(v *int64) { - o.Port = v -} - -// GetRoles returns the Roles field value if set, zero value otherwise. -func (o *User) GetRoles() *[]string { - if o == nil || IsNil(o.Roles) { - var ret *[]string - return ret - } - return o.Roles -} - -// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetRolesOk() (*[]string, bool) { - if o == nil || IsNil(o.Roles) { - return nil, false - } - return o.Roles, true -} - -// HasRoles returns a boolean if a field has been set. -func (o *User) HasRoles() bool { - if o != nil && !IsNil(o.Roles) { - return true - } - - return false -} - -// SetRoles gets a reference to the given []string and assigns it to the Roles field. -func (o *User) SetRoles(v *[]string) { - o.Roles = v -} - -// GetUri returns the Uri field value if set, zero value otherwise. -func (o *User) GetUri() *string { - if o == nil || IsNil(o.Uri) { - var ret *string - return ret - } - return o.Uri -} - -// GetUriOk returns a tuple with the Uri field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetUriOk() (*string, bool) { - if o == nil || IsNil(o.Uri) { - return nil, false - } - return o.Uri, true -} - -// HasUri returns a boolean if a field has been set. -func (o *User) HasUri() bool { - if o != nil && !IsNil(o.Uri) { - return true - } - - return false -} - -// SetUri gets a reference to the given string and assigns it to the Uri field. -func (o *User) SetUri(v *string) { - o.Uri = v -} - -// GetUsername returns the Username field value if set, zero value otherwise. -func (o *User) GetUsername() *string { - if o == nil || IsNil(o.Username) { - var ret *string - return ret - } - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *User) GetUsernameOk() (*string, bool) { - if o == nil || IsNil(o.Username) { - return nil, false - } - return o.Username, true -} - -// HasUsername returns a boolean if a field has been set. -func (o *User) HasUsername() bool { - if o != nil && !IsNil(o.Username) { - return true - } - - return false -} - -// SetUsername gets a reference to the given string and assigns it to the Username field. -func (o *User) SetUsername(v *string) { - o.Username = v -} - -func (o User) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Database) { - toSerialize["database"] = o.Database - } - if !IsNil(o.Host) { - toSerialize["host"] = o.Host - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Password) { - toSerialize["password"] = o.Password - } - if !IsNil(o.Port) { - toSerialize["port"] = o.Port - } - if !IsNil(o.Roles) { - toSerialize["roles"] = o.Roles - } - if !IsNil(o.Uri) { - toSerialize["uri"] = o.Uri - } - if !IsNil(o.Username) { - toSerialize["username"] = o.Username - } - return toSerialize, nil -} - -type NullableUser struct { - value *User - isSet bool -} - -func (v NullableUser) Get() *User { - return v.value -} - -func (v *NullableUser) Set(val *User) { - v.value = val - v.isSet = true -} - -func (v NullableUser) IsSet() bool { - return v.isSet -} - -func (v *NullableUser) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUser(val *User) *NullableUser { - return &NullableUser{value: val, isSet: true} -} - -func (v NullableUser) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUser) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -}