From 08a65026eca2f56947cdc4cdea3a8f5c716c6f40 Mon Sep 17 00:00:00 2001 From: Philipp Eberle Date: Fri, 17 Nov 2023 13:11:57 +0100 Subject: [PATCH] Update spec --- api/models/v1_cluster_features.go | 17 -- api/models/v1_postgres_create_request.go | 38 ++++ .../v1_postgres_create_standby_request.go | 37 ++++ api/models/v1_postgres_response.go | 34 +++ api/models/v1_postgres_restore_request.go | 58 ++++- api/models/v1_postgres_status.go | 63 ++++++ api/models/v1_postgres_update_request.go | 37 ++++ ...ey_rotation.go => v1beta1_c_a_rotation.go} | 28 ++- ...1beta1_e_t_c_d_encryption_key_rotation.go} | 28 ++- api/models/v1beta1_last_maintenance.go | 108 ++++++++++ ...> v1beta1_service_account_key_rotation.go} | 28 ++- .../v1beta1_shoot_credentials_rotation.go | 6 +- api/models/v1beta1_shoot_status.go | 51 +++++ cloud-api.json | 200 +++++++++++++----- 14 files changed, 626 insertions(+), 107 deletions(-) rename api/models/{v1beta1_shoot_service_account_key_rotation.go => v1beta1_c_a_rotation.go} (57%) rename api/models/{v1beta1_shoot_c_a_rotation.go => v1beta1_e_t_c_d_encryption_key_rotation.go} (51%) create mode 100644 api/models/v1beta1_last_maintenance.go rename api/models/{v1beta1_shoot_e_t_c_d_encryption_key_rotation.go => v1beta1_service_account_key_rotation.go} (53%) diff --git a/api/models/v1_cluster_features.go b/api/models/v1_cluster_features.go index 87b69e6..e2b2971 100644 --- a/api/models/v1_cluster_features.go +++ b/api/models/v1_cluster_features.go @@ -26,10 +26,6 @@ type V1ClusterFeatures struct { // log accepted connections // Required: true LogAcceptedConnections *string `json:"LogAcceptedConnections"` - - // reversed v p n - // Required: true - ReversedVPN *string `json:"ReversedVPN"` } // Validate validates this v1 cluster features @@ -44,10 +40,6 @@ func (m *V1ClusterFeatures) Validate(formats strfmt.Registry) error { res = append(res, err) } - if err := m.validateReversedVPN(formats); err != nil { - res = append(res, err) - } - if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -72,15 +64,6 @@ func (m *V1ClusterFeatures) validateLogAcceptedConnections(formats strfmt.Regist return nil } -func (m *V1ClusterFeatures) validateReversedVPN(formats strfmt.Registry) error { - - if err := validate.Required("ReversedVPN", "body", m.ReversedVPN); err != nil { - return err - } - - return nil -} - // ContextValidate validates this v1 cluster features based on context it is used func (m *V1ClusterFeatures) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil diff --git a/api/models/v1_postgres_create_request.go b/api/models/v1_postgres_create_request.go index f09a6d0..09681a3 100644 --- a/api/models/v1_postgres_create_request.go +++ b/api/models/v1_postgres_create_request.go @@ -11,6 +11,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // V1PostgresCreateRequest v1 postgres create request @@ -24,9 +25,20 @@ type V1PostgresCreateRequest struct { // audit logs AuditLogs bool `json:"auditLogs,omitempty"` + // autoassigndedicatedlbipfrom + Autoassigndedicatedlbipfrom string `json:"autoassigndedicatedlbipfrom,omitempty"` + // backup Backup string `json:"backup,omitempty"` + // dedicatedloadbalancerip + // Required: true + Dedicatedloadbalancerip *string `json:"dedicatedloadbalancerip"` + + // dedicatedloadbalancerport + // Required: true + Dedicatedloadbalancerport *int32 `json:"dedicatedloadbalancerport"` + // description Description string `json:"description,omitempty"` @@ -63,6 +75,14 @@ func (m *V1PostgresCreateRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDedicatedloadbalancerip(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDedicatedloadbalancerport(formats); err != nil { + res = append(res, err) + } + if err := m.validateSize(formats); err != nil { res = append(res, err) } @@ -92,6 +112,24 @@ func (m *V1PostgresCreateRequest) validateAccessList(formats strfmt.Registry) er return nil } +func (m *V1PostgresCreateRequest) validateDedicatedloadbalancerip(formats strfmt.Registry) error { + + if err := validate.Required("dedicatedloadbalancerip", "body", m.Dedicatedloadbalancerip); err != nil { + return err + } + + return nil +} + +func (m *V1PostgresCreateRequest) validateDedicatedloadbalancerport(formats strfmt.Registry) error { + + if err := validate.Required("dedicatedloadbalancerport", "body", m.Dedicatedloadbalancerport); err != nil { + return err + } + + return nil +} + func (m *V1PostgresCreateRequest) validateSize(formats strfmt.Registry) error { if swag.IsZero(m.Size) { // not required return nil diff --git a/api/models/v1_postgres_create_standby_request.go b/api/models/v1_postgres_create_standby_request.go index 8fd5702..85a18ff 100644 --- a/api/models/v1_postgres_create_standby_request.go +++ b/api/models/v1_postgres_create_standby_request.go @@ -19,9 +19,20 @@ import ( // swagger:model v1.PostgresCreateStandbyRequest type V1PostgresCreateStandbyRequest struct { + // autoassigndedicatedlbipfrom + Autoassigndedicatedlbipfrom string `json:"autoassigndedicatedlbipfrom,omitempty"` + // backup Backup string `json:"backup,omitempty"` + // dedicatedloadbalancerip + // Required: true + Dedicatedloadbalancerip *string `json:"dedicatedloadbalancerip"` + + // dedicatedloadbalancerport + // Required: true + Dedicatedloadbalancerport *int32 `json:"dedicatedloadbalancerport"` + // description Description string `json:"description,omitempty"` @@ -46,6 +57,14 @@ type V1PostgresCreateStandbyRequest struct { func (m *V1PostgresCreateStandbyRequest) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDedicatedloadbalancerip(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDedicatedloadbalancerport(formats); err != nil { + res = append(res, err) + } + if err := m.validatePrimaryID(formats); err != nil { res = append(res, err) } @@ -56,6 +75,24 @@ func (m *V1PostgresCreateStandbyRequest) Validate(formats strfmt.Registry) error return nil } +func (m *V1PostgresCreateStandbyRequest) validateDedicatedloadbalancerip(formats strfmt.Registry) error { + + if err := validate.Required("dedicatedloadbalancerip", "body", m.Dedicatedloadbalancerip); err != nil { + return err + } + + return nil +} + +func (m *V1PostgresCreateStandbyRequest) validateDedicatedloadbalancerport(formats strfmt.Registry) error { + + if err := validate.Required("dedicatedloadbalancerport", "body", m.Dedicatedloadbalancerport); err != nil { + return err + } + + return nil +} + func (m *V1PostgresCreateStandbyRequest) validatePrimaryID(formats strfmt.Registry) error { if err := validate.Required("primaryId", "body", m.PrimaryID); err != nil { diff --git a/api/models/v1_postgres_response.go b/api/models/v1_postgres_response.go index 2a5b839..99555e7 100644 --- a/api/models/v1_postgres_response.go +++ b/api/models/v1_postgres_response.go @@ -38,6 +38,14 @@ type V1PostgresResponse struct { // Format: date-time CreationTimestamp strfmt.DateTime `json:"creationTimestamp,omitempty"` + // dedicatedloadbalancerip + // Required: true + Dedicatedloadbalancerip *string `json:"dedicatedloadbalancerip"` + + // dedicatedloadbalancerport + // Required: true + Dedicatedloadbalancerport *int32 `json:"dedicatedloadbalancerport"` + // description Description string `json:"description,omitempty"` @@ -96,6 +104,14 @@ func (m *V1PostgresResponse) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDedicatedloadbalancerip(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDedicatedloadbalancerport(formats); err != nil { + res = append(res, err) + } + if err := m.validateID(formats); err != nil { res = append(res, err) } @@ -168,6 +184,24 @@ func (m *V1PostgresResponse) validateCreationTimestamp(formats strfmt.Registry) return nil } +func (m *V1PostgresResponse) validateDedicatedloadbalancerip(formats strfmt.Registry) error { + + if err := validate.Required("dedicatedloadbalancerip", "body", m.Dedicatedloadbalancerip); err != nil { + return err + } + + return nil +} + +func (m *V1PostgresResponse) validateDedicatedloadbalancerport(formats strfmt.Registry) error { + + if err := validate.Required("dedicatedloadbalancerport", "body", m.Dedicatedloadbalancerport); err != nil { + return err + } + + return nil +} + func (m *V1PostgresResponse) validateID(formats strfmt.Registry) error { if err := validate.Required("id", "body", m.ID); err != nil { diff --git a/api/models/v1_postgres_restore_request.go b/api/models/v1_postgres_restore_request.go index bbf8cc1..96195d7 100644 --- a/api/models/v1_postgres_restore_request.go +++ b/api/models/v1_postgres_restore_request.go @@ -31,6 +31,9 @@ type V1PostgresRestoreRequest struct { // partition ID PartitionID string `json:"partitionID,omitempty"` + // size + Size *V1PostgresSize `json:"size,omitempty"` + // source Id // Required: true SourceID *string `json:"sourceId"` @@ -46,6 +49,10 @@ type V1PostgresRestoreRequest struct { func (m *V1PostgresRestoreRequest) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateSize(formats); err != nil { + res = append(res, err) + } + if err := m.validateSourceID(formats); err != nil { res = append(res, err) } @@ -56,6 +63,25 @@ func (m *V1PostgresRestoreRequest) Validate(formats strfmt.Registry) error { return nil } +func (m *V1PostgresRestoreRequest) validateSize(formats strfmt.Registry) error { + if swag.IsZero(m.Size) { // not required + return nil + } + + if m.Size != nil { + if err := m.Size.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("size") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("size") + } + return err + } + } + + return nil +} + func (m *V1PostgresRestoreRequest) validateSourceID(formats strfmt.Registry) error { if err := validate.Required("sourceId", "body", m.SourceID); err != nil { @@ -65,8 +91,38 @@ func (m *V1PostgresRestoreRequest) validateSourceID(formats strfmt.Registry) err return nil } -// ContextValidate validates this v1 postgres restore request based on context it is used +// ContextValidate validate this v1 postgres restore request based on the context it is used func (m *V1PostgresRestoreRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSize(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PostgresRestoreRequest) contextValidateSize(ctx context.Context, formats strfmt.Registry) error { + + if m.Size != nil { + + if swag.IsZero(m.Size) { // not required + return nil + } + + if err := m.Size.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("size") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("size") + } + return err + } + } + return nil } diff --git a/api/models/v1_postgres_status.go b/api/models/v1_postgres_status.go index 66ab223..692df32 100644 --- a/api/models/v1_postgres_status.go +++ b/api/models/v1_postgres_status.go @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -18,6 +19,9 @@ import ( // swagger:model v1.PostgresStatus type V1PostgresStatus struct { + // additionalsockets + Additionalsockets []*V1PostgresSocket `json:"additionalsockets"` + // child reference ChildReference string `json:"childReference,omitempty"` @@ -32,6 +36,10 @@ type V1PostgresStatus struct { func (m *V1PostgresStatus) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateAdditionalsockets(formats); err != nil { + res = append(res, err) + } + if err := m.validateSocket(formats); err != nil { res = append(res, err) } @@ -42,6 +50,32 @@ func (m *V1PostgresStatus) Validate(formats strfmt.Registry) error { return nil } +func (m *V1PostgresStatus) validateAdditionalsockets(formats strfmt.Registry) error { + if swag.IsZero(m.Additionalsockets) { // not required + return nil + } + + for i := 0; i < len(m.Additionalsockets); i++ { + if swag.IsZero(m.Additionalsockets[i]) { // not required + continue + } + + if m.Additionalsockets[i] != nil { + if err := m.Additionalsockets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("additionalsockets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("additionalsockets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *V1PostgresStatus) validateSocket(formats strfmt.Registry) error { if swag.IsZero(m.Socket) { // not required return nil @@ -65,6 +99,10 @@ func (m *V1PostgresStatus) validateSocket(formats strfmt.Registry) error { func (m *V1PostgresStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateAdditionalsockets(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateSocket(ctx, formats); err != nil { res = append(res, err) } @@ -75,6 +113,31 @@ func (m *V1PostgresStatus) ContextValidate(ctx context.Context, formats strfmt.R return nil } +func (m *V1PostgresStatus) contextValidateAdditionalsockets(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Additionalsockets); i++ { + + if m.Additionalsockets[i] != nil { + + if swag.IsZero(m.Additionalsockets[i]) { // not required + return nil + } + + if err := m.Additionalsockets[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("additionalsockets" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("additionalsockets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (m *V1PostgresStatus) contextValidateSocket(ctx context.Context, formats strfmt.Registry) error { if m.Socket != nil { diff --git a/api/models/v1_postgres_update_request.go b/api/models/v1_postgres_update_request.go index e12ce0b..0fc74d3 100644 --- a/api/models/v1_postgres_update_request.go +++ b/api/models/v1_postgres_update_request.go @@ -25,12 +25,23 @@ type V1PostgresUpdateRequest struct { // audit logs AuditLogs bool `json:"auditLogs,omitempty"` + // autoassigndedicatedlbipfrom + Autoassigndedicatedlbipfrom string `json:"autoassigndedicatedlbipfrom,omitempty"` + // backup Backup string `json:"backup,omitempty"` // connection Connection *V1Connection `json:"connection,omitempty"` + // dedicatedloadbalancerip + // Required: true + Dedicatedloadbalancerip *string `json:"dedicatedloadbalancerip"` + + // dedicatedloadbalancerport + // Required: true + Dedicatedloadbalancerport *int32 `json:"dedicatedloadbalancerport"` + // description Description string `json:"description,omitempty"` @@ -75,6 +86,14 @@ func (m *V1PostgresUpdateRequest) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateDedicatedloadbalancerip(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDedicatedloadbalancerport(formats); err != nil { + res = append(res, err) + } + if err := m.validateID(formats); err != nil { res = append(res, err) } @@ -131,6 +150,24 @@ func (m *V1PostgresUpdateRequest) validateConnection(formats strfmt.Registry) er return nil } +func (m *V1PostgresUpdateRequest) validateDedicatedloadbalancerip(formats strfmt.Registry) error { + + if err := validate.Required("dedicatedloadbalancerip", "body", m.Dedicatedloadbalancerip); err != nil { + return err + } + + return nil +} + +func (m *V1PostgresUpdateRequest) validateDedicatedloadbalancerport(formats strfmt.Registry) error { + + if err := validate.Required("dedicatedloadbalancerport", "body", m.Dedicatedloadbalancerport); err != nil { + return err + } + + return nil +} + func (m *V1PostgresUpdateRequest) validateID(formats strfmt.Registry) error { if err := validate.Required("id", "body", m.ID); err != nil { diff --git a/api/models/v1beta1_shoot_service_account_key_rotation.go b/api/models/v1beta1_c_a_rotation.go similarity index 57% rename from api/models/v1beta1_shoot_service_account_key_rotation.go rename to api/models/v1beta1_c_a_rotation.go index 754380f..b3b6c0e 100644 --- a/api/models/v1beta1_shoot_service_account_key_rotation.go +++ b/api/models/v1beta1_c_a_rotation.go @@ -14,14 +14,20 @@ import ( "github.com/go-openapi/validate" ) -// V1beta1ShootServiceAccountKeyRotation v1beta1 shoot service account key rotation +// V1beta1CARotation v1beta1 c a rotation // -// swagger:model v1beta1.ShootServiceAccountKeyRotation -type V1beta1ShootServiceAccountKeyRotation struct { +// swagger:model v1beta1.CARotation +type V1beta1CARotation struct { // last completion time LastCompletionTime string `json:"lastCompletionTime,omitempty"` + // last completion triggered time + LastCompletionTriggeredTime string `json:"lastCompletionTriggeredTime,omitempty"` + + // last initiation finished time + LastInitiationFinishedTime string `json:"lastInitiationFinishedTime,omitempty"` + // last initiation time LastInitiationTime string `json:"lastInitiationTime,omitempty"` @@ -30,8 +36,8 @@ type V1beta1ShootServiceAccountKeyRotation struct { Phase *string `json:"phase"` } -// Validate validates this v1beta1 shoot service account key rotation -func (m *V1beta1ShootServiceAccountKeyRotation) Validate(formats strfmt.Registry) error { +// Validate validates this v1beta1 c a rotation +func (m *V1beta1CARotation) Validate(formats strfmt.Registry) error { var res []error if err := m.validatePhase(formats); err != nil { @@ -44,7 +50,7 @@ func (m *V1beta1ShootServiceAccountKeyRotation) Validate(formats strfmt.Registry return nil } -func (m *V1beta1ShootServiceAccountKeyRotation) validatePhase(formats strfmt.Registry) error { +func (m *V1beta1CARotation) validatePhase(formats strfmt.Registry) error { if err := validate.Required("phase", "body", m.Phase); err != nil { return err @@ -53,13 +59,13 @@ func (m *V1beta1ShootServiceAccountKeyRotation) validatePhase(formats strfmt.Reg return nil } -// ContextValidate validates this v1beta1 shoot service account key rotation based on context it is used -func (m *V1beta1ShootServiceAccountKeyRotation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this v1beta1 c a rotation based on context it is used +func (m *V1beta1CARotation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *V1beta1ShootServiceAccountKeyRotation) MarshalBinary() ([]byte, error) { +func (m *V1beta1CARotation) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -67,8 +73,8 @@ func (m *V1beta1ShootServiceAccountKeyRotation) MarshalBinary() ([]byte, error) } // UnmarshalBinary interface implementation -func (m *V1beta1ShootServiceAccountKeyRotation) UnmarshalBinary(b []byte) error { - var res V1beta1ShootServiceAccountKeyRotation +func (m *V1beta1CARotation) UnmarshalBinary(b []byte) error { + var res V1beta1CARotation if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/api/models/v1beta1_shoot_c_a_rotation.go b/api/models/v1beta1_e_t_c_d_encryption_key_rotation.go similarity index 51% rename from api/models/v1beta1_shoot_c_a_rotation.go rename to api/models/v1beta1_e_t_c_d_encryption_key_rotation.go index cc98985..45b1c65 100644 --- a/api/models/v1beta1_shoot_c_a_rotation.go +++ b/api/models/v1beta1_e_t_c_d_encryption_key_rotation.go @@ -14,14 +14,20 @@ import ( "github.com/go-openapi/validate" ) -// V1beta1ShootCARotation v1beta1 shoot c a rotation +// V1beta1ETCDEncryptionKeyRotation v1beta1 e t c d encryption key rotation // -// swagger:model v1beta1.ShootCARotation -type V1beta1ShootCARotation struct { +// swagger:model v1beta1.ETCDEncryptionKeyRotation +type V1beta1ETCDEncryptionKeyRotation struct { // last completion time LastCompletionTime string `json:"lastCompletionTime,omitempty"` + // last completion triggered time + LastCompletionTriggeredTime string `json:"lastCompletionTriggeredTime,omitempty"` + + // last initiation finished time + LastInitiationFinishedTime string `json:"lastInitiationFinishedTime,omitempty"` + // last initiation time LastInitiationTime string `json:"lastInitiationTime,omitempty"` @@ -30,8 +36,8 @@ type V1beta1ShootCARotation struct { Phase *string `json:"phase"` } -// Validate validates this v1beta1 shoot c a rotation -func (m *V1beta1ShootCARotation) Validate(formats strfmt.Registry) error { +// Validate validates this v1beta1 e t c d encryption key rotation +func (m *V1beta1ETCDEncryptionKeyRotation) Validate(formats strfmt.Registry) error { var res []error if err := m.validatePhase(formats); err != nil { @@ -44,7 +50,7 @@ func (m *V1beta1ShootCARotation) Validate(formats strfmt.Registry) error { return nil } -func (m *V1beta1ShootCARotation) validatePhase(formats strfmt.Registry) error { +func (m *V1beta1ETCDEncryptionKeyRotation) validatePhase(formats strfmt.Registry) error { if err := validate.Required("phase", "body", m.Phase); err != nil { return err @@ -53,13 +59,13 @@ func (m *V1beta1ShootCARotation) validatePhase(formats strfmt.Registry) error { return nil } -// ContextValidate validates this v1beta1 shoot c a rotation based on context it is used -func (m *V1beta1ShootCARotation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this v1beta1 e t c d encryption key rotation based on context it is used +func (m *V1beta1ETCDEncryptionKeyRotation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *V1beta1ShootCARotation) MarshalBinary() ([]byte, error) { +func (m *V1beta1ETCDEncryptionKeyRotation) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -67,8 +73,8 @@ func (m *V1beta1ShootCARotation) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *V1beta1ShootCARotation) UnmarshalBinary(b []byte) error { - var res V1beta1ShootCARotation +func (m *V1beta1ETCDEncryptionKeyRotation) UnmarshalBinary(b []byte) error { + var res V1beta1ETCDEncryptionKeyRotation if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/api/models/v1beta1_last_maintenance.go b/api/models/v1beta1_last_maintenance.go new file mode 100644 index 0000000..8890c6b --- /dev/null +++ b/api/models/v1beta1_last_maintenance.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1beta1LastMaintenance v1beta1 last maintenance +// +// swagger:model v1beta1.LastMaintenance +type V1beta1LastMaintenance struct { + + // description + // Required: true + Description *string `json:"description"` + + // failure reason + FailureReason string `json:"failureReason,omitempty"` + + // state + // Required: true + State *string `json:"state"` + + // triggered time + // Required: true + TriggeredTime *string `json:"triggeredTime"` +} + +// Validate validates this v1beta1 last maintenance +func (m *V1beta1LastMaintenance) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTriggeredTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1beta1LastMaintenance) validateDescription(formats strfmt.Registry) error { + + if err := validate.Required("description", "body", m.Description); err != nil { + return err + } + + return nil +} + +func (m *V1beta1LastMaintenance) validateState(formats strfmt.Registry) error { + + if err := validate.Required("state", "body", m.State); err != nil { + return err + } + + return nil +} + +func (m *V1beta1LastMaintenance) validateTriggeredTime(formats strfmt.Registry) error { + + if err := validate.Required("triggeredTime", "body", m.TriggeredTime); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this v1beta1 last maintenance based on context it is used +func (m *V1beta1LastMaintenance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1beta1LastMaintenance) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1beta1LastMaintenance) UnmarshalBinary(b []byte) error { + var res V1beta1LastMaintenance + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1beta1_shoot_e_t_c_d_encryption_key_rotation.go b/api/models/v1beta1_service_account_key_rotation.go similarity index 53% rename from api/models/v1beta1_shoot_e_t_c_d_encryption_key_rotation.go rename to api/models/v1beta1_service_account_key_rotation.go index d5de151..2928711 100644 --- a/api/models/v1beta1_shoot_e_t_c_d_encryption_key_rotation.go +++ b/api/models/v1beta1_service_account_key_rotation.go @@ -14,14 +14,20 @@ import ( "github.com/go-openapi/validate" ) -// V1beta1ShootETCDEncryptionKeyRotation v1beta1 shoot e t c d encryption key rotation +// V1beta1ServiceAccountKeyRotation v1beta1 service account key rotation // -// swagger:model v1beta1.ShootETCDEncryptionKeyRotation -type V1beta1ShootETCDEncryptionKeyRotation struct { +// swagger:model v1beta1.ServiceAccountKeyRotation +type V1beta1ServiceAccountKeyRotation struct { // last completion time LastCompletionTime string `json:"lastCompletionTime,omitempty"` + // last completion triggered time + LastCompletionTriggeredTime string `json:"lastCompletionTriggeredTime,omitempty"` + + // last initiation finished time + LastInitiationFinishedTime string `json:"lastInitiationFinishedTime,omitempty"` + // last initiation time LastInitiationTime string `json:"lastInitiationTime,omitempty"` @@ -30,8 +36,8 @@ type V1beta1ShootETCDEncryptionKeyRotation struct { Phase *string `json:"phase"` } -// Validate validates this v1beta1 shoot e t c d encryption key rotation -func (m *V1beta1ShootETCDEncryptionKeyRotation) Validate(formats strfmt.Registry) error { +// Validate validates this v1beta1 service account key rotation +func (m *V1beta1ServiceAccountKeyRotation) Validate(formats strfmt.Registry) error { var res []error if err := m.validatePhase(formats); err != nil { @@ -44,7 +50,7 @@ func (m *V1beta1ShootETCDEncryptionKeyRotation) Validate(formats strfmt.Registry return nil } -func (m *V1beta1ShootETCDEncryptionKeyRotation) validatePhase(formats strfmt.Registry) error { +func (m *V1beta1ServiceAccountKeyRotation) validatePhase(formats strfmt.Registry) error { if err := validate.Required("phase", "body", m.Phase); err != nil { return err @@ -53,13 +59,13 @@ func (m *V1beta1ShootETCDEncryptionKeyRotation) validatePhase(formats strfmt.Reg return nil } -// ContextValidate validates this v1beta1 shoot e t c d encryption key rotation based on context it is used -func (m *V1beta1ShootETCDEncryptionKeyRotation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this v1beta1 service account key rotation based on context it is used +func (m *V1beta1ServiceAccountKeyRotation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *V1beta1ShootETCDEncryptionKeyRotation) MarshalBinary() ([]byte, error) { +func (m *V1beta1ServiceAccountKeyRotation) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -67,8 +73,8 @@ func (m *V1beta1ShootETCDEncryptionKeyRotation) MarshalBinary() ([]byte, error) } // UnmarshalBinary interface implementation -func (m *V1beta1ShootETCDEncryptionKeyRotation) UnmarshalBinary(b []byte) error { - var res V1beta1ShootETCDEncryptionKeyRotation +func (m *V1beta1ServiceAccountKeyRotation) UnmarshalBinary(b []byte) error { + var res V1beta1ServiceAccountKeyRotation if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/api/models/v1beta1_shoot_credentials_rotation.go b/api/models/v1beta1_shoot_credentials_rotation.go index 537a2c8..29094e3 100644 --- a/api/models/v1beta1_shoot_credentials_rotation.go +++ b/api/models/v1beta1_shoot_credentials_rotation.go @@ -19,10 +19,10 @@ import ( type V1beta1ShootCredentialsRotation struct { // certificate authorities - CertificateAuthorities *V1beta1ShootCARotation `json:"certificateAuthorities,omitempty"` + CertificateAuthorities *V1beta1CARotation `json:"certificateAuthorities,omitempty"` // etcd encryption key - EtcdEncryptionKey *V1beta1ShootETCDEncryptionKeyRotation `json:"etcdEncryptionKey,omitempty"` + EtcdEncryptionKey *V1beta1ETCDEncryptionKeyRotation `json:"etcdEncryptionKey,omitempty"` // kubeconfig Kubeconfig *V1beta1ShootKubeconfigRotation `json:"kubeconfig,omitempty"` @@ -31,7 +31,7 @@ type V1beta1ShootCredentialsRotation struct { Observability *V1beta1ShootObservabilityRotation `json:"observability,omitempty"` // service account key - ServiceAccountKey *V1beta1ShootServiceAccountKeyRotation `json:"serviceAccountKey,omitempty"` + ServiceAccountKey *V1beta1ServiceAccountKeyRotation `json:"serviceAccountKey,omitempty"` // ssh keypair SSHKeypair *V1beta1ShootSSHKeypairRotation `json:"sshKeypair,omitempty"` diff --git a/api/models/v1beta1_shoot_status.go b/api/models/v1beta1_shoot_status.go index e3a5850..cdb7c44 100644 --- a/api/models/v1beta1_shoot_status.go +++ b/api/models/v1beta1_shoot_status.go @@ -49,6 +49,9 @@ type V1beta1ShootStatus struct { // last hibernation trigger time LastHibernationTriggerTime string `json:"lastHibernationTriggerTime,omitempty"` + // last maintenance + LastMaintenance *V1beta1LastMaintenance `json:"lastMaintenance,omitempty"` + // last operation LastOperation *V1beta1LastOperation `json:"lastOperation,omitempty"` @@ -105,6 +108,10 @@ func (m *V1beta1ShootStatus) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLastMaintenance(formats); err != nil { + res = append(res, err) + } + if err := m.validateLastOperation(formats); err != nil { res = append(res, err) } @@ -275,6 +282,25 @@ func (m *V1beta1ShootStatus) validateLastErrors(formats strfmt.Registry) error { return nil } +func (m *V1beta1ShootStatus) validateLastMaintenance(formats strfmt.Registry) error { + if swag.IsZero(m.LastMaintenance) { // not required + return nil + } + + if m.LastMaintenance != nil { + if err := m.LastMaintenance.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastMaintenance") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastMaintenance") + } + return err + } + } + + return nil +} + func (m *V1beta1ShootStatus) validateLastOperation(formats strfmt.Registry) error { if swag.IsZero(m.LastOperation) { // not required return nil @@ -340,6 +366,10 @@ func (m *V1beta1ShootStatus) ContextValidate(ctx context.Context, formats strfmt res = append(res, err) } + if err := m.contextValidateLastMaintenance(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLastOperation(ctx, formats); err != nil { res = append(res, err) } @@ -488,6 +518,27 @@ func (m *V1beta1ShootStatus) contextValidateLastErrors(ctx context.Context, form return nil } +func (m *V1beta1ShootStatus) contextValidateLastMaintenance(ctx context.Context, formats strfmt.Registry) error { + + if m.LastMaintenance != nil { + + if swag.IsZero(m.LastMaintenance) { // not required + return nil + } + + if err := m.LastMaintenance.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastMaintenance") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("lastMaintenance") + } + return err + } + } + + return nil +} + func (m *V1beta1ShootStatus) contextValidateLastOperation(ctx context.Context, formats strfmt.Registry) error { if m.LastOperation != nil { diff --git a/cloud-api.json b/cloud-api.json index da8c977..20f7ac7 100644 --- a/cloud-api.json +++ b/cloud-api.json @@ -1266,15 +1266,11 @@ }, "LogAcceptedConnections": { "type": "string" - }, - "ReversedVPN": { - "type": "string" } }, "required": [ "DurosStorageEncryption", - "LogAcceptedConnections", - "ReversedVPN" + "LogAcceptedConnections" ] }, "v1.ClusterFindRequest": { @@ -2993,9 +2989,19 @@ "auditLogs": { "type": "boolean" }, + "autoassigndedicatedlbipfrom": { + "type": "string" + }, "backup": { "type": "string" }, + "dedicatedloadbalancerip": { + "type": "string" + }, + "dedicatedloadbalancerport": { + "format": "int32", + "type": "integer" + }, "description": { "type": "string" }, @@ -3033,13 +3039,27 @@ "version": { "type": "string" } - } + }, + "required": [ + "dedicatedloadbalancerip", + "dedicatedloadbalancerport" + ] }, "v1.PostgresCreateStandbyRequest": { "properties": { + "autoassigndedicatedlbipfrom": { + "type": "string" + }, "backup": { "type": "string" }, + "dedicatedloadbalancerip": { + "type": "string" + }, + "dedicatedloadbalancerport": { + "format": "int32", + "type": "integer" + }, "description": { "type": "string" }, @@ -3067,6 +3087,8 @@ } }, "required": [ + "dedicatedloadbalancerip", + "dedicatedloadbalancerport", "primaryId" ] }, @@ -3135,6 +3157,13 @@ "format": "date-time", "type": "string" }, + "dedicatedloadbalancerip": { + "type": "string" + }, + "dedicatedloadbalancerport": { + "format": "int32", + "type": "integer" + }, "description": { "type": "string" }, @@ -3186,6 +3215,8 @@ } }, "required": [ + "dedicatedloadbalancerip", + "dedicatedloadbalancerport", "id", "status" ] @@ -3210,6 +3241,9 @@ "partitionID": { "type": "string" }, + "size": { + "$ref": "#/definitions/v1.PostgresSize" + }, "sourceId": { "type": "string" }, @@ -3260,6 +3294,12 @@ }, "v1.PostgresStatus": { "properties": { + "additionalsockets": { + "items": { + "$ref": "#/definitions/v1.PostgresSocket" + }, + "type": "array" + }, "childReference": { "type": "string" }, @@ -3279,12 +3319,22 @@ "auditLogs": { "type": "boolean" }, + "autoassigndedicatedlbipfrom": { + "type": "string" + }, "backup": { "type": "string" }, "connection": { "$ref": "#/definitions/v1.Connection" }, + "dedicatedloadbalancerip": { + "type": "string" + }, + "dedicatedloadbalancerport": { + "format": "int32", + "type": "integer" + }, "description": { "type": "string" }, @@ -3324,6 +3374,8 @@ } }, "required": [ + "dedicatedloadbalancerip", + "dedicatedloadbalancerport", "id" ] }, @@ -5052,6 +5104,28 @@ "Taints" ] }, + "v1beta1.CARotation": { + "properties": { + "lastCompletionTime": { + "type": "string" + }, + "lastCompletionTriggeredTime": { + "type": "string" + }, + "lastInitiationFinishedTime": { + "type": "string" + }, + "lastInitiationTime": { + "type": "string" + }, + "phase": { + "type": "string" + } + }, + "required": [ + "phase" + ] + }, "v1beta1.Condition": { "properties": { "codes": { @@ -5088,6 +5162,28 @@ "type" ] }, + "v1beta1.ETCDEncryptionKeyRotation": { + "properties": { + "lastCompletionTime": { + "type": "string" + }, + "lastCompletionTriggeredTime": { + "type": "string" + }, + "lastInitiationFinishedTime": { + "type": "string" + }, + "lastInitiationTime": { + "type": "string" + }, + "phase": { + "type": "string" + } + }, + "required": [ + "phase" + ] + }, "v1beta1.Gardener": { "properties": { "id": { @@ -5128,6 +5224,27 @@ "description" ] }, + "v1beta1.LastMaintenance": { + "properties": { + "description": { + "type": "string" + }, + "failureReason": { + "type": "string" + }, + "state": { + "type": "string" + }, + "triggeredTime": { + "type": "string" + } + }, + "required": [ + "description", + "state", + "triggeredTime" + ] + }, "v1beta1.LastOperation": { "properties": { "description": { @@ -5155,34 +5272,40 @@ "type" ] }, - "v1beta1.ShootAdvertisedAddress": { + "v1beta1.ServiceAccountKeyRotation": { "properties": { - "name": { + "lastCompletionTime": { "type": "string" }, - "url": { + "lastCompletionTriggeredTime": { + "type": "string" + }, + "lastInitiationFinishedTime": { + "type": "string" + }, + "lastInitiationTime": { + "type": "string" + }, + "phase": { "type": "string" } }, "required": [ - "name", - "url" + "phase" ] }, - "v1beta1.ShootCARotation": { + "v1beta1.ShootAdvertisedAddress": { "properties": { - "lastCompletionTime": { - "type": "string" - }, - "lastInitiationTime": { + "name": { "type": "string" }, - "phase": { + "url": { "type": "string" } }, "required": [ - "phase" + "name", + "url" ] }, "v1beta1.ShootCredentials": { @@ -5195,10 +5318,10 @@ "v1beta1.ShootCredentialsRotation": { "properties": { "certificateAuthorities": { - "$ref": "#/definitions/v1beta1.ShootCARotation" + "$ref": "#/definitions/v1beta1.CARotation" }, "etcdEncryptionKey": { - "$ref": "#/definitions/v1beta1.ShootETCDEncryptionKeyRotation" + "$ref": "#/definitions/v1beta1.ETCDEncryptionKeyRotation" }, "kubeconfig": { "$ref": "#/definitions/v1beta1.ShootKubeconfigRotation" @@ -5207,29 +5330,13 @@ "$ref": "#/definitions/v1beta1.ShootObservabilityRotation" }, "serviceAccountKey": { - "$ref": "#/definitions/v1beta1.ShootServiceAccountKeyRotation" + "$ref": "#/definitions/v1beta1.ServiceAccountKeyRotation" }, "sshKeypair": { "$ref": "#/definitions/v1beta1.ShootSSHKeypairRotation" } } }, - "v1beta1.ShootETCDEncryptionKeyRotation": { - "properties": { - "lastCompletionTime": { - "type": "string" - }, - "lastInitiationTime": { - "type": "string" - }, - "phase": { - "type": "string" - } - }, - "required": [ - "phase" - ] - }, "v1beta1.ShootKubeconfigRotation": { "properties": { "lastCompletionTime": { @@ -5260,22 +5367,6 @@ } } }, - "v1beta1.ShootServiceAccountKeyRotation": { - "properties": { - "lastCompletionTime": { - "type": "string" - }, - "lastInitiationTime": { - "type": "string" - }, - "phase": { - "type": "string" - } - }, - "required": [ - "phase" - ] - }, "v1beta1.ShootStatus": { "properties": { "advertisedAddresses": { @@ -5317,6 +5408,9 @@ "lastHibernationTriggerTime": { "type": "string" }, + "lastMaintenance": { + "$ref": "#/definitions/v1beta1.LastMaintenance" + }, "lastOperation": { "$ref": "#/definitions/v1beta1.LastOperation" },