diff --git a/CHANGELOG.md b/CHANGELOG.md index cbdf22457..b1761a6a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## Release (2024-XX-XX) +- `secretsmanager`: [v0.9.0](services/secretsmanager/CHANGELOG.md#v090-2024-08-16) + - **Feature**: New API method `UpdateInstance` to update an instance - `sqlserverflex`: [v0.5.0](services/sqlserverflex/CHANGELOG.md#v050-2024-08-16) - **Breaking change**: - Fields in `GetBackupResponse` are not nested in an `Item` field (with type `Backup`) anymore diff --git a/services/secretsmanager/CHANGELOG.md b/services/secretsmanager/CHANGELOG.md index 46a126141..cefde9cd4 100644 --- a/services/secretsmanager/CHANGELOG.md +++ b/services/secretsmanager/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.9.0 (2024-08-16) + +- **Feature**: New API method `UpdateInstance` to update an instance + ## v0.8.0 (2024-05-23) - **Breaking change**: Rename data types for uniformity diff --git a/services/secretsmanager/api_default.go b/services/secretsmanager/api_default.go index 1dc3911b1..042ce05f1 100644 --- a/services/secretsmanager/api_default.go +++ b/services/secretsmanager/api_default.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -1749,6 +1749,128 @@ func (a *APIClient) UpdateACLsExecute(ctx context.Context, projectId string, ins return r.Execute() } +type ApiUpdateInstanceRequest struct { + ctx context.Context + apiService *DefaultApiService + projectId string + instanceId string + updateInstancePayload *UpdateInstancePayload +} + +func (r ApiUpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { + r.updateInstancePayload = &updateInstancePayload + return r +} + +func (r ApiUpdateInstanceRequest) Execute() error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + a := r.apiService + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateInstance") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + 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{} + if r.updateInstancePayload == nil { + return fmt.Errorf("updateInstancePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateInstancePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + } + return newErr + } + + return nil +} + +/* +UpdateInstance: Method for UpdateInstance + +Updates the given Secrets Manager instance. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. + @param instanceId The Secrets Manager instance UUID. + @return ApiUpdateInstanceRequest +*/ +func (a *APIClient) UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) error { + r := ApiUpdateInstanceRequest{ + apiService: a.defaultApi, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } + return r.Execute() +} + type ApiUpdateUserRequest struct { ctx context.Context apiService *DefaultApiService diff --git a/services/secretsmanager/api_default_test.go b/services/secretsmanager/api_default_test.go index 230142dab..ddd54ccc7 100644 --- a/services/secretsmanager/api_default_test.go +++ b/services/secretsmanager/api_default_test.go @@ -777,6 +777,56 @@ func Test_secretsmanager_DefaultApiService(t *testing.T) { } }) + t.Run("Test DefaultApiService UpdateInstance", func(t *testing.T) { + path := "/v1/projects/{projectId}/instances/{instanceId}" + 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) { + }) + 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 secretsmanager_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" + updateInstancePayload := UpdateInstancePayload{} + + reqErr := apiClient.UpdateInstance(context.Background(), projectId, instanceId).UpdateInstancePayload(updateInstancePayload).Execute() + + if reqErr != nil { + t.Fatalf("error in call: %v", reqErr) + } + }) + t.Run("Test DefaultApiService UpdateUser", func(t *testing.T) { path := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId" diff --git a/services/secretsmanager/client.go b/services/secretsmanager/client.go index 8c4203fdf..bba3766cb 100644 --- a/services/secretsmanager/client.go +++ b/services/secretsmanager/client.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -42,7 +42,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the STACKIT Secrets Manager API API v1.2.0 +// APIClient manages communication with the STACKIT Secrets Manager API API v1.4.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *config.Configuration diff --git a/services/secretsmanager/configuration.go b/services/secretsmanager/configuration.go index 6d67e6d2f..c244f1b7a 100644 --- a/services/secretsmanager/configuration.go +++ b/services/secretsmanager/configuration.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_acl.go b/services/secretsmanager/model_acl.go index 4b8dc85cd..b2644461e 100644 --- a/services/secretsmanager/model_acl.go +++ b/services/secretsmanager/model_acl.go @@ -3,20 +3,13 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -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 { // The given IP/IP Range that is permitted to access. @@ -26,115 +19,3 @@ type ACL struct { // REQUIRED Id *string `json:"id"` } - -type _ACL ACL - -// 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(cidr *string, id *string) *ACL { - this := ACL{} - this.Cidr = cidr - this.Id = id - 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 -} - -// GetCidr returns the Cidr field value -func (o *ACL) GetCidr() *string { - if o == nil { - var ret *string - return ret - } - - return o.Cidr -} - -// GetCidrOk returns a tuple with the Cidr field value -// and a boolean to check if the value has been set. -func (o *ACL) GetCidrOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Cidr, true -} - -// SetCidr sets field value -func (o *ACL) SetCidr(v *string) { - o.Cidr = v -} - -// GetId returns the Id field value -func (o *ACL) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ACL) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *ACL) SetId(v *string) { - o.Id = v -} - -func (o ACL) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cidr"] = o.Cidr - toSerialize["id"] = o.Id - 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/secretsmanager/model_create_acl_payload.go b/services/secretsmanager/model_create_acl_payload.go index c2b4ca179..c6e5e79ec 100644 --- a/services/secretsmanager/model_create_acl_payload.go +++ b/services/secretsmanager/model_create_acl_payload.go @@ -3,109 +3,16 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -import ( - "encoding/json" -) - -// checks if the CreateACLPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CreateACLPayload{} - // CreateACLPayload struct for CreateACLPayload type CreateACLPayload struct { // The given IP/IP Range that is permitted to access. // REQUIRED Cidr *string `json:"cidr"` } - -type _CreateACLPayload CreateACLPayload - -// NewCreateACLPayload instantiates a new CreateACLPayload 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 NewCreateACLPayload(cidr *string) *CreateACLPayload { - this := CreateACLPayload{} - this.Cidr = cidr - return &this -} - -// NewCreateACLPayloadWithDefaults instantiates a new CreateACLPayload 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 NewCreateACLPayloadWithDefaults() *CreateACLPayload { - this := CreateACLPayload{} - return &this -} - -// GetCidr returns the Cidr field value -func (o *CreateACLPayload) GetCidr() *string { - if o == nil { - var ret *string - return ret - } - - return o.Cidr -} - -// GetCidrOk returns a tuple with the Cidr field value -// and a boolean to check if the value has been set. -func (o *CreateACLPayload) GetCidrOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Cidr, true -} - -// SetCidr sets field value -func (o *CreateACLPayload) SetCidr(v *string) { - o.Cidr = v -} - -func (o CreateACLPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cidr"] = o.Cidr - return toSerialize, nil -} - -type NullableCreateACLPayload struct { - value *CreateACLPayload - isSet bool -} - -func (v NullableCreateACLPayload) Get() *CreateACLPayload { - return v.value -} - -func (v *NullableCreateACLPayload) Set(val *CreateACLPayload) { - v.value = val - v.isSet = true -} - -func (v NullableCreateACLPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateACLPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateACLPayload(val *CreateACLPayload) *NullableCreateACLPayload { - return &NullableCreateACLPayload{value: val, isSet: true} -} - -func (v NullableCreateACLPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateACLPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/secretsmanager/model_create_instance_payload.go b/services/secretsmanager/model_create_instance_payload.go index 1037bfc34..5cd3befc1 100644 --- a/services/secretsmanager/model_create_instance_payload.go +++ b/services/secretsmanager/model_create_instance_payload.go @@ -3,109 +3,16 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -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 { // A user chosen name to distinguish multiple secrets manager instances. // REQUIRED Name *string `json:"name"` } - -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(name *string) *CreateInstancePayload { - this := CreateInstancePayload{} - this.Name = name - 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 -} - -// 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 -} - -func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - 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/secretsmanager/model_create_user_payload.go b/services/secretsmanager/model_create_user_payload.go index 918b56b94..0cdc700c6 100644 --- a/services/secretsmanager/model_create_user_payload.go +++ b/services/secretsmanager/model_create_user_payload.go @@ -3,20 +3,13 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -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 { // A user chosen description to differentiate between multiple users. @@ -26,115 +19,3 @@ type CreateUserPayload struct { // REQUIRED Write *bool `json:"write"` } - -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(description *string, write *bool) *CreateUserPayload { - this := CreateUserPayload{} - this.Description = description - this.Write = write - 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 -} - -// GetDescription returns the Description field value -func (o *CreateUserPayload) GetDescription() *string { - if o == nil { - var ret *string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *CreateUserPayload) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true -} - -// SetDescription sets field value -func (o *CreateUserPayload) SetDescription(v *string) { - o.Description = v -} - -// GetWrite returns the Write field value -func (o *CreateUserPayload) GetWrite() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Write -} - -// GetWriteOk returns a tuple with the Write field value -// and a boolean to check if the value has been set. -func (o *CreateUserPayload) GetWriteOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Write, true -} - -// SetWrite sets field value -func (o *CreateUserPayload) SetWrite(v *bool) { - o.Write = v -} - -func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["write"] = o.Write - 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/secretsmanager/model_instance.go b/services/secretsmanager/model_instance.go index 13662418e..82894a8b2 100644 --- a/services/secretsmanager/model_instance.go +++ b/services/secretsmanager/model_instance.go @@ -3,20 +3,13 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -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 { // The API endpoint for connecting to the secrets engine. @@ -45,350 +38,3 @@ type Instance struct { UpdateFinishedDate *string `json:"updateFinishedDate,omitempty"` UpdateStartDate *string `json:"updateStartDate,omitempty"` } - -type _Instance Instance - -// 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(apiUrl *string, creationStartDate *string, id *string, name *string, secretCount *int64, secretsEngine *string, state *string) *Instance { - this := Instance{} - this.ApiUrl = apiUrl - this.CreationStartDate = creationStartDate - this.Id = id - this.Name = name - this.SecretCount = secretCount - this.SecretsEngine = secretsEngine - this.State = state - 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 -} - -// GetApiUrl returns the ApiUrl field value -func (o *Instance) GetApiUrl() *string { - if o == nil { - var ret *string - return ret - } - - return o.ApiUrl -} - -// GetApiUrlOk returns a tuple with the ApiUrl field value -// and a boolean to check if the value has been set. -func (o *Instance) GetApiUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ApiUrl, true -} - -// SetApiUrl sets field value -func (o *Instance) SetApiUrl(v *string) { - o.ApiUrl = v -} - -// GetCreationFinishedDate returns the CreationFinishedDate field value if set, zero value otherwise. -func (o *Instance) GetCreationFinishedDate() *string { - if o == nil || IsNil(o.CreationFinishedDate) { - var ret *string - return ret - } - return o.CreationFinishedDate -} - -// GetCreationFinishedDateOk returns a tuple with the CreationFinishedDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetCreationFinishedDateOk() (*string, bool) { - if o == nil || IsNil(o.CreationFinishedDate) { - return nil, false - } - return o.CreationFinishedDate, true -} - -// HasCreationFinishedDate returns a boolean if a field has been set. -func (o *Instance) HasCreationFinishedDate() bool { - if o != nil && !IsNil(o.CreationFinishedDate) { - return true - } - - return false -} - -// SetCreationFinishedDate gets a reference to the given string and assigns it to the CreationFinishedDate field. -func (o *Instance) SetCreationFinishedDate(v *string) { - o.CreationFinishedDate = v -} - -// GetCreationStartDate returns the CreationStartDate field value -func (o *Instance) GetCreationStartDate() *string { - if o == nil { - var ret *string - return ret - } - - return o.CreationStartDate -} - -// GetCreationStartDateOk returns a tuple with the CreationStartDate field value -// and a boolean to check if the value has been set. -func (o *Instance) GetCreationStartDateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CreationStartDate, true -} - -// SetCreationStartDate sets field value -func (o *Instance) SetCreationStartDate(v *string) { - o.CreationStartDate = v -} - -// GetId returns the Id field value -func (o *Instance) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *Instance) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *Instance) SetId(v *string) { - o.Id = v -} - -// GetName returns the Name field value -func (o *Instance) 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 *Instance) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Name, true -} - -// SetName sets field value -func (o *Instance) SetName(v *string) { - o.Name = v -} - -// GetSecretCount returns the SecretCount field value -func (o *Instance) GetSecretCount() *int64 { - if o == nil { - var ret *int64 - return ret - } - - return o.SecretCount -} - -// GetSecretCountOk returns a tuple with the SecretCount field value -// and a boolean to check if the value has been set. -func (o *Instance) GetSecretCountOk() (*int64, bool) { - if o == nil { - return nil, false - } - return o.SecretCount, true -} - -// SetSecretCount sets field value -func (o *Instance) SetSecretCount(v *int64) { - o.SecretCount = v -} - -// GetSecretsEngine returns the SecretsEngine field value -func (o *Instance) GetSecretsEngine() *string { - if o == nil { - var ret *string - return ret - } - - return o.SecretsEngine -} - -// GetSecretsEngineOk returns a tuple with the SecretsEngine field value -// and a boolean to check if the value has been set. -func (o *Instance) GetSecretsEngineOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.SecretsEngine, true -} - -// SetSecretsEngine sets field value -func (o *Instance) SetSecretsEngine(v *string) { - o.SecretsEngine = v -} - -// GetState returns the State field value -func (o *Instance) GetState() *string { - if o == nil { - var ret *string - return ret - } - - return o.State -} - -// GetStateOk returns a tuple with the State field value -// and a boolean to check if the value has been set. -func (o *Instance) GetStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.State, true -} - -// SetState sets field value -func (o *Instance) SetState(v *string) { - o.State = v -} - -// GetUpdateFinishedDate returns the UpdateFinishedDate field value if set, zero value otherwise. -func (o *Instance) GetUpdateFinishedDate() *string { - if o == nil || IsNil(o.UpdateFinishedDate) { - var ret *string - return ret - } - return o.UpdateFinishedDate -} - -// GetUpdateFinishedDateOk returns a tuple with the UpdateFinishedDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetUpdateFinishedDateOk() (*string, bool) { - if o == nil || IsNil(o.UpdateFinishedDate) { - return nil, false - } - return o.UpdateFinishedDate, true -} - -// HasUpdateFinishedDate returns a boolean if a field has been set. -func (o *Instance) HasUpdateFinishedDate() bool { - if o != nil && !IsNil(o.UpdateFinishedDate) { - return true - } - - return false -} - -// SetUpdateFinishedDate gets a reference to the given string and assigns it to the UpdateFinishedDate field. -func (o *Instance) SetUpdateFinishedDate(v *string) { - o.UpdateFinishedDate = v -} - -// GetUpdateStartDate returns the UpdateStartDate field value if set, zero value otherwise. -func (o *Instance) GetUpdateStartDate() *string { - if o == nil || IsNil(o.UpdateStartDate) { - var ret *string - return ret - } - return o.UpdateStartDate -} - -// GetUpdateStartDateOk returns a tuple with the UpdateStartDate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Instance) GetUpdateStartDateOk() (*string, bool) { - if o == nil || IsNil(o.UpdateStartDate) { - return nil, false - } - return o.UpdateStartDate, true -} - -// HasUpdateStartDate returns a boolean if a field has been set. -func (o *Instance) HasUpdateStartDate() bool { - if o != nil && !IsNil(o.UpdateStartDate) { - return true - } - - return false -} - -// SetUpdateStartDate gets a reference to the given string and assigns it to the UpdateStartDate field. -func (o *Instance) SetUpdateStartDate(v *string) { - o.UpdateStartDate = v -} - -func (o Instance) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["apiUrl"] = o.ApiUrl - if !IsNil(o.CreationFinishedDate) { - toSerialize["creationFinishedDate"] = o.CreationFinishedDate - } - toSerialize["creationStartDate"] = o.CreationStartDate - toSerialize["id"] = o.Id - toSerialize["name"] = o.Name - toSerialize["secretCount"] = o.SecretCount - toSerialize["secretsEngine"] = o.SecretsEngine - toSerialize["state"] = o.State - if !IsNil(o.UpdateFinishedDate) { - toSerialize["updateFinishedDate"] = o.UpdateFinishedDate - } - if !IsNil(o.UpdateStartDate) { - toSerialize["updateStartDate"] = o.UpdateStartDate - } - 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/secretsmanager/model_list_acls_response.go b/services/secretsmanager/model_list_acls_response.go index 19df3678f..4c6b0ff5f 100644 --- a/services/secretsmanager/model_list_acls_response.go +++ b/services/secretsmanager/model_list_acls_response.go @@ -3,108 +3,15 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -import ( - "encoding/json" -) - -// checks if the ListACLsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ListACLsResponse{} - // ListACLsResponse struct for ListACLsResponse type ListACLsResponse struct { // REQUIRED Acls *[]ACL `json:"acls"` } - -type _ListACLsResponse ListACLsResponse - -// NewListACLsResponse instantiates a new ListACLsResponse 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 NewListACLsResponse(acls *[]ACL) *ListACLsResponse { - this := ListACLsResponse{} - this.Acls = acls - return &this -} - -// NewListACLsResponseWithDefaults instantiates a new ListACLsResponse 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 NewListACLsResponseWithDefaults() *ListACLsResponse { - this := ListACLsResponse{} - return &this -} - -// GetAcls returns the Acls field value -func (o *ListACLsResponse) GetAcls() *[]ACL { - if o == nil { - var ret *[]ACL - return ret - } - - return o.Acls -} - -// GetAclsOk returns a tuple with the Acls field value -// and a boolean to check if the value has been set. -func (o *ListACLsResponse) GetAclsOk() (*[]ACL, bool) { - if o == nil { - return nil, false - } - return o.Acls, true -} - -// SetAcls sets field value -func (o *ListACLsResponse) SetAcls(v *[]ACL) { - o.Acls = v -} - -func (o ListACLsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["acls"] = o.Acls - return toSerialize, nil -} - -type NullableListACLsResponse struct { - value *ListACLsResponse - isSet bool -} - -func (v NullableListACLsResponse) Get() *ListACLsResponse { - return v.value -} - -func (v *NullableListACLsResponse) Set(val *ListACLsResponse) { - v.value = val - v.isSet = true -} - -func (v NullableListACLsResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableListACLsResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableListACLsResponse(val *ListACLsResponse) *NullableListACLsResponse { - return &NullableListACLsResponse{value: val, isSet: true} -} - -func (v NullableListACLsResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableListACLsResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/secretsmanager/model_list_instances_response.go b/services/secretsmanager/model_list_instances_response.go index 1f3e74544..21e92436b 100644 --- a/services/secretsmanager/model_list_instances_response.go +++ b/services/secretsmanager/model_list_instances_response.go @@ -3,108 +3,15 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -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 { // REQUIRED Instances *[]Instance `json:"instances"` } - -type _ListInstancesResponse ListInstancesResponse - -// 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(instances *[]Instance) *ListInstancesResponse { - this := ListInstancesResponse{} - this.Instances = instances - 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 -} - -// GetInstances returns the Instances field value -func (o *ListInstancesResponse) GetInstances() *[]Instance { - if o == nil { - var ret *[]Instance - return ret - } - - return o.Instances -} - -// GetInstancesOk returns a tuple with the Instances field value -// and a boolean to check if the value has been set. -func (o *ListInstancesResponse) GetInstancesOk() (*[]Instance, bool) { - if o == nil { - return nil, false - } - return o.Instances, true -} - -// SetInstances sets field value -func (o *ListInstancesResponse) SetInstances(v *[]Instance) { - o.Instances = v -} - -func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["instances"] = o.Instances - 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/secretsmanager/model_list_users_response.go b/services/secretsmanager/model_list_users_response.go index ac143d50d..6ea1967b0 100644 --- a/services/secretsmanager/model_list_users_response.go +++ b/services/secretsmanager/model_list_users_response.go @@ -3,108 +3,15 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -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 { // REQUIRED Users *[]User `json:"users"` } - -type _ListUsersResponse ListUsersResponse - -// 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(users *[]User) *ListUsersResponse { - this := ListUsersResponse{} - this.Users = users - 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 -} - -// GetUsers returns the Users field value -func (o *ListUsersResponse) GetUsers() *[]User { - if o == nil { - var ret *[]User - return ret - } - - return o.Users -} - -// GetUsersOk returns a tuple with the Users field value -// and a boolean to check if the value has been set. -func (o *ListUsersResponse) GetUsersOk() (*[]User, bool) { - if o == nil { - return nil, false - } - return o.Users, true -} - -// SetUsers sets field value -func (o *ListUsersResponse) SetUsers(v *[]User) { - o.Users = v -} - -func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["users"] = o.Users - 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/secretsmanager/model_update_acl_payload.go b/services/secretsmanager/model_update_acl_payload.go index 9e2692e2f..bea51ac50 100644 --- a/services/secretsmanager/model_update_acl_payload.go +++ b/services/secretsmanager/model_update_acl_payload.go @@ -3,109 +3,16 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -import ( - "encoding/json" -) - -// checks if the UpdateACLPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateACLPayload{} - // UpdateACLPayload struct for UpdateACLPayload type UpdateACLPayload struct { // The given IP/IP Range that is permitted to access. // REQUIRED Cidr *string `json:"cidr"` } - -type _UpdateACLPayload UpdateACLPayload - -// NewUpdateACLPayload instantiates a new UpdateACLPayload 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 NewUpdateACLPayload(cidr *string) *UpdateACLPayload { - this := UpdateACLPayload{} - this.Cidr = cidr - return &this -} - -// NewUpdateACLPayloadWithDefaults instantiates a new UpdateACLPayload 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 NewUpdateACLPayloadWithDefaults() *UpdateACLPayload { - this := UpdateACLPayload{} - return &this -} - -// GetCidr returns the Cidr field value -func (o *UpdateACLPayload) GetCidr() *string { - if o == nil { - var ret *string - return ret - } - - return o.Cidr -} - -// GetCidrOk returns a tuple with the Cidr field value -// and a boolean to check if the value has been set. -func (o *UpdateACLPayload) GetCidrOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Cidr, true -} - -// SetCidr sets field value -func (o *UpdateACLPayload) SetCidr(v *string) { - o.Cidr = v -} - -func (o UpdateACLPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cidr"] = o.Cidr - return toSerialize, nil -} - -type NullableUpdateACLPayload struct { - value *UpdateACLPayload - isSet bool -} - -func (v NullableUpdateACLPayload) Get() *UpdateACLPayload { - return v.value -} - -func (v *NullableUpdateACLPayload) Set(val *UpdateACLPayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateACLPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateACLPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateACLPayload(val *UpdateACLPayload) *NullableUpdateACLPayload { - return &NullableUpdateACLPayload{value: val, isSet: true} -} - -func (v NullableUpdateACLPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateACLPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/secretsmanager/model_update_acls_payload.go b/services/secretsmanager/model_update_acls_payload.go index 73cfca171..85b9748df 100644 --- a/services/secretsmanager/model_update_acls_payload.go +++ b/services/secretsmanager/model_update_acls_payload.go @@ -3,114 +3,14 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -import ( - "encoding/json" -) - -// checks if the UpdateACLsPayload type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UpdateACLsPayload{} - // UpdateACLsPayload struct for UpdateACLsPayload type UpdateACLsPayload struct { Cidrs *[]UpdateACLPayload `json:"cidrs,omitempty"` } - -// NewUpdateACLsPayload instantiates a new UpdateACLsPayload 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 NewUpdateACLsPayload() *UpdateACLsPayload { - this := UpdateACLsPayload{} - return &this -} - -// NewUpdateACLsPayloadWithDefaults instantiates a new UpdateACLsPayload 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 NewUpdateACLsPayloadWithDefaults() *UpdateACLsPayload { - this := UpdateACLsPayload{} - return &this -} - -// GetCidrs returns the Cidrs field value if set, zero value otherwise. -func (o *UpdateACLsPayload) GetCidrs() *[]UpdateACLPayload { - if o == nil || IsNil(o.Cidrs) { - var ret *[]UpdateACLPayload - return ret - } - return o.Cidrs -} - -// GetCidrsOk returns a tuple with the Cidrs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateACLsPayload) GetCidrsOk() (*[]UpdateACLPayload, bool) { - if o == nil || IsNil(o.Cidrs) { - return nil, false - } - return o.Cidrs, true -} - -// HasCidrs returns a boolean if a field has been set. -func (o *UpdateACLsPayload) HasCidrs() bool { - if o != nil && !IsNil(o.Cidrs) { - return true - } - - return false -} - -// SetCidrs gets a reference to the given []UpdateACLPayload and assigns it to the Cidrs field. -func (o *UpdateACLsPayload) SetCidrs(v *[]UpdateACLPayload) { - o.Cidrs = v -} - -func (o UpdateACLsPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Cidrs) { - toSerialize["cidrs"] = o.Cidrs - } - return toSerialize, nil -} - -type NullableUpdateACLsPayload struct { - value *UpdateACLsPayload - isSet bool -} - -func (v NullableUpdateACLsPayload) Get() *UpdateACLsPayload { - return v.value -} - -func (v *NullableUpdateACLsPayload) Set(val *UpdateACLsPayload) { - v.value = val - v.isSet = true -} - -func (v NullableUpdateACLsPayload) IsSet() bool { - return v.isSet -} - -func (v *NullableUpdateACLsPayload) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUpdateACLsPayload(val *UpdateACLsPayload) *NullableUpdateACLsPayload { - return &NullableUpdateACLsPayload{value: val, isSet: true} -} - -func (v NullableUpdateACLsPayload) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUpdateACLsPayload) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/services/secretsmanager/model_update_instance_payload.go b/services/secretsmanager/model_update_instance_payload.go new file mode 100644 index 000000000..f46e25877 --- /dev/null +++ b/services/secretsmanager/model_update_instance_payload.go @@ -0,0 +1,18 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package secretsmanager + +// UpdateInstancePayload struct for UpdateInstancePayload +type UpdateInstancePayload struct { + // A user chosen name to distinguish multiple secrets manager instances. + // REQUIRED + Name *string `json:"name"` +} diff --git a/services/secretsmanager/model_update_user_payload.go b/services/secretsmanager/model_update_user_payload.go index 9f843417e..5bc46daf3 100644 --- a/services/secretsmanager/model_update_user_payload.go +++ b/services/secretsmanager/model_update_user_payload.go @@ -3,115 +3,15 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -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 { // Is true if the user has write access to the secrets engine. Is false for a read-only user. Write *bool `json:"write,omitempty"` } - -// 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() *UpdateUserPayload { - this := UpdateUserPayload{} - 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 -} - -// GetWrite returns the Write field value if set, zero value otherwise. -func (o *UpdateUserPayload) GetWrite() *bool { - if o == nil || IsNil(o.Write) { - var ret *bool - return ret - } - return o.Write -} - -// GetWriteOk returns a tuple with the Write field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UpdateUserPayload) GetWriteOk() (*bool, bool) { - if o == nil || IsNil(o.Write) { - return nil, false - } - return o.Write, true -} - -// HasWrite returns a boolean if a field has been set. -func (o *UpdateUserPayload) HasWrite() bool { - if o != nil && !IsNil(o.Write) { - return true - } - - return false -} - -// SetWrite gets a reference to the given bool and assigns it to the Write field. -func (o *UpdateUserPayload) SetWrite(v *bool) { - o.Write = v -} - -func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Write) { - toSerialize["write"] = o.Write - } - 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/secretsmanager/model_user.go b/services/secretsmanager/model_user.go index 335247dd5..043ba5fd1 100644 --- a/services/secretsmanager/model_user.go +++ b/services/secretsmanager/model_user.go @@ -3,20 +3,13 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package secretsmanager -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 { // A user chosen description to differentiate between multiple users. @@ -35,193 +28,3 @@ type User struct { // REQUIRED Write *bool `json:"write"` } - -type _User User - -// 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(description *string, id *string, password *string, username *string, write *bool) *User { - this := User{} - this.Description = description - this.Id = id - this.Password = password - this.Username = username - this.Write = write - 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 -} - -// GetDescription returns the Description field value -func (o *User) GetDescription() *string { - if o == nil { - var ret *string - return ret - } - - return o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value -// and a boolean to check if the value has been set. -func (o *User) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description, true -} - -// SetDescription sets field value -func (o *User) SetDescription(v *string) { - o.Description = v -} - -// GetId returns the Id field value -func (o *User) GetId() *string { - if o == nil { - var ret *string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *User) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id, true -} - -// SetId sets field value -func (o *User) SetId(v *string) { - o.Id = v -} - -// GetPassword returns the Password field value -func (o *User) GetPassword() *string { - if o == nil { - var ret *string - return ret - } - - return o.Password -} - -// GetPasswordOk returns a tuple with the Password field value -// and a boolean to check if the value has been set. -func (o *User) GetPasswordOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Password, true -} - -// SetPassword sets field value -func (o *User) SetPassword(v *string) { - o.Password = v -} - -// GetUsername returns the Username field value -func (o *User) GetUsername() *string { - if o == nil { - var ret *string - return ret - } - - return o.Username -} - -// GetUsernameOk returns a tuple with the Username field value -// and a boolean to check if the value has been set. -func (o *User) GetUsernameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Username, true -} - -// SetUsername sets field value -func (o *User) SetUsername(v *string) { - o.Username = v -} - -// GetWrite returns the Write field value -func (o *User) GetWrite() *bool { - if o == nil { - var ret *bool - return ret - } - - return o.Write -} - -// GetWriteOk returns a tuple with the Write field value -// and a boolean to check if the value has been set. -func (o *User) GetWriteOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.Write, true -} - -// SetWrite sets field value -func (o *User) SetWrite(v *bool) { - o.Write = v -} - -func (o User) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["description"] = o.Description - toSerialize["id"] = o.Id - toSerialize["password"] = o.Password - toSerialize["username"] = o.Username - toSerialize["write"] = o.Write - 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) -} diff --git a/services/secretsmanager/utils.go b/services/secretsmanager/utils.go index 7ee0db83d..16e62e555 100644 --- a/services/secretsmanager/utils.go +++ b/services/secretsmanager/utils.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.2.0 +API version: 1.4.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.