From b87e99e93860f0d3fd05ba141f50f4dc3ff3fc9c Mon Sep 17 00:00:00 2001 From: rmorales Date: Fri, 22 Jul 2022 11:46:26 -0500 Subject: [PATCH] Update Service-Broker to v1.98.3 --- ...nternal_v1_transitgateway_get_responses.go | 114 ------------------ .../pcloud_cloudconnections_post_responses.go | 76 ++++++++++++ ...s_virtualprivateclouds_getall_responses.go | 76 ++++++++++++ ...pplacementgroups_members_post_responses.go | 38 ++++++ power/models/d_h_c_p_server_create.go | 3 + power/models/disaster_recovery_location.go | 70 +++-------- power/models/disaster_recovery_locations.go | 34 +++--- power/models/fail_over_sites.go | 73 ----------- ...ail_back_sites.go => replication_sites.go} | 14 +-- power/models/transit_gateway_instance.go | 70 ++--------- 10 files changed, 239 insertions(+), 329 deletions(-) delete mode 100644 power/models/fail_over_sites.go rename power/models/{fail_back_sites.go => replication_sites.go} (75%) diff --git a/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go b/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go index 6e21161f..3d25a711 100644 --- a/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go +++ b/power/client/internal_transit_gateway/internal_v1_transitgateway_get_responses.go @@ -29,30 +29,12 @@ func (o *InternalV1TransitgatewayGetReader) ReadResponse(response runtime.Client return nil, err } return result, nil - case 400: - result := NewInternalV1TransitgatewayGetBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result case 403: result := NewInternalV1TransitgatewayGetForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result - case 404: - result := NewInternalV1TransitgatewayGetNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewInternalV1TransitgatewayGetInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } @@ -90,38 +72,6 @@ func (o *InternalV1TransitgatewayGetOK) readResponse(response runtime.ClientResp return nil } -// NewInternalV1TransitgatewayGetBadRequest creates a InternalV1TransitgatewayGetBadRequest with default headers values -func NewInternalV1TransitgatewayGetBadRequest() *InternalV1TransitgatewayGetBadRequest { - return &InternalV1TransitgatewayGetBadRequest{} -} - -/* InternalV1TransitgatewayGetBadRequest describes a response with status code 400, with default header values. - -Bad Request -*/ -type InternalV1TransitgatewayGetBadRequest struct { - Payload *models.Error -} - -func (o *InternalV1TransitgatewayGetBadRequest) Error() string { - return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetBadRequest %+v", 400, o.Payload) -} -func (o *InternalV1TransitgatewayGetBadRequest) GetPayload() *models.Error { - return o.Payload -} - -func (o *InternalV1TransitgatewayGetBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - // NewInternalV1TransitgatewayGetForbidden creates a InternalV1TransitgatewayGetForbidden with default headers values func NewInternalV1TransitgatewayGetForbidden() *InternalV1TransitgatewayGetForbidden { return &InternalV1TransitgatewayGetForbidden{} @@ -153,67 +103,3 @@ func (o *InternalV1TransitgatewayGetForbidden) readResponse(response runtime.Cli return nil } - -// NewInternalV1TransitgatewayGetNotFound creates a InternalV1TransitgatewayGetNotFound with default headers values -func NewInternalV1TransitgatewayGetNotFound() *InternalV1TransitgatewayGetNotFound { - return &InternalV1TransitgatewayGetNotFound{} -} - -/* InternalV1TransitgatewayGetNotFound describes a response with status code 404, with default header values. - -Not Found -*/ -type InternalV1TransitgatewayGetNotFound struct { - Payload *models.Error -} - -func (o *InternalV1TransitgatewayGetNotFound) Error() string { - return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetNotFound %+v", 404, o.Payload) -} -func (o *InternalV1TransitgatewayGetNotFound) GetPayload() *models.Error { - return o.Payload -} - -func (o *InternalV1TransitgatewayGetNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewInternalV1TransitgatewayGetInternalServerError creates a InternalV1TransitgatewayGetInternalServerError with default headers values -func NewInternalV1TransitgatewayGetInternalServerError() *InternalV1TransitgatewayGetInternalServerError { - return &InternalV1TransitgatewayGetInternalServerError{} -} - -/* InternalV1TransitgatewayGetInternalServerError describes a response with status code 500, with default header values. - -Internal Server Error -*/ -type InternalV1TransitgatewayGetInternalServerError struct { - Payload *models.Error -} - -func (o *InternalV1TransitgatewayGetInternalServerError) Error() string { - return fmt.Sprintf("[GET /internal/v1/transit-gateway/{powervs_service_crn}][%d] internalV1TransitgatewayGetInternalServerError %+v", 500, o.Payload) -} -func (o *InternalV1TransitgatewayGetInternalServerError) GetPayload() *models.Error { - return o.Payload -} - -func (o *InternalV1TransitgatewayGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Error) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go index b0f46e4e..0c93bc9c 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_post_responses.go @@ -53,6 +53,12 @@ func (o *PcloudCloudconnectionsPostReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 408: + result := NewPcloudCloudconnectionsPostRequestTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudCloudconnectionsPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -71,6 +77,12 @@ func (o *PcloudCloudconnectionsPostReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 504: + result := NewPcloudCloudconnectionsPostGatewayTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } @@ -236,6 +248,38 @@ func (o *PcloudCloudconnectionsPostUnauthorized) readResponse(response runtime.C return nil } +// NewPcloudCloudconnectionsPostRequestTimeout creates a PcloudCloudconnectionsPostRequestTimeout with default headers values +func NewPcloudCloudconnectionsPostRequestTimeout() *PcloudCloudconnectionsPostRequestTimeout { + return &PcloudCloudconnectionsPostRequestTimeout{} +} + +/* PcloudCloudconnectionsPostRequestTimeout describes a response with status code 408, with default header values. + +Request Timeout +*/ +type PcloudCloudconnectionsPostRequestTimeout struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsPostRequestTimeout) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostRequestTimeout %+v", 408, o.Payload) +} +func (o *PcloudCloudconnectionsPostRequestTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsPostRequestTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + // NewPcloudCloudconnectionsPostConflict creates a PcloudCloudconnectionsPostConflict with default headers values func NewPcloudCloudconnectionsPostConflict() *PcloudCloudconnectionsPostConflict { return &PcloudCloudconnectionsPostConflict{} @@ -331,3 +375,35 @@ func (o *PcloudCloudconnectionsPostInternalServerError) readResponse(response ru return nil } + +// NewPcloudCloudconnectionsPostGatewayTimeout creates a PcloudCloudconnectionsPostGatewayTimeout with default headers values +func NewPcloudCloudconnectionsPostGatewayTimeout() *PcloudCloudconnectionsPostGatewayTimeout { + return &PcloudCloudconnectionsPostGatewayTimeout{} +} + +/* PcloudCloudconnectionsPostGatewayTimeout describes a response with status code 504, with default header values. + +Gateway Timeout +*/ +type PcloudCloudconnectionsPostGatewayTimeout struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsPostGatewayTimeout) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections][%d] pcloudCloudconnectionsPostGatewayTimeout %+v", 504, o.Payload) +} +func (o *PcloudCloudconnectionsPostGatewayTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsPostGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go index ad162ef3..3da81fad 100644 --- a/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go +++ b/power/client/p_cloud_cloud_connections/pcloud_cloudconnections_virtualprivateclouds_getall_responses.go @@ -41,12 +41,24 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallReader) ReadResponse(re return nil, err } return nil, result + case 408: + result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 500: result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result + case 504: + result := NewPcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } @@ -148,6 +160,38 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallUnauthorized) readRespo return nil } +// NewPcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout creates a PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout with default headers values +func NewPcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout() *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout { + return &PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout{} +} + +/* PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout describes a response with status code 408, with default header values. + +Request Timeout +*/ +type PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout %+v", 408, o.Payload) +} +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallRequestTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + // NewPcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError creates a PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError with default headers values func NewPcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError() *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError { return &PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError{} @@ -179,3 +223,35 @@ func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallInternalServerError) re return nil } + +// NewPcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout creates a PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout with default headers values +func NewPcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout() *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout { + return &PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout{} +} + +/* PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout describes a response with status code 504, with default header values. + +Gateway Timeout +*/ +type PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout struct { + Payload *models.Error +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) Error() string { + return fmt.Sprintf("[GET /pcloud/v1/cloud-instances/{cloud_instance_id}/cloud-connections-virtual-private-clouds][%d] pcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout %+v", 504, o.Payload) +} +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudconnectionsVirtualprivatecloudsGetallGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go index 9a929920..ae3c476e 100644 --- a/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go +++ b/power/client/p_cloud_s_p_p_placement_groups/pcloud_sppplacementgroups_members_post_responses.go @@ -47,6 +47,12 @@ func (o *PcloudSppplacementgroupsMembersPostReader) ReadResponse(response runtim return nil, err } return nil, result + case 404: + result := NewPcloudSppplacementgroupsMembersPostNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudSppplacementgroupsMembersPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -198,6 +204,38 @@ func (o *PcloudSppplacementgroupsMembersPostForbidden) readResponse(response run return nil } +// NewPcloudSppplacementgroupsMembersPostNotFound creates a PcloudSppplacementgroupsMembersPostNotFound with default headers values +func NewPcloudSppplacementgroupsMembersPostNotFound() *PcloudSppplacementgroupsMembersPostNotFound { + return &PcloudSppplacementgroupsMembersPostNotFound{} +} + +/* PcloudSppplacementgroupsMembersPostNotFound describes a response with status code 404, with default header values. + +Not Found +*/ +type PcloudSppplacementgroupsMembersPostNotFound struct { + Payload *models.Error +} + +func (o *PcloudSppplacementgroupsMembersPostNotFound) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/spp-placement-groups/{spp_placement_group_id}/members/{shared_processor_pool_id}][%d] pcloudSppplacementgroupsMembersPostNotFound %+v", 404, o.Payload) +} +func (o *PcloudSppplacementgroupsMembersPostNotFound) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudSppplacementgroupsMembersPostNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + // NewPcloudSppplacementgroupsMembersPostConflict creates a PcloudSppplacementgroupsMembersPostConflict with default headers values func NewPcloudSppplacementgroupsMembersPostConflict() *PcloudSppplacementgroupsMembersPostConflict { return &PcloudSppplacementgroupsMembersPostConflict{} diff --git a/power/models/d_h_c_p_server_create.go b/power/models/d_h_c_p_server_create.go index 5497b606..9cf1cc3b 100644 --- a/power/models/d_h_c_p_server_create.go +++ b/power/models/d_h_c_p_server_create.go @@ -28,6 +28,9 @@ type DHCPServerCreate struct { // Optional name of DHCP Service (will be prefixed by DHCP identifier) Name *string `json:"name,omitempty"` + + // Indicates if SNAT will be enabled for DHCP service + SnatEnabled *bool `json:"snatEnabled,omitempty"` } // Validate validates this d h c p server create diff --git a/power/models/disaster_recovery_location.go b/power/models/disaster_recovery_location.go index 2898ae5f..a3e98f9b 100644 --- a/power/models/disaster_recovery_location.go +++ b/power/models/disaster_recovery_location.go @@ -18,25 +18,18 @@ import ( // swagger:model DisasterRecoveryLocation type DisasterRecoveryLocation struct { - // The list of failBackSites has mapped to the location - FailBackSites FailBackSites `json:"failBackSites,omitempty"` - - // The list of failOverSites has mapped for the location - FailOverSites FailOverSites `json:"failOverSites,omitempty"` - // regionZone of a site Location string `json:"location,omitempty"` + + // The list of replication sites has mapped for the given location + ReplicationSites ReplicationSites `json:"replicationSites,omitempty"` } // Validate validates this disaster recovery location func (m *DisasterRecoveryLocation) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateFailBackSites(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFailOverSites(formats); err != nil { + if err := m.validateReplicationSites(formats); err != nil { res = append(res, err) } @@ -46,33 +39,16 @@ func (m *DisasterRecoveryLocation) Validate(formats strfmt.Registry) error { return nil } -func (m *DisasterRecoveryLocation) validateFailBackSites(formats strfmt.Registry) error { - if swag.IsZero(m.FailBackSites) { // not required +func (m *DisasterRecoveryLocation) validateReplicationSites(formats strfmt.Registry) error { + if swag.IsZero(m.ReplicationSites) { // not required return nil } - if err := m.FailBackSites.Validate(formats); err != nil { + if err := m.ReplicationSites.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failBackSites") + return ve.ValidateName("replicationSites") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failBackSites") - } - return err - } - - return nil -} - -func (m *DisasterRecoveryLocation) validateFailOverSites(formats strfmt.Registry) error { - if swag.IsZero(m.FailOverSites) { // not required - return nil - } - - if err := m.FailOverSites.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failOverSites") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failOverSites") + return ce.ValidateName("replicationSites") } return err } @@ -84,11 +60,7 @@ func (m *DisasterRecoveryLocation) validateFailOverSites(formats strfmt.Registry func (m *DisasterRecoveryLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateFailBackSites(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFailOverSites(ctx, formats); err != nil { + if err := m.contextValidateReplicationSites(ctx, formats); err != nil { res = append(res, err) } @@ -98,27 +70,13 @@ func (m *DisasterRecoveryLocation) ContextValidate(ctx context.Context, formats return nil } -func (m *DisasterRecoveryLocation) contextValidateFailBackSites(ctx context.Context, formats strfmt.Registry) error { - - if err := m.FailBackSites.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failBackSites") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failBackSites") - } - return err - } - - return nil -} - -func (m *DisasterRecoveryLocation) contextValidateFailOverSites(ctx context.Context, formats strfmt.Registry) error { +func (m *DisasterRecoveryLocation) contextValidateReplicationSites(ctx context.Context, formats strfmt.Registry) error { - if err := m.FailOverSites.ContextValidate(ctx, formats); err != nil { + if err := m.ReplicationSites.ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("failOverSites") + return ve.ValidateName("replicationSites") } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("failOverSites") + return ce.ValidateName("replicationSites") } return err } diff --git a/power/models/disaster_recovery_locations.go b/power/models/disaster_recovery_locations.go index f1f4910a..31d522ca 100644 --- a/power/models/disaster_recovery_locations.go +++ b/power/models/disaster_recovery_locations.go @@ -22,14 +22,14 @@ type DisasterRecoveryLocations struct { // The list of Disaster Recovery Locations // Required: true - DisasterRecoryLocations []*DisasterRecoveryLocation `json:"disasterRecoryLocations"` + DisasterRecoveryLocations []*DisasterRecoveryLocation `json:"disasterRecoveryLocations"` } // Validate validates this disaster recovery locations func (m *DisasterRecoveryLocations) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateDisasterRecoryLocations(formats); err != nil { + if err := m.validateDisasterRecoveryLocations(formats); err != nil { res = append(res, err) } @@ -39,23 +39,23 @@ func (m *DisasterRecoveryLocations) Validate(formats strfmt.Registry) error { return nil } -func (m *DisasterRecoveryLocations) validateDisasterRecoryLocations(formats strfmt.Registry) error { +func (m *DisasterRecoveryLocations) validateDisasterRecoveryLocations(formats strfmt.Registry) error { - if err := validate.Required("disasterRecoryLocations", "body", m.DisasterRecoryLocations); err != nil { + if err := validate.Required("disasterRecoveryLocations", "body", m.DisasterRecoveryLocations); err != nil { return err } - for i := 0; i < len(m.DisasterRecoryLocations); i++ { - if swag.IsZero(m.DisasterRecoryLocations[i]) { // not required + for i := 0; i < len(m.DisasterRecoveryLocations); i++ { + if swag.IsZero(m.DisasterRecoveryLocations[i]) { // not required continue } - if m.DisasterRecoryLocations[i] != nil { - if err := m.DisasterRecoryLocations[i].Validate(formats); err != nil { + if m.DisasterRecoveryLocations[i] != nil { + if err := m.DisasterRecoveryLocations[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disasterRecoryLocations" + "." + strconv.Itoa(i)) + return ve.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disasterRecoryLocations" + "." + strconv.Itoa(i)) + return ce.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) } return err } @@ -70,7 +70,7 @@ func (m *DisasterRecoveryLocations) validateDisasterRecoryLocations(formats strf func (m *DisasterRecoveryLocations) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error - if err := m.contextValidateDisasterRecoryLocations(ctx, formats); err != nil { + if err := m.contextValidateDisasterRecoveryLocations(ctx, formats); err != nil { res = append(res, err) } @@ -80,16 +80,16 @@ func (m *DisasterRecoveryLocations) ContextValidate(ctx context.Context, formats return nil } -func (m *DisasterRecoveryLocations) contextValidateDisasterRecoryLocations(ctx context.Context, formats strfmt.Registry) error { +func (m *DisasterRecoveryLocations) contextValidateDisasterRecoveryLocations(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(m.DisasterRecoryLocations); i++ { + for i := 0; i < len(m.DisasterRecoveryLocations); i++ { - if m.DisasterRecoryLocations[i] != nil { - if err := m.DisasterRecoryLocations[i].ContextValidate(ctx, formats); err != nil { + if m.DisasterRecoveryLocations[i] != nil { + if err := m.DisasterRecoveryLocations[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("disasterRecoryLocations" + "." + strconv.Itoa(i)) + return ve.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("disasterRecoryLocations" + "." + strconv.Itoa(i)) + return ce.ValidateName("disasterRecoveryLocations" + "." + strconv.Itoa(i)) } return err } diff --git a/power/models/fail_over_sites.go b/power/models/fail_over_sites.go deleted file mode 100644 index e6191488..00000000 --- a/power/models/fail_over_sites.go +++ /dev/null @@ -1,73 +0,0 @@ -// 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" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// FailOverSites list of failOver Sites -// -// swagger:model FailOverSites -type FailOverSites []*Site - -// Validate validates this fail over sites -func (m FailOverSites) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validate this fail over sites based on the context it is used -func (m FailOverSites) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/power/models/fail_back_sites.go b/power/models/replication_sites.go similarity index 75% rename from power/models/fail_back_sites.go rename to power/models/replication_sites.go index 430fa3cf..04130f12 100644 --- a/power/models/fail_back_sites.go +++ b/power/models/replication_sites.go @@ -14,13 +14,13 @@ import ( "github.com/go-openapi/swag" ) -// FailBackSites list of failBack Sites +// ReplicationSites list of Replication Sites // -// swagger:model FailBackSites -type FailBackSites []*Site +// swagger:model ReplicationSites +type ReplicationSites []*Site -// Validate validates this fail back sites -func (m FailBackSites) Validate(formats strfmt.Registry) error { +// Validate validates this replication sites +func (m ReplicationSites) Validate(formats strfmt.Registry) error { var res []error for i := 0; i < len(m); i++ { @@ -47,8 +47,8 @@ func (m FailBackSites) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validate this fail back sites based on the context it is used -func (m FailBackSites) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this replication sites based on the context it is used +func (m ReplicationSites) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error for i := 0; i < len(m); i++ { diff --git a/power/models/transit_gateway_instance.go b/power/models/transit_gateway_instance.go index 43fac2a7..60bc6a41 100644 --- a/power/models/transit_gateway_instance.go +++ b/power/models/transit_gateway_instance.go @@ -21,48 +21,29 @@ type TransitGatewayInstance struct { // IBM Resource Group ID associated with the PowerVS Service Instance // Example: 2bf1887bf5c947b1966de2bd88220489 - // Required: true - ResourceGroupID *string `json:"resourceGroupId"` + ResourceGroupID string `json:"resourceGroupId,omitempty"` // The route distinguisher for a network // Example: 47902:3255120092 - // Required: true - RouteDistinguisher *string `json:"routeDistinguisher"` + RouteDistinguisher string `json:"routeDistinguisher,omitempty"` // The route target for a network // Example: 47902:3255120092 - // Required: true - RouteTarget *string `json:"routeTarget"` + RouteTarget string `json:"routeTarget,omitempty"` // The PowerVS Service Instance CRN // Example: crn:v1:bluemix:public:power-iaas:dal12:a/2bc3df23c0d14ebe921397bd8aa2573a:3a5798f1-4d2b-4e0a-9311-9b0fd6b94698:: - // Required: true - ServiceCrn *string `json:"serviceCrn"` + ServiceCrn string `json:"serviceCrn,omitempty"` // transit connection error - TransitConnectionError *TransitConnectionError `json:"transitConnectionError,omitempty"` + // Required: true + TransitConnectionError *TransitConnectionError `json:"transitConnectionError"` } // Validate validates this transit gateway instance func (m *TransitGatewayInstance) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateResourceGroupID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRouteDistinguisher(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRouteTarget(formats); err != nil { - res = append(res, err) - } - - if err := m.validateServiceCrn(formats); err != nil { - res = append(res, err) - } - if err := m.validateTransitConnectionError(formats); err != nil { res = append(res, err) } @@ -73,47 +54,12 @@ func (m *TransitGatewayInstance) Validate(formats strfmt.Registry) error { return nil } -func (m *TransitGatewayInstance) validateResourceGroupID(formats strfmt.Registry) error { - - if err := validate.Required("resourceGroupId", "body", m.ResourceGroupID); err != nil { - return err - } - - return nil -} - -func (m *TransitGatewayInstance) validateRouteDistinguisher(formats strfmt.Registry) error { - - if err := validate.Required("routeDistinguisher", "body", m.RouteDistinguisher); err != nil { - return err - } - - return nil -} - -func (m *TransitGatewayInstance) validateRouteTarget(formats strfmt.Registry) error { - - if err := validate.Required("routeTarget", "body", m.RouteTarget); err != nil { - return err - } - - return nil -} - -func (m *TransitGatewayInstance) validateServiceCrn(formats strfmt.Registry) error { +func (m *TransitGatewayInstance) validateTransitConnectionError(formats strfmt.Registry) error { - if err := validate.Required("serviceCrn", "body", m.ServiceCrn); err != nil { + if err := validate.Required("transitConnectionError", "body", m.TransitConnectionError); err != nil { return err } - return nil -} - -func (m *TransitGatewayInstance) validateTransitConnectionError(formats strfmt.Registry) error { - if swag.IsZero(m.TransitConnectionError) { // not required - return nil - } - if m.TransitConnectionError != nil { if err := m.TransitConnectionError.Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok {