diff --git a/services/logme/oas_commit b/services/logme/oas_commit index 8ae9a8db5..739d7a10c 100644 --- a/services/logme/oas_commit +++ b/services/logme/oas_commit @@ -1 +1 @@ -e9fe931e91e0b8f067d5c12518398a52062ca794 +d3401e53c9d91a6d95564111fc34bc9d341ef4e6 diff --git a/services/logme/v1api/api_default.go b/services/logme/v1api/api_default.go index 69d50460e..a2e339701 100644 --- a/services/logme/v1api/api_default.go +++ b/services/logme/v1api/api_default.go @@ -173,8 +173,8 @@ type DefaultAPI interface { ListBackups(ctx context.Context, instanceId string, projectId string) ApiListBackupsRequest // ListBackupsExecute executes the request - // @return ListBackupsResponse - ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) + // @return []Backup + ListBackupsExecute(r ApiListBackupsRequest) ([]Backup, error) /* ListCredentials get list of credentials ids @@ -1699,7 +1699,7 @@ type ApiListBackupsRequest struct { projectId string } -func (r ApiListBackupsRequest) Execute() (*ListBackupsResponse, error) { +func (r ApiListBackupsRequest) Execute() ([]Backup, error) { return r.ApiService.ListBackupsExecute(r) } @@ -1722,13 +1722,13 @@ func (a *DefaultAPIService) ListBackups(ctx context.Context, instanceId string, // Execute executes the request // -// @return ListBackupsResponse -func (a *DefaultAPIService) ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) { +// @return []Backup +func (a *DefaultAPIService) ListBackupsExecute(r ApiListBackupsRequest) ([]Backup, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ListBackupsResponse + localVarReturnValue []Backup ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListBackups") diff --git a/services/logme/v1api/api_default_mock.go b/services/logme/v1api/api_default_mock.go index 3980424fc..85b0b2de6 100644 --- a/services/logme/v1api/api_default_mock.go +++ b/services/logme/v1api/api_default_mock.go @@ -40,7 +40,7 @@ type DefaultAPIServiceMock struct { // GetMetricsExecuteMock can be populated to implement the behavior of the GetMetricsExecute function of this mock GetMetricsExecuteMock *func(r ApiGetMetricsRequest) (*GetMetricsResponse, error) // ListBackupsExecuteMock can be populated to implement the behavior of the ListBackupsExecute function of this mock - ListBackupsExecuteMock *func(r ApiListBackupsRequest) (*ListBackupsResponse, error) + ListBackupsExecuteMock *func(r ApiListBackupsRequest) ([]Backup, error) // ListCredentialsExecuteMock can be populated to implement the behavior of the ListCredentialsExecute function of this mock ListCredentialsExecuteMock *func(r ApiListCredentialsRequest) (*ListCredentialsResponse, error) // ListInstancesExecuteMock can be populated to implement the behavior of the ListInstancesExecute function of this mock @@ -242,9 +242,9 @@ func (a DefaultAPIServiceMock) ListBackups(ctx context.Context, instanceId strin } // ListBackupsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListBackupsExecuteMock field in the DefaultAPIServiceMock struct. -func (a DefaultAPIServiceMock) ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) { +func (a DefaultAPIServiceMock) ListBackupsExecute(r ApiListBackupsRequest) ([]Backup, error) { if a.ListBackupsExecuteMock == nil { - var localVarReturnValue *ListBackupsResponse + var localVarReturnValue []Backup return localVarReturnValue, nil } diff --git a/services/logme/v1api/model_list_backups_response.go b/services/logme/v1api/model_list_backups_response.go deleted file mode 100644 index 7d611bb21..000000000 --- a/services/logme/v1api/model_list_backups_response.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -STACKIT LogMe API - -The STACKIT LogMe API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. - -API version: 1.2.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v1api - -import ( - "encoding/json" - "fmt" -) - -// checks if the ListBackupsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListBackupsResponse{} - -// ListBackupsResponse struct for ListBackupsResponse -type ListBackupsResponse struct { - InstanceBackups []Backup `json:"instanceBackups"` - AdditionalProperties map[string]interface{} -} - -type _ListBackupsResponse ListBackupsResponse - -// 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(instanceBackups []Backup) *ListBackupsResponse { - this := ListBackupsResponse{} - this.InstanceBackups = instanceBackups - 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 -} - -// GetInstanceBackups returns the InstanceBackups field value -func (o *ListBackupsResponse) GetInstanceBackups() []Backup { - if o == nil { - var ret []Backup - return ret - } - - return o.InstanceBackups -} - -// GetInstanceBackupsOk returns a tuple with the InstanceBackups field value -// and a boolean to check if the value has been set. -func (o *ListBackupsResponse) GetInstanceBackupsOk() ([]Backup, bool) { - if o == nil { - return nil, false - } - return o.InstanceBackups, true -} - -// SetInstanceBackups sets field value -func (o *ListBackupsResponse) SetInstanceBackups(v []Backup) { - o.InstanceBackups = v -} - -func (o ListBackupsResponse) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["instanceBackups"] = o.InstanceBackups - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ListBackupsResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "instanceBackups", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err - } - - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varListBackupsResponse := _ListBackupsResponse{} - - err = json.Unmarshal(data, &varListBackupsResponse) - - if err != nil { - return err - } - - *o = ListBackupsResponse(varListBackupsResponse) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "instanceBackups") - o.AdditionalProperties = additionalProperties - } - - return err -} - -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) -}