diff --git a/CHANGELOG.md b/CHANGELOG.md index da4836aaf..634768c4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,9 @@ - **Internal:** Backwards compatible change to generated code - `secretsmanager`: [v0.11.1](services/secretsmanager/CHANGELOG.md#v0111-2025-03-19) - **Internal:** Backwards compatible change to generated code +- `secretsmanager`: [v0.11.2](services/secretsmanager/CHANGELOG.md#v0112-2025-03-20) + - **Improvement:** Error handling + - **Feature:** Add description to `UpdateUserPayload` - `serviceaccount`: [v0.6.1](services/serviceaccount/CHANGELOG.md#v061-2025-03-19) - **Internal:** Backwards compatible change to generated code - `serviceenablement`: [v1.0.1](services/serviceenablement/CHANGELOG.md#v101-2025-03-19) diff --git a/services/secretsmanager/CHANGELOG.md b/services/secretsmanager/CHANGELOG.md index a978490d6..1fc8a2b5c 100644 --- a/services/secretsmanager/CHANGELOG.md +++ b/services/secretsmanager/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.11.2 (2025-03-20) +- **Improvement:** Error handling +- **Feature:** Add description to `UpdateUserPayload` + ## v0.11.1 (2025-03-19) - **Internal:** Backwards compatible change to generated code diff --git a/services/secretsmanager/api_default.go b/services/secretsmanager/api_default.go index 042ce05f1..20be7ba1b 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.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -73,7 +73,7 @@ func (r ApiCreateACLRequest) Execute() (*ACL, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -114,6 +114,39 @@ func (r ApiCreateACLRequest) Execute() (*ACL, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 NotFound + 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 + } return localVarReturnValue, newErr } @@ -204,7 +237,7 @@ func (r ApiCreateInstanceRequest) Execute() (*Instance, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -245,6 +278,28 @@ func (r ApiCreateInstanceRequest) Execute() (*Instance, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 + } return localVarReturnValue, newErr } @@ -334,7 +389,7 @@ func (r ApiCreateUserRequest) Execute() (*User, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -375,6 +430,50 @@ func (r ApiCreateUserRequest) Execute() (*User, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 NotFound + 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 == 409 { + var v Conflict + 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 + } return localVarReturnValue, newErr } @@ -459,7 +558,7 @@ func (r ApiDeleteACLRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -498,6 +597,39 @@ func (r ApiDeleteACLRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v NotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -573,7 +705,7 @@ func (r ApiDeleteInstanceRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -612,6 +744,39 @@ func (r ApiDeleteInstanceRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v NotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -686,7 +851,7 @@ func (r ApiDeleteUserRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -725,6 +890,39 @@ func (r ApiDeleteUserRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v NotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -803,7 +1001,7 @@ func (r ApiGetACLRequest) Execute() (*ACL, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -842,6 +1040,39 @@ func (r ApiGetACLRequest) Execute() (*ACL, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 NotFound + 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 + } return localVarReturnValue, newErr } @@ -928,7 +1159,7 @@ func (r ApiGetInstanceRequest) Execute() (*Instance, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -967,6 +1198,39 @@ func (r ApiGetInstanceRequest) Execute() (*Instance, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 NotFound + 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 + } return localVarReturnValue, newErr } @@ -1052,7 +1316,7 @@ func (r ApiGetUserRequest) Execute() (*User, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1091,6 +1355,39 @@ func (r ApiGetUserRequest) Execute() (*User, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 NotFound + 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 + } return localVarReturnValue, newErr } @@ -1177,7 +1474,7 @@ func (r ApiListACLsRequest) Execute() (*ListACLsResponse, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1216,6 +1513,39 @@ func (r ApiListACLsRequest) Execute() (*ListACLsResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 NotFound + 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 + } return localVarReturnValue, newErr } @@ -1297,7 +1627,7 @@ func (r ApiListInstancesRequest) Execute() (*ListInstancesResponse, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1336,6 +1666,28 @@ func (r ApiListInstancesRequest) Execute() (*ListInstancesResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 + } return localVarReturnValue, newErr } @@ -1416,7 +1768,7 @@ func (r ApiListUsersRequest) Execute() (*ListUsersResponse, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1455,6 +1807,39 @@ func (r ApiListUsersRequest) Execute() (*ListUsersResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + 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 == 401 { + var v string + 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 NotFound + 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 + } return localVarReturnValue, newErr } @@ -1548,7 +1933,7 @@ func (r ApiUpdateACLRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1589,6 +1974,39 @@ func (r ApiUpdateACLRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v NotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -1673,7 +2091,7 @@ func (r ApiUpdateACLsRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1714,6 +2132,39 @@ func (r ApiUpdateACLsRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v NotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -1795,7 +2246,7 @@ func (r ApiUpdateInstanceRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1836,6 +2287,39 @@ func (r ApiUpdateInstanceRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v NotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -1919,7 +2403,7 @@ func (r ApiUpdateUserRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1960,6 +2444,39 @@ func (r ApiUpdateUserRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v BadRequest + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v NotFound + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } diff --git a/services/secretsmanager/client.go b/services/secretsmanager/client.go index bba3766cb..8466e7b28 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.4.0 +API version: 1.4.1 */ // 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.4.0 +// APIClient manages communication with the STACKIT Secrets Manager API API v1.4.1 // 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 c244f1b7a..c8c075765 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.4.0 +API version: 1.4.1 */ // 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 91c9b7d4e..090f50e61 100644 --- a/services/secretsmanager/model_acl.go +++ b/services/secretsmanager/model_acl.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_bad_request.go b/services/secretsmanager/model_bad_request.go new file mode 100644 index 000000000..ab3291c13 --- /dev/null +++ b/services/secretsmanager/model_bad_request.go @@ -0,0 +1,127 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package secretsmanager + +import ( + "encoding/json" +) + +// checks if the BadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BadRequest{} + +/* + types and functions for message +*/ + +// isNotNullableString +type BadRequestGetMessageAttributeType = *string + +func getBadRequestGetMessageAttributeTypeOk(arg BadRequestGetMessageAttributeType) (ret BadRequestGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setBadRequestGetMessageAttributeType(arg *BadRequestGetMessageAttributeType, val BadRequestGetMessageRetType) { + *arg = &val +} + +type BadRequestGetMessageArgType = string +type BadRequestGetMessageRetType = string + +// BadRequest struct for BadRequest +type BadRequest struct { + // The error message for bad requests + // REQUIRED + Message BadRequestGetMessageAttributeType `json:"message"` +} + +type _BadRequest BadRequest + +// NewBadRequest instantiates a new BadRequest 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 NewBadRequest(message BadRequestGetMessageArgType) *BadRequest { + this := BadRequest{} + setBadRequestGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewBadRequestWithDefaults instantiates a new BadRequest 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 NewBadRequestWithDefaults() *BadRequest { + this := BadRequest{} + return &this +} + +// GetMessage returns the Message field value +func (o *BadRequest) GetMessage() (ret BadRequestGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *BadRequest) GetMessageOk() (ret BadRequestGetMessageRetType, ok bool) { + return getBadRequestGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *BadRequest) SetMessage(v BadRequestGetMessageRetType) { + setBadRequestGetMessageAttributeType(&o.Message, v) +} + +func (o BadRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getBadRequestGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableBadRequest struct { + value *BadRequest + isSet bool +} + +func (v NullableBadRequest) Get() *BadRequest { + return v.value +} + +func (v *NullableBadRequest) Set(val *BadRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBadRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBadRequest(val *BadRequest) *NullableBadRequest { + return &NullableBadRequest{value: val, isSet: true} +} + +func (v NullableBadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/secretsmanager/model_conflict.go b/services/secretsmanager/model_conflict.go new file mode 100644 index 000000000..e02a06095 --- /dev/null +++ b/services/secretsmanager/model_conflict.go @@ -0,0 +1,127 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package secretsmanager + +import ( + "encoding/json" +) + +// checks if the Conflict type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Conflict{} + +/* + types and functions for message +*/ + +// isNotNullableString +type ConflictGetMessageAttributeType = *string + +func getConflictGetMessageAttributeTypeOk(arg ConflictGetMessageAttributeType) (ret ConflictGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setConflictGetMessageAttributeType(arg *ConflictGetMessageAttributeType, val ConflictGetMessageRetType) { + *arg = &val +} + +type ConflictGetMessageArgType = string +type ConflictGetMessageRetType = string + +// Conflict struct for Conflict +type Conflict struct { + // The error message for conflicts + // REQUIRED + Message ConflictGetMessageAttributeType `json:"message"` +} + +type _Conflict Conflict + +// NewConflict instantiates a new Conflict 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 NewConflict(message ConflictGetMessageArgType) *Conflict { + this := Conflict{} + setConflictGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewConflictWithDefaults instantiates a new Conflict 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 NewConflictWithDefaults() *Conflict { + this := Conflict{} + return &this +} + +// GetMessage returns the Message field value +func (o *Conflict) GetMessage() (ret ConflictGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Conflict) GetMessageOk() (ret ConflictGetMessageRetType, ok bool) { + return getConflictGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *Conflict) SetMessage(v ConflictGetMessageRetType) { + setConflictGetMessageAttributeType(&o.Message, v) +} + +func (o Conflict) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getConflictGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableConflict struct { + value *Conflict + isSet bool +} + +func (v NullableConflict) Get() *Conflict { + return v.value +} + +func (v *NullableConflict) Set(val *Conflict) { + v.value = val + v.isSet = true +} + +func (v NullableConflict) IsSet() bool { + return v.isSet +} + +func (v *NullableConflict) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConflict(val *Conflict) *NullableConflict { + return &NullableConflict{value: val, isSet: true} +} + +func (v NullableConflict) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConflict) 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 0d8963766..56a5d51b3 100644 --- a/services/secretsmanager/model_create_acl_payload.go +++ b/services/secretsmanager/model_create_acl_payload.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_create_instance_payload.go b/services/secretsmanager/model_create_instance_payload.go index a4f0affcc..115655c62 100644 --- a/services/secretsmanager/model_create_instance_payload.go +++ b/services/secretsmanager/model_create_instance_payload.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_create_user_payload.go b/services/secretsmanager/model_create_user_payload.go index 4bc9b53e3..df5d9d70a 100644 --- a/services/secretsmanager/model_create_user_payload.go +++ b/services/secretsmanager/model_create_user_payload.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_instance.go b/services/secretsmanager/model_instance.go index c97fc505a..b08c96f6a 100644 --- a/services/secretsmanager/model_instance.go +++ b/services/secretsmanager/model_instance.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_list_acls_response.go b/services/secretsmanager/model_list_acls_response.go index d67456b7a..aaca5e02b 100644 --- a/services/secretsmanager/model_list_acls_response.go +++ b/services/secretsmanager/model_list_acls_response.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_list_instances_response.go b/services/secretsmanager/model_list_instances_response.go index a4584b247..2b53571cf 100644 --- a/services/secretsmanager/model_list_instances_response.go +++ b/services/secretsmanager/model_list_instances_response.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_list_users_response.go b/services/secretsmanager/model_list_users_response.go index 8537518f0..302bb8bfe 100644 --- a/services/secretsmanager/model_list_users_response.go +++ b/services/secretsmanager/model_list_users_response.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_not_found.go b/services/secretsmanager/model_not_found.go new file mode 100644 index 000000000..8c11ec55b --- /dev/null +++ b/services/secretsmanager/model_not_found.go @@ -0,0 +1,127 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package secretsmanager + +import ( + "encoding/json" +) + +// checks if the NotFound type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotFound{} + +/* + types and functions for message +*/ + +// isNotNullableString +type NotFoundGetMessageAttributeType = *string + +func getNotFoundGetMessageAttributeTypeOk(arg NotFoundGetMessageAttributeType) (ret NotFoundGetMessageRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setNotFoundGetMessageAttributeType(arg *NotFoundGetMessageAttributeType, val NotFoundGetMessageRetType) { + *arg = &val +} + +type NotFoundGetMessageArgType = string +type NotFoundGetMessageRetType = string + +// NotFound struct for NotFound +type NotFound struct { + // The error message for not found resources + // REQUIRED + Message NotFoundGetMessageAttributeType `json:"message"` +} + +type _NotFound NotFound + +// NewNotFound instantiates a new NotFound 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 NewNotFound(message NotFoundGetMessageArgType) *NotFound { + this := NotFound{} + setNotFoundGetMessageAttributeType(&this.Message, message) + return &this +} + +// NewNotFoundWithDefaults instantiates a new NotFound 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 NewNotFoundWithDefaults() *NotFound { + this := NotFound{} + return &this +} + +// GetMessage returns the Message field value +func (o *NotFound) GetMessage() (ret NotFoundGetMessageRetType) { + ret, _ = o.GetMessageOk() + return ret +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *NotFound) GetMessageOk() (ret NotFoundGetMessageRetType, ok bool) { + return getNotFoundGetMessageAttributeTypeOk(o.Message) +} + +// SetMessage sets field value +func (o *NotFound) SetMessage(v NotFoundGetMessageRetType) { + setNotFoundGetMessageAttributeType(&o.Message, v) +} + +func (o NotFound) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getNotFoundGetMessageAttributeTypeOk(o.Message); ok { + toSerialize["Message"] = val + } + return toSerialize, nil +} + +type NullableNotFound struct { + value *NotFound + isSet bool +} + +func (v NullableNotFound) Get() *NotFound { + return v.value +} + +func (v *NullableNotFound) Set(val *NotFound) { + v.value = val + v.isSet = true +} + +func (v NullableNotFound) IsSet() bool { + return v.isSet +} + +func (v *NullableNotFound) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNotFound(val *NotFound) *NullableNotFound { + return &NullableNotFound{value: val, isSet: true} +} + +func (v NullableNotFound) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNotFound) 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 55feefc5f..82327c3ad 100644 --- a/services/secretsmanager/model_update_acl_payload.go +++ b/services/secretsmanager/model_update_acl_payload.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_update_acls_payload.go b/services/secretsmanager/model_update_acls_payload.go index 8fba9279f..d0b01d807 100644 --- a/services/secretsmanager/model_update_acls_payload.go +++ b/services/secretsmanager/model_update_acls_payload.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_update_instance_payload.go b/services/secretsmanager/model_update_instance_payload.go index 097ca3aac..fdb13b09c 100644 --- a/services/secretsmanager/model_update_instance_payload.go +++ b/services/secretsmanager/model_update_instance_payload.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/model_update_user_payload.go b/services/secretsmanager/model_update_user_payload.go index e386efe8c..1115e0ff0 100644 --- a/services/secretsmanager/model_update_user_payload.go +++ b/services/secretsmanager/model_update_user_payload.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,6 +17,27 @@ import ( // checks if the UpdateUserPayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &UpdateUserPayload{} +/* + types and functions for description +*/ + +// isNotNullableString +type UpdateUserPayloadGetDescriptionAttributeType = *string + +func getUpdateUserPayloadGetDescriptionAttributeTypeOk(arg UpdateUserPayloadGetDescriptionAttributeType) (ret UpdateUserPayloadGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setUpdateUserPayloadGetDescriptionAttributeType(arg *UpdateUserPayloadGetDescriptionAttributeType, val UpdateUserPayloadGetDescriptionRetType) { + *arg = &val +} + +type UpdateUserPayloadGetDescriptionArgType = string +type UpdateUserPayloadGetDescriptionRetType = string + /* types and functions for write */ @@ -39,6 +60,8 @@ func setUpdateUserPayloadgetWriteAttributeType(arg *UpdateUserPayloadgetWriteAtt // UpdateUserPayload struct for UpdateUserPayload type UpdateUserPayload struct { + // A user chosen description to differentiate between multiple users. + Description UpdateUserPayloadGetDescriptionAttributeType `json:"description,omitempty"` // Is true if the user has write access to the secrets engine. Is false for a read-only user. Write UpdateUserPayloadgetWriteAttributeType `json:"write,omitempty"` } @@ -60,6 +83,29 @@ func NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { return &this } +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateUserPayload) GetDescription() (res UpdateUserPayloadGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return +} + +// 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 *UpdateUserPayload) GetDescriptionOk() (ret UpdateUserPayloadGetDescriptionRetType, ok bool) { + return getUpdateUserPayloadGetDescriptionAttributeTypeOk(o.Description) +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateUserPayload) HasDescription() bool { + _, ok := o.GetDescriptionOk() + return ok +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateUserPayload) SetDescription(v UpdateUserPayloadGetDescriptionRetType) { + setUpdateUserPayloadGetDescriptionAttributeType(&o.Description, v) +} + // GetWrite returns the Write field value if set, zero value otherwise. func (o *UpdateUserPayload) GetWrite() (res UpdateUserPayloadgetWriteRetType) { res, _ = o.GetWriteOk() @@ -85,6 +131,9 @@ func (o *UpdateUserPayload) SetWrite(v UpdateUserPayloadgetWriteRetType) { func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if val, ok := getUpdateUserPayloadGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } if val, ok := getUpdateUserPayloadgetWriteAttributeTypeOk(o.Write); ok { toSerialize["Write"] = val } diff --git a/services/secretsmanager/model_user.go b/services/secretsmanager/model_user.go index 4257015de..1e8e8d3e5 100644 --- a/services/secretsmanager/model_user.go +++ b/services/secretsmanager/model_user.go @@ -3,7 +3,7 @@ STACKIT Secrets Manager API This API provides endpoints for managing the Secrets-Manager. -API version: 1.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/secretsmanager/utils.go b/services/secretsmanager/utils.go index 278cb1405..5497efd93 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.4.0 +API version: 1.4.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.