From f0a411f1dcc2dbdfabcbc8ff4a3c834a71f0fe3e Mon Sep 17 00:00:00 2001 From: Bhagyashri Gaikwad1 Date: Tue, 9 Aug 2022 20:03:43 +0530 Subject: [PATCH] Update Service-Broker to v1.100.0 --- ...rnal_v1_powervs_instances_get_responses.go | 8 +- ..._locations_transitgateway_get_responses.go | 8 +- ...instances_volumes_action_post_responses.go | 38 +++++++ ...d_cloudinstances_volumes_post_responses.go | 38 +++++++ .../pcloud_v2_volumes_clone_post_responses.go | 38 +++++++ .../pcloud_v2_volumes_post_responses.go | 38 +++++++ ...d_v2_volumesclone_cancel_post_responses.go | 38 +++++++ ...pcloud_v2_volumesclone_delete_responses.go | 38 +++++++ ..._v2_volumesclone_execute_post_responses.go | 38 +++++++ ...ud_v2_volumesclone_start_post_responses.go | 38 +++++++ .../pcloud_volumes_clone_post_responses.go | 38 +++++++ power/models/p_vm_instance.go | 3 + power/models/power_v_s_instance.go | 106 ++++++++++++++++-- power/models/power_v_s_instances.go | 84 ++++++++++---- power/models/shared_processor_pool.go | 65 ++++++++++- .../shared_processor_pool_placement_group.go | 105 +++++++++++++++++ power/models/transit_gateway_instance.go | 4 + power/models/transit_gateway_locations.go | 84 ++++++++++---- 18 files changed, 756 insertions(+), 53 deletions(-) create mode 100644 power/models/shared_processor_pool_placement_group.go diff --git a/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go b/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go index 430c7ef0..e8d4224a 100644 --- a/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go +++ b/power/client/internal_power_v_s_instances/internal_v1_powervs_instances_get_responses.go @@ -56,20 +56,22 @@ func NewInternalV1PowervsInstancesGetOK() *InternalV1PowervsInstancesGetOK { OK */ type InternalV1PowervsInstancesGetOK struct { - Payload models.PowerVSInstances + Payload *models.PowerVSInstances } func (o *InternalV1PowervsInstancesGetOK) Error() string { return fmt.Sprintf("[GET /internal/v1/powervs/instances][%d] internalV1PowervsInstancesGetOK %+v", 200, o.Payload) } -func (o *InternalV1PowervsInstancesGetOK) GetPayload() models.PowerVSInstances { +func (o *InternalV1PowervsInstancesGetOK) GetPayload() *models.PowerVSInstances { return o.Payload } func (o *InternalV1PowervsInstancesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(models.PowerVSInstances) + // 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/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go index fb888aa1..e55ecdb2 100644 --- a/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go +++ b/power/client/internal_power_v_s_locations/internal_v1_powervs_locations_transitgateway_get_responses.go @@ -56,20 +56,22 @@ func NewInternalV1PowervsLocationsTransitgatewayGetOK() *InternalV1PowervsLocati OK */ type InternalV1PowervsLocationsTransitgatewayGetOK struct { - Payload models.TransitGatewayLocations + Payload *models.TransitGatewayLocations } func (o *InternalV1PowervsLocationsTransitgatewayGetOK) Error() string { return fmt.Sprintf("[GET /internal/v1/powervs/locations/transit-gateway][%d] internalV1PowervsLocationsTransitgatewayGetOK %+v", 200, o.Payload) } -func (o *InternalV1PowervsLocationsTransitgatewayGetOK) GetPayload() models.TransitGatewayLocations { +func (o *InternalV1PowervsLocationsTransitgatewayGetOK) GetPayload() *models.TransitGatewayLocations { return o.Payload } func (o *InternalV1PowervsLocationsTransitgatewayGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(models.TransitGatewayLocations) + // 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/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go index 11e70e85..89a7e126 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_action_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesVolumesActionPostReader) ReadResponse(response runt return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesVolumesActionPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudCloudinstancesVolumesActionPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -158,6 +164,38 @@ func (o *PcloudCloudinstancesVolumesActionPostUnauthorized) readResponse(respons return nil } +// NewPcloudCloudinstancesVolumesActionPostForbidden creates a PcloudCloudinstancesVolumesActionPostForbidden with default headers values +func NewPcloudCloudinstancesVolumesActionPostForbidden() *PcloudCloudinstancesVolumesActionPostForbidden { + return &PcloudCloudinstancesVolumesActionPostForbidden{} +} + +/* PcloudCloudinstancesVolumesActionPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesVolumesActionPostForbidden struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesVolumesActionPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/{volume_id}/action][%d] pcloudCloudinstancesVolumesActionPostForbidden %+v", 403, o.Payload) +} +func (o *PcloudCloudinstancesVolumesActionPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesVolumesActionPostForbidden) 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 +} + // NewPcloudCloudinstancesVolumesActionPostNotFound creates a PcloudCloudinstancesVolumesActionPostNotFound with default headers values func NewPcloudCloudinstancesVolumesActionPostNotFound() *PcloudCloudinstancesVolumesActionPostNotFound { return &PcloudCloudinstancesVolumesActionPostNotFound{} diff --git a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go index 258e913a..a8596908 100644 --- a/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_cloudinstances_volumes_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudCloudinstancesVolumesPostReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 403: + result := NewPcloudCloudinstancesVolumesPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudCloudinstancesVolumesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -160,6 +166,38 @@ func (o *PcloudCloudinstancesVolumesPostUnauthorized) readResponse(response runt return nil } +// NewPcloudCloudinstancesVolumesPostForbidden creates a PcloudCloudinstancesVolumesPostForbidden with default headers values +func NewPcloudCloudinstancesVolumesPostForbidden() *PcloudCloudinstancesVolumesPostForbidden { + return &PcloudCloudinstancesVolumesPostForbidden{} +} + +/* PcloudCloudinstancesVolumesPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudCloudinstancesVolumesPostForbidden struct { + Payload *models.Error +} + +func (o *PcloudCloudinstancesVolumesPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudCloudinstancesVolumesPostForbidden %+v", 403, o.Payload) +} +func (o *PcloudCloudinstancesVolumesPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudCloudinstancesVolumesPostForbidden) 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 +} + // NewPcloudCloudinstancesVolumesPostConflict creates a PcloudCloudinstancesVolumesPostConflict with default headers values func NewPcloudCloudinstancesVolumesPostConflict() *PcloudCloudinstancesVolumesPostConflict { return &PcloudCloudinstancesVolumesPostConflict{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go index 17b686b2..b505cb9b 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_clone_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2VolumesClonePostReader) ReadResponse(response runtime.ClientRes return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumesClonePostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2VolumesClonePostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -154,6 +160,38 @@ func (o *PcloudV2VolumesClonePostUnauthorized) readResponse(response runtime.Cli return nil } +// NewPcloudV2VolumesClonePostForbidden creates a PcloudV2VolumesClonePostForbidden with default headers values +func NewPcloudV2VolumesClonePostForbidden() *PcloudV2VolumesClonePostForbidden { + return &PcloudV2VolumesClonePostForbidden{} +} + +/* PcloudV2VolumesClonePostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumesClonePostForbidden struct { + Payload *models.Error +} + +func (o *PcloudV2VolumesClonePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudV2VolumesClonePostForbidden %+v", 403, o.Payload) +} +func (o *PcloudV2VolumesClonePostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumesClonePostForbidden) 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 +} + // NewPcloudV2VolumesClonePostNotFound creates a PcloudV2VolumesClonePostNotFound with default headers values func NewPcloudV2VolumesClonePostNotFound() *PcloudV2VolumesClonePostNotFound { return &PcloudV2VolumesClonePostNotFound{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go index 7101f333..f9abc5c3 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumes_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2VolumesPostReader) ReadResponse(response runtime.ClientResponse return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumesPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudV2VolumesPostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -160,6 +166,38 @@ func (o *PcloudV2VolumesPostUnauthorized) readResponse(response runtime.ClientRe return nil } +// NewPcloudV2VolumesPostForbidden creates a PcloudV2VolumesPostForbidden with default headers values +func NewPcloudV2VolumesPostForbidden() *PcloudV2VolumesPostForbidden { + return &PcloudV2VolumesPostForbidden{} +} + +/* PcloudV2VolumesPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumesPostForbidden struct { + Payload *models.Error +} + +func (o *PcloudV2VolumesPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes][%d] pcloudV2VolumesPostForbidden %+v", 403, o.Payload) +} +func (o *PcloudV2VolumesPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumesPostForbidden) 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 +} + // NewPcloudV2VolumesPostConflict creates a PcloudV2VolumesPostConflict with default headers values func NewPcloudV2VolumesPostConflict() *PcloudV2VolumesPostConflict { return &PcloudV2VolumesPostConflict{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go index 3d06fe1b..784ad3b1 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_cancel_post_responses.go @@ -35,6 +35,12 @@ func (o *PcloudV2VolumescloneCancelPostReader) ReadResponse(response runtime.Cli return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumescloneCancelPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2VolumescloneCancelPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +122,38 @@ func (o *PcloudV2VolumescloneCancelPostUnauthorized) readResponse(response runti return nil } +// NewPcloudV2VolumescloneCancelPostForbidden creates a PcloudV2VolumescloneCancelPostForbidden with default headers values +func NewPcloudV2VolumescloneCancelPostForbidden() *PcloudV2VolumescloneCancelPostForbidden { + return &PcloudV2VolumescloneCancelPostForbidden{} +} + +/* PcloudV2VolumescloneCancelPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumescloneCancelPostForbidden struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneCancelPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/cancel][%d] pcloudV2VolumescloneCancelPostForbidden %+v", 403, o.Payload) +} +func (o *PcloudV2VolumescloneCancelPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneCancelPostForbidden) 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 +} + // NewPcloudV2VolumescloneCancelPostNotFound creates a PcloudV2VolumescloneCancelPostNotFound with default headers values func NewPcloudV2VolumescloneCancelPostNotFound() *PcloudV2VolumescloneCancelPostNotFound { return &PcloudV2VolumescloneCancelPostNotFound{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go index 2dc153ac..663e0c9f 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_delete_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2VolumescloneDeleteReader) ReadResponse(response runtime.ClientR return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumescloneDeleteForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2VolumescloneDeleteNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -152,6 +158,38 @@ func (o *PcloudV2VolumescloneDeleteUnauthorized) readResponse(response runtime.C return nil } +// NewPcloudV2VolumescloneDeleteForbidden creates a PcloudV2VolumescloneDeleteForbidden with default headers values +func NewPcloudV2VolumescloneDeleteForbidden() *PcloudV2VolumescloneDeleteForbidden { + return &PcloudV2VolumescloneDeleteForbidden{} +} + +/* PcloudV2VolumescloneDeleteForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumescloneDeleteForbidden struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneDeleteForbidden) Error() string { + return fmt.Sprintf("[DELETE /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}][%d] pcloudV2VolumescloneDeleteForbidden %+v", 403, o.Payload) +} +func (o *PcloudV2VolumescloneDeleteForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneDeleteForbidden) 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 +} + // NewPcloudV2VolumescloneDeleteNotFound creates a PcloudV2VolumescloneDeleteNotFound with default headers values func NewPcloudV2VolumescloneDeleteNotFound() *PcloudV2VolumescloneDeleteNotFound { return &PcloudV2VolumescloneDeleteNotFound{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go index 4523d858..064daf76 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_execute_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudV2VolumescloneExecutePostReader) ReadResponse(response runtime.Cl return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumescloneExecutePostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2VolumescloneExecutePostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -154,6 +160,38 @@ func (o *PcloudV2VolumescloneExecutePostUnauthorized) readResponse(response runt return nil } +// NewPcloudV2VolumescloneExecutePostForbidden creates a PcloudV2VolumescloneExecutePostForbidden with default headers values +func NewPcloudV2VolumescloneExecutePostForbidden() *PcloudV2VolumescloneExecutePostForbidden { + return &PcloudV2VolumescloneExecutePostForbidden{} +} + +/* PcloudV2VolumescloneExecutePostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumescloneExecutePostForbidden struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneExecutePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/execute][%d] pcloudV2VolumescloneExecutePostForbidden %+v", 403, o.Payload) +} +func (o *PcloudV2VolumescloneExecutePostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneExecutePostForbidden) 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 +} + // NewPcloudV2VolumescloneExecutePostNotFound creates a PcloudV2VolumescloneExecutePostNotFound with default headers values func NewPcloudV2VolumescloneExecutePostNotFound() *PcloudV2VolumescloneExecutePostNotFound { return &PcloudV2VolumescloneExecutePostNotFound{} diff --git a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go index a144d63d..22fa2bf7 100644 --- a/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_v2_volumesclone_start_post_responses.go @@ -35,6 +35,12 @@ func (o *PcloudV2VolumescloneStartPostReader) ReadResponse(response runtime.Clie return nil, err } return nil, result + case 403: + result := NewPcloudV2VolumescloneStartPostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 404: result := NewPcloudV2VolumescloneStartPostNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -116,6 +122,38 @@ func (o *PcloudV2VolumescloneStartPostUnauthorized) readResponse(response runtim return nil } +// NewPcloudV2VolumescloneStartPostForbidden creates a PcloudV2VolumescloneStartPostForbidden with default headers values +func NewPcloudV2VolumescloneStartPostForbidden() *PcloudV2VolumescloneStartPostForbidden { + return &PcloudV2VolumescloneStartPostForbidden{} +} + +/* PcloudV2VolumescloneStartPostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudV2VolumescloneStartPostForbidden struct { + Payload *models.Error +} + +func (o *PcloudV2VolumescloneStartPostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v2/cloud-instances/{cloud_instance_id}/volumes-clone/{volumes_clone_id}/start][%d] pcloudV2VolumescloneStartPostForbidden %+v", 403, o.Payload) +} +func (o *PcloudV2VolumescloneStartPostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudV2VolumescloneStartPostForbidden) 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 +} + // NewPcloudV2VolumescloneStartPostNotFound creates a PcloudV2VolumescloneStartPostNotFound with default headers values func NewPcloudV2VolumescloneStartPostNotFound() *PcloudV2VolumescloneStartPostNotFound { return &PcloudV2VolumescloneStartPostNotFound{} diff --git a/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go b/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go index 5c13855d..0c26160d 100644 --- a/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go +++ b/power/client/p_cloud_volumes/pcloud_volumes_clone_post_responses.go @@ -41,6 +41,12 @@ func (o *PcloudVolumesClonePostReader) ReadResponse(response runtime.ClientRespo return nil, err } return nil, result + case 403: + result := NewPcloudVolumesClonePostForbidden() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result case 409: result := NewPcloudVolumesClonePostConflict() if err := result.readResponse(response, consumer, o.formats); err != nil { @@ -154,6 +160,38 @@ func (o *PcloudVolumesClonePostUnauthorized) readResponse(response runtime.Clien return nil } +// NewPcloudVolumesClonePostForbidden creates a PcloudVolumesClonePostForbidden with default headers values +func NewPcloudVolumesClonePostForbidden() *PcloudVolumesClonePostForbidden { + return &PcloudVolumesClonePostForbidden{} +} + +/* PcloudVolumesClonePostForbidden describes a response with status code 403, with default header values. + +Forbidden +*/ +type PcloudVolumesClonePostForbidden struct { + Payload *models.Error +} + +func (o *PcloudVolumesClonePostForbidden) Error() string { + return fmt.Sprintf("[POST /pcloud/v1/cloud-instances/{cloud_instance_id}/volumes/clone][%d] pcloudVolumesClonePostForbidden %+v", 403, o.Payload) +} +func (o *PcloudVolumesClonePostForbidden) GetPayload() *models.Error { + return o.Payload +} + +func (o *PcloudVolumesClonePostForbidden) 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 +} + // NewPcloudVolumesClonePostConflict creates a PcloudVolumesClonePostConflict with default headers values func NewPcloudVolumesClonePostConflict() *PcloudVolumesClonePostConflict { return &PcloudVolumesClonePostConflict{} diff --git a/power/models/p_vm_instance.go b/power/models/p_vm_instance.go index 6755f801..19f52b67 100644 --- a/power/models/p_vm_instance.go +++ b/power/models/p_vm_instance.go @@ -31,6 +31,9 @@ type PVMInstance struct { // Format: date-time CreationDate strfmt.DateTime `json:"creationDate,omitempty"` + // Custom Deployment Type Information (For Internal Use Only) + DeploymentType string `json:"deploymentType,omitempty"` + // Size of allocated disk (in GB) // Required: true DiskSize *float64 `json:"diskSize"` diff --git a/power/models/power_v_s_instance.go b/power/models/power_v_s_instance.go index 2ecfe4d9..c8c86175 100644 --- a/power/models/power_v_s_instance.go +++ b/power/models/power_v_s_instance.go @@ -20,11 +20,13 @@ import ( type PowerVSInstance struct { // capabilities - Capabilities InstanceCapabilities `json:"capabilities,omitempty"` + // Required: true + Capabilities InstanceCapabilities `json:"capabilities"` // The timestamp in which the PowerVS service instance was created // Example: 2022-04-04T16:20:15.581636275Z - CreationDate string `json:"creationDate,omitempty"` + // Required: true + CreationDate *string `json:"creationDate"` // The PowerVS Service Instance CRN // Example: crn:v1:bluemix:public:power-iaas:dal12:a/2bc3df23c0d14ebe921397bd8aa2573a:3a5798f1-4d2b-4e0a-9311-9b0fd6b94698:: @@ -33,7 +35,13 @@ type PowerVSInstance struct { // The PowerVS IBM Cloud URL path for UI (Tentative, still need verification that this is possible) // Example: https://cloud.ibm.com/services/power-iaas/crn%3Av1%3Abluemix%3Apublic%3Apower-iaas%3Adal12%3Aa%2F2bc3df23c0d14ebe921397bd8aa2573a%3A5de8348d-bc6a-466e-854f-661d1e86b230%3A%3A - Href string `json:"href,omitempty"` + // Required: true + Href *string `json:"href"` + + // The PowerVS Service Instance ID + // Example: 3a5798f1-4d2b-4e0a-9311-9b0fd6b94698 + // Required: true + ID *string `json:"id"` // Location of the PowerVS Instance // Example: dal12 @@ -47,11 +55,13 @@ type PowerVSInstance struct { // The name of the service instance (This field will be empty for old accounts as PowerVS did not previously saved the names) // Example: Test Name - Name string `json:"name,omitempty"` + // Required: true + Name *string `json:"name"` // Defines if the user has administrator privileges // Example: true - PrivilegedUser bool `json:"privilegedUser,omitempty"` + // Required: true + PrivilegedUser *bool `json:"privilegedUser"` // IBM Resource Group ID associated with the PowerVS Service Instance (This field will be empty for old accounts as PowerVS did not previously saved the Resource Group ID) // Example: 2bf1887bf5c947b1966de2bd88220489 @@ -59,7 +69,8 @@ type PowerVSInstance struct { // The status of the service instance (PowerVS behavior, if Service Instance exists then then status is active) // Example: Active - Status string `json:"status,omitempty"` + // Required: true + Status *string `json:"status"` } // Validate validates this power v s instance @@ -70,10 +81,22 @@ func (m *PowerVSInstance) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateCreationDate(formats); err != nil { + res = append(res, err) + } + if err := m.validateCrn(formats); err != nil { res = append(res, err) } + if err := m.validateHref(formats); err != nil { + res = append(res, err) + } + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + if err := m.validateLocation(formats); err != nil { res = append(res, err) } @@ -82,6 +105,18 @@ func (m *PowerVSInstance) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePrivilegedUser(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -89,8 +124,9 @@ func (m *PowerVSInstance) Validate(formats strfmt.Registry) error { } func (m *PowerVSInstance) validateCapabilities(formats strfmt.Registry) error { - if swag.IsZero(m.Capabilities) { // not required - return nil + + if err := validate.Required("capabilities", "body", m.Capabilities); err != nil { + return err } if m.Capabilities != nil { @@ -107,6 +143,15 @@ func (m *PowerVSInstance) validateCapabilities(formats strfmt.Registry) error { return nil } +func (m *PowerVSInstance) validateCreationDate(formats strfmt.Registry) error { + + if err := validate.Required("creationDate", "body", m.CreationDate); err != nil { + return err + } + + return nil +} + func (m *PowerVSInstance) validateCrn(formats strfmt.Registry) error { if err := validate.Required("crn", "body", m.Crn); err != nil { @@ -116,6 +161,24 @@ func (m *PowerVSInstance) validateCrn(formats strfmt.Registry) error { return nil } +func (m *PowerVSInstance) validateHref(formats strfmt.Registry) error { + + if err := validate.Required("href", "body", m.Href); err != nil { + return err + } + + return nil +} + +func (m *PowerVSInstance) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + func (m *PowerVSInstance) validateLocation(formats strfmt.Registry) error { if err := validate.Required("location", "body", m.Location); err != nil { @@ -134,6 +197,33 @@ func (m *PowerVSInstance) validateLocationURL(formats strfmt.Registry) error { return nil } +func (m *PowerVSInstance) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *PowerVSInstance) validatePrivilegedUser(formats strfmt.Registry) error { + + if err := validate.Required("privilegedUser", "body", m.PrivilegedUser); err != nil { + return err + } + + return nil +} + +func (m *PowerVSInstance) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + // ContextValidate validate this power v s instance based on the context it is used func (m *PowerVSInstance) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/power/models/power_v_s_instances.go b/power/models/power_v_s_instances.go index 783d2de9..4ccd656d 100644 --- a/power/models/power_v_s_instances.go +++ b/power/models/power_v_s_instances.go @@ -12,28 +12,50 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) -// PowerVSInstances PowerVS Instance for a specific IBM Cloud Account +// PowerVSInstances The List of PowerVS Instances for a specific IBM Cloud Account // // swagger:model PowerVSInstances -type PowerVSInstances []*PowerVSInstance +type PowerVSInstances struct { + + // power vs instances + // Required: true + PowerVsInstances []*PowerVSInstance `json:"powerVsInstances"` +} // Validate validates this power v s instances -func (m PowerVSInstances) Validate(formats strfmt.Registry) error { +func (m *PowerVSInstances) Validate(formats strfmt.Registry) error { var res []error - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required + if err := m.validatePowerVsInstances(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PowerVSInstances) validatePowerVsInstances(formats strfmt.Registry) error { + + if err := validate.Required("powerVsInstances", "body", m.PowerVsInstances); err != nil { + return err + } + + for i := 0; i < len(m.PowerVsInstances); i++ { + if swag.IsZero(m.PowerVsInstances[i]) { // not required continue } - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { + if m.PowerVsInstances[i] != nil { + if err := m.PowerVsInstances[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) + return ve.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) + return ce.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) } return err } @@ -41,24 +63,33 @@ func (m PowerVSInstances) Validate(formats strfmt.Registry) error { } + return nil +} + +// ContextValidate validate this power v s instances based on the context it is used +func (m *PowerVSInstances) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidatePowerVsInstances(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } -// ContextValidate validate this power v s instances based on the context it is used -func (m PowerVSInstances) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error +func (m *PowerVSInstances) contextValidatePowerVsInstances(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(m); i++ { + for i := 0; i < len(m.PowerVsInstances); i++ { - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { + if m.PowerVsInstances[i] != nil { + if err := m.PowerVsInstances[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) + return ve.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) + return ce.ValidateName("powerVsInstances" + "." + strconv.Itoa(i)) } return err } @@ -66,8 +97,23 @@ func (m PowerVSInstances) ContextValidate(ctx context.Context, formats strfmt.Re } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + return nil +} + +// MarshalBinary interface implementation +func (m *PowerVSInstances) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PowerVSInstances) UnmarshalBinary(b []byte) error { + var res PowerVSInstances + if err := swag.ReadJSON(b, &res); err != nil { + return err } + *m = res return nil } diff --git a/power/models/shared_processor_pool.go b/power/models/shared_processor_pool.go index a9583722..85f262bb 100644 --- a/power/models/shared_processor_pool.go +++ b/power/models/shared_processor_pool.go @@ -7,6 +7,7 @@ package models import ( "context" + "strconv" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" @@ -45,6 +46,9 @@ type SharedProcessorPool struct { // Required: true ReservedCores *int64 `json:"reservedCores"` + // list of Shared Processor Pool Placement Groups + SharedProcessorPoolPlacementGroups []*SharedProcessorPoolPlacementGroup `json:"sharedProcessorPoolPlacementGroups"` + // The status of the Shared Processor Pool Status string `json:"status,omitempty"` @@ -76,6 +80,10 @@ func (m *SharedProcessorPool) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSharedProcessorPoolPlacementGroups(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -127,8 +135,63 @@ func (m *SharedProcessorPool) validateReservedCores(formats strfmt.Registry) err return nil } -// ContextValidate validates this shared processor pool based on context it is used +func (m *SharedProcessorPool) validateSharedProcessorPoolPlacementGroups(formats strfmt.Registry) error { + if swag.IsZero(m.SharedProcessorPoolPlacementGroups) { // not required + return nil + } + + for i := 0; i < len(m.SharedProcessorPoolPlacementGroups); i++ { + if swag.IsZero(m.SharedProcessorPoolPlacementGroups[i]) { // not required + continue + } + + if m.SharedProcessorPoolPlacementGroups[i] != nil { + if err := m.SharedProcessorPoolPlacementGroups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sharedProcessorPoolPlacementGroups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sharedProcessorPoolPlacementGroups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this shared processor pool based on the context it is used func (m *SharedProcessorPool) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateSharedProcessorPoolPlacementGroups(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SharedProcessorPool) contextValidateSharedProcessorPoolPlacementGroups(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.SharedProcessorPoolPlacementGroups); i++ { + + if m.SharedProcessorPoolPlacementGroups[i] != nil { + if err := m.SharedProcessorPoolPlacementGroups[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sharedProcessorPoolPlacementGroups" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("sharedProcessorPoolPlacementGroups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + return nil } diff --git a/power/models/shared_processor_pool_placement_group.go b/power/models/shared_processor_pool_placement_group.go new file mode 100644 index 00000000..a8411ac7 --- /dev/null +++ b/power/models/shared_processor_pool_placement_group.go @@ -0,0 +1,105 @@ +// 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" +) + +// SharedProcessorPoolPlacementGroup shared processor pool placement group +// +// swagger:model SharedProcessorPoolPlacementGroup +type SharedProcessorPoolPlacementGroup struct { + + // The id of the Shared Processor Pool Placement Group + // Required: true + ID *string `json:"id"` + + // The name of the Shared Processor Pool Placement Group + // Required: true + Name *string `json:"name"` + + // The Shared Processor Pool Placement Group policy + // Required: true + Policy *string `json:"policy"` +} + +// Validate validates this shared processor pool placement group +func (m *SharedProcessorPoolPlacementGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *SharedProcessorPoolPlacementGroup) validateID(formats strfmt.Registry) error { + + if err := validate.Required("id", "body", m.ID); err != nil { + return err + } + + return nil +} + +func (m *SharedProcessorPoolPlacementGroup) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *SharedProcessorPoolPlacementGroup) validatePolicy(formats strfmt.Registry) error { + + if err := validate.Required("policy", "body", m.Policy); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this shared processor pool placement group based on context it is used +func (m *SharedProcessorPoolPlacementGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SharedProcessorPoolPlacementGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SharedProcessorPoolPlacementGroup) UnmarshalBinary(b []byte) error { + var res SharedProcessorPoolPlacementGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/power/models/transit_gateway_instance.go b/power/models/transit_gateway_instance.go index 60bc6a41..2f1b34f1 100644 --- a/power/models/transit_gateway_instance.go +++ b/power/models/transit_gateway_instance.go @@ -35,6 +35,10 @@ type TransitGatewayInstance struct { // Example: crn:v1:bluemix:public:power-iaas:dal12:a/2bc3df23c0d14ebe921397bd8aa2573a:3a5798f1-4d2b-4e0a-9311-9b0fd6b94698:: ServiceCrn string `json:"serviceCrn,omitempty"` + // The PowerVS Service Instance ID + // Example: 3a5798f1-4d2b-4e0a-9311-9b0fd6b94698 + ServiceID string `json:"serviceId,omitempty"` + // transit connection error // Required: true TransitConnectionError *TransitConnectionError `json:"transitConnectionError"` diff --git a/power/models/transit_gateway_locations.go b/power/models/transit_gateway_locations.go index 02d7862a..9e734b0b 100644 --- a/power/models/transit_gateway_locations.go +++ b/power/models/transit_gateway_locations.go @@ -12,28 +12,50 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) -// TransitGatewayLocations The List of PER enabled PowerVS Service Locations +// TransitGatewayLocations transit gateway locations // // swagger:model TransitGatewayLocations -type TransitGatewayLocations []*TransitGatewayLocation +type TransitGatewayLocations struct { + + // The List of PER enabled PowerVS Service Locations + // Required: true + TransitGatewayLocations []*TransitGatewayLocation `json:"transitGatewayLocations"` +} // Validate validates this transit gateway locations -func (m TransitGatewayLocations) Validate(formats strfmt.Registry) error { +func (m *TransitGatewayLocations) Validate(formats strfmt.Registry) error { var res []error - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required + if err := m.validateTransitGatewayLocations(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TransitGatewayLocations) validateTransitGatewayLocations(formats strfmt.Registry) error { + + if err := validate.Required("transitGatewayLocations", "body", m.TransitGatewayLocations); err != nil { + return err + } + + for i := 0; i < len(m.TransitGatewayLocations); i++ { + if swag.IsZero(m.TransitGatewayLocations[i]) { // not required continue } - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { + if m.TransitGatewayLocations[i] != nil { + if err := m.TransitGatewayLocations[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) + return ve.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) + return ce.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) } return err } @@ -41,24 +63,33 @@ func (m TransitGatewayLocations) Validate(formats strfmt.Registry) error { } + return nil +} + +// ContextValidate validate this transit gateway locations based on the context it is used +func (m *TransitGatewayLocations) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTransitGatewayLocations(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } -// ContextValidate validate this transit gateway locations based on the context it is used -func (m TransitGatewayLocations) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error +func (m *TransitGatewayLocations) contextValidateTransitGatewayLocations(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(m); i++ { + for i := 0; i < len(m.TransitGatewayLocations); i++ { - if m[i] != nil { - if err := m[i].ContextValidate(ctx, formats); err != nil { + if m.TransitGatewayLocations[i] != nil { + if err := m.TransitGatewayLocations[i].ContextValidate(ctx, formats); err != nil { if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) + return ve.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName(strconv.Itoa(i)) + return ce.ValidateName("transitGatewayLocations" + "." + strconv.Itoa(i)) } return err } @@ -66,8 +97,23 @@ func (m TransitGatewayLocations) ContextValidate(ctx context.Context, formats st } - if len(res) > 0 { - return errors.CompositeValidationError(res...) + return nil +} + +// MarshalBinary interface implementation +func (m *TransitGatewayLocations) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TransitGatewayLocations) UnmarshalBinary(b []byte) error { + var res TransitGatewayLocations + if err := swag.ReadJSON(b, &res); err != nil { + return err } + *m = res return nil }