From f83a39d38388ff650f27fbb0c126423aeb106cb3 Mon Sep 17 00:00:00 2001 From: powervs-ibm <137309855+powervs-ibm@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:25:54 -0600 Subject: [PATCH] Generated Swagger client from service-broker commit f712c352b9437123744b0e6f1ae7b32ab2d53ac8 (#316) --- .../pcloud_v2_volumes_delete_responses.go | 8 ++++--- power/models/volumes_delete_response.go | 23 +------------------ 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go index d9d8a870..927d2514 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_delete_responses.go @@ -87,7 +87,7 @@ PcloudV2VolumesDeleteAccepted describes a response with status code 202, with de Accepted */ type PcloudV2VolumesDeleteAccepted struct { - Payload models.Object + Payload *models.VolumesDeleteResponse } // IsSuccess returns true when this pcloud v2 volumes delete accepted response has a 2xx status code @@ -128,14 +128,16 @@ func (o *PcloudV2VolumesDeleteAccepted) String() string { return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesDeleteAccepted %+v", 202, o.Payload) } -func (o *PcloudV2VolumesDeleteAccepted) GetPayload() models.Object { +func (o *PcloudV2VolumesDeleteAccepted) GetPayload() *models.VolumesDeleteResponse { return o.Payload } func (o *PcloudV2VolumesDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(models.VolumesDeleteResponse) + // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } diff --git a/power/models/volumes_delete_response.go b/power/models/volumes_delete_response.go index 99b9a418..0d20ec18 100644 --- a/power/models/volumes_delete_response.go +++ b/power/models/volumes_delete_response.go @@ -8,10 +8,8 @@ package models import ( "context" - "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // VolumesDeleteResponse volumes delete response @@ -20,30 +18,11 @@ import ( type VolumesDeleteResponse struct { // status summary for volumes deletion request - // Required: true - Summary *string `json:"summary"` + Summary string `json:"summary,omitempty"` } // Validate validates this volumes delete response func (m *VolumesDeleteResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSummary(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *VolumesDeleteResponse) validateSummary(formats strfmt.Registry) error { - - if err := validate.Required("summary", "body", m.Summary); err != nil { - return err - } - return nil }