diff --git a/services/secretsmanager/api_default.go b/services/secretsmanager/api_default.go index 3c50c2dce..ec47cccea 100644 --- a/services/secretsmanager/api_default.go +++ b/services/secretsmanager/api_default.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -23,6 +24,7 @@ import ( "github.com/stackitcloud/stackit-sdk-go/core/oapierror" ) +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApi interface { /* CreateACL Method for CreateACL @@ -32,6 +34,8 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @param instanceId The Secrets Manager instance UUID. @return ApiCreateACLRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateACL(ctx context.Context, projectId string, instanceId string) ApiCreateACLRequest /* @@ -42,6 +46,7 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @return ACL + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateACLExecute(ctx context.Context, projectId string, instanceId string) (*ACL, error) /* @@ -51,6 +56,8 @@ type DefaultApi interface { @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. @return ApiCreateInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest /* @@ -60,6 +67,7 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @return Instance + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateInstanceExecute(ctx context.Context, projectId string) (*Instance, error) /* @@ -70,6 +78,8 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @param instanceId The Secrets Manager instance UUID. @return ApiCreateUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest /* @@ -80,6 +90,7 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @return User + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateUserExecute(ctx context.Context, projectId string, instanceId string) (*User, error) /* @@ -91,11 +102,14 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @param aclId The acl UUID of the Secrets Manager instance. @return ApiDeleteACLRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiDeleteACLRequest /* DeleteACLExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteACLExecute(ctx context.Context, projectId string, instanceId string, aclId string) error /* @@ -106,11 +120,14 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @param instanceId The Secrets Manager instance UUID. @return ApiDeleteInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest /* DeleteInstanceExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string) error /* @@ -122,11 +139,14 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @param userId The user UUID with permissions on the Secrets Manager instance. @return ApiDeleteUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteUser(ctx context.Context, projectId string, instanceId string, userId string) ApiDeleteUserRequest /* DeleteUserExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error /* @@ -138,6 +158,8 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @param aclId The acl UUID of the Secrets Manager instance. @return ApiGetACLRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiGetACLRequest /* @@ -149,6 +171,7 @@ type DefaultApi interface { @param aclId The acl UUID of the Secrets Manager instance. @return ACL + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetACLExecute(ctx context.Context, projectId string, instanceId string, aclId string) (*ACL, error) /* @@ -159,6 +182,8 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @param instanceId The Secrets Manager instance UUID. @return ApiGetInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest /* @@ -169,6 +194,7 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @return Instance + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetInstanceExecute(ctx context.Context, projectId string, instanceId string) (*Instance, error) /* @@ -180,6 +206,8 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @param userId The user UUID with permissions on the Secrets Manager instance. @return ApiGetUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiGetUserRequest /* @@ -191,6 +219,7 @@ type DefaultApi interface { @param userId The user UUID with permissions on the Secrets Manager instance. @return User + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string) (*User, error) /* @@ -201,6 +230,8 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @param instanceId The Secrets Manager instance UUID. @return ApiListACLsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListACLs(ctx context.Context, projectId string, instanceId string) ApiListACLsRequest /* @@ -211,6 +242,7 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @return ListACLsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListACLsExecute(ctx context.Context, projectId string, instanceId string) (*ListACLsResponse, error) /* @@ -220,6 +252,8 @@ type DefaultApi interface { @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. @return ApiListInstancesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest /* @@ -229,6 +263,7 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @return ListInstancesResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListInstancesExecute(ctx context.Context, projectId string) (*ListInstancesResponse, error) /* @@ -239,6 +274,8 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @param instanceId The Secrets Manager instance UUID. @return ApiListUsersRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest /* @@ -249,6 +286,7 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @return ListUsersResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListUsersExecute(ctx context.Context, projectId string, instanceId string) (*ListUsersResponse, error) /* @@ -260,11 +298,14 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @param aclId The acl UUID of the Secrets Manager instance. @return ApiUpdateACLRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiUpdateACLRequest /* UpdateACLExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateACLExecute(ctx context.Context, projectId string, instanceId string, aclId string) error /* @@ -275,11 +316,14 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @param instanceId The Secrets Manager instance UUID. @return ApiUpdateACLsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateACLs(ctx context.Context, projectId string, instanceId string) ApiUpdateACLsRequest /* UpdateACLsExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateACLsExecute(ctx context.Context, projectId string, instanceId string) error /* @@ -290,11 +334,14 @@ type DefaultApi interface { @param projectId The STACKIT portal project UUID the Secrets Manager instance is part of. @param instanceId The Secrets Manager instance UUID. @return ApiUpdateInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest /* UpdateInstanceExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) error /* @@ -306,89 +353,133 @@ type DefaultApi interface { @param instanceId The Secrets Manager instance UUID. @param userId The user UUID with permissions on the Secrets Manager instance. @return ApiUpdateUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiUpdateUserRequest /* UpdateUserExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateACLRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateACLPayload(createACLPayload CreateACLPayload) ApiCreateACLRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ACL, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Instance, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateUserRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*User, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteACLRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteUserRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetACLRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ACL, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*Instance, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetUserRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*User, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListACLsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListACLsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListInstancesRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListInstancesResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListUsersRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListUsersResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateACLRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateACLPayload(updateACLPayload UpdateACLPayload) ApiUpdateACLRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateACLsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateACLsPayload(updateACLsPayload UpdateACLsPayload) ApiUpdateACLsRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateUserRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateUserPayload(updateUserPayload UpdateUserPayload) ApiUpdateUserRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } // DefaultApiService DefaultApi service +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApiService service +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateACLRequest struct { ctx context.Context apiService *DefaultApiService @@ -397,11 +488,13 @@ type CreateACLRequest struct { createACLPayload *CreateACLPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateACLRequest) CreateACLPayload(createACLPayload CreateACLPayload) ApiCreateACLRequest { r.createACLPayload = &createACLPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateACLRequest) Execute() (*ACL, error) { var ( localVarHTTPMethod = http.MethodPost @@ -544,7 +637,7 @@ func (r CreateACLRequest) Execute() (*ACL, error) { /* CreateACL: Method for CreateACL -Creates a new Secrets Manager acl within the project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -560,6 +653,7 @@ func (a *APIClient) CreateACL(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateACLExecute(ctx context.Context, projectId string, instanceId string) (*ACL, error) { r := CreateACLRequest{ apiService: a.defaultApi, @@ -570,6 +664,7 @@ func (a *APIClient) CreateACLExecute(ctx context.Context, projectId string, inst return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -577,11 +672,13 @@ type CreateInstanceRequest struct { createInstancePayload *CreateInstancePayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { r.createInstancePayload = &createInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateInstanceRequest) Execute() (*Instance, error) { var ( localVarHTTPMethod = http.MethodPost @@ -701,7 +798,7 @@ func (r CreateInstanceRequest) Execute() (*Instance, error) { /* CreateInstance: Method for CreateInstance -Creates a new Secrets Manager instance within the project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -715,6 +812,7 @@ func (a *APIClient) CreateInstance(ctx context.Context, projectId string) ApiCre } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateInstanceExecute(ctx context.Context, projectId string) (*Instance, error) { r := CreateInstanceRequest{ apiService: a.defaultApi, @@ -724,6 +822,7 @@ func (a *APIClient) CreateInstanceExecute(ctx context.Context, projectId string) return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -732,11 +831,13 @@ type CreateUserRequest struct { createUserPayload *CreateUserPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateUserRequest) CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest { r.createUserPayload = &createUserPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateUserRequest) Execute() (*User, error) { var ( localVarHTTPMethod = http.MethodPost @@ -879,7 +980,7 @@ func (r CreateUserRequest) Execute() (*User, error) { /* CreateUser: Method for CreateUser -Creates a new user for the given Secrets Manager instance. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -895,6 +996,7 @@ func (a *APIClient) CreateUser(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, instanceId string) (*User, error) { r := CreateUserRequest{ apiService: a.defaultApi, @@ -905,6 +1007,7 @@ func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, ins return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteACLRequest struct { ctx context.Context apiService *DefaultApiService @@ -913,6 +1016,7 @@ type DeleteACLRequest struct { aclId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteACLRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1029,7 +1133,7 @@ func (r DeleteACLRequest) Execute() error { /* DeleteACL: Method for DeleteACL -Deletes the given acl. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -1047,6 +1151,7 @@ func (a *APIClient) DeleteACL(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteACLExecute(ctx context.Context, projectId string, instanceId string, aclId string) error { r := DeleteACLRequest{ apiService: a.defaultApi, @@ -1058,6 +1163,7 @@ func (a *APIClient) DeleteACLExecute(ctx context.Context, projectId string, inst return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -1065,6 +1171,7 @@ type DeleteInstanceRequest struct { instanceId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteInstanceRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1180,7 +1287,7 @@ func (r DeleteInstanceRequest) Execute() error { /* DeleteInstance: Method for DeleteInstance -Deletes the given Secrets Manager instance. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -1196,6 +1303,7 @@ func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, instan } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string) error { r := DeleteInstanceRequest{ apiService: a.defaultApi, @@ -1206,6 +1314,7 @@ func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -1214,6 +1323,7 @@ type DeleteUserRequest struct { userId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteUserRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1330,7 +1440,7 @@ func (r DeleteUserRequest) Execute() error { /* DeleteUser: Method for DeleteUser -Deletes the given user. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -1348,6 +1458,7 @@ func (a *APIClient) DeleteUser(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error { r := DeleteUserRequest{ apiService: a.defaultApi, @@ -1359,6 +1470,7 @@ func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, ins return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetACLRequest struct { ctx context.Context apiService *DefaultApiService @@ -1367,6 +1479,7 @@ type GetACLRequest struct { aclId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetACLRequest) Execute() (*ACL, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1494,7 +1607,7 @@ func (r GetACLRequest) Execute() (*ACL, error) { /* GetACL: Method for GetACL -Returns the details for the given acl. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -1512,6 +1625,7 @@ func (a *APIClient) GetACL(ctx context.Context, projectId string, instanceId str } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetACLExecute(ctx context.Context, projectId string, instanceId string, aclId string) (*ACL, error) { r := GetACLRequest{ apiService: a.defaultApi, @@ -1523,6 +1637,7 @@ func (a *APIClient) GetACLExecute(ctx context.Context, projectId string, instanc return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -1530,6 +1645,7 @@ type GetInstanceRequest struct { instanceId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetInstanceRequest) Execute() (*Instance, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1656,7 +1772,7 @@ func (r GetInstanceRequest) Execute() (*Instance, error) { /* GetInstance: Method for GetInstance -Returns the details for the given Secrets Manager instance. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -1672,6 +1788,7 @@ func (a *APIClient) GetInstance(ctx context.Context, projectId string, instanceI } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, instanceId string) (*Instance, error) { r := GetInstanceRequest{ apiService: a.defaultApi, @@ -1682,6 +1799,7 @@ func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, in return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -1690,6 +1808,7 @@ type GetUserRequest struct { userId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetUserRequest) Execute() (*User, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1817,7 +1936,7 @@ func (r GetUserRequest) Execute() (*User, error) { /* GetUser: Method for GetUser -Returns the details for the given user. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -1835,6 +1954,7 @@ func (a *APIClient) GetUser(ctx context.Context, projectId string, instanceId st } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string) (*User, error) { r := GetUserRequest{ apiService: a.defaultApi, @@ -1846,6 +1966,7 @@ func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instan return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListACLsRequest struct { ctx context.Context apiService *DefaultApiService @@ -1853,6 +1974,7 @@ type ListACLsRequest struct { instanceId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListACLsRequest) Execute() (*ListACLsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1979,7 +2101,7 @@ func (r ListACLsRequest) Execute() (*ListACLsResponse, error) { /* ListACLs: Method for ListACLs -Returns the acls for the given Secrets Manager instance. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -1995,6 +2117,7 @@ func (a *APIClient) ListACLs(ctx context.Context, projectId string, instanceId s } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListACLsExecute(ctx context.Context, projectId string, instanceId string) (*ListACLsResponse, error) { r := ListACLsRequest{ apiService: a.defaultApi, @@ -2005,12 +2128,14 @@ func (a *APIClient) ListACLsExecute(ctx context.Context, projectId string, insta return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesRequest struct { ctx context.Context apiService *DefaultApiService projectId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2125,7 +2250,7 @@ func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { /* ListInstances: Method for ListInstances -Returns a list of all Secrets Manager instances within the project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -2139,6 +2264,7 @@ func (a *APIClient) ListInstances(ctx context.Context, projectId string) ApiList } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string) (*ListInstancesResponse, error) { r := ListInstancesRequest{ apiService: a.defaultApi, @@ -2148,6 +2274,7 @@ func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string) return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersRequest struct { ctx context.Context apiService *DefaultApiService @@ -2155,6 +2282,7 @@ type ListUsersRequest struct { instanceId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2281,7 +2409,7 @@ func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { /* ListUsers: Method for ListUsers -Returns the users for the given Secrets Manager instance. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -2297,6 +2425,7 @@ func (a *APIClient) ListUsers(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, instanceId string) (*ListUsersResponse, error) { r := ListUsersRequest{ apiService: a.defaultApi, @@ -2307,6 +2436,7 @@ func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, inst return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLRequest struct { ctx context.Context apiService *DefaultApiService @@ -2316,11 +2446,13 @@ type UpdateACLRequest struct { updateACLPayload *UpdateACLPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateACLRequest) UpdateACLPayload(updateACLPayload UpdateACLPayload) ApiUpdateACLRequest { r.updateACLPayload = &updateACLPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateACLRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPut @@ -2442,7 +2574,7 @@ func (r UpdateACLRequest) Execute() error { /* UpdateACL: Method for UpdateACL -Updates the ip ranges for the acl. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -2460,6 +2592,7 @@ func (a *APIClient) UpdateACL(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateACLExecute(ctx context.Context, projectId string, instanceId string, aclId string) error { r := UpdateACLRequest{ apiService: a.defaultApi, @@ -2471,6 +2604,7 @@ func (a *APIClient) UpdateACLExecute(ctx context.Context, projectId string, inst return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2479,11 +2613,13 @@ type UpdateACLsRequest struct { updateACLsPayload *UpdateACLsPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateACLsRequest) UpdateACLsPayload(updateACLsPayload UpdateACLsPayload) ApiUpdateACLsRequest { r.updateACLsPayload = &updateACLsPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateACLsRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPut @@ -2615,7 +2751,7 @@ func (r UpdateACLsRequest) Execute() error { /* UpdateACLs: Method for UpdateACLs -Changes a list of ACLs within the project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -2631,6 +2767,7 @@ func (a *APIClient) UpdateACLs(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateACLsExecute(ctx context.Context, projectId string, instanceId string) error { r := UpdateACLsRequest{ apiService: a.defaultApi, @@ -2641,6 +2778,7 @@ func (a *APIClient) UpdateACLsExecute(ctx context.Context, projectId string, ins return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -2649,11 +2787,13 @@ type UpdateInstanceRequest struct { updateInstancePayload *UpdateInstancePayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { r.updateInstancePayload = &updateInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateInstanceRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPut @@ -2774,7 +2914,7 @@ func (r UpdateInstanceRequest) Execute() error { /* UpdateInstance: Method for UpdateInstance -Updates the given Secrets Manager instance. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -2790,6 +2930,7 @@ func (a *APIClient) UpdateInstance(ctx context.Context, projectId string, instan } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) error { r := UpdateInstanceRequest{ apiService: a.defaultApi, @@ -2800,6 +2941,7 @@ func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -2809,11 +2951,13 @@ type UpdateUserRequest struct { updateUserPayload *UpdateUserPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateUserRequest) UpdateUserPayload(updateUserPayload UpdateUserPayload) ApiUpdateUserRequest { r.updateUserPayload = &updateUserPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateUserRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPut @@ -2935,7 +3079,7 @@ func (r UpdateUserRequest) Execute() error { /* UpdateUser: Method for UpdateUser -Updates the details for the given user. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @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. @@ -2953,6 +3097,7 @@ func (a *APIClient) UpdateUser(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error { r := UpdateUserRequest{ apiService: a.defaultApi, diff --git a/services/secretsmanager/client.go b/services/secretsmanager/client.go index ab1706342..97af71906 100644 --- a/services/secretsmanager/client.go +++ b/services/secretsmanager/client.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -44,18 +45,21 @@ var ( // APIClient manages communication with the STACKIT Secrets Manager API API v1.4.2 // In most cases there should be only one, shared, APIClient. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type APIClient struct { cfg *config.Configuration common service // Reuse a single struct instead of allocating one for each service on the heap. defaultApi *DefaultApiService } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type service struct { client DefaultApi } // NewAPIClient creates a new API client. // Optionally receives configuration options +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { cfg := NewConfiguration() @@ -147,6 +151,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func ParameterValueToString(obj interface{}, key string) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { return fmt.Sprintf("%v", obj) @@ -285,6 +290,7 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { // Allow modification of underlying config for alternate implementations and testing // Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (c *APIClient) GetConfig() *config.Configuration { return c.cfg } @@ -595,6 +601,7 @@ func parseCacheControl(headers http.Header) cacheControl { } // CacheExpires helper function to determine remaining time before repeating a request. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func CacheExpires(r *http.Response) time.Time { // Figure out when the cache expires. var expires time.Time diff --git a/services/secretsmanager/configuration.go b/services/secretsmanager/configuration.go index 366cd2466..770a4bfcd 100644 --- a/services/secretsmanager/configuration.go +++ b/services/secretsmanager/configuration.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -15,6 +16,7 @@ import ( ) // NewConfiguration returns a new Configuration object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewConfiguration() *config.Configuration { cfg := &config.Configuration{ DefaultHeader: make(map[string]string), diff --git a/services/secretsmanager/go.mod b/services/secretsmanager/go.mod index 2625d5eed..7e894b873 100644 --- a/services/secretsmanager/go.mod +++ b/services/secretsmanager/go.mod @@ -2,7 +2,7 @@ module github.com/stackitcloud/stackit-sdk-go/services/secretsmanager go 1.21 -require github.com/stackitcloud/stackit-sdk-go/core v0.21.1 +require github.com/stackitcloud/stackit-sdk-go/core v0.22.0 require ( github.com/golang-jwt/jwt/v5 v5.3.1 // indirect diff --git a/services/secretsmanager/go.sum b/services/secretsmanager/go.sum index ca103c909..195011dd5 100644 --- a/services/secretsmanager/go.sum +++ b/services/secretsmanager/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= diff --git a/services/secretsmanager/model_acl.go b/services/secretsmanager/model_acl.go index 48b5ee484..7000e95a8 100644 --- a/services/secretsmanager/model_acl.go +++ b/services/secretsmanager/model_acl.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ACL{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetCidrAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getACLGetCidrAttributeTypeOk(arg ACLGetCidrAttributeType) (ret ACLGetCidrRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getACLGetCidrAttributeTypeOk(arg ACLGetCidrAttributeType) (ret ACLGetCidrRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setACLGetCidrAttributeType(arg *ACLGetCidrAttributeType, val ACLGetCidrRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetCidrArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetCidrRetType = string /* @@ -43,8 +50,10 @@ type ACLGetCidrRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getACLGetIdAttributeTypeOk(arg ACLGetIdAttributeType) (ret ACLGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getACLGetIdAttributeTypeOk(arg ACLGetIdAttributeType) (ret ACLGetIdRetType, return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setACLGetIdAttributeType(arg *ACLGetIdAttributeType, val ACLGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetIdRetType = string // ACL struct for ACL +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACL struct { // The given IP/IP Range that is permitted to access. // REQUIRED @@ -69,12 +83,14 @@ type ACL struct { Id ACLGetIdAttributeType `json:"id" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewACL(cidr ACLGetCidrArgType, id ACLGetIdArgType) *ACL { this := ACL{} setACLGetCidrAttributeType(&this.Cidr, cidr) @@ -85,12 +101,14 @@ func NewACL(cidr ACLGetCidrArgType, id ACLGetIdArgType) *ACL { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewACLWithDefaults() *ACL { this := ACL{} return &this } // GetCidr returns the Cidr field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) GetCidr() (ret ACLGetCidrRetType) { ret, _ = o.GetCidrOk() return ret @@ -98,16 +116,19 @@ func (o *ACL) GetCidr() (ret ACLGetCidrRetType) { // GetCidrOk returns a tuple with the Cidr field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) GetCidrOk() (ret ACLGetCidrRetType, ok bool) { return getACLGetCidrAttributeTypeOk(o.Cidr) } // SetCidr sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) SetCidr(v ACLGetCidrRetType) { setACLGetCidrAttributeType(&o.Cidr, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) GetId() (ret ACLGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -115,15 +136,18 @@ func (o *ACL) GetId() (ret ACLGetIdRetType) { // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) GetIdOk() (ret ACLGetIdRetType, ok bool) { return getACLGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) SetId(v ACLGetIdRetType) { setACLGetIdAttributeType(&o.Id, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ACL) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getACLGetCidrAttributeTypeOk(o.Cidr); ok { @@ -135,37 +159,45 @@ func (o ACL) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableACL struct { value *ACL isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableACL) Get() *ACL { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableACL) Set(val *ACL) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableACL) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableACL) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableACL(val *ACL) *NullableACL { return &NullableACL{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableACL) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableACL) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/secretsmanager/model_bad_request.go b/services/secretsmanager/model_bad_request.go index d33738ad5..cdaf461ae 100644 --- a/services/secretsmanager/model_bad_request.go +++ b/services/secretsmanager/model_bad_request.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &BadRequest{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBadRequestGetMessageAttributeTypeOk(arg BadRequestGetMessageAttributeType) (ret BadRequestGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -31,26 +34,33 @@ func getBadRequestGetMessageAttributeTypeOk(arg BadRequestGetMessageAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBadRequestGetMessageAttributeType(arg *BadRequestGetMessageAttributeType, val BadRequestGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequestGetMessageRetType = string // BadRequest struct for BadRequest +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BadRequest struct { // The error message for bad requests // REQUIRED Message BadRequestGetMessageAttributeType `json:"message" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewBadRequest(message BadRequestGetMessageArgType) *BadRequest { this := BadRequest{} setBadRequestGetMessageAttributeType(&this.Message, message) @@ -60,12 +70,14 @@ func NewBadRequest(message BadRequestGetMessageArgType) *BadRequest { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewBadRequestWithDefaults() *BadRequest { this := BadRequest{} return &this } // GetMessage returns the Message field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BadRequest) GetMessage() (ret BadRequestGetMessageRetType) { ret, _ = o.GetMessageOk() return ret @@ -73,15 +85,18 @@ func (o *BadRequest) GetMessage() (ret BadRequestGetMessageRetType) { // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BadRequest) GetMessageOk() (ret BadRequestGetMessageRetType, ok bool) { return getBadRequestGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BadRequest) SetMessage(v BadRequestGetMessageRetType) { setBadRequestGetMessageAttributeType(&o.Message, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o BadRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getBadRequestGetMessageAttributeTypeOk(o.Message); ok { @@ -90,37 +105,45 @@ func (o BadRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableBadRequest struct { value *BadRequest isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBadRequest) Get() *BadRequest { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBadRequest) Set(val *BadRequest) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBadRequest) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBadRequest) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableBadRequest(val *BadRequest) *NullableBadRequest { return &NullableBadRequest{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBadRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 index d8f9e23bc..6058472b1 100644 --- a/services/secretsmanager/model_conflict.go +++ b/services/secretsmanager/model_conflict.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Conflict{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ConflictGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getConflictGetMessageAttributeTypeOk(arg ConflictGetMessageAttributeType) (ret ConflictGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -31,26 +34,33 @@ func getConflictGetMessageAttributeTypeOk(arg ConflictGetMessageAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setConflictGetMessageAttributeType(arg *ConflictGetMessageAttributeType, val ConflictGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ConflictGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ConflictGetMessageRetType = string // Conflict struct for Conflict +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Conflict struct { // The error message for conflicts // REQUIRED Message ConflictGetMessageAttributeType `json:"message" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewConflict(message ConflictGetMessageArgType) *Conflict { this := Conflict{} setConflictGetMessageAttributeType(&this.Message, message) @@ -60,12 +70,14 @@ func NewConflict(message ConflictGetMessageArgType) *Conflict { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewConflictWithDefaults() *Conflict { this := Conflict{} return &this } // GetMessage returns the Message field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Conflict) GetMessage() (ret ConflictGetMessageRetType) { ret, _ = o.GetMessageOk() return ret @@ -73,15 +85,18 @@ func (o *Conflict) GetMessage() (ret ConflictGetMessageRetType) { // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Conflict) GetMessageOk() (ret ConflictGetMessageRetType, ok bool) { return getConflictGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Conflict) SetMessage(v ConflictGetMessageRetType) { setConflictGetMessageAttributeType(&o.Message, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Conflict) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getConflictGetMessageAttributeTypeOk(o.Message); ok { @@ -90,37 +105,45 @@ func (o Conflict) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableConflict struct { value *Conflict isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableConflict) Get() *Conflict { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableConflict) Set(val *Conflict) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableConflict) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableConflict) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableConflict(val *Conflict) *NullableConflict { return &NullableConflict{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableConflict) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 f9d78ffd4..dde86c522 100644 --- a/services/secretsmanager/model_create_acl_payload.go +++ b/services/secretsmanager/model_create_acl_payload.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateACLPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateACLPayloadGetCidrAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateACLPayloadGetCidrAttributeTypeOk(arg CreateACLPayloadGetCidrAttributeType) (ret CreateACLPayloadGetCidrRetType, ok bool) { if arg == nil { return ret, false @@ -31,26 +34,33 @@ func getCreateACLPayloadGetCidrAttributeTypeOk(arg CreateACLPayloadGetCidrAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateACLPayloadGetCidrAttributeType(arg *CreateACLPayloadGetCidrAttributeType, val CreateACLPayloadGetCidrRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateACLPayloadGetCidrArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateACLPayloadGetCidrRetType = string // CreateACLPayload struct for CreateACLPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateACLPayload struct { // The given IP/IP Range that is permitted to access. // REQUIRED Cidr CreateACLPayloadGetCidrAttributeType `json:"cidr" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateACLPayload(cidr CreateACLPayloadGetCidrArgType) *CreateACLPayload { this := CreateACLPayload{} setCreateACLPayloadGetCidrAttributeType(&this.Cidr, cidr) @@ -60,12 +70,14 @@ func NewCreateACLPayload(cidr CreateACLPayloadGetCidrArgType) *CreateACLPayload // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateACLPayloadWithDefaults() *CreateACLPayload { this := CreateACLPayload{} return &this } // GetCidr returns the Cidr field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateACLPayload) GetCidr() (ret CreateACLPayloadGetCidrRetType) { ret, _ = o.GetCidrOk() return ret @@ -73,15 +85,18 @@ func (o *CreateACLPayload) GetCidr() (ret CreateACLPayloadGetCidrRetType) { // GetCidrOk returns a tuple with the Cidr field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateACLPayload) GetCidrOk() (ret CreateACLPayloadGetCidrRetType, ok bool) { return getCreateACLPayloadGetCidrAttributeTypeOk(o.Cidr) } // SetCidr sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateACLPayload) SetCidr(v CreateACLPayloadGetCidrRetType) { setCreateACLPayloadGetCidrAttributeType(&o.Cidr, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateACLPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateACLPayloadGetCidrAttributeTypeOk(o.Cidr); ok { @@ -90,37 +105,45 @@ func (o CreateACLPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateACLPayload struct { value *CreateACLPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateACLPayload) Get() *CreateACLPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateACLPayload) Set(val *CreateACLPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateACLPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateACLPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateACLPayload(val *CreateACLPayload) *NullableCreateACLPayload { return &NullableCreateACLPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateACLPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 6649b68d3..aadd78970 100644 --- a/services/secretsmanager/model_create_instance_payload.go +++ b/services/secretsmanager/model_create_instance_payload.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateInstancePayload{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetKmsKeyAttributeType = *KmsKeyPayload + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetKmsKeyArgType = KmsKeyPayload + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetKmsKeyRetType = KmsKeyPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetKmsKeyAttributeTypeOk(arg CreateInstancePayloadGetKmsKeyAttributeType) (ret CreateInstancePayloadGetKmsKeyRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getCreateInstancePayloadGetKmsKeyAttributeTypeOk(arg CreateInstancePayloadG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetKmsKeyAttributeType(arg *CreateInstancePayloadGetKmsKeyAttributeType, val CreateInstancePayloadGetKmsKeyRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setCreateInstancePayloadGetKmsKeyAttributeType(arg *CreateInstancePayloadGe */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetNameAttributeTypeOk(arg CreateInstancePayloadGetNameAttributeType) (ret CreateInstancePayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -51,14 +61,19 @@ func getCreateInstancePayloadGetNameAttributeTypeOk(arg CreateInstancePayloadGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetNameAttributeType(arg *CreateInstancePayloadGetNameAttributeType, val CreateInstancePayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetNameRetType = string // CreateInstancePayload struct for CreateInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayload struct { KmsKey CreateInstancePayloadGetKmsKeyAttributeType `json:"kmsKey,omitempty"` // A user chosen name to distinguish multiple secrets manager instances. @@ -66,12 +81,14 @@ type CreateInstancePayload struct { Name CreateInstancePayloadGetNameAttributeType `json:"name" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateInstancePayload(name CreateInstancePayloadGetNameArgType) *CreateInstancePayload { this := CreateInstancePayload{} setCreateInstancePayloadGetNameAttributeType(&this.Name, name) @@ -81,12 +98,14 @@ func NewCreateInstancePayload(name CreateInstancePayloadGetNameArgType) *CreateI // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { this := CreateInstancePayload{} return &this } // GetKmsKey returns the KmsKey field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetKmsKey() (res CreateInstancePayloadGetKmsKeyRetType) { res, _ = o.GetKmsKeyOk() return @@ -94,22 +113,26 @@ func (o *CreateInstancePayload) GetKmsKey() (res CreateInstancePayloadGetKmsKeyR // GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetKmsKeyOk() (ret CreateInstancePayloadGetKmsKeyRetType, ok bool) { return getCreateInstancePayloadGetKmsKeyAttributeTypeOk(o.KmsKey) } // HasKmsKey returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) HasKmsKey() bool { _, ok := o.GetKmsKeyOk() return ok } // SetKmsKey gets a reference to the given KmsKeyPayload and assigns it to the KmsKey field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetKmsKey(v CreateInstancePayloadGetKmsKeyRetType) { setCreateInstancePayloadGetKmsKeyAttributeType(&o.KmsKey, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetName() (ret CreateInstancePayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -117,15 +140,18 @@ func (o *CreateInstancePayload) GetName() (ret CreateInstancePayloadGetNameRetTy // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetNameOk() (ret CreateInstancePayloadGetNameRetType, ok bool) { return getCreateInstancePayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetName(v CreateInstancePayloadGetNameRetType) { setCreateInstancePayloadGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateInstancePayloadGetKmsKeyAttributeTypeOk(o.KmsKey); ok { @@ -137,37 +163,45 @@ func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateInstancePayload struct { value *CreateInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateInstancePayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateInstancePayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { return &NullableCreateInstancePayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 8af205819..2085d89a1 100644 --- a/services/secretsmanager/model_create_user_payload.go +++ b/services/secretsmanager/model_create_user_payload.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateUserPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateUserPayloadGetDescriptionAttributeTypeOk(arg CreateUserPayloadGetDescriptionAttributeType) (ret CreateUserPayloadGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getCreateUserPayloadGetDescriptionAttributeTypeOk(arg CreateUserPayloadGetD return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateUserPayloadGetDescriptionAttributeType(arg *CreateUserPayloadGetDescriptionAttributeType, val CreateUserPayloadGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetDescriptionRetType = string /* @@ -43,10 +50,16 @@ type CreateUserPayloadGetDescriptionRetType = string */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadgetWriteAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadgetWriteArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadgetWriteRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateUserPayloadgetWriteAttributeTypeOk(arg CreateUserPayloadgetWriteAttributeType) (ret CreateUserPayloadgetWriteRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +67,13 @@ func getCreateUserPayloadgetWriteAttributeTypeOk(arg CreateUserPayloadgetWriteAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateUserPayloadgetWriteAttributeType(arg *CreateUserPayloadgetWriteAttributeType, val CreateUserPayloadgetWriteRetType) { *arg = &val } // CreateUserPayload struct for CreateUserPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayload struct { // A user chosen description to differentiate between multiple users. // REQUIRED @@ -68,12 +83,14 @@ type CreateUserPayload struct { Write CreateUserPayloadgetWriteAttributeType `json:"write" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateUserPayload(description CreateUserPayloadGetDescriptionArgType, write CreateUserPayloadgetWriteArgType) *CreateUserPayload { this := CreateUserPayload{} setCreateUserPayloadGetDescriptionAttributeType(&this.Description, description) @@ -84,12 +101,14 @@ func NewCreateUserPayload(description CreateUserPayloadGetDescriptionArgType, wr // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateUserPayloadWithDefaults() *CreateUserPayload { this := CreateUserPayload{} return &this } // GetDescription returns the Description field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) GetDescription() (ret CreateUserPayloadGetDescriptionRetType) { ret, _ = o.GetDescriptionOk() return ret @@ -97,16 +116,19 @@ func (o *CreateUserPayload) GetDescription() (ret CreateUserPayloadGetDescriptio // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) GetDescriptionOk() (ret CreateUserPayloadGetDescriptionRetType, ok bool) { return getCreateUserPayloadGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) SetDescription(v CreateUserPayloadGetDescriptionRetType) { setCreateUserPayloadGetDescriptionAttributeType(&o.Description, v) } // GetWrite returns the Write field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) GetWrite() (ret CreateUserPayloadgetWriteRetType) { ret, _ = o.GetWriteOk() return ret @@ -114,15 +136,18 @@ func (o *CreateUserPayload) GetWrite() (ret CreateUserPayloadgetWriteRetType) { // GetWriteOk returns a tuple with the Write field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) GetWriteOk() (ret CreateUserPayloadgetWriteRetType, ok bool) { return getCreateUserPayloadgetWriteAttributeTypeOk(o.Write) } // SetWrite sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) SetWrite(v CreateUserPayloadgetWriteRetType) { setCreateUserPayloadgetWriteAttributeType(&o.Write, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateUserPayloadGetDescriptionAttributeTypeOk(o.Description); ok { @@ -134,37 +159,45 @@ func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateUserPayload struct { value *CreateUserPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateUserPayload) Get() *CreateUserPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateUserPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateUserPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { return &NullableCreateUserPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateUserPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 06bb19354..447b0f1c5 100644 --- a/services/secretsmanager/model_instance.go +++ b/services/secretsmanager/model_instance.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Instance{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetApiUrlAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetApiUrlAttributeTypeOk(arg InstanceGetApiUrlAttributeType) (ret InstanceGetApiUrlRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getInstanceGetApiUrlAttributeTypeOk(arg InstanceGetApiUrlAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetApiUrlAttributeType(arg *InstanceGetApiUrlAttributeType, val InstanceGetApiUrlRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetApiUrlArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetApiUrlRetType = string /* @@ -43,8 +50,10 @@ type InstanceGetApiUrlRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreationFinishedDateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetCreationFinishedDateAttributeTypeOk(arg InstanceGetCreationFinishedDateAttributeType) (ret InstanceGetCreationFinishedDateRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getInstanceGetCreationFinishedDateAttributeTypeOk(arg InstanceGetCreationFi return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetCreationFinishedDateAttributeType(arg *InstanceGetCreationFinishedDateAttributeType, val InstanceGetCreationFinishedDateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreationFinishedDateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreationFinishedDateRetType = string /* @@ -64,8 +77,10 @@ type InstanceGetCreationFinishedDateRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreationStartDateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetCreationStartDateAttributeTypeOk(arg InstanceGetCreationStartDateAttributeType) (ret InstanceGetCreationStartDateRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getInstanceGetCreationStartDateAttributeTypeOk(arg InstanceGetCreationStart return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetCreationStartDateAttributeType(arg *InstanceGetCreationStartDateAttributeType, val InstanceGetCreationStartDateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreationStartDateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetCreationStartDateRetType = string /* @@ -85,8 +104,10 @@ type InstanceGetCreationStartDateRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetIdAttributeTypeOk(arg InstanceGetIdAttributeType) (ret InstanceGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -94,11 +115,15 @@ func getInstanceGetIdAttributeTypeOk(arg InstanceGetIdAttributeType) (ret Instan return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetIdAttributeType(arg *InstanceGetIdAttributeType, val InstanceGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdRetType = string /* @@ -106,10 +131,16 @@ type InstanceGetIdRetType = string */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetKmsKeyAttributeType = *KmsKeyPayload + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetKmsKeyArgType = KmsKeyPayload + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetKmsKeyRetType = KmsKeyPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetKmsKeyAttributeTypeOk(arg InstanceGetKmsKeyAttributeType) (ret InstanceGetKmsKeyRetType, ok bool) { if arg == nil { return ret, false @@ -117,6 +148,7 @@ func getInstanceGetKmsKeyAttributeTypeOk(arg InstanceGetKmsKeyAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetKmsKeyAttributeType(arg *InstanceGetKmsKeyAttributeType, val InstanceGetKmsKeyRetType) { *arg = &val } @@ -126,8 +158,10 @@ func setInstanceGetKmsKeyAttributeType(arg *InstanceGetKmsKeyAttributeType, val */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetNameAttributeTypeOk(arg InstanceGetNameAttributeType) (ret InstanceGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -135,11 +169,15 @@ func getInstanceGetNameAttributeTypeOk(arg InstanceGetNameAttributeType) (ret In return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetNameAttributeType(arg *InstanceGetNameAttributeType, val InstanceGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetNameRetType = string /* @@ -147,10 +185,16 @@ type InstanceGetNameRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetSecretCountAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetSecretCountArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetSecretCountRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetSecretCountAttributeTypeOk(arg InstanceGetSecretCountAttributeType) (ret InstanceGetSecretCountRetType, ok bool) { if arg == nil { return ret, false @@ -158,6 +202,7 @@ func getInstanceGetSecretCountAttributeTypeOk(arg InstanceGetSecretCountAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetSecretCountAttributeType(arg *InstanceGetSecretCountAttributeType, val InstanceGetSecretCountRetType) { *arg = &val } @@ -167,8 +212,10 @@ func setInstanceGetSecretCountAttributeType(arg *InstanceGetSecretCountAttribute */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetSecretsEngineAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetSecretsEngineAttributeTypeOk(arg InstanceGetSecretsEngineAttributeType) (ret InstanceGetSecretsEngineRetType, ok bool) { if arg == nil { return ret, false @@ -176,11 +223,15 @@ func getInstanceGetSecretsEngineAttributeTypeOk(arg InstanceGetSecretsEngineAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetSecretsEngineAttributeType(arg *InstanceGetSecretsEngineAttributeType, val InstanceGetSecretsEngineRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetSecretsEngineArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetSecretsEngineRetType = string /* @@ -188,8 +239,10 @@ type InstanceGetSecretsEngineRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetStateAttributeTypeOk(arg InstanceGetStateAttributeType) (ret InstanceGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -197,11 +250,15 @@ func getInstanceGetStateAttributeTypeOk(arg InstanceGetStateAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetStateAttributeType(arg *InstanceGetStateAttributeType, val InstanceGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStateRetType = string /* @@ -209,8 +266,10 @@ type InstanceGetStateRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetUpdateFinishedDateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetUpdateFinishedDateAttributeTypeOk(arg InstanceGetUpdateFinishedDateAttributeType) (ret InstanceGetUpdateFinishedDateRetType, ok bool) { if arg == nil { return ret, false @@ -218,11 +277,15 @@ func getInstanceGetUpdateFinishedDateAttributeTypeOk(arg InstanceGetUpdateFinish return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetUpdateFinishedDateAttributeType(arg *InstanceGetUpdateFinishedDateAttributeType, val InstanceGetUpdateFinishedDateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetUpdateFinishedDateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetUpdateFinishedDateRetType = string /* @@ -230,8 +293,10 @@ type InstanceGetUpdateFinishedDateRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetUpdateStartDateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetUpdateStartDateAttributeTypeOk(arg InstanceGetUpdateStartDateAttributeType) (ret InstanceGetUpdateStartDateRetType, ok bool) { if arg == nil { return ret, false @@ -239,14 +304,19 @@ func getInstanceGetUpdateStartDateAttributeTypeOk(arg InstanceGetUpdateStartDate return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetUpdateStartDateAttributeType(arg *InstanceGetUpdateStartDateAttributeType, val InstanceGetUpdateStartDateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetUpdateStartDateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetUpdateStartDateRetType = string // Instance struct for Instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Instance struct { // The API endpoint for connecting to the secrets engine. // REQUIRED @@ -276,12 +346,14 @@ type Instance struct { UpdateStartDate InstanceGetUpdateStartDateAttributeType `json:"updateStartDate,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewInstance(apiUrl InstanceGetApiUrlArgType, creationStartDate InstanceGetCreationStartDateArgType, id InstanceGetIdArgType, name InstanceGetNameArgType, secretCount InstanceGetSecretCountArgType, secretsEngine InstanceGetSecretsEngineArgType, state InstanceGetStateArgType) *Instance { this := Instance{} setInstanceGetApiUrlAttributeType(&this.ApiUrl, apiUrl) @@ -297,12 +369,14 @@ func NewInstance(apiUrl InstanceGetApiUrlArgType, creationStartDate InstanceGetC // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewInstanceWithDefaults() *Instance { this := Instance{} return &this } // GetApiUrl returns the ApiUrl field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetApiUrl() (ret InstanceGetApiUrlRetType) { ret, _ = o.GetApiUrlOk() return ret @@ -310,16 +384,19 @@ func (o *Instance) GetApiUrl() (ret InstanceGetApiUrlRetType) { // GetApiUrlOk returns a tuple with the ApiUrl field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetApiUrlOk() (ret InstanceGetApiUrlRetType, ok bool) { return getInstanceGetApiUrlAttributeTypeOk(o.ApiUrl) } // SetApiUrl sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetApiUrl(v InstanceGetApiUrlRetType) { setInstanceGetApiUrlAttributeType(&o.ApiUrl, v) } // GetCreationFinishedDate returns the CreationFinishedDate field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetCreationFinishedDate() (res InstanceGetCreationFinishedDateRetType) { res, _ = o.GetCreationFinishedDateOk() return @@ -327,22 +404,26 @@ func (o *Instance) GetCreationFinishedDate() (res InstanceGetCreationFinishedDat // GetCreationFinishedDateOk returns a tuple with the CreationFinishedDate field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetCreationFinishedDateOk() (ret InstanceGetCreationFinishedDateRetType, ok bool) { return getInstanceGetCreationFinishedDateAttributeTypeOk(o.CreationFinishedDate) } // HasCreationFinishedDate returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) HasCreationFinishedDate() bool { _, ok := o.GetCreationFinishedDateOk() return ok } // SetCreationFinishedDate gets a reference to the given string and assigns it to the CreationFinishedDate field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetCreationFinishedDate(v InstanceGetCreationFinishedDateRetType) { setInstanceGetCreationFinishedDateAttributeType(&o.CreationFinishedDate, v) } // GetCreationStartDate returns the CreationStartDate field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetCreationStartDate() (ret InstanceGetCreationStartDateRetType) { ret, _ = o.GetCreationStartDateOk() return ret @@ -350,16 +431,19 @@ func (o *Instance) GetCreationStartDate() (ret InstanceGetCreationStartDateRetTy // GetCreationStartDateOk returns a tuple with the CreationStartDate field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetCreationStartDateOk() (ret InstanceGetCreationStartDateRetType, ok bool) { return getInstanceGetCreationStartDateAttributeTypeOk(o.CreationStartDate) } // SetCreationStartDate sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetCreationStartDate(v InstanceGetCreationStartDateRetType) { setInstanceGetCreationStartDateAttributeType(&o.CreationStartDate, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetId() (ret InstanceGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -367,16 +451,19 @@ func (o *Instance) GetId() (ret InstanceGetIdRetType) { // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetIdOk() (ret InstanceGetIdRetType, ok bool) { return getInstanceGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetId(v InstanceGetIdRetType) { setInstanceGetIdAttributeType(&o.Id, v) } // GetKmsKey returns the KmsKey field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetKmsKey() (res InstanceGetKmsKeyRetType) { res, _ = o.GetKmsKeyOk() return @@ -384,22 +471,26 @@ func (o *Instance) GetKmsKey() (res InstanceGetKmsKeyRetType) { // GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetKmsKeyOk() (ret InstanceGetKmsKeyRetType, ok bool) { return getInstanceGetKmsKeyAttributeTypeOk(o.KmsKey) } // HasKmsKey returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) HasKmsKey() bool { _, ok := o.GetKmsKeyOk() return ok } // SetKmsKey gets a reference to the given KmsKeyPayload and assigns it to the KmsKey field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetKmsKey(v InstanceGetKmsKeyRetType) { setInstanceGetKmsKeyAttributeType(&o.KmsKey, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetName() (ret InstanceGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -407,16 +498,19 @@ func (o *Instance) GetName() (ret InstanceGetNameRetType) { // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetNameOk() (ret InstanceGetNameRetType, ok bool) { return getInstanceGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetName(v InstanceGetNameRetType) { setInstanceGetNameAttributeType(&o.Name, v) } // GetSecretCount returns the SecretCount field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetSecretCount() (ret InstanceGetSecretCountRetType) { ret, _ = o.GetSecretCountOk() return ret @@ -424,16 +518,19 @@ func (o *Instance) GetSecretCount() (ret InstanceGetSecretCountRetType) { // GetSecretCountOk returns a tuple with the SecretCount field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetSecretCountOk() (ret InstanceGetSecretCountRetType, ok bool) { return getInstanceGetSecretCountAttributeTypeOk(o.SecretCount) } // SetSecretCount sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetSecretCount(v InstanceGetSecretCountRetType) { setInstanceGetSecretCountAttributeType(&o.SecretCount, v) } // GetSecretsEngine returns the SecretsEngine field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetSecretsEngine() (ret InstanceGetSecretsEngineRetType) { ret, _ = o.GetSecretsEngineOk() return ret @@ -441,16 +538,19 @@ func (o *Instance) GetSecretsEngine() (ret InstanceGetSecretsEngineRetType) { // GetSecretsEngineOk returns a tuple with the SecretsEngine field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetSecretsEngineOk() (ret InstanceGetSecretsEngineRetType, ok bool) { return getInstanceGetSecretsEngineAttributeTypeOk(o.SecretsEngine) } // SetSecretsEngine sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetSecretsEngine(v InstanceGetSecretsEngineRetType) { setInstanceGetSecretsEngineAttributeType(&o.SecretsEngine, v) } // GetState returns the State field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetState() (ret InstanceGetStateRetType) { ret, _ = o.GetStateOk() return ret @@ -458,16 +558,19 @@ func (o *Instance) GetState() (ret InstanceGetStateRetType) { // GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetStateOk() (ret InstanceGetStateRetType, ok bool) { return getInstanceGetStateAttributeTypeOk(o.State) } // SetState sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetState(v InstanceGetStateRetType) { setInstanceGetStateAttributeType(&o.State, v) } // GetUpdateFinishedDate returns the UpdateFinishedDate field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetUpdateFinishedDate() (res InstanceGetUpdateFinishedDateRetType) { res, _ = o.GetUpdateFinishedDateOk() return @@ -475,22 +578,26 @@ func (o *Instance) GetUpdateFinishedDate() (res InstanceGetUpdateFinishedDateRet // GetUpdateFinishedDateOk returns a tuple with the UpdateFinishedDate field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetUpdateFinishedDateOk() (ret InstanceGetUpdateFinishedDateRetType, ok bool) { return getInstanceGetUpdateFinishedDateAttributeTypeOk(o.UpdateFinishedDate) } // HasUpdateFinishedDate returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) HasUpdateFinishedDate() bool { _, ok := o.GetUpdateFinishedDateOk() return ok } // SetUpdateFinishedDate gets a reference to the given string and assigns it to the UpdateFinishedDate field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetUpdateFinishedDate(v InstanceGetUpdateFinishedDateRetType) { setInstanceGetUpdateFinishedDateAttributeType(&o.UpdateFinishedDate, v) } // GetUpdateStartDate returns the UpdateStartDate field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetUpdateStartDate() (res InstanceGetUpdateStartDateRetType) { res, _ = o.GetUpdateStartDateOk() return @@ -498,21 +605,25 @@ func (o *Instance) GetUpdateStartDate() (res InstanceGetUpdateStartDateRetType) // GetUpdateStartDateOk returns a tuple with the UpdateStartDate field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) GetUpdateStartDateOk() (ret InstanceGetUpdateStartDateRetType, ok bool) { return getInstanceGetUpdateStartDateAttributeTypeOk(o.UpdateStartDate) } // HasUpdateStartDate returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) HasUpdateStartDate() bool { _, ok := o.GetUpdateStartDateOk() return ok } // SetUpdateStartDate gets a reference to the given string and assigns it to the UpdateStartDate field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetUpdateStartDate(v InstanceGetUpdateStartDateRetType) { setInstanceGetUpdateStartDateAttributeType(&o.UpdateStartDate, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Instance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceGetApiUrlAttributeTypeOk(o.ApiUrl); ok { @@ -551,37 +662,45 @@ func (o Instance) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInstance struct { value *Instance isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstance) Get() *Instance { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstance) Set(val *Instance) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstance) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstance) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInstance(val *Instance) *NullableInstance { return &NullableInstance{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstance) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/secretsmanager/model_kms_key_payload.go b/services/secretsmanager/model_kms_key_payload.go index ccc0d1567..9e34d4873 100644 --- a/services/secretsmanager/model_kms_key_payload.go +++ b/services/secretsmanager/model_kms_key_payload.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &KmsKeyPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKmsKeyPayloadGetKeyIdAttributeTypeOk(arg KmsKeyPayloadGetKeyIdAttributeType) (ret KmsKeyPayloadGetKeyIdRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getKmsKeyPayloadGetKeyIdAttributeTypeOk(arg KmsKeyPayloadGetKeyIdAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKmsKeyPayloadGetKeyIdAttributeType(arg *KmsKeyPayloadGetKeyIdAttributeType, val KmsKeyPayloadGetKeyIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyIdRetType = string /* @@ -43,8 +50,10 @@ type KmsKeyPayloadGetKeyIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyRingIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKmsKeyPayloadGetKeyRingIdAttributeTypeOk(arg KmsKeyPayloadGetKeyRingIdAttributeType) (ret KmsKeyPayloadGetKeyRingIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getKmsKeyPayloadGetKeyRingIdAttributeTypeOk(arg KmsKeyPayloadGetKeyRingIdAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKmsKeyPayloadGetKeyRingIdAttributeType(arg *KmsKeyPayloadGetKeyRingIdAttributeType, val KmsKeyPayloadGetKeyRingIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyRingIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyRingIdRetType = string /* @@ -64,10 +77,16 @@ type KmsKeyPayloadGetKeyRingIdRetType = string */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyVersionAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyVersionArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetKeyVersionRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKmsKeyPayloadGetKeyVersionAttributeTypeOk(arg KmsKeyPayloadGetKeyVersionAttributeType) (ret KmsKeyPayloadGetKeyVersionRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +94,7 @@ func getKmsKeyPayloadGetKeyVersionAttributeTypeOk(arg KmsKeyPayloadGetKeyVersion return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKmsKeyPayloadGetKeyVersionAttributeType(arg *KmsKeyPayloadGetKeyVersionAttributeType, val KmsKeyPayloadGetKeyVersionRetType) { *arg = &val } @@ -84,8 +104,10 @@ func setKmsKeyPayloadGetKeyVersionAttributeType(arg *KmsKeyPayloadGetKeyVersionA */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetServiceAccountEmailAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getKmsKeyPayloadGetServiceAccountEmailAttributeTypeOk(arg KmsKeyPayloadGetServiceAccountEmailAttributeType) (ret KmsKeyPayloadGetServiceAccountEmailRetType, ok bool) { if arg == nil { return ret, false @@ -93,14 +115,19 @@ func getKmsKeyPayloadGetServiceAccountEmailAttributeTypeOk(arg KmsKeyPayloadGetS return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setKmsKeyPayloadGetServiceAccountEmailAttributeType(arg *KmsKeyPayloadGetServiceAccountEmailAttributeType, val KmsKeyPayloadGetServiceAccountEmailRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetServiceAccountEmailArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayloadGetServiceAccountEmailRetType = string // KmsKeyPayload The key for secret encryption and decryption. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type KmsKeyPayload struct { // The key UUID. // REQUIRED @@ -116,12 +143,14 @@ type KmsKeyPayload struct { ServiceAccountEmail KmsKeyPayloadGetServiceAccountEmailAttributeType `json:"serviceAccountEmail" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _KmsKeyPayload KmsKeyPayload // NewKmsKeyPayload instantiates a new KmsKeyPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewKmsKeyPayload(keyId KmsKeyPayloadGetKeyIdArgType, keyRingId KmsKeyPayloadGetKeyRingIdArgType, keyVersion KmsKeyPayloadGetKeyVersionArgType, serviceAccountEmail KmsKeyPayloadGetServiceAccountEmailArgType) *KmsKeyPayload { this := KmsKeyPayload{} setKmsKeyPayloadGetKeyIdAttributeType(&this.KeyId, keyId) @@ -134,12 +163,14 @@ func NewKmsKeyPayload(keyId KmsKeyPayloadGetKeyIdArgType, keyRingId KmsKeyPayloa // NewKmsKeyPayloadWithDefaults instantiates a new KmsKeyPayload 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewKmsKeyPayloadWithDefaults() *KmsKeyPayload { this := KmsKeyPayload{} return &this } // GetKeyId returns the KeyId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) GetKeyId() (ret KmsKeyPayloadGetKeyIdRetType) { ret, _ = o.GetKeyIdOk() return ret @@ -147,16 +178,19 @@ func (o *KmsKeyPayload) GetKeyId() (ret KmsKeyPayloadGetKeyIdRetType) { // GetKeyIdOk returns a tuple with the KeyId field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) GetKeyIdOk() (ret KmsKeyPayloadGetKeyIdRetType, ok bool) { return getKmsKeyPayloadGetKeyIdAttributeTypeOk(o.KeyId) } // SetKeyId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) SetKeyId(v KmsKeyPayloadGetKeyIdRetType) { setKmsKeyPayloadGetKeyIdAttributeType(&o.KeyId, v) } // GetKeyRingId returns the KeyRingId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) GetKeyRingId() (ret KmsKeyPayloadGetKeyRingIdRetType) { ret, _ = o.GetKeyRingIdOk() return ret @@ -164,16 +198,19 @@ func (o *KmsKeyPayload) GetKeyRingId() (ret KmsKeyPayloadGetKeyRingIdRetType) { // GetKeyRingIdOk returns a tuple with the KeyRingId field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) GetKeyRingIdOk() (ret KmsKeyPayloadGetKeyRingIdRetType, ok bool) { return getKmsKeyPayloadGetKeyRingIdAttributeTypeOk(o.KeyRingId) } // SetKeyRingId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) SetKeyRingId(v KmsKeyPayloadGetKeyRingIdRetType) { setKmsKeyPayloadGetKeyRingIdAttributeType(&o.KeyRingId, v) } // GetKeyVersion returns the KeyVersion field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) GetKeyVersion() (ret KmsKeyPayloadGetKeyVersionRetType) { ret, _ = o.GetKeyVersionOk() return ret @@ -181,16 +218,19 @@ func (o *KmsKeyPayload) GetKeyVersion() (ret KmsKeyPayloadGetKeyVersionRetType) // GetKeyVersionOk returns a tuple with the KeyVersion field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) GetKeyVersionOk() (ret KmsKeyPayloadGetKeyVersionRetType, ok bool) { return getKmsKeyPayloadGetKeyVersionAttributeTypeOk(o.KeyVersion) } // SetKeyVersion sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) SetKeyVersion(v KmsKeyPayloadGetKeyVersionRetType) { setKmsKeyPayloadGetKeyVersionAttributeType(&o.KeyVersion, v) } // GetServiceAccountEmail returns the ServiceAccountEmail field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) GetServiceAccountEmail() (ret KmsKeyPayloadGetServiceAccountEmailRetType) { ret, _ = o.GetServiceAccountEmailOk() return ret @@ -198,15 +238,18 @@ func (o *KmsKeyPayload) GetServiceAccountEmail() (ret KmsKeyPayloadGetServiceAcc // GetServiceAccountEmailOk returns a tuple with the ServiceAccountEmail field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) GetServiceAccountEmailOk() (ret KmsKeyPayloadGetServiceAccountEmailRetType, ok bool) { return getKmsKeyPayloadGetServiceAccountEmailAttributeTypeOk(o.ServiceAccountEmail) } // SetServiceAccountEmail sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *KmsKeyPayload) SetServiceAccountEmail(v KmsKeyPayloadGetServiceAccountEmailRetType) { setKmsKeyPayloadGetServiceAccountEmailAttributeType(&o.ServiceAccountEmail, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o KmsKeyPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getKmsKeyPayloadGetKeyIdAttributeTypeOk(o.KeyId); ok { @@ -224,37 +267,45 @@ func (o KmsKeyPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableKmsKeyPayload struct { value *KmsKeyPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableKmsKeyPayload) Get() *KmsKeyPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableKmsKeyPayload) Set(val *KmsKeyPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableKmsKeyPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableKmsKeyPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableKmsKeyPayload(val *KmsKeyPayload) *NullableKmsKeyPayload { return &NullableKmsKeyPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableKmsKeyPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableKmsKeyPayload) 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 bcdcbf7bd..9b8063610 100644 --- a/services/secretsmanager/model_list_acls_response.go +++ b/services/secretsmanager/model_list_acls_response.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListACLsResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListACLsResponseGetAclsAttributeType = *[]ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListACLsResponseGetAclsArgType = []ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListACLsResponseGetAclsRetType = []ACL +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListACLsResponseGetAclsAttributeTypeOk(arg ListACLsResponseGetAclsAttributeType) (ret ListACLsResponseGetAclsRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getListACLsResponseGetAclsAttributeTypeOk(arg ListACLsResponseGetAclsAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListACLsResponseGetAclsAttributeType(arg *ListACLsResponseGetAclsAttributeType, val ListACLsResponseGetAclsRetType) { *arg = &val } // ListACLsResponse struct for ListACLsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListACLsResponse struct { // REQUIRED Acls ListACLsResponseGetAclsAttributeType `json:"acls" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListACLsResponse(acls ListACLsResponseGetAclsArgType) *ListACLsResponse { this := ListACLsResponse{} setListACLsResponseGetAclsAttributeType(&this.Acls, acls) @@ -58,12 +69,14 @@ func NewListACLsResponse(acls ListACLsResponseGetAclsArgType) *ListACLsResponse // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListACLsResponseWithDefaults() *ListACLsResponse { this := ListACLsResponse{} return &this } // GetAcls returns the Acls field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListACLsResponse) GetAcls() (ret ListACLsResponseGetAclsRetType) { ret, _ = o.GetAclsOk() return ret @@ -71,15 +84,18 @@ func (o *ListACLsResponse) GetAcls() (ret ListACLsResponseGetAclsRetType) { // GetAclsOk returns a tuple with the Acls field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListACLsResponse) GetAclsOk() (ret ListACLsResponseGetAclsRetType, ok bool) { return getListACLsResponseGetAclsAttributeTypeOk(o.Acls) } // SetAcls sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListACLsResponse) SetAcls(v ListACLsResponseGetAclsRetType) { setListACLsResponseGetAclsAttributeType(&o.Acls, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListACLsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListACLsResponseGetAclsAttributeTypeOk(o.Acls); ok { @@ -88,37 +104,45 @@ func (o ListACLsResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListACLsResponse struct { value *ListACLsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListACLsResponse) Get() *ListACLsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListACLsResponse) Set(val *ListACLsResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListACLsResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListACLsResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListACLsResponse(val *ListACLsResponse) *NullableListACLsResponse { return &NullableListACLsResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListACLsResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 f99b9aa79..4e5b94d6e 100644 --- a/services/secretsmanager/model_list_instances_response.go +++ b/services/secretsmanager/model_list_instances_response.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListInstancesResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetInstancesAttributeType = *[]Instance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetInstancesArgType = []Instance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetInstancesRetType = []Instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListInstancesResponseGetInstancesAttributeTypeOk(arg ListInstancesResponseGetInstancesAttributeType) (ret ListInstancesResponseGetInstancesRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getListInstancesResponseGetInstancesAttributeTypeOk(arg ListInstancesRespon return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListInstancesResponseGetInstancesAttributeType(arg *ListInstancesResponseGetInstancesAttributeType, val ListInstancesResponseGetInstancesRetType) { *arg = &val } // ListInstancesResponse struct for ListInstancesResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponse struct { // REQUIRED Instances ListInstancesResponseGetInstancesAttributeType `json:"instances" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListInstancesResponse(instances ListInstancesResponseGetInstancesArgType) *ListInstancesResponse { this := ListInstancesResponse{} setListInstancesResponseGetInstancesAttributeType(&this.Instances, instances) @@ -58,12 +69,14 @@ func NewListInstancesResponse(instances ListInstancesResponseGetInstancesArgType // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListInstancesResponseWithDefaults() *ListInstancesResponse { this := ListInstancesResponse{} return &this } // GetInstances returns the Instances field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListInstancesResponse) GetInstances() (ret ListInstancesResponseGetInstancesRetType) { ret, _ = o.GetInstancesOk() return ret @@ -71,15 +84,18 @@ func (o *ListInstancesResponse) GetInstances() (ret ListInstancesResponseGetInst // GetInstancesOk returns a tuple with the Instances field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListInstancesResponse) GetInstancesOk() (ret ListInstancesResponseGetInstancesRetType, ok bool) { return getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances) } // SetInstances sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListInstancesResponse) SetInstances(v ListInstancesResponseGetInstancesRetType) { setListInstancesResponseGetInstancesAttributeType(&o.Instances, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances); ok { @@ -88,37 +104,45 @@ func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListInstancesResponse struct { value *ListInstancesResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListInstancesResponse) Get() *ListInstancesResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListInstancesResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListInstancesResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { return &NullableListInstancesResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 37759f013..f81223b80 100644 --- a/services/secretsmanager/model_list_users_response.go +++ b/services/secretsmanager/model_list_users_response.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListUsersResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetUsersAttributeType = *[]User + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetUsersArgType = []User + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetUsersRetType = []User +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListUsersResponseGetUsersAttributeTypeOk(arg ListUsersResponseGetUsersAttributeType) (ret ListUsersResponseGetUsersRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getListUsersResponseGetUsersAttributeTypeOk(arg ListUsersResponseGetUsersAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListUsersResponseGetUsersAttributeType(arg *ListUsersResponseGetUsersAttributeType, val ListUsersResponseGetUsersRetType) { *arg = &val } // ListUsersResponse struct for ListUsersResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponse struct { // REQUIRED Users ListUsersResponseGetUsersAttributeType `json:"users" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListUsersResponse(users ListUsersResponseGetUsersArgType) *ListUsersResponse { this := ListUsersResponse{} setListUsersResponseGetUsersAttributeType(&this.Users, users) @@ -58,12 +69,14 @@ func NewListUsersResponse(users ListUsersResponseGetUsersArgType) *ListUsersResp // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListUsersResponseWithDefaults() *ListUsersResponse { this := ListUsersResponse{} return &this } // GetUsers returns the Users field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListUsersResponse) GetUsers() (ret ListUsersResponseGetUsersRetType) { ret, _ = o.GetUsersOk() return ret @@ -71,15 +84,18 @@ func (o *ListUsersResponse) GetUsers() (ret ListUsersResponseGetUsersRetType) { // GetUsersOk returns a tuple with the Users field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListUsersResponse) GetUsersOk() (ret ListUsersResponseGetUsersRetType, ok bool) { return getListUsersResponseGetUsersAttributeTypeOk(o.Users) } // SetUsers sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListUsersResponse) SetUsers(v ListUsersResponseGetUsersRetType) { setListUsersResponseGetUsersAttributeType(&o.Users, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListUsersResponseGetUsersAttributeTypeOk(o.Users); ok { @@ -88,37 +104,45 @@ func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListUsersResponse struct { value *ListUsersResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListUsersResponse) Get() *ListUsersResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListUsersResponse) Set(val *ListUsersResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListUsersResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListUsersResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListUsersResponse(val *ListUsersResponse) *NullableListUsersResponse { return &NullableListUsersResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListUsersResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListUsersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/secretsmanager/model_not_found.go b/services/secretsmanager/model_not_found.go index 4dc637af0..b9d235990 100644 --- a/services/secretsmanager/model_not_found.go +++ b/services/secretsmanager/model_not_found.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &NotFound{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NotFoundGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getNotFoundGetMessageAttributeTypeOk(arg NotFoundGetMessageAttributeType) (ret NotFoundGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -31,26 +34,33 @@ func getNotFoundGetMessageAttributeTypeOk(arg NotFoundGetMessageAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setNotFoundGetMessageAttributeType(arg *NotFoundGetMessageAttributeType, val NotFoundGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NotFoundGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NotFoundGetMessageRetType = string // NotFound struct for NotFound +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NotFound struct { // The error message for not found resources // REQUIRED Message NotFoundGetMessageAttributeType `json:"message" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNotFound(message NotFoundGetMessageArgType) *NotFound { this := NotFound{} setNotFoundGetMessageAttributeType(&this.Message, message) @@ -60,12 +70,14 @@ func NewNotFound(message NotFoundGetMessageArgType) *NotFound { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNotFoundWithDefaults() *NotFound { this := NotFound{} return &this } // GetMessage returns the Message field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *NotFound) GetMessage() (ret NotFoundGetMessageRetType) { ret, _ = o.GetMessageOk() return ret @@ -73,15 +85,18 @@ func (o *NotFound) GetMessage() (ret NotFoundGetMessageRetType) { // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *NotFound) GetMessageOk() (ret NotFoundGetMessageRetType, ok bool) { return getNotFoundGetMessageAttributeTypeOk(o.Message) } // SetMessage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *NotFound) SetMessage(v NotFoundGetMessageRetType) { setNotFoundGetMessageAttributeType(&o.Message, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o NotFound) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getNotFoundGetMessageAttributeTypeOk(o.Message); ok { @@ -90,37 +105,45 @@ func (o NotFound) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableNotFound struct { value *NotFound isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableNotFound) Get() *NotFound { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableNotFound) Set(val *NotFound) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableNotFound) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableNotFound) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableNotFound(val *NotFound) *NullableNotFound { return &NullableNotFound{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableNotFound) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 d0383cee5..b08c09a4a 100644 --- a/services/secretsmanager/model_update_acl_payload.go +++ b/services/secretsmanager/model_update_acl_payload.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateACLPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLPayloadGetCidrAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateACLPayloadGetCidrAttributeTypeOk(arg UpdateACLPayloadGetCidrAttributeType) (ret UpdateACLPayloadGetCidrRetType, ok bool) { if arg == nil { return ret, false @@ -31,26 +34,33 @@ func getUpdateACLPayloadGetCidrAttributeTypeOk(arg UpdateACLPayloadGetCidrAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateACLPayloadGetCidrAttributeType(arg *UpdateACLPayloadGetCidrAttributeType, val UpdateACLPayloadGetCidrRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLPayloadGetCidrArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLPayloadGetCidrRetType = string // UpdateACLPayload struct for UpdateACLPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLPayload struct { // The given IP/IP Range that is permitted to access. // REQUIRED Cidr UpdateACLPayloadGetCidrAttributeType `json:"cidr" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateACLPayload(cidr UpdateACLPayloadGetCidrArgType) *UpdateACLPayload { this := UpdateACLPayload{} setUpdateACLPayloadGetCidrAttributeType(&this.Cidr, cidr) @@ -60,12 +70,14 @@ func NewUpdateACLPayload(cidr UpdateACLPayloadGetCidrArgType) *UpdateACLPayload // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateACLPayloadWithDefaults() *UpdateACLPayload { this := UpdateACLPayload{} return &this } // GetCidr returns the Cidr field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateACLPayload) GetCidr() (ret UpdateACLPayloadGetCidrRetType) { ret, _ = o.GetCidrOk() return ret @@ -73,15 +85,18 @@ func (o *UpdateACLPayload) GetCidr() (ret UpdateACLPayloadGetCidrRetType) { // GetCidrOk returns a tuple with the Cidr field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateACLPayload) GetCidrOk() (ret UpdateACLPayloadGetCidrRetType, ok bool) { return getUpdateACLPayloadGetCidrAttributeTypeOk(o.Cidr) } // SetCidr sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateACLPayload) SetCidr(v UpdateACLPayloadGetCidrRetType) { setUpdateACLPayloadGetCidrAttributeType(&o.Cidr, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateACLPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateACLPayloadGetCidrAttributeTypeOk(o.Cidr); ok { @@ -90,37 +105,45 @@ func (o UpdateACLPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateACLPayload struct { value *UpdateACLPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateACLPayload) Get() *UpdateACLPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateACLPayload) Set(val *UpdateACLPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateACLPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateACLPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateACLPayload(val *UpdateACLPayload) *NullableUpdateACLPayload { return &NullableUpdateACLPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateACLPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 cd82828bb..f3717612e 100644 --- a/services/secretsmanager/model_update_acls_payload.go +++ b/services/secretsmanager/model_update_acls_payload.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateACLsPayload{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLsPayloadGetCidrsAttributeType = *[]UpdateACLPayload + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLsPayloadGetCidrsArgType = []UpdateACLPayload + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLsPayloadGetCidrsRetType = []UpdateACLPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateACLsPayloadGetCidrsAttributeTypeOk(arg UpdateACLsPayloadGetCidrsAttributeType) (ret UpdateACLsPayloadGetCidrsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getUpdateACLsPayloadGetCidrsAttributeTypeOk(arg UpdateACLsPayloadGetCidrsAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateACLsPayloadGetCidrsAttributeType(arg *UpdateACLsPayloadGetCidrsAttributeType, val UpdateACLsPayloadGetCidrsRetType) { *arg = &val } // UpdateACLsPayload struct for UpdateACLsPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateACLsPayload struct { Cidrs UpdateACLsPayloadGetCidrsAttributeType `json:"cidrs,omitempty"` } @@ -46,6 +55,7 @@ type UpdateACLsPayload struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateACLsPayload() *UpdateACLsPayload { this := UpdateACLsPayload{} return &this @@ -54,12 +64,14 @@ func NewUpdateACLsPayload() *UpdateACLsPayload { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateACLsPayloadWithDefaults() *UpdateACLsPayload { this := UpdateACLsPayload{} return &this } // GetCidrs returns the Cidrs field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateACLsPayload) GetCidrs() (res UpdateACLsPayloadGetCidrsRetType) { res, _ = o.GetCidrsOk() return @@ -67,21 +79,25 @@ func (o *UpdateACLsPayload) GetCidrs() (res UpdateACLsPayloadGetCidrsRetType) { // GetCidrsOk returns a tuple with the Cidrs field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateACLsPayload) GetCidrsOk() (ret UpdateACLsPayloadGetCidrsRetType, ok bool) { return getUpdateACLsPayloadGetCidrsAttributeTypeOk(o.Cidrs) } // HasCidrs returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateACLsPayload) HasCidrs() bool { _, ok := o.GetCidrsOk() return ok } // SetCidrs gets a reference to the given []UpdateACLPayload and assigns it to the Cidrs field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateACLsPayload) SetCidrs(v UpdateACLsPayloadGetCidrsRetType) { setUpdateACLsPayloadGetCidrsAttributeType(&o.Cidrs, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateACLsPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateACLsPayloadGetCidrsAttributeTypeOk(o.Cidrs); ok { @@ -90,37 +106,45 @@ func (o UpdateACLsPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateACLsPayload struct { value *UpdateACLsPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateACLsPayload) Get() *UpdateACLsPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateACLsPayload) Set(val *UpdateACLsPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateACLsPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateACLsPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateACLsPayload(val *UpdateACLsPayload) *NullableUpdateACLsPayload { return &NullableUpdateACLsPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateACLsPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 index e387ae8b4..829974d2e 100644 --- a/services/secretsmanager/model_update_instance_payload.go +++ b/services/secretsmanager/model_update_instance_payload.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateInstancePayload{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetKmsKeyAttributeType = *KmsKeyPayload + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetKmsKeyArgType = KmsKeyPayload + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetKmsKeyRetType = KmsKeyPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetKmsKeyAttributeTypeOk(arg UpdateInstancePayloadGetKmsKeyAttributeType) (ret UpdateInstancePayloadGetKmsKeyRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getUpdateInstancePayloadGetKmsKeyAttributeTypeOk(arg UpdateInstancePayloadG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetKmsKeyAttributeType(arg *UpdateInstancePayloadGetKmsKeyAttributeType, val UpdateInstancePayloadGetKmsKeyRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setUpdateInstancePayloadGetKmsKeyAttributeType(arg *UpdateInstancePayloadGe */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetNameAttributeTypeOk(arg UpdateInstancePayloadGetNameAttributeType) (ret UpdateInstancePayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -51,14 +61,19 @@ func getUpdateInstancePayloadGetNameAttributeTypeOk(arg UpdateInstancePayloadGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetNameAttributeType(arg *UpdateInstancePayloadGetNameAttributeType, val UpdateInstancePayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetNameRetType = string // UpdateInstancePayload struct for UpdateInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayload struct { KmsKey UpdateInstancePayloadGetKmsKeyAttributeType `json:"kmsKey,omitempty"` // A user chosen name to distinguish multiple secrets manager instances. @@ -66,12 +81,14 @@ type UpdateInstancePayload struct { Name UpdateInstancePayloadGetNameAttributeType `json:"name" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _UpdateInstancePayload UpdateInstancePayload // NewUpdateInstancePayload instantiates a new UpdateInstancePayload object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateInstancePayload(name UpdateInstancePayloadGetNameArgType) *UpdateInstancePayload { this := UpdateInstancePayload{} setUpdateInstancePayloadGetNameAttributeType(&this.Name, name) @@ -81,12 +98,14 @@ func NewUpdateInstancePayload(name UpdateInstancePayloadGetNameArgType) *UpdateI // NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { this := UpdateInstancePayload{} return &this } // GetKmsKey returns the KmsKey field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetKmsKey() (res UpdateInstancePayloadGetKmsKeyRetType) { res, _ = o.GetKmsKeyOk() return @@ -94,22 +113,26 @@ func (o *UpdateInstancePayload) GetKmsKey() (res UpdateInstancePayloadGetKmsKeyR // GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetKmsKeyOk() (ret UpdateInstancePayloadGetKmsKeyRetType, ok bool) { return getUpdateInstancePayloadGetKmsKeyAttributeTypeOk(o.KmsKey) } // HasKmsKey returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) HasKmsKey() bool { _, ok := o.GetKmsKeyOk() return ok } // SetKmsKey gets a reference to the given KmsKeyPayload and assigns it to the KmsKey field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetKmsKey(v UpdateInstancePayloadGetKmsKeyRetType) { setUpdateInstancePayloadGetKmsKeyAttributeType(&o.KmsKey, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetName() (ret UpdateInstancePayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -117,15 +140,18 @@ func (o *UpdateInstancePayload) GetName() (ret UpdateInstancePayloadGetNameRetTy // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetNameOk() (ret UpdateInstancePayloadGetNameRetType, ok bool) { return getUpdateInstancePayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetName(v UpdateInstancePayloadGetNameRetType) { setUpdateInstancePayloadGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateInstancePayloadGetKmsKeyAttributeTypeOk(o.KmsKey); ok { @@ -137,37 +163,45 @@ func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateInstancePayload struct { value *UpdateInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateInstancePayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateInstancePayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { return &NullableUpdateInstancePayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/secretsmanager/model_update_user_payload.go b/services/secretsmanager/model_update_user_payload.go index 40881bfe8..48c1f8625 100644 --- a/services/secretsmanager/model_update_user_payload.go +++ b/services/secretsmanager/model_update_user_payload.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateUserPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateUserPayloadGetDescriptionAttributeTypeOk(arg UpdateUserPayloadGetDescriptionAttributeType) (ret UpdateUserPayloadGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUpdateUserPayloadGetDescriptionAttributeTypeOk(arg UpdateUserPayloadGetD return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateUserPayloadGetDescriptionAttributeType(arg *UpdateUserPayloadGetDescriptionAttributeType, val UpdateUserPayloadGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetDescriptionRetType = string /* @@ -43,10 +50,16 @@ type UpdateUserPayloadGetDescriptionRetType = string */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadgetWriteAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadgetWriteArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadgetWriteRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateUserPayloadgetWriteAttributeTypeOk(arg UpdateUserPayloadgetWriteAttributeType) (ret UpdateUserPayloadgetWriteRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +67,13 @@ func getUpdateUserPayloadgetWriteAttributeTypeOk(arg UpdateUserPayloadgetWriteAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateUserPayloadgetWriteAttributeType(arg *UpdateUserPayloadgetWriteAttributeType, val UpdateUserPayloadgetWriteRetType) { *arg = &val } // UpdateUserPayload struct for UpdateUserPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayload struct { // A user chosen description to differentiate between multiple users. Description UpdateUserPayloadGetDescriptionAttributeType `json:"description,omitempty"` @@ -70,6 +85,7 @@ type UpdateUserPayload struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateUserPayload() *UpdateUserPayload { this := UpdateUserPayload{} return &this @@ -78,12 +94,14 @@ func NewUpdateUserPayload() *UpdateUserPayload { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { this := UpdateUserPayload{} return &this } // GetDescription returns the Description field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) GetDescription() (res UpdateUserPayloadGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -91,22 +109,26 @@ func (o *UpdateUserPayload) GetDescription() (res UpdateUserPayloadGetDescriptio // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) GetDescriptionOk() (ret UpdateUserPayloadGetDescriptionRetType, ok bool) { return getUpdateUserPayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) SetDescription(v UpdateUserPayloadGetDescriptionRetType) { setUpdateUserPayloadGetDescriptionAttributeType(&o.Description, v) } // GetWrite returns the Write field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) GetWrite() (res UpdateUserPayloadgetWriteRetType) { res, _ = o.GetWriteOk() return @@ -114,21 +136,25 @@ func (o *UpdateUserPayload) GetWrite() (res UpdateUserPayloadgetWriteRetType) { // GetWriteOk returns a tuple with the Write field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) GetWriteOk() (ret UpdateUserPayloadgetWriteRetType, ok bool) { return getUpdateUserPayloadgetWriteAttributeTypeOk(o.Write) } // HasWrite returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) HasWrite() bool { _, ok := o.GetWriteOk() return ok } // SetWrite gets a reference to the given bool and assigns it to the Write field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) SetWrite(v UpdateUserPayloadgetWriteRetType) { setUpdateUserPayloadgetWriteAttributeType(&o.Write, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateUserPayloadGetDescriptionAttributeTypeOk(o.Description); ok { @@ -140,37 +166,45 @@ func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateUserPayload struct { value *UpdateUserPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateUserPayload) Get() *UpdateUserPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateUserPayload) Set(val *UpdateUserPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateUserPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateUserPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateUserPayload(val *UpdateUserPayload) *NullableUpdateUserPayload { return &NullableUpdateUserPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateUserPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 29bbc4742..49fc05907 100644 --- a/services/secretsmanager/model_user.go +++ b/services/secretsmanager/model_user.go @@ -8,6 +8,7 @@ API version: 1.4.2 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package secretsmanager import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &User{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetDescriptionAttributeTypeOk(arg UserGetDescriptionAttributeType) (ret UserGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUserGetDescriptionAttributeTypeOk(arg UserGetDescriptionAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetDescriptionAttributeType(arg *UserGetDescriptionAttributeType, val UserGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetDescriptionRetType = string /* @@ -43,8 +50,10 @@ type UserGetDescriptionRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetIdAttributeTypeOk(arg UserGetIdAttributeType) (ret UserGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getUserGetIdAttributeTypeOk(arg UserGetIdAttributeType) (ret UserGetIdRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetIdAttributeType(arg *UserGetIdAttributeType, val UserGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetIdRetType = string /* @@ -64,8 +77,10 @@ type UserGetIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPasswordAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetPasswordAttributeTypeOk(arg UserGetPasswordAttributeType) (ret UserGetPasswordRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getUserGetPasswordAttributeTypeOk(arg UserGetPasswordAttributeType) (ret Us return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetPasswordAttributeType(arg *UserGetPasswordAttributeType, val UserGetPasswordRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPasswordArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPasswordRetType = string /* @@ -85,8 +104,10 @@ type UserGetPasswordRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUsernameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetUsernameAttributeTypeOk(arg UserGetUsernameAttributeType) (ret UserGetUsernameRetType, ok bool) { if arg == nil { return ret, false @@ -94,11 +115,15 @@ func getUserGetUsernameAttributeTypeOk(arg UserGetUsernameAttributeType) (ret Us return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetUsernameAttributeType(arg *UserGetUsernameAttributeType, val UserGetUsernameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUsernameRetType = string /* @@ -106,10 +131,16 @@ type UserGetUsernameRetType = string */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UsergetWriteAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UsergetWriteArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UsergetWriteRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUsergetWriteAttributeTypeOk(arg UsergetWriteAttributeType) (ret UsergetWriteRetType, ok bool) { if arg == nil { return ret, false @@ -117,11 +148,13 @@ func getUsergetWriteAttributeTypeOk(arg UsergetWriteAttributeType) (ret UsergetW return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUsergetWriteAttributeType(arg *UsergetWriteAttributeType, val UsergetWriteRetType) { *arg = &val } // User struct for User +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type User struct { // A user chosen description to differentiate between multiple users. // REQUIRED @@ -140,12 +173,14 @@ type User struct { Write UsergetWriteAttributeType `json:"write" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUser(description UserGetDescriptionArgType, id UserGetIdArgType, password UserGetPasswordArgType, username UserGetUsernameArgType, write UsergetWriteArgType) *User { this := User{} setUserGetDescriptionAttributeType(&this.Description, description) @@ -159,12 +194,14 @@ func NewUser(description UserGetDescriptionArgType, id UserGetIdArgType, passwor // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUserWithDefaults() *User { this := User{} return &this } // GetDescription returns the Description field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetDescription() (ret UserGetDescriptionRetType) { ret, _ = o.GetDescriptionOk() return ret @@ -172,16 +209,19 @@ func (o *User) GetDescription() (ret UserGetDescriptionRetType) { // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetDescriptionOk() (ret UserGetDescriptionRetType, ok bool) { return getUserGetDescriptionAttributeTypeOk(o.Description) } // SetDescription sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetDescription(v UserGetDescriptionRetType) { setUserGetDescriptionAttributeType(&o.Description, v) } // GetId returns the Id field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetId() (ret UserGetIdRetType) { ret, _ = o.GetIdOk() return ret @@ -189,16 +229,19 @@ func (o *User) GetId() (ret UserGetIdRetType) { // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetIdOk() (ret UserGetIdRetType, ok bool) { return getUserGetIdAttributeTypeOk(o.Id) } // SetId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetId(v UserGetIdRetType) { setUserGetIdAttributeType(&o.Id, v) } // GetPassword returns the Password field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetPassword() (ret UserGetPasswordRetType) { ret, _ = o.GetPasswordOk() return ret @@ -206,16 +249,19 @@ func (o *User) GetPassword() (ret UserGetPasswordRetType) { // GetPasswordOk returns a tuple with the Password field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetPasswordOk() (ret UserGetPasswordRetType, ok bool) { return getUserGetPasswordAttributeTypeOk(o.Password) } // SetPassword sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetPassword(v UserGetPasswordRetType) { setUserGetPasswordAttributeType(&o.Password, v) } // GetUsername returns the Username field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetUsername() (ret UserGetUsernameRetType) { ret, _ = o.GetUsernameOk() return ret @@ -223,16 +269,19 @@ func (o *User) GetUsername() (ret UserGetUsernameRetType) { // GetUsernameOk returns a tuple with the Username field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetUsernameOk() (ret UserGetUsernameRetType, ok bool) { return getUserGetUsernameAttributeTypeOk(o.Username) } // SetUsername sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetUsername(v UserGetUsernameRetType) { setUserGetUsernameAttributeType(&o.Username, v) } // GetWrite returns the Write field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetWrite() (ret UsergetWriteRetType) { ret, _ = o.GetWriteOk() return ret @@ -240,15 +289,18 @@ func (o *User) GetWrite() (ret UsergetWriteRetType) { // GetWriteOk returns a tuple with the Write field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) GetWriteOk() (ret UsergetWriteRetType, ok bool) { return getUsergetWriteAttributeTypeOk(o.Write) } // SetWrite sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetWrite(v UsergetWriteRetType) { setUsergetWriteAttributeType(&o.Write, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o User) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUserGetDescriptionAttributeTypeOk(o.Description); ok { @@ -269,37 +321,45 @@ func (o User) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUser struct { value *User isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUser) Get() *User { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUser) Set(val *User) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUser) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUser) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUser(val *User) *NullableUser { return &NullableUser{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUser) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/secretsmanager/oas_commit b/services/secretsmanager/oas_commit index 1568ca803..bf3189995 100644 --- a/services/secretsmanager/oas_commit +++ b/services/secretsmanager/oas_commit @@ -1 +1 @@ -de08988e74d198707fe9def2236c63562e5ad6df +3e9c109388be83b40c16d8cb5ab146aa314eb6e8 diff --git a/services/secretsmanager/utils.go b/services/secretsmanager/utils.go index cdea3e74d..83552b302 100644 --- a/services/secretsmanager/utils.go +++ b/services/secretsmanager/utils.go @@ -18,341 +18,419 @@ import ( ) // PtrBool is a helper routine that returns a pointer to given boolean value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrBool(v bool) *bool { return &v } // PtrInt is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt(v int) *int { return &v } // PtrInt32 is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt32(v int32) *int32 { return &v } // PtrInt64 is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt64(v int64) *int64 { return &v } // PtrFloat32 is a helper routine that returns a pointer to given float value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrFloat32(v float32) *float32 { return &v } // PtrFloat64 is a helper routine that returns a pointer to given float value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrFloat64(v float64) *float64 { return &v } // PtrString is a helper routine that returns a pointer to given string value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrTime(v time.Time) *time.Time { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableValue[T any] struct { value *T isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValue[T]) Get() *T { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValue[T]) Set(val *T) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValue[T]) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValue[T]) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableBool struct { value *bool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) Get() *bool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) Set(val *bool) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableBool(val *bool) *NullableBool { return &NullableBool{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt struct { value *int isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) Get() *int { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) Set(val *int) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt(val *int) *NullableInt { return &NullableInt{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt32 struct { value *int32 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) Get() *int32 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) Set(val *int32) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt32(val *int32) *NullableInt32 { return &NullableInt32{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt64 struct { value *int64 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) Get() *int64 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) Set(val *int64) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt64(val *int64) *NullableInt64 { return &NullableInt64{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFloat32 struct { value *float32 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) Get() *float32 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) Set(val *float32) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableFloat32(val *float32) *NullableFloat32 { return &NullableFloat32{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFloat64 struct { value *float64 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) Get() *float64 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) Set(val *float64) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableFloat64(val *float64) *NullableFloat64 { return &NullableFloat64{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableString struct { value *string isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) Get() *string { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) Set(val *string) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableString(val *string) *NullableString { return &NullableString{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableTime struct { value *time.Time isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) Get() *time.Time { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) Set(val *time.Time) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableTime(val *time.Time) *NullableTime { return &NullableTime{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) MarshalJSON() ([]byte, error) { return v.value.MarshalJSON() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } // IsNil checks if an input is nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func IsNil(i interface{}) bool { if i == nil { return true @@ -369,13 +447,16 @@ func IsNil(i interface{}) bool { return false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MappedNullable interface { ToMap() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // randString returns a random string with a specified length. It panics if n <= 0. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func randString(n int) string { b := make([]byte, n) for i := range b { diff --git a/services/secretsmanager/v1api/api_default.go b/services/secretsmanager/v1api/api_default.go new file mode 100644 index 000000000..db01d184d --- /dev/null +++ b/services/secretsmanager/v1api/api_default.go @@ -0,0 +1,2775 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + CreateACL Method for CreateACL + + Creates a new Secrets Manager acl within the project. + + @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 ApiCreateACLRequest + */ + CreateACL(ctx context.Context, projectId string, instanceId string) ApiCreateACLRequest + + // CreateACLExecute executes the request + // @return ACL + CreateACLExecute(r ApiCreateACLRequest) (*ACL, error) + + /* + CreateInstance Method for CreateInstance + + Creates a new Secrets Manager instance within the project. + + @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. + @return ApiCreateInstanceRequest + */ + CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest + + // CreateInstanceExecute executes the request + // @return Instance + CreateInstanceExecute(r ApiCreateInstanceRequest) (*Instance, error) + + /* + CreateUser Method for CreateUser + + Creates a new user for 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 ApiCreateUserRequest + */ + CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest + + // CreateUserExecute executes the request + // @return User + CreateUserExecute(r ApiCreateUserRequest) (*User, error) + + /* + DeleteACL Method for DeleteACL + + Deletes the given acl. + + @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. + @param aclId The acl UUID of the Secrets Manager instance. + @return ApiDeleteACLRequest + */ + DeleteACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiDeleteACLRequest + + // DeleteACLExecute executes the request + DeleteACLExecute(r ApiDeleteACLRequest) error + + /* + DeleteInstance Method for DeleteInstance + + Deletes 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 ApiDeleteInstanceRequest + */ + DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest + + // DeleteInstanceExecute executes the request + DeleteInstanceExecute(r ApiDeleteInstanceRequest) error + + /* + DeleteUser Method for DeleteUser + + Deletes the given user. + + @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. + @param userId The user UUID with permissions on the Secrets Manager instance. + @return ApiDeleteUserRequest + */ + DeleteUser(ctx context.Context, projectId string, instanceId string, userId string) ApiDeleteUserRequest + + // DeleteUserExecute executes the request + DeleteUserExecute(r ApiDeleteUserRequest) error + + /* + GetACL Method for GetACL + + Returns the details for the given acl. + + @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. + @param aclId The acl UUID of the Secrets Manager instance. + @return ApiGetACLRequest + */ + GetACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiGetACLRequest + + // GetACLExecute executes the request + // @return ACL + GetACLExecute(r ApiGetACLRequest) (*ACL, error) + + /* + GetInstance Method for GetInstance + + Returns the details for 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 ApiGetInstanceRequest + */ + GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest + + // GetInstanceExecute executes the request + // @return Instance + GetInstanceExecute(r ApiGetInstanceRequest) (*Instance, error) + + /* + GetUser Method for GetUser + + Returns the details for the given user. + + @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. + @param userId The user UUID with permissions on the Secrets Manager instance. + @return ApiGetUserRequest + */ + GetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiGetUserRequest + + // GetUserExecute executes the request + // @return User + GetUserExecute(r ApiGetUserRequest) (*User, error) + + /* + ListACLs Method for ListACLs + + Returns the acls for 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 ApiListACLsRequest + */ + ListACLs(ctx context.Context, projectId string, instanceId string) ApiListACLsRequest + + // ListACLsExecute executes the request + // @return ListACLsResponse + ListACLsExecute(r ApiListACLsRequest) (*ListACLsResponse, error) + + /* + ListInstances Method for ListInstances + + Returns a list of all Secrets Manager instances within the project. + + @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. + @return ApiListInstancesRequest + */ + ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest + + // ListInstancesExecute executes the request + // @return ListInstancesResponse + ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) + + /* + ListUsers Method for ListUsers + + Returns the users for 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 ApiListUsersRequest + */ + ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest + + // ListUsersExecute executes the request + // @return ListUsersResponse + ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) + + /* + UpdateACL Method for UpdateACL + + Updates the ip ranges for the acl. + + @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. + @param aclId The acl UUID of the Secrets Manager instance. + @return ApiUpdateACLRequest + */ + UpdateACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiUpdateACLRequest + + // UpdateACLExecute executes the request + UpdateACLExecute(r ApiUpdateACLRequest) error + + /* + UpdateACLs Method for UpdateACLs + + Changes a list of ACLs within the project. + + @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 ApiUpdateACLsRequest + */ + UpdateACLs(ctx context.Context, projectId string, instanceId string) ApiUpdateACLsRequest + + // UpdateACLsExecute executes the request + UpdateACLsExecute(r ApiUpdateACLsRequest) error + + /* + 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 + */ + UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest + + // UpdateInstanceExecute executes the request + UpdateInstanceExecute(r ApiUpdateInstanceRequest) error + + /* + UpdateUser Method for UpdateUser + + Updates the details for the given user. + + @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. + @param userId The user UUID with permissions on the Secrets Manager instance. + @return ApiUpdateUserRequest + */ + UpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiUpdateUserRequest + + // UpdateUserExecute executes the request + UpdateUserExecute(r ApiUpdateUserRequest) error +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCreateACLRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + createACLPayload *CreateACLPayload +} + +func (r ApiCreateACLRequest) CreateACLPayload(createACLPayload CreateACLPayload) ApiCreateACLRequest { + r.createACLPayload = &createACLPayload + return r +} + +func (r ApiCreateACLRequest) Execute() (*ACL, error) { + return r.ApiService.CreateACLExecute(r) +} + +/* +CreateACL Method for CreateACL + +Creates a new Secrets Manager acl within the project. + + @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 ApiCreateACLRequest +*/ +func (a *DefaultAPIService) CreateACL(ctx context.Context, projectId string, instanceId string) ApiCreateACLRequest { + return ApiCreateACLRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ACL +func (a *DefaultAPIService) CreateACLExecute(r ApiCreateACLRequest) (*ACL, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ACL + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateACL") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/acls" + 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.createACLPayload == nil { + return localVarReturnValue, reportError("createACLPayload 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{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createACLPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + 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 + } + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + createInstancePayload *CreateInstancePayload +} + +func (r ApiCreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { + r.createInstancePayload = &createInstancePayload + return r +} + +func (r ApiCreateInstanceRequest) Execute() (*Instance, error) { + return r.ApiService.CreateInstanceExecute(r) +} + +/* +CreateInstance Method for CreateInstance + +Creates a new Secrets Manager instance within the project. + + @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. + @return ApiCreateInstanceRequest +*/ +func (a *DefaultAPIService) CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return Instance +func (a *DefaultAPIService) CreateInstanceExecute(r ApiCreateInstanceRequest) (*Instance, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Instance + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createInstancePayload == nil { + return localVarReturnValue, reportError("createInstancePayload 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{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createInstancePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + createUserPayload *CreateUserPayload +} + +func (r ApiCreateUserRequest) CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest { + r.createUserPayload = &createUserPayload + return r +} + +func (r ApiCreateUserRequest) Execute() (*User, error) { + return r.ApiService.CreateUserExecute(r) +} + +/* +CreateUser Method for CreateUser + +Creates a new user for 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 ApiCreateUserRequest +*/ +func (a *DefaultAPIService) CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return User +func (a *DefaultAPIService) CreateUserExecute(r ApiCreateUserRequest) (*User, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users" + 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.createUserPayload == nil { + return localVarReturnValue, reportError("createUserPayload 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{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createUserPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + 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 + } + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteACLRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + aclId string +} + +func (r ApiDeleteACLRequest) Execute() error { + return r.ApiService.DeleteACLExecute(r) +} + +/* +DeleteACL Method for DeleteACL + +Deletes the given acl. + + @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. + @param aclId The acl UUID of the Secrets Manager instance. + @return ApiDeleteACLRequest +*/ +func (a *DefaultAPIService) DeleteACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiDeleteACLRequest { + return ApiDeleteACLRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + aclId: aclId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteACLExecute(r ApiDeleteACLRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteACL") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"aclId"+"}", url.PathEscape(parameterValueToString(r.aclId, "aclId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + 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 + } + return newErr + } + + return nil +} + +type ApiDeleteInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiDeleteInstanceRequest) Execute() error { + return r.ApiService.DeleteInstanceExecute(r) +} + +/* +DeleteInstance Method for DeleteInstance + +Deletes 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 ApiDeleteInstanceRequest +*/ +func (a *DefaultAPIService) DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteInstance") + 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{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + 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 + } + return newErr + } + + return nil +} + +type ApiDeleteUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string +} + +func (r ApiDeleteUserRequest) Execute() error { + return r.ApiService.DeleteUserExecute(r) +} + +/* +DeleteUser Method for DeleteUser + +Deletes the given user. + + @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. + @param userId The user UUID with permissions on the Secrets Manager instance. + @return ApiDeleteUserRequest +*/ +func (a *DefaultAPIService) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteUserExecute(r ApiDeleteUserRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + 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 + } + return newErr + } + + return nil +} + +type ApiGetACLRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + aclId string +} + +func (r ApiGetACLRequest) Execute() (*ACL, error) { + return r.ApiService.GetACLExecute(r) +} + +/* +GetACL Method for GetACL + +Returns the details for the given acl. + + @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. + @param aclId The acl UUID of the Secrets Manager instance. + @return ApiGetACLRequest +*/ +func (a *DefaultAPIService) GetACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiGetACLRequest { + return ApiGetACLRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + aclId: aclId, + } +} + +// Execute executes the request +// +// @return ACL +func (a *DefaultAPIService) GetACLExecute(r ApiGetACLRequest) (*ACL, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ACL + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetACL") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"aclId"+"}", url.PathEscape(parameterValueToString(r.aclId, "aclId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiGetInstanceRequest) Execute() (*Instance, error) { + return r.ApiService.GetInstanceExecute(r) +} + +/* +GetInstance Method for GetInstance + +Returns the details for 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 ApiGetInstanceRequest +*/ +func (a *DefaultAPIService) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return Instance +func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*Instance, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Instance + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetInstance") + if err != nil { + return localVarReturnValue, &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{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string +} + +func (r ApiGetUserRequest) Execute() (*User, error) { + return r.ApiService.GetUserExecute(r) +} + +/* +GetUser Method for GetUser + +Returns the details for the given user. + + @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. + @param userId The user UUID with permissions on the Secrets Manager instance. + @return ApiGetUserRequest +*/ +func (a *DefaultAPIService) GetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +// +// @return User +func (a *DefaultAPIService) GetUserExecute(r ApiGetUserRequest) (*User, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListACLsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiListACLsRequest) Execute() (*ListACLsResponse, error) { + return r.ApiService.ListACLsExecute(r) +} + +/* +ListACLs Method for ListACLs + +Returns the acls for 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 ApiListACLsRequest +*/ +func (a *DefaultAPIService) ListACLs(ctx context.Context, projectId string, instanceId string) ApiListACLsRequest { + return ApiListACLsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListACLsResponse +func (a *DefaultAPIService) ListACLsExecute(r ApiListACLsRequest) (*ListACLsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListACLsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListACLs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/acls" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListInstancesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiListInstancesRequest) Execute() (*ListInstancesResponse, error) { + return r.ApiService.ListInstancesExecute(r) +} + +/* +ListInstances Method for ListInstances + +Returns a list of all Secrets Manager instances within the project. + + @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. + @return ApiListInstancesRequest +*/ +func (a *DefaultAPIService) ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListInstancesResponse +func (a *DefaultAPIService) ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListInstancesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListInstances") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListUsersRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiListUsersRequest) Execute() (*ListUsersResponse, error) { + return r.ApiService.ListUsersExecute(r) +} + +/* +ListUsers Method for ListUsers + +Returns the users for 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 ApiListUsersRequest +*/ +func (a *DefaultAPIService) ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListUsersResponse +func (a *DefaultAPIService) ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListUsersResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListUsers") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + } + 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 + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateACLRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + aclId string + updateACLPayload *UpdateACLPayload +} + +func (r ApiUpdateACLRequest) UpdateACLPayload(updateACLPayload UpdateACLPayload) ApiUpdateACLRequest { + r.updateACLPayload = &updateACLPayload + return r +} + +func (r ApiUpdateACLRequest) Execute() error { + return r.ApiService.UpdateACLExecute(r) +} + +/* +UpdateACL Method for UpdateACL + +Updates the ip ranges for the acl. + + @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. + @param aclId The acl UUID of the Secrets Manager instance. + @return ApiUpdateACLRequest +*/ +func (a *DefaultAPIService) UpdateACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiUpdateACLRequest { + return ApiUpdateACLRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + aclId: aclId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateACLExecute(r ApiUpdateACLRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateACL") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/acls/{aclId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"aclId"+"}", url.PathEscape(parameterValueToString(r.aclId, "aclId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateACLPayload == nil { + return reportError("updateACLPayload 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{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateACLPayload + 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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + 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 + } + return newErr + } + + return nil +} + +type ApiUpdateACLsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + updateACLsPayload *UpdateACLsPayload +} + +func (r ApiUpdateACLsRequest) UpdateACLsPayload(updateACLsPayload UpdateACLsPayload) ApiUpdateACLsRequest { + r.updateACLsPayload = &updateACLsPayload + return r +} + +func (r ApiUpdateACLsRequest) Execute() error { + return r.ApiService.UpdateACLsExecute(r) +} + +/* +UpdateACLs Method for UpdateACLs + +Changes a list of ACLs within the project. + + @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 ApiUpdateACLsRequest +*/ +func (a *DefaultAPIService) UpdateACLs(ctx context.Context, projectId string, instanceId string) ApiUpdateACLsRequest { + return ApiUpdateACLsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateACLsExecute(r ApiUpdateACLsRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateACLs") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/acls" + 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.updateACLsPayload == nil { + return reportError("updateACLsPayload 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{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateACLsPayload + 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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + 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 + } + 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 newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + return newErr + } + + return nil +} + +type ApiUpdateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + updateInstancePayload *UpdateInstancePayload +} + +func (r ApiUpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { + r.updateInstancePayload = &updateInstancePayload + return r +} + +func (r ApiUpdateInstanceRequest) Execute() error { + return r.ApiService.UpdateInstanceExecute(r) +} + +/* +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 *DefaultAPIService) UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateInstanceExecute(r ApiUpdateInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + 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 reportError("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{"application/json", "text/plain"} + + // 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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + 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 + } + return newErr + } + + return nil +} + +type ApiUpdateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string + updateUserPayload *UpdateUserPayload +} + +func (r ApiUpdateUserRequest) UpdateUserPayload(updateUserPayload UpdateUserPayload) ApiUpdateUserRequest { + r.updateUserPayload = &updateUserPayload + return r +} + +func (r ApiUpdateUserRequest) Execute() error { + return r.ApiService.UpdateUserExecute(r) +} + +/* +UpdateUser Method for UpdateUser + +Updates the details for the given user. + + @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. + @param userId The user UUID with permissions on the Secrets Manager instance. + @return ApiUpdateUserRequest +*/ +func (a *DefaultAPIService) UpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateUserExecute(r ApiUpdateUserRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateUserPayload == nil { + return reportError("updateUserPayload 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{"application/json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateUserPayload + 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{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + 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 + 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 + 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 + } + return newErr + } + + return nil +} diff --git a/services/secretsmanager/v1api/api_default_mock.go b/services/secretsmanager/v1api/api_default_mock.go new file mode 100644 index 000000000..af31cb3a3 --- /dev/null +++ b/services/secretsmanager/v1api/api_default_mock.go @@ -0,0 +1,356 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // CreateACLExecuteMock can be populated to implement the behavior of the CreateACLExecute function of this mock + CreateACLExecuteMock *func(r ApiCreateACLRequest) (*ACL, error) + // CreateInstanceExecuteMock can be populated to implement the behavior of the CreateInstanceExecute function of this mock + CreateInstanceExecuteMock *func(r ApiCreateInstanceRequest) (*Instance, error) + // CreateUserExecuteMock can be populated to implement the behavior of the CreateUserExecute function of this mock + CreateUserExecuteMock *func(r ApiCreateUserRequest) (*User, error) + // DeleteACLExecuteMock can be populated to implement the behavior of the DeleteACLExecute function of this mock + DeleteACLExecuteMock *func(r ApiDeleteACLRequest) error + // DeleteInstanceExecuteMock can be populated to implement the behavior of the DeleteInstanceExecute function of this mock + DeleteInstanceExecuteMock *func(r ApiDeleteInstanceRequest) error + // DeleteUserExecuteMock can be populated to implement the behavior of the DeleteUserExecute function of this mock + DeleteUserExecuteMock *func(r ApiDeleteUserRequest) error + // GetACLExecuteMock can be populated to implement the behavior of the GetACLExecute function of this mock + GetACLExecuteMock *func(r ApiGetACLRequest) (*ACL, error) + // GetInstanceExecuteMock can be populated to implement the behavior of the GetInstanceExecute function of this mock + GetInstanceExecuteMock *func(r ApiGetInstanceRequest) (*Instance, error) + // GetUserExecuteMock can be populated to implement the behavior of the GetUserExecute function of this mock + GetUserExecuteMock *func(r ApiGetUserRequest) (*User, error) + // ListACLsExecuteMock can be populated to implement the behavior of the ListACLsExecute function of this mock + ListACLsExecuteMock *func(r ApiListACLsRequest) (*ListACLsResponse, error) + // ListInstancesExecuteMock can be populated to implement the behavior of the ListInstancesExecute function of this mock + ListInstancesExecuteMock *func(r ApiListInstancesRequest) (*ListInstancesResponse, error) + // ListUsersExecuteMock can be populated to implement the behavior of the ListUsersExecute function of this mock + ListUsersExecuteMock *func(r ApiListUsersRequest) (*ListUsersResponse, error) + // UpdateACLExecuteMock can be populated to implement the behavior of the UpdateACLExecute function of this mock + UpdateACLExecuteMock *func(r ApiUpdateACLRequest) error + // UpdateACLsExecuteMock can be populated to implement the behavior of the UpdateACLsExecute function of this mock + UpdateACLsExecuteMock *func(r ApiUpdateACLsRequest) error + // UpdateInstanceExecuteMock can be populated to implement the behavior of the UpdateInstanceExecute function of this mock + UpdateInstanceExecuteMock *func(r ApiUpdateInstanceRequest) error + // UpdateUserExecuteMock can be populated to implement the behavior of the UpdateUserExecute function of this mock + UpdateUserExecuteMock *func(r ApiUpdateUserRequest) error +} + +func (a DefaultAPIServiceMock) CreateACL(ctx context.Context, projectId string, instanceId string) ApiCreateACLRequest { + return ApiCreateACLRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// CreateACLExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateACLExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateACLExecute(r ApiCreateACLRequest) (*ACL, error) { + if a.CreateACLExecuteMock == nil { + var localVarReturnValue *ACL + return localVarReturnValue, nil + } + + return (*a.CreateACLExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// CreateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateInstanceExecute(r ApiCreateInstanceRequest) (*Instance, error) { + if a.CreateInstanceExecuteMock == nil { + var localVarReturnValue *Instance + return localVarReturnValue, nil + } + + return (*a.CreateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// CreateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateUserExecute(r ApiCreateUserRequest) (*User, error) { + if a.CreateUserExecuteMock == nil { + var localVarReturnValue *User + return localVarReturnValue, nil + } + + return (*a.CreateUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiDeleteACLRequest { + return ApiDeleteACLRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + aclId: aclId, + } +} + +// DeleteACLExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteACLExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteACLExecute(r ApiDeleteACLRequest) error { + if a.DeleteACLExecuteMock == nil { + return nil + } + + return (*a.DeleteACLExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// DeleteInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + if a.DeleteInstanceExecuteMock == nil { + return nil + } + + return (*a.DeleteInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// DeleteUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteUserExecute(r ApiDeleteUserRequest) error { + if a.DeleteUserExecuteMock == nil { + return nil + } + + return (*a.DeleteUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiGetACLRequest { + return ApiGetACLRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + aclId: aclId, + } +} + +// GetACLExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetACLExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetACLExecute(r ApiGetACLRequest) (*ACL, error) { + if a.GetACLExecuteMock == nil { + var localVarReturnValue *ACL + return localVarReturnValue, nil + } + + return (*a.GetACLExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// GetInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetInstanceExecute(r ApiGetInstanceRequest) (*Instance, error) { + if a.GetInstanceExecuteMock == nil { + var localVarReturnValue *Instance + return localVarReturnValue, nil + } + + return (*a.GetInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// GetUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetUserExecute(r ApiGetUserRequest) (*User, error) { + if a.GetUserExecuteMock == nil { + var localVarReturnValue *User + return localVarReturnValue, nil + } + + return (*a.GetUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListACLs(ctx context.Context, projectId string, instanceId string) ApiListACLsRequest { + return ApiListACLsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// ListACLsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListACLsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListACLsExecute(r ApiListACLsRequest) (*ListACLsResponse, error) { + if a.ListACLsExecuteMock == nil { + var localVarReturnValue *ListACLsResponse + return localVarReturnValue, nil + } + + return (*a.ListACLsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListInstancesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListInstancesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) { + if a.ListInstancesExecuteMock == nil { + var localVarReturnValue *ListInstancesResponse + return localVarReturnValue, nil + } + + return (*a.ListInstancesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// ListUsersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListUsersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) { + if a.ListUsersExecuteMock == nil { + var localVarReturnValue *ListUsersResponse + return localVarReturnValue, nil + } + + return (*a.ListUsersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateACL(ctx context.Context, projectId string, instanceId string, aclId string) ApiUpdateACLRequest { + return ApiUpdateACLRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + aclId: aclId, + } +} + +// UpdateACLExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateACLExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateACLExecute(r ApiUpdateACLRequest) error { + if a.UpdateACLExecuteMock == nil { + return nil + } + + return (*a.UpdateACLExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateACLs(ctx context.Context, projectId string, instanceId string) ApiUpdateACLsRequest { + return ApiUpdateACLsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// UpdateACLsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateACLsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateACLsExecute(r ApiUpdateACLsRequest) error { + if a.UpdateACLsExecuteMock == nil { + return nil + } + + return (*a.UpdateACLsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// UpdateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateInstanceExecute(r ApiUpdateInstanceRequest) error { + if a.UpdateInstanceExecuteMock == nil { + return nil + } + + return (*a.UpdateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// UpdateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateUserExecute(r ApiUpdateUserRequest) error { + if a.UpdateUserExecuteMock == nil { + return nil + } + + return (*a.UpdateUserExecuteMock)(r) +} diff --git a/services/secretsmanager/v1api/client.go b/services/secretsmanager/v1api/client.go new file mode 100644 index 000000000..55810a597 --- /dev/null +++ b/services/secretsmanager/v1api/client.go @@ -0,0 +1,658 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "github.com/stackitcloud/stackit-sdk-go/core/auth" + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") +) + +// APIClient manages communication with the STACKIT Secrets Manager API API v1.4.2 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *config.Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultAPI DefaultAPI +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { + cfg := NewConfiguration() + + for _, option := range opts { + err := option(cfg) + if err != nil { + return nil, fmt.Errorf("configuring the client: %w", err) + } + } + + err := config.ConfigureRegion(cfg) + if err != nil { + return nil, fmt.Errorf("configuring region: %w", err) + } + + if cfg.HTTPClient == nil { + cfg.HTTPClient = &http.Client{} + } + + authRoundTripper, err := auth.SetupAuth(cfg) + if err != nil { + return nil, fmt.Errorf("setting up authentication: %w", err) + } + + roundTripper := authRoundTripper + if cfg.Middleware != nil { + roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...) + } + + cfg.HTTPClient.Transport = roundTripper + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.DefaultAPI = (*DefaultAPIService)(&c.common) + + return c, nil +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString(obj interface{}, key string) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + return fmt.Sprintf("%v", obj) + } + var param, ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap, err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i := 0; i < lenIndValue; i++ { + var arrayValue = indValue.Index(i) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, collectionType) + } + return + + case reflect.Map: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + iter := indValue.MapRange() + for iter.Next() { + k, v := iter.Key(), iter.Value() + parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, collectionType) + return + + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } + + switch valuesMap := headerOrQueryParams.(type) { + case url.Values: + if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" { + valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value) + } else { + valuesMap.Add(keyPrefix, value) + } + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *config.Configuration { + return c.cfg +} + +type formFile struct { + fileBytes []byte + fileName string + formFileName string +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFiles []formFile) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/secretsmanager/v1api/configuration.go b/services/secretsmanager/v1api/configuration.go new file mode 100644 index 000000000..4fbab6f52 --- /dev/null +++ b/services/secretsmanager/v1api/configuration.go @@ -0,0 +1,40 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "github.com/stackitcloud/stackit-sdk-go/core/config" +) + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *config.Configuration { + cfg := &config.Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "stackit-sdk-go/secretsmanager", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://secrets-manager.api.{region}stackit.cloud", + Description: "No description provided", + Variables: map[string]config.ServerVariable{ + "region": { + Description: "No description provided", + DefaultValue: "eu01.", + EnumValues: []string{ + "eu01.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + return cfg +} diff --git a/services/secretsmanager/v1api/model_acl.go b/services/secretsmanager/v1api/model_acl.go new file mode 100644 index 000000000..e971bcddf --- /dev/null +++ b/services/secretsmanager/v1api/model_acl.go @@ -0,0 +1,186 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// 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. + Cidr string `json:"cidr"` + // A auto generated unique id which identifies the acl. + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cidr"] = o.Cidr + toSerialize["id"] = o.Id + return toSerialize, nil +} + +func (o *ACL) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "cidr", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varACL := _ACL{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varACL) + + if err != nil { + return err + } + + *o = ACL(varACL) + + return err +} + +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/v1api/model_bad_request.go b/services/secretsmanager/v1api/model_bad_request.go new file mode 100644 index 000000000..a0b1fa6d0 --- /dev/null +++ b/services/secretsmanager/v1api/model_bad_request.go @@ -0,0 +1,157 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the BadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BadRequest{} + +// BadRequest struct for BadRequest +type BadRequest struct { + // The error message for bad requests + Message string `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 string) *BadRequest { + this := BadRequest{} + 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() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *BadRequest) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *BadRequest) SetMessage(v string) { + o.Message = v +} + +func (o BadRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BadRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *BadRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBadRequest := _BadRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBadRequest) + + if err != nil { + return err + } + + *o = BadRequest(varBadRequest) + + return err +} + +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/v1api/model_conflict.go b/services/secretsmanager/v1api/model_conflict.go new file mode 100644 index 000000000..bc53d6f05 --- /dev/null +++ b/services/secretsmanager/v1api/model_conflict.go @@ -0,0 +1,157 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Conflict type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Conflict{} + +// Conflict struct for Conflict +type Conflict struct { + // The error message for conflicts + Message string `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 string) *Conflict { + this := Conflict{} + 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() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Conflict) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *Conflict) SetMessage(v string) { + o.Message = v +} + +func (o Conflict) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Conflict) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *Conflict) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConflict := _Conflict{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConflict) + + if err != nil { + return err + } + + *o = Conflict(varConflict) + + return err +} + +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/v1api/model_create_acl_payload.go b/services/secretsmanager/v1api/model_create_acl_payload.go new file mode 100644 index 000000000..6b2d9b46f --- /dev/null +++ b/services/secretsmanager/v1api/model_create_acl_payload.go @@ -0,0 +1,157 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// 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. + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateACLPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cidr"] = o.Cidr + return toSerialize, nil +} + +func (o *CreateACLPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "cidr", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateACLPayload := _CreateACLPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateACLPayload) + + if err != nil { + return err + } + + *o = CreateACLPayload(varCreateACLPayload) + + return err +} + +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/v1api/model_create_instance_payload.go b/services/secretsmanager/v1api/model_create_instance_payload.go new file mode 100644 index 000000000..fcbe40407 --- /dev/null +++ b/services/secretsmanager/v1api/model_create_instance_payload.go @@ -0,0 +1,193 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayload{} + +// CreateInstancePayload struct for CreateInstancePayload +type CreateInstancePayload struct { + KmsKey *KmsKeyPayload `json:"kmsKey,omitempty"` + // A user chosen name to distinguish multiple secrets manager instances. + 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 +} + +// GetKmsKey returns the KmsKey field value if set, zero value otherwise. +func (o *CreateInstancePayload) GetKmsKey() KmsKeyPayload { + if o == nil || IsNil(o.KmsKey) { + var ret KmsKeyPayload + return ret + } + return *o.KmsKey +} + +// GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetKmsKeyOk() (*KmsKeyPayload, bool) { + if o == nil || IsNil(o.KmsKey) { + return nil, false + } + return o.KmsKey, true +} + +// HasKmsKey returns a boolean if a field has been set. +func (o *CreateInstancePayload) HasKmsKey() bool { + if o != nil && !IsNil(o.KmsKey) { + return true + } + + return false +} + +// SetKmsKey gets a reference to the given KmsKeyPayload and assigns it to the KmsKey field. +func (o *CreateInstancePayload) SetKmsKey(v KmsKeyPayload) { + o.KmsKey = &v +} + +// GetName returns the Name field value +func (o *CreateInstancePayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateInstancePayload) SetName(v string) { + o.Name = v +} + +func (o CreateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.KmsKey) { + toSerialize["kmsKey"] = o.KmsKey + } + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *CreateInstancePayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateInstancePayload := _CreateInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateInstancePayload) + + if err != nil { + return err + } + + *o = CreateInstancePayload(varCreateInstancePayload) + + return err +} + +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/v1api/model_create_user_payload.go b/services/secretsmanager/v1api/model_create_user_payload.go new file mode 100644 index 000000000..944835e12 --- /dev/null +++ b/services/secretsmanager/v1api/model_create_user_payload.go @@ -0,0 +1,186 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// 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. + Description string `json:"description"` + // Is true if the user has write access to the secrets engine. Is false for a read-only user. + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + toSerialize["write"] = o.Write + return toSerialize, nil +} + +func (o *CreateUserPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "description", + "write", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateUserPayload := _CreateUserPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateUserPayload) + + if err != nil { + return err + } + + *o = CreateUserPayload(varCreateUserPayload) + + return err +} + +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/v1api/model_instance.go b/services/secretsmanager/v1api/model_instance.go new file mode 100644 index 000000000..11e4665b6 --- /dev/null +++ b/services/secretsmanager/v1api/model_instance.go @@ -0,0 +1,476 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// 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. + ApiUrl string `json:"apiUrl"` + // The date and time the creation of the Secrets Manager instance was finished. + CreationFinishedDate *string `json:"creationFinishedDate,omitempty"` + // The date and time the creation of the Secrets Manager instance was triggered. + CreationStartDate string `json:"creationStartDate"` + // A auto generated unique id which identifies the secrets manager instances. + Id string `json:"id"` + KmsKey *KmsKeyPayload `json:"kmsKey,omitempty"` + // A user chosen name to distinguish multiple secrets manager instances. + Name string `json:"name"` + // The number of secrets currently stored inside of the instance. This value will be updated once per hour. + SecretCount int32 `json:"secretCount"` + // The name of the secrets engine. + SecretsEngine string `json:"secretsEngine"` + // The current state of the Secrets Manager instance. + State string `json:"state"` + 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 int32, 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 +} + +// GetKmsKey returns the KmsKey field value if set, zero value otherwise. +func (o *Instance) GetKmsKey() KmsKeyPayload { + if o == nil || IsNil(o.KmsKey) { + var ret KmsKeyPayload + return ret + } + return *o.KmsKey +} + +// GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetKmsKeyOk() (*KmsKeyPayload, bool) { + if o == nil || IsNil(o.KmsKey) { + return nil, false + } + return o.KmsKey, true +} + +// HasKmsKey returns a boolean if a field has been set. +func (o *Instance) HasKmsKey() bool { + if o != nil && !IsNil(o.KmsKey) { + return true + } + + return false +} + +// SetKmsKey gets a reference to the given KmsKeyPayload and assigns it to the KmsKey field. +func (o *Instance) SetKmsKey(v KmsKeyPayload) { + o.KmsKey = &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() int32 { + if o == nil { + var ret int32 + 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() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SecretCount, true +} + +// SetSecretCount sets field value +func (o *Instance) SetSecretCount(v int32) { + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +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 + if !IsNil(o.KmsKey) { + toSerialize["kmsKey"] = o.KmsKey + } + 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 +} + +func (o *Instance) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "apiUrl", + "creationStartDate", + "id", + "name", + "secretCount", + "secretsEngine", + "state", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInstance := _Instance{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInstance) + + if err != nil { + return err + } + + *o = Instance(varInstance) + + return err +} + +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/v1api/model_kms_key_payload.go b/services/secretsmanager/v1api/model_kms_key_payload.go new file mode 100644 index 000000000..9a5dbabde --- /dev/null +++ b/services/secretsmanager/v1api/model_kms_key_payload.go @@ -0,0 +1,244 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the KmsKeyPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KmsKeyPayload{} + +// KmsKeyPayload The key for secret encryption and decryption. +type KmsKeyPayload struct { + // The key UUID. + KeyId string `json:"keyId"` + // The key ring UUID the key is part of. + KeyRingId string `json:"keyRingId"` + // The Key version number. + KeyVersion int64 `json:"keyVersion"` + // The Service account email that will consume the key. Must be in the same project as the Secrets Manager instance. + ServiceAccountEmail string `json:"serviceAccountEmail"` +} + +type _KmsKeyPayload KmsKeyPayload + +// NewKmsKeyPayload instantiates a new KmsKeyPayload 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 NewKmsKeyPayload(keyId string, keyRingId string, keyVersion int64, serviceAccountEmail string) *KmsKeyPayload { + this := KmsKeyPayload{} + this.KeyId = keyId + this.KeyRingId = keyRingId + this.KeyVersion = keyVersion + this.ServiceAccountEmail = serviceAccountEmail + return &this +} + +// NewKmsKeyPayloadWithDefaults instantiates a new KmsKeyPayload 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 NewKmsKeyPayloadWithDefaults() *KmsKeyPayload { + this := KmsKeyPayload{} + return &this +} + +// GetKeyId returns the KeyId field value +func (o *KmsKeyPayload) GetKeyId() string { + if o == nil { + var ret string + return ret + } + + return o.KeyId +} + +// GetKeyIdOk returns a tuple with the KeyId field value +// and a boolean to check if the value has been set. +func (o *KmsKeyPayload) GetKeyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyId, true +} + +// SetKeyId sets field value +func (o *KmsKeyPayload) SetKeyId(v string) { + o.KeyId = v +} + +// GetKeyRingId returns the KeyRingId field value +func (o *KmsKeyPayload) GetKeyRingId() string { + if o == nil { + var ret string + return ret + } + + return o.KeyRingId +} + +// GetKeyRingIdOk returns a tuple with the KeyRingId field value +// and a boolean to check if the value has been set. +func (o *KmsKeyPayload) GetKeyRingIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyRingId, true +} + +// SetKeyRingId sets field value +func (o *KmsKeyPayload) SetKeyRingId(v string) { + o.KeyRingId = v +} + +// GetKeyVersion returns the KeyVersion field value +func (o *KmsKeyPayload) GetKeyVersion() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.KeyVersion +} + +// GetKeyVersionOk returns a tuple with the KeyVersion field value +// and a boolean to check if the value has been set. +func (o *KmsKeyPayload) GetKeyVersionOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.KeyVersion, true +} + +// SetKeyVersion sets field value +func (o *KmsKeyPayload) SetKeyVersion(v int64) { + o.KeyVersion = v +} + +// GetServiceAccountEmail returns the ServiceAccountEmail field value +func (o *KmsKeyPayload) GetServiceAccountEmail() string { + if o == nil { + var ret string + return ret + } + + return o.ServiceAccountEmail +} + +// GetServiceAccountEmailOk returns a tuple with the ServiceAccountEmail field value +// and a boolean to check if the value has been set. +func (o *KmsKeyPayload) GetServiceAccountEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceAccountEmail, true +} + +// SetServiceAccountEmail sets field value +func (o *KmsKeyPayload) SetServiceAccountEmail(v string) { + o.ServiceAccountEmail = v +} + +func (o KmsKeyPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KmsKeyPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["keyId"] = o.KeyId + toSerialize["keyRingId"] = o.KeyRingId + toSerialize["keyVersion"] = o.KeyVersion + toSerialize["serviceAccountEmail"] = o.ServiceAccountEmail + return toSerialize, nil +} + +func (o *KmsKeyPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "keyId", + "keyRingId", + "keyVersion", + "serviceAccountEmail", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKmsKeyPayload := _KmsKeyPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKmsKeyPayload) + + if err != nil { + return err + } + + *o = KmsKeyPayload(varKmsKeyPayload) + + return err +} + +type NullableKmsKeyPayload struct { + value *KmsKeyPayload + isSet bool +} + +func (v NullableKmsKeyPayload) Get() *KmsKeyPayload { + return v.value +} + +func (v *NullableKmsKeyPayload) Set(val *KmsKeyPayload) { + v.value = val + v.isSet = true +} + +func (v NullableKmsKeyPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableKmsKeyPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKmsKeyPayload(val *KmsKeyPayload) *NullableKmsKeyPayload { + return &NullableKmsKeyPayload{value: val, isSet: true} +} + +func (v NullableKmsKeyPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKmsKeyPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/secretsmanager/v1api/model_list_acls_response.go b/services/secretsmanager/v1api/model_list_acls_response.go new file mode 100644 index 000000000..06ed40fdd --- /dev/null +++ b/services/secretsmanager/v1api/model_list_acls_response.go @@ -0,0 +1,156 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListACLsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListACLsResponse{} + +// ListACLsResponse struct for ListACLsResponse +type ListACLsResponse struct { + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListACLsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acls"] = o.Acls + return toSerialize, nil +} + +func (o *ListACLsResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "acls", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListACLsResponse := _ListACLsResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListACLsResponse) + + if err != nil { + return err + } + + *o = ListACLsResponse(varListACLsResponse) + + return err +} + +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/v1api/model_list_instances_response.go b/services/secretsmanager/v1api/model_list_instances_response.go new file mode 100644 index 000000000..e94afc6c0 --- /dev/null +++ b/services/secretsmanager/v1api/model_list_instances_response.go @@ -0,0 +1,156 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstancesResponse{} + +// ListInstancesResponse struct for ListInstancesResponse +type ListInstancesResponse struct { + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["instances"] = o.Instances + return toSerialize, nil +} + +func (o *ListInstancesResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "instances", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListInstancesResponse := _ListInstancesResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListInstancesResponse) + + if err != nil { + return err + } + + *o = ListInstancesResponse(varListInstancesResponse) + + return err +} + +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/v1api/model_list_users_response.go b/services/secretsmanager/v1api/model_list_users_response.go new file mode 100644 index 000000000..d839b6233 --- /dev/null +++ b/services/secretsmanager/v1api/model_list_users_response.go @@ -0,0 +1,156 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ListUsersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUsersResponse{} + +// ListUsersResponse struct for ListUsersResponse +type ListUsersResponse struct { + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["users"] = o.Users + return toSerialize, nil +} + +func (o *ListUsersResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "users", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListUsersResponse := _ListUsersResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varListUsersResponse) + + if err != nil { + return err + } + + *o = ListUsersResponse(varListUsersResponse) + + return err +} + +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/v1api/model_not_found.go b/services/secretsmanager/v1api/model_not_found.go new file mode 100644 index 000000000..a1fd960e0 --- /dev/null +++ b/services/secretsmanager/v1api/model_not_found.go @@ -0,0 +1,157 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the NotFound type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NotFound{} + +// NotFound struct for NotFound +type NotFound struct { + // The error message for not found resources + Message string `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 string) *NotFound { + this := NotFound{} + 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() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *NotFound) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *NotFound) SetMessage(v string) { + o.Message = v +} + +func (o NotFound) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NotFound) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message"] = o.Message + return toSerialize, nil +} + +func (o *NotFound) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNotFound := _NotFound{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNotFound) + + if err != nil { + return err + } + + *o = NotFound(varNotFound) + + return err +} + +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/v1api/model_update_acl_payload.go b/services/secretsmanager/v1api/model_update_acl_payload.go new file mode 100644 index 000000000..ed8aaf441 --- /dev/null +++ b/services/secretsmanager/v1api/model_update_acl_payload.go @@ -0,0 +1,157 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// 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. + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateACLPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cidr"] = o.Cidr + return toSerialize, nil +} + +func (o *UpdateACLPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "cidr", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateACLPayload := _UpdateACLPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateACLPayload) + + if err != nil { + return err + } + + *o = UpdateACLPayload(varUpdateACLPayload) + + return err +} + +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/v1api/model_update_acls_payload.go b/services/secretsmanager/v1api/model_update_acls_payload.go new file mode 100644 index 000000000..927f52d0d --- /dev/null +++ b/services/secretsmanager/v1api/model_update_acls_payload.go @@ -0,0 +1,124 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +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/v1api/model_update_instance_payload.go b/services/secretsmanager/v1api/model_update_instance_payload.go new file mode 100644 index 000000000..1de4c8c3f --- /dev/null +++ b/services/secretsmanager/v1api/model_update_instance_payload.go @@ -0,0 +1,193 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayload{} + +// UpdateInstancePayload struct for UpdateInstancePayload +type UpdateInstancePayload struct { + KmsKey *KmsKeyPayload `json:"kmsKey,omitempty"` + // A user chosen name to distinguish multiple secrets manager instances. + Name string `json:"name"` +} + +type _UpdateInstancePayload UpdateInstancePayload + +// NewUpdateInstancePayload instantiates a new UpdateInstancePayload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateInstancePayload(name string) *UpdateInstancePayload { + this := UpdateInstancePayload{} + this.Name = name + return &this +} + +// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// GetKmsKey returns the KmsKey field value if set, zero value otherwise. +func (o *UpdateInstancePayload) GetKmsKey() KmsKeyPayload { + if o == nil || IsNil(o.KmsKey) { + var ret KmsKeyPayload + return ret + } + return *o.KmsKey +} + +// GetKmsKeyOk returns a tuple with the KmsKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetKmsKeyOk() (*KmsKeyPayload, bool) { + if o == nil || IsNil(o.KmsKey) { + return nil, false + } + return o.KmsKey, true +} + +// HasKmsKey returns a boolean if a field has been set. +func (o *UpdateInstancePayload) HasKmsKey() bool { + if o != nil && !IsNil(o.KmsKey) { + return true + } + + return false +} + +// SetKmsKey gets a reference to the given KmsKeyPayload and assigns it to the KmsKey field. +func (o *UpdateInstancePayload) SetKmsKey(v KmsKeyPayload) { + o.KmsKey = &v +} + +// GetName returns the Name field value +func (o *UpdateInstancePayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateInstancePayload) SetName(v string) { + o.Name = v +} + +func (o UpdateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.KmsKey) { + toSerialize["kmsKey"] = o.KmsKey + } + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *UpdateInstancePayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateInstancePayload := _UpdateInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateInstancePayload) + + if err != nil { + return err + } + + *o = UpdateInstancePayload(varUpdateInstancePayload) + + return err +} + +type NullableUpdateInstancePayload struct { + value *UpdateInstancePayload + isSet bool +} + +func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { + return v.value +} + +func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { + return &NullableUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/secretsmanager/v1api/model_update_user_payload.go b/services/secretsmanager/v1api/model_update_user_payload.go new file mode 100644 index 000000000..b72dd8d48 --- /dev/null +++ b/services/secretsmanager/v1api/model_update_user_payload.go @@ -0,0 +1,162 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +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 { + // A user chosen description to differentiate between multiple users. + Description *string `json:"description,omitempty"` + // 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 +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateUserPayload) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateUserPayload) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateUserPayload) SetDescription(v string) { + o.Description = &v +} + +// 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + 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/v1api/model_user.go b/services/secretsmanager/v1api/model_user.go new file mode 100644 index 000000000..22a7420cd --- /dev/null +++ b/services/secretsmanager/v1api/model_user.go @@ -0,0 +1,273 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// 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. + Description string `json:"description"` + // A auto generated unique id which identifies the users. + Id string `json:"id"` + // A auto generated password for logging in with the user. + Password string `json:"password"` + // A auto generated username for logging in with the user. + Username string `json:"username"` + // Is true if the user has write access to the secrets engine. Is false for a read-only user. + 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) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +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 +} + +func (o *User) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "description", + "id", + "password", + "username", + "write", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUser := _User{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUser) + + if err != nil { + return err + } + + *o = User(varUser) + + return err +} + +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/v1api/response.go b/services/secretsmanager/v1api/response.go new file mode 100644 index 000000000..355c493eb --- /dev/null +++ b/services/secretsmanager/v1api/response.go @@ -0,0 +1,47 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/secretsmanager/v1api/utils.go b/services/secretsmanager/v1api/utils.go new file mode 100644 index 000000000..c48a6e0a0 --- /dev/null +++ b/services/secretsmanager/v1api/utils.go @@ -0,0 +1,361 @@ +/* +STACKIT Secrets Manager API + +This API provides endpoints for managing the Secrets-Manager. + +API version: 1.4.2 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +}