diff --git a/client_mock.go b/client_mock.go index d7f1bbd..72b0906 100644 --- a/client_mock.go +++ b/client_mock.go @@ -23771,16 +23771,22 @@ func (_c *MockClient_ServiceSchemaRegistrySubjectConfigPut_Call) RunAndReturn(ru } // ServiceSchemaRegistrySubjectDelete provides a mock function for the type MockClient -func (_mock *MockClient) ServiceSchemaRegistrySubjectDelete(ctx context.Context, project1 string, serviceName string, subjectName string) error { - ret := _mock.Called(ctx, project1, serviceName, subjectName) +func (_mock *MockClient) ServiceSchemaRegistrySubjectDelete(ctx context.Context, project1 string, serviceName string, subjectName string, query ...[2]string) error { + var tmpRet mock.Arguments + if len(query) > 0 { + tmpRet = _mock.Called(ctx, project1, serviceName, subjectName, query) + } else { + tmpRet = _mock.Called(ctx, project1, serviceName, subjectName) + } + ret := tmpRet if len(ret) == 0 { panic("no return value specified for ServiceSchemaRegistrySubjectDelete") } var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { - r0 = returnFunc(ctx, project1, serviceName, subjectName) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, ...[2]string) error); ok { + r0 = returnFunc(ctx, project1, serviceName, subjectName, query...) } else { r0 = ret.Error(0) } @@ -23797,11 +23803,13 @@ type MockClient_ServiceSchemaRegistrySubjectDelete_Call struct { // - project1 string // - serviceName string // - subjectName string -func (_e *MockClient_Expecter) ServiceSchemaRegistrySubjectDelete(ctx interface{}, project1 interface{}, serviceName interface{}, subjectName interface{}) *MockClient_ServiceSchemaRegistrySubjectDelete_Call { - return &MockClient_ServiceSchemaRegistrySubjectDelete_Call{Call: _e.mock.On("ServiceSchemaRegistrySubjectDelete", ctx, project1, serviceName, subjectName)} +// - query ...[2]string +func (_e *MockClient_Expecter) ServiceSchemaRegistrySubjectDelete(ctx interface{}, project1 interface{}, serviceName interface{}, subjectName interface{}, query ...interface{}) *MockClient_ServiceSchemaRegistrySubjectDelete_Call { + return &MockClient_ServiceSchemaRegistrySubjectDelete_Call{Call: _e.mock.On("ServiceSchemaRegistrySubjectDelete", + append([]interface{}{ctx, project1, serviceName, subjectName}, query...)...)} } -func (_c *MockClient_ServiceSchemaRegistrySubjectDelete_Call) Run(run func(ctx context.Context, project1 string, serviceName string, subjectName string)) *MockClient_ServiceSchemaRegistrySubjectDelete_Call { +func (_c *MockClient_ServiceSchemaRegistrySubjectDelete_Call) Run(run func(ctx context.Context, project1 string, serviceName string, subjectName string, query ...[2]string)) *MockClient_ServiceSchemaRegistrySubjectDelete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { @@ -23819,11 +23827,18 @@ func (_c *MockClient_ServiceSchemaRegistrySubjectDelete_Call) Run(run func(ctx c if args[3] != nil { arg3 = args[3].(string) } + var arg4 [][2]string + var variadicArgs [][2]string + if len(args) > 4 { + variadicArgs = args[4].([][2]string) + } + arg4 = variadicArgs run( arg0, arg1, arg2, arg3, + arg4..., ) }) return _c @@ -23834,22 +23849,28 @@ func (_c *MockClient_ServiceSchemaRegistrySubjectDelete_Call) Return(err error) return _c } -func (_c *MockClient_ServiceSchemaRegistrySubjectDelete_Call) RunAndReturn(run func(ctx context.Context, project1 string, serviceName string, subjectName string) error) *MockClient_ServiceSchemaRegistrySubjectDelete_Call { +func (_c *MockClient_ServiceSchemaRegistrySubjectDelete_Call) RunAndReturn(run func(ctx context.Context, project1 string, serviceName string, subjectName string, query ...[2]string) error) *MockClient_ServiceSchemaRegistrySubjectDelete_Call { _c.Call.Return(run) return _c } // ServiceSchemaRegistrySubjectVersionDelete provides a mock function for the type MockClient -func (_mock *MockClient) ServiceSchemaRegistrySubjectVersionDelete(ctx context.Context, project1 string, serviceName string, subjectName string, versionId int) error { - ret := _mock.Called(ctx, project1, serviceName, subjectName, versionId) +func (_mock *MockClient) ServiceSchemaRegistrySubjectVersionDelete(ctx context.Context, project1 string, serviceName string, subjectName string, versionId int, query ...[2]string) error { + var tmpRet mock.Arguments + if len(query) > 0 { + tmpRet = _mock.Called(ctx, project1, serviceName, subjectName, versionId, query) + } else { + tmpRet = _mock.Called(ctx, project1, serviceName, subjectName, versionId) + } + ret := tmpRet if len(ret) == 0 { panic("no return value specified for ServiceSchemaRegistrySubjectVersionDelete") } var r0 error - if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, int) error); ok { - r0 = returnFunc(ctx, project1, serviceName, subjectName, versionId) + if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, int, ...[2]string) error); ok { + r0 = returnFunc(ctx, project1, serviceName, subjectName, versionId, query...) } else { r0 = ret.Error(0) } @@ -23867,11 +23888,13 @@ type MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call struct { // - serviceName string // - subjectName string // - versionId int -func (_e *MockClient_Expecter) ServiceSchemaRegistrySubjectVersionDelete(ctx interface{}, project1 interface{}, serviceName interface{}, subjectName interface{}, versionId interface{}) *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call { - return &MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call{Call: _e.mock.On("ServiceSchemaRegistrySubjectVersionDelete", ctx, project1, serviceName, subjectName, versionId)} +// - query ...[2]string +func (_e *MockClient_Expecter) ServiceSchemaRegistrySubjectVersionDelete(ctx interface{}, project1 interface{}, serviceName interface{}, subjectName interface{}, versionId interface{}, query ...interface{}) *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call { + return &MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call{Call: _e.mock.On("ServiceSchemaRegistrySubjectVersionDelete", + append([]interface{}{ctx, project1, serviceName, subjectName, versionId}, query...)...)} } -func (_c *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call) Run(run func(ctx context.Context, project1 string, serviceName string, subjectName string, versionId int)) *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call { +func (_c *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call) Run(run func(ctx context.Context, project1 string, serviceName string, subjectName string, versionId int, query ...[2]string)) *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { @@ -23893,12 +23916,19 @@ func (_c *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call) Run(run fun if args[4] != nil { arg4 = args[4].(int) } + var arg5 [][2]string + var variadicArgs [][2]string + if len(args) > 5 { + variadicArgs = args[5].([][2]string) + } + arg5 = variadicArgs run( arg0, arg1, arg2, arg3, arg4, + arg5..., ) }) return _c @@ -23909,7 +23939,7 @@ func (_c *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call) Return(err return _c } -func (_c *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call) RunAndReturn(run func(ctx context.Context, project1 string, serviceName string, subjectName string, versionId int) error) *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call { +func (_c *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call) RunAndReturn(run func(ctx context.Context, project1 string, serviceName string, subjectName string, versionId int, query ...[2]string) error) *MockClient_ServiceSchemaRegistrySubjectVersionDelete_Call { _c.Call.Return(run) return _c } diff --git a/handler/accountteammember/accountteammember.go b/handler/accountteammember/accountteammember.go index 0f6d06a..531cc44 100644 --- a/handler/accountteammember/accountteammember.go +++ b/handler/accountteammember/accountteammember.go @@ -16,7 +16,7 @@ type Handler interface { // https://api.aiven.io/doc/#tag/Account/operation/AccountTeamMemberCancelInvite AccountTeamMemberCancelInvite(ctx context.Context, accountId string, teamId string, userEmail string) error - // AccountTeamMemberVerifyInvite confirm account team invite + // Deprecated: AccountTeamMemberVerifyInvite confirm account team invite // POST /v1/account/{account_id}/invite/{invite_verification_code} // https://api.aiven.io/doc/#tag/Account/operation/AccountTeamMemberVerifyInvite AccountTeamMemberVerifyInvite(ctx context.Context, accountId string, inviteVerificationCode string) (*AccountTeamMemberVerifyInviteOut, error) diff --git a/handler/cmk/cmk.go b/handler/cmk/cmk.go index fdc62c4..079f5ef 100644 --- a/handler/cmk/cmk.go +++ b/handler/cmk/cmk.go @@ -139,6 +139,11 @@ type AwsOut struct { Principal string `json:"principal"` } +// AzureOut CMKAccessorsAzure +type AzureOut struct { + AppId string `json:"app_id"` // Application ID +} + // CMKAccessCheckTriggerOut CMK type CMKAccessCheckTriggerOut struct { CreatedAt time.Time `json:"created_at"` // Created At @@ -150,9 +155,10 @@ type CMKAccessCheckTriggerOut struct { // CMKAccessorsListOut CMKAccessors type CMKAccessorsListOut struct { - Aws *AwsOut `json:"aws,omitempty"` // CMKAccessorsAWS - Gcp GcpOut `json:"gcp"` // CMKAccessorsGCP - Oci OciOut `json:"oci"` // CMKAccessorsOCI + Aws *AwsOut `json:"aws,omitempty"` // CMKAccessorsAWS + Azure AzureOut `json:"azure"` // CMKAccessorsAzure + Gcp GcpOut `json:"gcp"` // CMKAccessorsGCP + Oci OciOut `json:"oci"` // CMKAccessorsOCI } // CMKCreateIn CMKCreateRequestBody @@ -229,13 +235,14 @@ type OciOut struct { type ProviderType string const ( - ProviderTypeAws ProviderType = "aws" - ProviderTypeGcp ProviderType = "gcp" - ProviderTypeOci ProviderType = "oci" + ProviderTypeAws ProviderType = "aws" + ProviderTypeAzure ProviderType = "azure" + ProviderTypeGcp ProviderType = "gcp" + ProviderTypeOci ProviderType = "oci" ) func ProviderTypeChoices() []string { - return []string{"aws", "gcp", "oci"} + return []string{"aws", "azure", "gcp", "oci"} } // cmkAccessCheckTriggerOut CMKAccessCheckTriggerResponse diff --git a/handler/kafkaschemaregistry/kafkaschemaregistry.go b/handler/kafkaschemaregistry/kafkaschemaregistry.go index 1b7e915..4eae12f 100644 --- a/handler/kafkaschemaregistry/kafkaschemaregistry.go +++ b/handler/kafkaschemaregistry/kafkaschemaregistry.go @@ -68,13 +68,13 @@ type Handler interface { // DELETE /v1/project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name} // https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectDelete // Required roles or permissions: service:data:write - ServiceSchemaRegistrySubjectDelete(ctx context.Context, project string, serviceName string, subjectName string) error + ServiceSchemaRegistrySubjectDelete(ctx context.Context, project string, serviceName string, subjectName string, query ...[2]string) error // ServiceSchemaRegistrySubjectVersionDelete delete Schema Registry subject version // DELETE /v1/project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}/versions/{version_id} // https://api.aiven.io/doc/#tag/Service:_Kafka/operation/ServiceSchemaRegistrySubjectVersionDelete // Required roles or permissions: service:data:write - ServiceSchemaRegistrySubjectVersionDelete(ctx context.Context, project string, serviceName string, subjectName string, versionId int) error + ServiceSchemaRegistrySubjectVersionDelete(ctx context.Context, project string, serviceName string, subjectName string, versionId int, query ...[2]string) error // ServiceSchemaRegistrySubjectVersionGet get Schema Registry Subject version // GET /v1/project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}/versions/{version_id} @@ -234,14 +234,24 @@ func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectConfigPut(ctx c } return out.Compatibility, nil } -func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectDelete(ctx context.Context, project string, serviceName string, subjectName string) error { + +// ServiceSchemaRegistrySubjectDeletePermanent If true, performs a hard delete that removes all metadata, including the schema ID. A hard delete is only allowed after a soft delete. +func ServiceSchemaRegistrySubjectDeletePermanent(permanent bool) [2]string { + return [2]string{"permanent", fmt.Sprintf("%t", permanent)} +} +func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectDelete(ctx context.Context, project string, serviceName string, subjectName string, query ...[2]string) error { path := fmt.Sprintf("/v1/project/%s/service/%s/kafka/schema/subjects/%s", url.PathEscape(project), url.PathEscape(serviceName), url.PathEscape(subjectName)) - _, err := h.doer.Do(ctx, "ServiceSchemaRegistrySubjectDelete", "DELETE", path, nil) + _, err := h.doer.Do(ctx, "ServiceSchemaRegistrySubjectDelete", "DELETE", path, nil, query...) return err } -func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionDelete(ctx context.Context, project string, serviceName string, subjectName string, versionId int) error { + +// ServiceSchemaRegistrySubjectVersionDeletePermanent If true, performs a hard delete that removes all metadata, including the schema ID. A hard delete is only allowed after a soft delete. +func ServiceSchemaRegistrySubjectVersionDeletePermanent(permanent bool) [2]string { + return [2]string{"permanent", fmt.Sprintf("%t", permanent)} +} +func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionDelete(ctx context.Context, project string, serviceName string, subjectName string, versionId int, query ...[2]string) error { path := fmt.Sprintf("/v1/project/%s/service/%s/kafka/schema/subjects/%s/versions/%d", url.PathEscape(project), url.PathEscape(serviceName), url.PathEscape(subjectName), versionId) - _, err := h.doer.Do(ctx, "ServiceSchemaRegistrySubjectVersionDelete", "DELETE", path, nil) + _, err := h.doer.Do(ctx, "ServiceSchemaRegistrySubjectVersionDelete", "DELETE", path, nil, query...) return err } func (h *KafkaSchemaRegistryHandler) ServiceSchemaRegistrySubjectVersionGet(ctx context.Context, project string, serviceName string, subjectName string, versionId int) (*ServiceSchemaRegistrySubjectVersionGetOut, error) { diff --git a/handler/organization/organization.go b/handler/organization/organization.go index f2a8906..dec88ab 100644 --- a/handler/organization/organization.go +++ b/handler/organization/organization.go @@ -363,7 +363,7 @@ type OrganizationAddressCreateIn struct { AddressLines []string `json:"address_lines"` // Address lines City string `json:"city"` CountryCode string `json:"country_code"` // Country Code - Name string `json:"name"` // Name of a company + Name string `json:"name"` State *string `json:"state,omitempty"` ZipCode *string `json:"zip_code,omitempty"` // Zip Code } @@ -401,7 +401,7 @@ type OrganizationAddressUpdateIn struct { AddressLines *[]string `json:"address_lines,omitempty"` // Address Lines City *string `json:"city,omitempty"` CountryCode *string `json:"country_code,omitempty"` // Country Code - Name *string `json:"name,omitempty"` // Name of a company + Name *string `json:"name,omitempty"` State *string `json:"state,omitempty"` ZipCode *string `json:"zip_code,omitempty"` // Zip Code } diff --git a/openapi_patch.yaml b/openapi_patch.yaml index c542ffb..bf46b43 100644 --- a/openapi_patch.yaml +++ b/openapi_patch.yaml @@ -19,6 +19,21 @@ paths: - $ref: "#/components/parameters/service_name" - $ref: "#/components/parameters/subject_name" - $ref: "#/components/parameters/global_default_fallback" + /project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}: + delete: + parameters: + - $ref: "#/components/parameters/project" + - $ref: "#/components/parameters/service_name" + - $ref: "#/components/parameters/subject_name" + - $ref: "#/components/parameters/permanent" + /project/{project}/service/{service_name}/kafka/schema/subjects/{subject_name}/versions/{version_id}: + delete: + parameters: + - $ref: "#/components/parameters/project" + - $ref: "#/components/parameters/service_name" + - $ref: "#/components/parameters/subject_name" + - $ref: "#/components/parameters/version_id" + - $ref: "#/components/parameters/permanent" /v2/project/{project}/service/{service_name}/topic: post: summary: List Kafka topics V2 @@ -429,6 +444,13 @@ components: schema: type: boolean required: false + permanent: + in: query + name: permanent + description: If true, performs a hard delete that removes all metadata, including the schema ID. A hard delete is only allowed after a soft delete. + schema: + type: boolean + required: false # Avoid generating a single-value enum from the example UUID. step_id: schema: