From 61779c578ad6281c7dd427a333f998035cadbcc6 Mon Sep 17 00:00:00 2001 From: Daniel Lipovetsky Date: Tue, 10 Dec 2024 10:41:47 -0800 Subject: [PATCH] fixup! Add idempotence identifier client methods Remove unrelated swagger changes --- v3/models/recovery_plan_def_status.go | 44 +-------------------------- v3/models/recovery_plan_resources.go | 2 +- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/v3/models/recovery_plan_def_status.go b/v3/models/recovery_plan_def_status.go index 1575de4c..21207a5b 100644 --- a/v3/models/recovery_plan_def_status.go +++ b/v3/models/recovery_plan_def_status.go @@ -307,7 +307,7 @@ type RecoveryPlanDefStatusRecoveryAvailabilityZoneOrderListItems0 struct { // List of recovery Availability Zone orders for entities in the Recovery Plan. More than one entry in this list indicates entities in Recovery Plan are protected by the Protection Rules with different recovery Availability Zone order and makes Recovery Plan invalid. // - AvailabilityZoneOrderList []*RecoveryPlanDefStatusRecoveryAvailabilityZoneOrderListItems0AvailabilityZoneOrderListItems0 `json:"availability_zone_order_list"` + AvailabilityZoneOrderList [][]*RecoveryPlanDefStatusRecoveryAvailabilityZoneOrderListItems0AvailabilityZoneOrderListItems0AvailabilityZoneListItems0 `json:"availability_zone_order_list"` // URL of the Availability Zone. // @@ -334,28 +334,6 @@ func (m *RecoveryPlanDefStatusRecoveryAvailabilityZoneOrderListItems0) Validate( } func (m *RecoveryPlanDefStatusRecoveryAvailabilityZoneOrderListItems0) validateAvailabilityZoneOrderList(formats strfmt.Registry) error { - if swag.IsZero(m.AvailabilityZoneOrderList) { // not required - return nil - } - - for i := 0; i < len(m.AvailabilityZoneOrderList); i++ { - if swag.IsZero(m.AvailabilityZoneOrderList[i]) { // not required - continue - } - - if m.AvailabilityZoneOrderList[i] != nil { - if err := m.AvailabilityZoneOrderList[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availability_zone_order_list" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availability_zone_order_list" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - return nil } @@ -384,26 +362,6 @@ func (m *RecoveryPlanDefStatusRecoveryAvailabilityZoneOrderListItems0) ContextVa func (m *RecoveryPlanDefStatusRecoveryAvailabilityZoneOrderListItems0) contextValidateAvailabilityZoneOrderList(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(m.AvailabilityZoneOrderList); i++ { - - if m.AvailabilityZoneOrderList[i] != nil { - - if swag.IsZero(m.AvailabilityZoneOrderList[i]) { // not required - return nil - } - - if err := m.AvailabilityZoneOrderList[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("availability_zone_order_list" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("availability_zone_order_list" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - return nil } diff --git a/v3/models/recovery_plan_resources.go b/v3/models/recovery_plan_resources.go index 66f82ad2..21054735 100644 --- a/v3/models/recovery_plan_resources.go +++ b/v3/models/recovery_plan_resources.go @@ -289,7 +289,7 @@ type RecoveryPlanResourcesParameters struct { // This field should be set to the index of the Availability Zone in the availability_zone_list which should be considered as a protected Availability Zone. // - PrimaryLocationIndex int64 `json:"primary_location_index,omitempty"` + PrimaryLocationIndex int64 `json:"primary_location_index"` // A list containing witness configuration. //